Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-01-07 13:40:36 +01:00
commit 7cbc1c98fc
19 changed files with 247 additions and 324 deletions

View file

@ -1,91 +0,0 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/adherents/htpasswd.php
* \ingroup member
* \brief Export page htpasswd of the membership file
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$status = GETPOST('status', 'int');
$cotis = GETPOST('cotis', 'int');
$sortfield = GETPOST('sortfield', 'alphanohtml');
$sortorder = GETPOST('sortorder', 'aZ09');
// Security check
if (!isModEnabled('adherent')) {
accessforbidden();
}
if (!$user->hasRight('adherent', 'export')) {
accessforbidden();
}
/*
* View
*/
llxHeader();
$now = dol_now();
if (empty($sortorder)) {
$sortorder = "ASC";
}
if (empty($sortfield)) {
$sortfield = "d.login";
}
$sql = "SELECT d.login, d.pass, d.datefin";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d ";
$sql .= " WHERE d.statut = ".((int) $status);
if ($cotis == 1) {
$sql .= " AND datefin > '".$db->idate($now)."'";
}
$sql .= $db->order($sortfield, $sortorder);
//$sql.=$db->plimit($conf->liste_limit, $offset);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$param = '';
print_barre_liste($langs->trans("HTPasswordExport"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', 0);
print "<hr>\n";
while ($i < $num) {
$objp = $db->fetch_object($result);
$htpass = crypt($objp->pass, makesalt());
print $objp->login.":".$htpass."<br>\n";
$i++;
}
print "<hr>\n";
} else {
dol_print_error($db);
}
// End of page
llxFooter();
$db->close();

View file

@ -761,7 +761,6 @@ class Form
if (preg_match('/onsmartphone$/', $tooltiptrigger) && empty($conf->dol_no_mouse_hover)) {
$tooltiptrigger = preg_replace('/^.*onsmartphone$/', '', $tooltiptrigger);
}
$alt = '';
if ($tooltiptrigger) {
$alt = $langs->transnoentitiesnoconv("ClickToShowHelp");

View file

@ -468,7 +468,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("adherent")', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=uptodate', 'OutOfDate', 2, 'members', '$user->hasRight("adherent","lire")', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("adherent")', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=0', 'MenuMembersResiliated', 2, 'members', '$user->hasRight("adherent","lire")', '', 2, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("adherent")', __HANDLER__, 'left', 4209__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/stats/geo.php?mainmenu=members&amp;leftmenu=members&amp;mode=memberbycountry', 'MenuMembersStats', 1, 'members', '$user->hasRight("adherent","lire")', '', 2, 7, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && isModEnabled("adherent")', __HANDLER__, 'left', 4502__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/htpasswd.php?mainmenu=members&amp;leftmenu=export', 'Filehtpasswd', 1, 'members', '$user->hasRight("adherent","export")', '', 2, 9, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("adherent")', __HANDLER__, 'left', 4503__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/cartes/carte.php?mainmenu=members&amp;leftmenu=export', 'MembersCards', 1, 'members', '$user->hasRight("adherent","export")', '', 2, 10, __ENTITY__);
-- Members - Subscriptions

View file

@ -2478,9 +2478,6 @@ function get_left_menu_members($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen
$newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export'));
if (getDolGlobalString('MEMBER_LINK_TO_HTPASSWDFILE') && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) {
$newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export'));
}
if (isModEnabled('categorie')) {
$langs->load("categories");

View file

@ -83,7 +83,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.getDolGlobalString('TAKEPOS_REF_UNIVERSAL_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans("Modify").'"></td>';
$texte .= '<td class="left" rowspan="2"><input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans("Modify").'"></td>';
$texte .= '</tr>';

View file

@ -1877,7 +1877,8 @@ CashDeskBankAccountForSell=Default account to use to receive cash payments
CashDeskBankAccountForCheque=Default account to use to receive payments by check
CashDeskBankAccountForCB=Default account to use to receive payments by credit cards
CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp
CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock).
CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale
CashDeskDoNotDecreaseStockHelp=If "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock.
CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease
StockDecreaseForPointOfSaleDisabled=Stock decrease from Point of Sale disabled
StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatible with module Serial/Lot management (currently active) so stock decrease is disabled.

View file

@ -76,7 +76,7 @@ TerminalSelect=Select terminal you want to use:
POSTicket=POS Ticket
POSTerminal=POS Terminal
POSModule=POS Module
BasicPhoneLayout=Use basic layout for phones
BasicPhoneLayout=On phones, replace the POS with a minimal layout (Record orders only, no invoice generation, no receipt printing)
SetupOfTerminalNotComplete=Setup of terminal %s is not complete
DirectPayment=Direct payment
DirectPaymentButton=Add a "Direct cash payment" button
@ -99,7 +99,7 @@ ByTerminal=By terminal
TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad
CashDeskRefNumberingModules=Numbering module for POS sales
CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal number
TakeposGroupSameProduct=Group same products lines
TakeposGroupSameProduct=Merge lines of the same products
StartAParallelSale=Start a new parallel sale
SaleStartedAt=Sale started at %s
ControlCashOpening=Open the "Control cash box" popup when opening the POS
@ -135,14 +135,14 @@ PrintWithoutDetailsLabelDefault=Line label by default on printing without detail
PrintWithoutDetails=Print without details
YearNotDefined=Year is not defined
TakeposBarcodeRuleToInsertProduct=Barcode rule to insert product
TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.<br>If empty (default value), application will use the full barcode scanned to find the product.<br><br>If defined, syntax must be:<br><b>ref:NB+qu:NB+qd:NB+other:NB</b><br>where NB is the number of characters to use to extract data from the scanned barcode with: <ul><li><b>ref</b> : product reference</li><li><b>qu</b> : quantity to set when inserting item (units)<l/i><li><b>qd</b> : quantity to set when inserting item (decimals)</li><li><b>other</b> : others characters</li></ul>
TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.<br>If empty (default value), application will use the full barcode scanned to find the product.<br><br>If defined, syntax must be:<br><b>ref:NB+qu:NB+qd:NB+other:NB</b><br>where NB is the number of characters to use to extract data from the scanned barcode with:<br><b>ref</b> : product reference<br><b>qu</b> : quantity to set when inserting item (units)<br><b>qd</b> : quantity to set when inserting item (decimals)<br><b>other</b> : others characters
AlreadyPrinted=Already printed
HideCategories=Hide the whole section of categories selection
HideStockOnLine=Hide stock on line
ShowOnlyProductInStock=Show the products in stock
ShowCategoryDescription=Show category description
ShowOnlyProductInStock=Show only the products in stock
ShowCategoryDescription=Show categories description
ShowProductReference=Show reference or label of products
UsePriceHT=Use price excl. taxes and not price incl. taxes
UsePriceHT=Use price excl. taxes and not price incl. taxes when modifying a price
TerminalName=Terminal %s
TerminalNameDesc=Terminal name
DefaultPOSThirdLabel=TakePOS generic customer

View file

@ -135,7 +135,7 @@ PrintWithoutDetailsLabelDefault=Libellé de ligne par défaut à l'impression sa
PrintWithoutDetails=Générer sans les détails
YearNotDefined=L'année n'est pas définie
TakeposBarcodeRuleToInsertProduct=Règle de lecture du code barre des produits
TakeposBarcodeRuleToInsertProductDesc=Règle pour extraire la référence produit + une quantité d'un code barre scanné. <br> Si vide (valeur par défaut), l'application utilisera le code-barres complet scanné pour trouver le produit. <br> <br> Si elle est définie, la syntaxe doit être: <br> <b> ref: NB + Qu: NB + QD: NB + autres: NB </b> <br> où NB est le nombre de caractères à utiliser pour extraire les données du code à barres scannés avec: <ul> <li> <b> ref </b>: référence produit </li> <li> <b> qu </b>: quantité de jeu lors de l'insertion article (unités) <l/i> <li> <b> </b> qd: quantité de jeu lors de l'insertion article (décimaux) </li> <li> <b> autre </b>: autres caractères </li> </ul>
TakeposBarcodeRuleToInsertProductDesc=Règle pour extraire la référence produit + une quantité d'un code barre scanné. <br> Si vide (valeur par défaut), l'application utilisera le code-barres complet scanné pour trouver le produit. <br> <br> Si elle est définie, la syntaxe doit être: <br> <b> ref: NB + Qu: NB + QD: NB + autres: NB </b> <br> où NB est le nombre de caractères à utiliser pour extraire les données du code à barres scannés avec:<br><b> ref </b>: référence produit<br><b> qu </b>: quantité de jeu lors de l'insertion article (unités)<br><b> </b> qd: quantité de jeu lors de l'insertion article (décimaux)<br><b> autre </b>: autres caractères
AlreadyPrinted=Déjà imprimé
HideCategories=Masquer toute la section de sélection des catégories
HideStockOnLine=Cacher les stocks sur les lignes

View file

@ -2407,7 +2407,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
//if ($_SESSION['dol_dst'] > 0) $dropdownBody .= yn(1);
//else $dropdownBody .= yn(0);
$dropdownBody .= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).')';
$dropdownBody .= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' <small class="opacitymedium">('.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).')</small>';
$dropdownBody .= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout;
$dropdownBody .= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
if ($conf->browser->layout == 'phone') {

View file

@ -160,14 +160,6 @@ print '</td><td>';
print ajax_constantonoff("TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Use price excl. taxes (HT) and not price incl. taxes (TTC)
print '<tr class="oddeven"><td>';
print $langs->trans('UsePriceHT');
print '</td><td>';
print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
print '</table>';
print $form->buttonsSaveCancel("Save", '');

View file

@ -160,6 +160,7 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
print '<tr class="oddeven value"><td>';
print $langs->trans("BasicPhoneLayout");
print ' ('.$langs->trans("Experimental").')';
print '</td>';
print '<td class="">';
//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1);

View file

@ -115,7 +115,7 @@ print '<td colspan="2">TakePOS Support</td>';
print '<td>'.$langs->trans("URL").'</td>';
print '</tr>';
$url = 'http://www.takepos.com';
$url = 'https://www.takepos.com';
print '<tr class="oddeven">'."\n";
print '<td class="left"><a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';

View file

@ -144,6 +144,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', '');
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name")."</td>\n";
@ -241,7 +242,9 @@ foreach ($dirmodels as $reldir) {
}
}
}
print "</table><br>\n";
print "</table>\n";
print '</div>';
print "\n";
print '<br>';
@ -260,7 +263,7 @@ print "</tr>\n";
// Terminals
print '<tr class="oddeven"><td>';
print $langs->trans("NumberOfTerminals");
print '<td colspan="2">';
print '<td>';
print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (!getDolGlobalString('TAKEPOS_NUM_TERMINALS') ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS) . '">';
print "</td></tr>\n";
@ -268,7 +271,7 @@ print "</td></tr>\n";
if (isModEnabled("service")) {
print '<tr class="oddeven"><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1);
print "</td></tr>\n";
@ -277,23 +280,23 @@ if (isModEnabled("service")) {
// Root category for products
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
print '<td colspan="2">';
print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0);
print '<td>';
print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0, 0, 'widthcentpercentminusx');
print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
print "</td></tr>\n";
// Sort product
print '<tr class="oddeven"><td>';
print $langs->trans("SortProductField");
print '<td colspan="2">';
print '<td>';
$prod = new Product($db);
$array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification');
print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (!getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD') ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0, 0, 0, '', 1);
print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD', 'rowid'), 0, 0, 0, '', 1);
print "</td></tr>\n";
print '<tr class="oddeven"><td>';
print $langs->trans('TakeposGroupSameProduct');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
@ -308,7 +311,7 @@ $htmltext .= '</i>';
// Payment numpad
print '<tr class="oddeven"><td>';
print $langs->trans("Paymentnumpad");
print '<td colspan="2">';
print '<td>';
$array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad"));
print $form->selectarray('TAKEPOS_NUMPAD', $array, (!getDolGlobalString('TAKEPOS_NUMPAD') ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
print "</td></tr>\n";
@ -324,7 +327,7 @@ print "</td></tr>\n";
// Direct Payment
print '<tr class="oddeven"><td>';
print $langs->trans('DirectPaymentButton');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_DIRECT_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
//print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1);
print "</td></tr>\n";
@ -340,7 +343,7 @@ print "</td></tr>\n";
// Email template for send invoice
print '<tr class="oddeven"><td>';
print $langs->trans('EmailTemplate');
print '<td colspan="2">';
print '<td>';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$nboftemplates = $formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang
@ -364,36 +367,43 @@ print "</td></tr>\n";
// Control cash box at opening pos
print '<tr class="oddeven"><td>';
print $langs->trans('ControlCashOpening');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Gift receipt
print '<tr class="oddeven"><td>';
print $langs->trans('GiftReceiptButton');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_GIFT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Delayed Pay Button
print '<tr class="oddeven"><td>';
print $langs->trans('AllowDelayedPayment');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Show price without vat
print '<tr class="oddeven"><td>';
print $langs->trans('ShowPriceHT');
print '<td colspan="2">';
print '<td>';
print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Use price excl. taxes (HT) and not price incl. taxes (TTC)
print '<tr class="oddeven"><td>';
print $langs->trans('UsePriceHT');
print '</td><td>';
print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Barcode rule to insert product
if (isModEnabled('barcode')) {
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"));
print '<td colspan="2">';
print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"), 1, 'help', '', 0, 3, 'barcoderuleonsmartphone');
print '<td>';
print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
print "</td></tr>\n";
}

View file

@ -262,7 +262,9 @@ if (isModEnabled("banque")) {
}
if (isModEnabled('stock')) {
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value)
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("CashDeskDoNotDecreaseStock"), $langs->trans("CashDeskDoNotDecreaseStockHelp"));
print '</td>'; // Force warehouse (this is not a default value)
print '<td>';
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK'.$terminal, getDolGlobalInt('CASHDESK_NO_DECREASE_STOCK'.$terminal), 1);
print '</td></tr>';

View file

@ -90,7 +90,7 @@ button.publicphonebutton {
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
width:33%;
width:33.33%;
height:50px;
font-weight: bold;
color: #fff;
@ -106,7 +106,6 @@ button.publicphonebutton {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
font-size:20px;
text-align:center;
width:20px;
}
@ -168,7 +167,7 @@ button.publicphonebutton2 {
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
width:33%;
width:33.33%;
font-weight: bold;
padding: 8px 16px;
}

View file

@ -572,10 +572,11 @@ div.description_content {
.topnav-left a {
padding: 7px 4px 7px 4px;
margin: 8px;
margin-left: 4px;
margin-left: 5px;
margin-right: 5px;
border-radius: 3px;
}
.topnav-left a:hover, .topnav .login_block_other a:hover {
.topnav-left a:hover:not(.nohover), .topnav .login_block_other a:hover:not(.nohover) {
background-color: #ddd;
color: black;
}

View file

@ -1082,21 +1082,24 @@ if (!getDolGlobalString('TAKEPOS_HIDE_HEAD_BAR')) {
<div id="topnav-right" class="topnav-right">
<?php
$reshook = $hookmanager->executeHooks('takepos_login_block_other');
if ($reshook == 0) { //Search method?>
if ($reshook == 0) { //Search method
?>
<div class="login_block_other">
<input type="text" id="search" name="search" class="input-nobottom" onkeyup="Search2('<?php echo dol_escape_js($keyCodeForEnter); ?>', null);" placeholder="<?php echo dol_escape_htmltag($langs->trans("Search")); ?>" autofocus>
<a onclick="ClearSearch(false);"><span class="fa fa-backspace"></span></a>
<input type="text" id="search" name="search" class="input-nobottom" onkeyup="Search2('<?php echo dol_escape_js($keyCodeForEnter); ?>', null);" placeholder="<?php echo dol_escape_htmltag($langs->trans("Search")); ?>" autofocus>
<a onclick="ClearSearch(false);" class="nohover"><span class="fa fa-backspace"></span></a>
<a href="<?php echo DOL_URL_ROOT.'/'; ?>" target="backoffice" rel="opener"><!-- we need rel="opener" here, we are on same domain and we need to be able to reuse this tab several times -->
<span class="fas fa-home"></span></a>
<?php if (empty($conf->dol_use_jmobile)) {?>
<a class="hideonsmartphone" onclick="FullScreen();" title="<?php echo dol_escape_htmltag($langs->trans("ClickFullScreenEscapeToLeave")); ?>"><span class="fa fa-expand-arrows-alt"></span></a>
<?php }?>
<?php if (empty($conf->dol_use_jmobile)) { ?>
<a class="hideonsmartphone" onclick="FullScreen();" title="<?php echo dol_escape_htmltag($langs->trans("ClickFullScreenEscapeToLeave")); ?>"><span class="fa fa-expand-arrows-alt"></span></a>
<?php } ?>
</div>
<?php
} ?>
}
?>
<div class="login_block_user">
<?php
print top_menu_user(1); ?>
print top_menu_user(1);
?>
</div>
</div>
<div class="arrows">

View file

@ -1049,6 +1049,7 @@ if (empty($reshook)) {
}
}
/*
* View
*/
@ -1438,7 +1439,7 @@ if (!empty($conf->use_javascript_ajax)) {
print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
}
print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"]) ? '' : $_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n";
print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"]) ? '' : $_SESSION["basiclayout"]).' conf TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n";
print '<div class="div-table-responsive-no-min invoice">';
print '<table id="tablelines" class="noborder noshadow postablelines centpercent">';
if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) {
@ -1505,7 +1506,6 @@ if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
}
print '</td>';
}
print '</td>';
}
@ -1521,7 +1521,6 @@ if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ttc * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>';
}
print '</td>';
}
print '</td>';
} elseif ($mobilepage == "invoice") {
@ -1569,11 +1568,12 @@ if (!empty($_SESSION["basiclayout"]) && $_SESSION["basiclayout"] == 1) {
$htmlforlines = '';
foreach ($prods as $row) {
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
$htmlforlines .= '<div class="leftcat';
$htmlforlines .= '<div class="leftcat"';
} else {
$htmlforlines .= '<tr class="drag drop oddeven posinvoiceline';
$htmlforlines .= '<tr class="drag drop oddeven posinvoiceline"';
}
$htmlforlines .= '" onclick="AddProduct(\''.$place.'\', '.$row->id.')">';
$htmlforlines .= ' onclick="AddProduct(\''.$place.'\', '.$row->id.')"';
$htmlforlines .= '>';
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
$htmlforlines .= '<img class="imgwrapper" width="33%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=pro&query=pro&id='.$row->id.'"><br>';
$htmlforlines .= $row->label.' '.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency);
@ -1582,6 +1582,7 @@ if (!empty($_SESSION["basiclayout"]) && $_SESSION["basiclayout"] == 1) {
$htmlforlines .= '<td class="left">';
$htmlforlines .= $row->label;
$htmlforlines .= '<div class="right">'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'</div>';
$htmlforlines .= '</td>';
$htmlforlines .= '</tr>'."\n";
}
}
@ -1816,17 +1817,22 @@ if ($placeid > 0) {
print $htmlforlines;
}
} else {
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>';
if (getDolGlobalString('TAKEPOS_SHOW_HT')) {
print '<td></td>';
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td>';
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
print '<td></td><td></td>';
if (getDolGlobalString('TAKEPOS_SHOW_HT')) {
print '<td></td>';
}
}
print '</tr>';
}
} else { // No invoice generated yet
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>';
if (getDolGlobalString('TAKEPOS_SHOW_HT')) {
print '<td></td>';
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td>';
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
print '<td></td><td></td>';
if (getDolGlobalString('TAKEPOS_SHOW_HT')) {
print '<td></td>';
}
}
print '</tr>';
}

