From 450707e4bed2b716184825deba5232d503838da0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Jan 2024 23:01:31 +0100 Subject: [PATCH 1/5] Removed a file that is bugged and output bugged empty data on screen --- htdocs/adherents/htpasswd.php | 91 ------------------------- htdocs/core/menus/init_menu_auguria.sql | 1 - htdocs/core/menus/standard/eldy.lib.php | 3 - 3 files changed, 95 deletions(-) delete mode 100644 htdocs/adherents/htpasswd.php diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php deleted file mode 100644 index a36f8092add..00000000000 --- a/htdocs/adherents/htpasswd.php +++ /dev/null @@ -1,91 +0,0 @@ - - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2006-2008 Laurent Destailleur - * - * 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 . - */ - -/** - * \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 "
\n"; - while ($i < $num) { - $objp = $db->fetch_object($result); - $htpass = crypt($objp->pass, makesalt()); - print $objp->login.":".$htpass."
\n"; - $i++; - } - print "
\n"; -} else { - dol_print_error($db); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 7bc635f225d..6b5d192a349 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -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&leftmenu=members&statut=1&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&leftmenu=members&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&leftmenu=members&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&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&leftmenu=export', 'MembersCards', 1, 'members', '$user->hasRight("adherent","export")', '', 2, 10, __ENTITY__); -- Members - Subscriptions diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 4aa247e49d1..94c4d961750 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -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"); From bf17b8767c0c3bb94259863d43512ca3dbeb4abf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Jan 2024 11:15:48 +0100 Subject: [PATCH 2/5] Debug v19 --- htdocs/core/class/html.form.class.php | 1 - .../takepos/mod_takepos_ref_universal.php | 2 +- htdocs/langs/en_US/cashdesk.lang | 4 +- htdocs/langs/fr_FR/cashdesk.lang | 2 +- htdocs/takepos/admin/setup.php | 37 ++++++++++--------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 628e389548d..eaea84e8dc8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -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"); diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 35c7242368f..c88258b790c 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -83,7 +83,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= ''; $texte .= ''; diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 06b5566e9b3..b0871f8a202 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -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 =
{TN} 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,7 +135,7 @@ 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.
If empty (default value), application will use the full barcode scanned to find the product.

If defined, syntax must be:
ref:NB+qu:NB+qd:NB+other:NB
where NB is the number of characters to use to extract data from the scanned barcode with:
  • ref : product reference
  • qu : quantity to set when inserting item (units)
  • qd : quantity to set when inserting item (decimals)
  • other : others characters
+TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.
If empty (default value), application will use the full barcode scanned to find the product.

If defined, syntax must be:
ref:NB+qu:NB+qd:NB+other:NB
where NB is the number of characters to use to extract data from the scanned barcode with:
ref : product reference
qu : quantity to set when inserting item (units)
qd : quantity to set when inserting item (decimals)
other : others characters AlreadyPrinted=Already printed HideCategories=Hide the whole section of categories selection HideStockOnLine=Hide stock on line diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index e73ce933294..bdfccb1dba8 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -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é.
Si vide (valeur par défaut), l'application utilisera le code-barres complet scanné pour trouver le produit.

Si elle est définie, la syntaxe doit être:
ref: NB + Qu: NB + QD: NB + autres: NB
où NB est le nombre de caractères à utiliser pour extraire les données du code à barres scannés avec:
  • ref : référence produit
  • qu : quantité de jeu lors de l'insertion article (unités)
  • qd: quantité de jeu lors de l'insertion article (décimaux)
  • autre : autres caractères
+TakeposBarcodeRuleToInsertProductDesc=Règle pour extraire la référence produit + une quantité d'un code barre scanné.
Si vide (valeur par défaut), l'application utilisera le code-barres complet scanné pour trouver le produit.

Si elle est définie, la syntaxe doit être:
ref: NB + Qu: NB + QD: NB + autres: NB
où NB est le nombre de caractères à utiliser pour extraire les données du code à barres scannés avec:
ref : référence produit
qu : quantité de jeu lors de l'insertion article (unités)
qd: quantité de jeu lors de l'insertion article (décimaux)
autre : 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 diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index c719efe3eee..679caa01ee2 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -144,6 +144,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); print load_fiche_titre($langs->trans('CashDeskRefNumberingModules'), '', ''); +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; print ''; print '\n"; @@ -241,7 +242,9 @@ foreach ($dirmodels as $reldir) { } } } -print "
'.$langs->trans("Name")."

\n"; +print "\n"; +print '
'; +print "\n"; print '
'; @@ -260,7 +263,7 @@ print "\n"; // Terminals print ''; print $langs->trans("NumberOfTerminals"); -print ''; +print ''; print ''; print "\n"; @@ -268,7 +271,7 @@ print "\n"; if (isModEnabled("service")) { print ''; print $langs->trans("CashdeskShowServices"); - print ''; + print ''; print ajax_constantonoff("CASHDESK_SERVICES", array(), $conf->entity, 0, 0, 1, 0); //print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1); print "\n"; @@ -277,23 +280,23 @@ if (isModEnabled("service")) { // Root category for products print ''; print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc")); -print ''; -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 ''; +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 "\n"; // Sort product print ''; print $langs->trans("SortProductField"); -print ''; +print ''; $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 "\n"; print ''; print $langs->trans('TakeposGroupSameProduct'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_GROUP_SAME_PRODUCT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; @@ -308,7 +311,7 @@ $htmltext .= ''; // Payment numpad print ''; print $langs->trans("Paymentnumpad"); -print ''; +print ''; $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 "\n"; @@ -324,7 +327,7 @@ print "\n"; // Direct Payment print ''; print $langs->trans('DirectPaymentButton'); -print ''; +print ''; 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 "\n"; @@ -340,7 +343,7 @@ print "\n"; // Email template for send invoice print ''; print $langs->trans('EmailTemplate'); -print ''; +print ''; 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,36 @@ print "\n"; // Control cash box at opening pos print ''; print $langs->trans('ControlCashOpening'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_CONTROL_CASH_OPENING", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // Gift receipt print ''; print $langs->trans('GiftReceiptButton'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_GIFT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // Delayed Pay Button print ''; print $langs->trans('AllowDelayedPayment'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // Show price without vat print ''; print $langs->trans('ShowPriceHT'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // Barcode rule to insert product if (isModEnabled('barcode')) { print ''; - print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc")); - print ''; + print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"), 1, 'help', '', 0, 3, 'barcoderuleonsmartphone'); + print ''; print ''; print "\n"; } From e0b5c48539f8940503facd1564b39e59e75b9f0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Jan 2024 11:43:29 +0100 Subject: [PATCH 3/5] Debug v19 --- htdocs/langs/en_US/admin.lang | 3 ++- htdocs/langs/en_US/cashdesk.lang | 8 ++++---- htdocs/main.inc.php | 2 +- htdocs/takepos/admin/appearance.php | 8 -------- htdocs/takepos/admin/other.php | 2 +- htdocs/takepos/admin/setup.php | 7 +++++++ htdocs/takepos/admin/terminal.php | 4 +++- htdocs/takepos/css/pos.css.php | 5 +++-- htdocs/takepos/index.php | 19 +++++++++++-------- 9 files changed, 32 insertions(+), 26 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 627d2d08a1f..6ccc7161d15 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -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. diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index b0871f8a202..bc88776e382 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -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=Use basic layout for phones (experimental) SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment DirectPaymentButton=Add a "Direct cash payment" button @@ -139,10 +139,10 @@ TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a 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 diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ebf279599e9..953b6b6221b 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2411,7 +2411,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') //if ($_SESSION['dol_dst'] > 0) $dropdownBody .= yn(1); //else $dropdownBody .= yn(0); - $dropdownBody .= '
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).')'; + $dropdownBody .= '
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).')'; $dropdownBody .= '
'.$langs->trans("Layout").': '.$conf->browser->layout; $dropdownBody .= '
'.$langs->trans("Screen").': '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; if ($conf->browser->layout == 'phone') { diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index b77d68d490b..3f58d23146b 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -160,14 +160,6 @@ print ''; print ajax_constantonoff("TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0); print "\n"; -// Use price excl. taxes (HT) and not price incl. taxes (TTC) -print ''; -print $langs->trans('UsePriceHT'); -print ''; -print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0); -print "\n"; - - print ''; print $form->buttonsSaveCancel("Save", ''); diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php index 7f07b214085..5e2af98b966 100644 --- a/htdocs/takepos/admin/other.php +++ b/htdocs/takepos/admin/other.php @@ -115,7 +115,7 @@ print 'TakePOS Support'; print ''.$langs->trans("URL").''; print ''; -$url = 'http://www.takepos.com'; +$url = 'https://www.takepos.com'; print ''."\n"; print ''; diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 679caa01ee2..c9890212a9b 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -392,6 +392,13 @@ print ''; print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; +// Use price excl. taxes (HT) and not price incl. taxes (TTC) +print ''; +print $langs->trans('UsePriceHT'); +print ''; +print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0); +print "\n"; + // Barcode rule to insert product if (isModEnabled('barcode')) { print ''; diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index 55b3b04336f..c4d9b457e89 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -262,7 +262,9 @@ if (isModEnabled("banque")) { } if (isModEnabled('stock')) { - print ''.$langs->trans("CashDeskDoNotDecreaseStock").''; // Force warehouse (this is not a default value) + print ''; + print $form->textwithpicto($langs->trans("CashDeskDoNotDecreaseStock"), $langs->trans("CashDeskDoNotDecreaseStockHelp")); + print ''; // Force warehouse (this is not a default value) print ''; print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK'.$terminal, getDolGlobalInt('CASHDESK_NO_DECREASE_STOCK'.$terminal), 1); print ''; diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index 98218cc3b2a..a5f58ffcbf6 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -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; } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 5541afa2457..16ca4115d09 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1071,21 +1071,24 @@ if (!getDolGlobalString('TAKEPOS_HIDE_HEAD_BAR')) {
executeHooks('takepos_login_block_other'); - if ($reshook == 0) { //Search method?> + if ($reshook == 0) { //Search method + ?> + } + ?>
From 8c8075a2c333ffa5a17dedacdf2f11ad4c988753 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Jan 2024 12:49:43 +0100 Subject: [PATCH 4/5] Debug v19 --- htdocs/langs/en_US/cashdesk.lang | 2 +- htdocs/takepos/admin/bar.php | 1 + htdocs/takepos/invoice.php | 32 +-- htdocs/takepos/phone.php | 334 ++++++++++++++++--------------- 4 files changed, 190 insertions(+), 179 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index bc88776e382..a9b8a63fec6 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -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 (experimental) +BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment DirectPaymentButton=Add a "Direct cash payment" button diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index ee294054e3c..653ef6acf9d 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -160,6 +160,7 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) { print ''; print $langs->trans("BasicPhoneLayout"); + print ' ('.$langs->trans("Experimental").')'; print ''; print ''; //print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 0d8c98a2ec7..74f8a751934 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1049,6 +1049,7 @@ if (empty($reshook)) { } } + /* * View */ @@ -1438,7 +1439,7 @@ if (!empty($conf->use_javascript_ajax)) { print ''."\n"; } -print ''."\n"; +print ''."\n"; print '
'; print ''; if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) { @@ -1505,7 +1506,6 @@ if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) { $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); print '
(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')'; } - print ''; } print ''; } @@ -1521,7 +1521,6 @@ if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) { $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); print '
('.price($invoice->total_ttc * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')'; } - print ''; } print ''; } 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 .= '
id.')">'; + $htmlforlines .= ' onclick="AddProduct(\''.$place.'\', '.$row->id.')"'; + $htmlforlines .= '>'; if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { $htmlforlines .= '
'; $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 .= '
'; $htmlforlines .= ''."\n"; } } @@ -1816,17 +1817,22 @@ if ($placeid > 0) { print $htmlforlines; } } else { - print ''; - if (getDolGlobalString('TAKEPOS_SHOW_HT')) { - print ''; + print ''; + if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) { + print ''; + if (getDolGlobalString('TAKEPOS_SHOW_HT')) { + print ''; + } } print ''; } } else { // No invoice generated yet - print ''; - - if (getDolGlobalString('TAKEPOS_SHOW_HT')) { - print ''; + print ''; + if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) { + print ''; + if (getDolGlobalString('TAKEPOS_SHOW_HT')) { + print ''; + } } print ''; } diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 65a15d0d57c..0becb24d769 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -85,9 +85,12 @@ if (empty($action)) { top_htmlhead($head, $title, 0, 0, '', $arrayofcss); } else { - top_httphead('text/html', 1); + top_htmlhead(''); } +//llxHeader(); +print ''; + if ($action == "productinfo") { $prod = new Product($db); $prod->fetch($idproduct); @@ -155,7 +158,30 @@ if ($action == "productinfo") { } } else { ?> - + function Exit(){ + window.location.href='../user/logout.php?token='; + } + + function CheckPlease(payment){ + if (payment==undefined){ + $("#phonediv1").load("auto_order.php?action=checkplease&token=&place="+place, function() { + }); + } + else{ + console.log("Request the check to the waiter"); + $("#phonediv1").load("auto_order.php?action=checkplease&token=&place=&payment="+payment, function() { + }); + } + } + + + -'.$langs->trans('TerminalSelect').''; - } ?> -
-
- '.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; - print ''; - print ''; - print ''; - } else { - print ''; - print ''; - print ''; - } ?> -
-
-
-
-
-
-
-
- - Date: Sun, 7 Jan 2024 13:38:13 +0100 Subject: [PATCH 5/5] Debug v19 --- htdocs/langs/en_US/cashdesk.lang | 2 +- htdocs/takepos/css/phone.css | 5 ++--- htdocs/takepos/phone.php | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index a9b8a63fec6..fd5d558bb28 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -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 diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css index 2b0cf62797f..caae1a436db 100644 --- a/htdocs/takepos/css/phone.css +++ b/htdocs/takepos/css/phone.css @@ -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; } diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 0becb24d769..b23b7996910 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -167,8 +167,8 @@ if ($action == "productinfo") { print ''; print ''; } else { - print ''; - print ''; + print ''; + print ''; print ''; } ?>
'; $htmlforlines .= $row->label; $htmlforlines .= '
'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
'; + $htmlforlines .= '
'.$langs->trans("Empty").'
'.$langs->trans("Empty").'
'.$langs->trans("Empty").'
'.$langs->trans("Empty").'