View file

@ -85,9 +85,12 @@ if (empty($action)) {
top_htmlhead($head, $title, 0, 0, '', $arrayofcss);
} else {
top_httphead('text/html', 1);
top_htmlhead('');
}
//llxHeader();
print '<body style="background-color:#D1D1D1;">';
if ($action == "productinfo") {
$prod = new Product($db);
$prod->fetch($idproduct);
@ -155,7 +158,30 @@ if ($action == "productinfo") {
}
} else {
?>
<script type="text/javascript">
<div class="container">
<div class="phonebuttonsrow">
<?php
if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
print '<button type="button" class="phonebutton uppercase" onclick="LoadPlacesList();">'.dol_trunc($langs->trans('Floors'), 3, 'right', 'UTF-8', 1).'</button>';
print '<button type="button" class="phonebutton uppercase" onclick="LoadCats();">'.dol_trunc($langs->trans('Categories'), 3, 'right', 'UTF-8', 1).'</button>';
print '<button type="button" class="phonebutton uppercase" onclick="TakeposPrintingOrder();">'.dol_trunc($langs->trans('Order'), 3, 'right', 'UTF-8', 1).'</button>';
print '<button type="button" class="phonebutton uppercase" onclick="Exit();">'.dol_trunc($langs->trans('Logout'), 3, 'right', 'UTF-8', 1).'</button>';
} else {
print '<button type="button" class="publicphonebutton phoneblue uppercase" onclick="LoadCats();">'.dol_trunc($langs->trans('Categories'), 5, 'right', 'UTF-8', 1).'</button>';
print '<button type="button" class="publicphonebutton phoneorange uppercase" onclick="PublicPreOrder();">'.dol_trunc($langs->trans('Order'), 5, 'right', 'UTF-8', 1).'</button>';
print '<button type="button" class="publicphonebutton phonegreen uppercase" onclick="CheckPlease();">'.dol_trunc($langs->trans('Payment'), 5, 'right', 'UTF-8', 1).'</button>';
} ?>
</div>
<div class="phonerow2">
<div id="phonediv2" class="phonediv2"></div>
</div>
<div class="phonerow1">
<div id="phonediv1" class="phonediv1"></div>
</div>
</div>
?>
<script type="text/javascript">
<?php
$categorie = new Categorie($db);
$categories = $categorie->get_full_arbo('product', ((getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID') > 0) ? $conf->global->TAKEPOS_ROOT_CATEGORY_ID : 0), 1);
@ -184,194 +210,172 @@ if ($action == "productinfo") {
}
sort($maincategories);
sort($subcategories); ?>
sort($subcategories);
?>
var categories = <?php echo json_encode($maincategories); ?>;
var subcategories = <?php echo json_encode($subcategories); ?>;
var categories = <?php echo json_encode($maincategories); ?>;
var subcategories = <?php echo json_encode($subcategories); ?>;
var currentcat;
var pageproducts=0;
var pagecategories=0;
var pageactions=0;
var place="<?php echo $place; ?>";
var editaction="qty";
var editnumber="";
var currentcat;
var pageproducts=0;
var pagecategories=0;
var pageactions=0;
var place="<?php echo $place; ?>";
var editaction="qty";
var editnumber="";
$( document ).ready(function() {
console.log("Refresh");
LoadPlace(place);
});
function LoadPlace(placeid){
place=placeid;
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&place="+place, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&place="+place, function() {
});';
} ?>
LoadCats();
}
function AddProduct(placeid, productid){
<?php
// If is a public terminal first show product information
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
print 'place=placeid;
$("#phonediv1").load("auto_order.php?action=productinfo&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} else {
print 'AddProductConfirm(placeid, productid);';
} ?>
}
function PublicPreOrder(){
$("#phonediv1").load("auto_order.php?action=publicpreorder&token=<?php echo newToken(); ?>&place="+place, function() {
$( document ).ready(function() {
console.log("Refresh");
LoadPlace(place);
});
}
function AddProductConfirm(placeid, productid){
place=placeid;
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=addline&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&action=addline&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} ?>
function LoadPlace(placeid){
place=placeid;
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&place="+place, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&place="+place, function() {
});';
} ?>
LoadCats();
}
return true;
}
function AddProduct(placeid, productid){
<?php
// If is a public terminal first show product information
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
print 'place=placeid;
$("#phonediv1").load("auto_order.php?action=productinfo&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} else {
print 'AddProductConfirm(placeid, productid);';
} ?>
}
function SetQty(place, selectedline, qty){
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
?>
if (qty==0){
$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline, function() {
function PublicPreOrder(){
$("#phonediv1").load("auto_order.php?action=publicpreorder&token=<?php echo newToken(); ?>&place="+place, function() {
});
}
else{
function AddProductConfirm(placeid, productid){
place=placeid;
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=addline&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&action=addline&token='.newToken().'&place="+place+"&idproduct="+productid, function() {
});';
} ?>
return true;
}
function SetQty(place, selectedline, qty){
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
?>
if (qty==0){
$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline, function() {
});
}
else{
$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=updateqty&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline+"&number="+qty, function() {
});
}
<?php
} else {
?>
if (qty==0){
$("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline, function() {
});
}
else{
$("#phonediv2").load("invoice.php?mobilepage=invoice&action=updateqty&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline+"&number="+qty, function() {
});
}
<?php
} ?>
LoadCats();
return true;
}
function SetNote(place, selectedline){
var note = prompt("<?php $langs->trans('Note'); ?>", "");
$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=updateqty&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline+"&number="+qty, function() {
});
LoadCats();
}
function LoadCats(){
<?php
} else {
?>
if (qty==0){
$("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline, function() {
});
}
else{
$("#phonediv2").load("invoice.php?mobilepage=invoice&action=updateqty&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline+"&number="+qty, function() {
});
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv1").load("auto_order.php?mobilepage=cats&place="+place, function() {
});';
} else {
echo '$("#phonediv1").load("invoice.php?mobilepage=cats&place="+place, function() {
});';
} ?>
}
function LoadProducts(idcat){
<?php
} ?>
LoadCats();
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv1").load("auto_order.php?mobilepage=products&catid="+idcat+"&place="+place, function() {
});';
} else {
echo '$("#phonediv1").load("invoice.php?mobilepage=products&catid="+idcat+"&place="+place, function() {
});';
} ?>
}
return true;
}
function SetNote(place, selectedline){
var note = prompt("<?php $langs->trans('Note'); ?>", "");
$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=updateqty&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline+"&number="+qty, function() {
});
LoadCats();
}
function LoadCats(){
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv1").load("auto_order.php?mobilepage=cats&place="+place, function() {
});';
} else {
echo '$("#phonediv1").load("invoice.php?mobilepage=cats&place="+place, function() {
});';
} ?>
}
function LoadProducts(idcat){
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv1").load("auto_order.php?mobilepage=products&catid="+idcat+"&place="+place, function() {
});';
} else {
echo '$("#phonediv1").load("invoice.php?mobilepage=products&catid="+idcat+"&place="+place, function() {
});';
} ?>
}
function LoadPlacesList(){
$("#phonediv1").load("invoice.php?mobilepage=places", function() {
});
}
function TakeposPrintingOrder(){
console.log("TakeposPrintingOrder");
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?action=order&token='.newToken().'&mobilepage=order&place="+place, function() {
});';
echo '$("#phonediv1").load("auto_order.php?action=publicpayment&token='.newToken().'&place="+place, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?action=order&token='.newToken().'&place="+place, function() {
});';
} ?>
}
function Exit(){
window.location.href='../user/logout.php?token=<?php echo newToken(); ?>';
}
function CheckPlease(payment){
if (payment==undefined){
$("#phonediv1").load("auto_order.php?action=checkplease&token=<?php echo newToken(); ?>&place="+place, function() {
function LoadPlacesList(){
$("#phonediv1").load("invoice.php?mobilepage=places", function() {
});
}
else{
console.log("Request the check to the waiter");
$("#phonediv1").load("auto_order.php?action=checkplease&token=<?php echo newToken(); ?>&place=<?php echo $place; ?>&payment="+payment, function() {
});
function TakeposPrintingOrder(){
console.log("TakeposPrintingOrder");
<?php
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
echo '$("#phonediv2").load("auto_order.php?action=order&token='.newToken().'&mobilepage=order&place="+place, function() {
});';
echo '$("#phonediv1").load("auto_order.php?action=publicpayment&token='.newToken().'&place="+place, function() {
});';
} else {
echo '$("#phonediv2").load("invoice.php?action=order&token='.newToken().'&place="+place, function() {
});';
} ?>
}
}
</script>
function Exit(){
window.location.href='../user/logout.php?token=<?php echo newToken(); ?>';
}
function CheckPlease(payment){
if (payment==undefined){
$("#phonediv1").load("auto_order.php?action=checkplease&token=<?php echo newToken(); ?>&place="+place, function() {
});
}
else{
console.log("Request the check to the waiter");
$("#phonediv1").load("auto_order.php?action=checkplease&token=<?php echo newToken(); ?>&place=<?php echo $place; ?>&payment="+payment, function() {
});
}
}
</script>
<body style="background-color:#D1D1D1;">
<?php
if (getDolGlobalString('TAKEPOS_NUM_TERMINALS') != "1" && $_SESSION["takeposterminal"] == "") {
print '<div class="dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>';
} ?>
<div class="container">
<div class="phonebuttonsrow">
<?php
if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
print '<button type="button" class="phonebutton" onclick="LoadPlacesList();">'.strtoupper(substr($langs->trans('Floors'), 0, 3)).'</button>';
print '<button type="button" class="phonebutton" onclick="LoadCats();">'.strtoupper(substr($langs->trans('Categories'), 0, 3)).'</button>';
print '<button type="button" class="phonebutton" onclick="TakeposPrintingOrder();">'.strtoupper(substr($langs->trans('Order'), 0, 3)).'</button>';
print '<button type="button" class="phonebutton" onclick="Exit();">'.strtoupper(substr($langs->trans('Logout'), 0, 3)).'</button>';
} else {
print '<button type="button" class="publicphonebutton phoneblue" onclick="LoadCats();">'.strtoupper(substr($langs->trans('Categories'), 0, 5)).'</button>';
print '<button type="button" class="publicphonebutton phoneorange" onclick="PublicPreOrder();">'.strtoupper(substr($langs->trans('Order'), 0, 5)).'</button>';
print '<button type="button" class="publicphonebutton phonegreen" onclick="CheckPlease();">'.strtoupper(substr($langs->trans('Payment'), 0, 5)).'</button>';
} ?>
</div>
<div class="phonerow2">
<div id="phonediv2" class="phonediv2"></div>
</div>
<div class="phonerow1">
<div id="phonediv1" class="phonediv1"></div>
</div>
</div>
</body>
<?php
}
}
llxFooter();