From 3f7f166fb664a8eb8425ebd16cbd39fdcdfc624d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Apr 2021 19:33:11 +0200 Subject: [PATCH] Make option label easier to understand. --- htdocs/langs/en_US/cashdesk.lang | 2 +- htdocs/takepos/admin/bar.php | 24 ++++++++++++------------ htdocs/takepos/invoice.php | 6 +++--- htdocs/takepos/receipt.php | 3 ++- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index a24109fa3d0..4bcf8439271 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -58,7 +58,7 @@ BillsCoinsPad=Coins and banknotes Pad DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr TakeposNeedsCategories=TakePOS needs at least one product categorie to work TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work -OrderNotes=Order Notes +OrderNotes=Printing the receipt will set all items to 'Order confirmed' CashDeskBankAccountFor=Default account to use for payments in NoPaimementModesDefined=No paiment mode defined in TakePOS configuration TicketVatGrouped=Group VAT by rate in tickets|receipts diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 09f3b13d4d1..863b6eda42c 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -118,14 +118,14 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print '
'; print ''; print ''; - print ''; + print ''; print "\n"; - if ($conf->global->TAKEPOS_PRINT_METHOD != "browser") { + if ($conf->global->TAKEPOS_PRINT_METHOD != "browser") { // Why this ? print ''; - print ''; @@ -133,7 +133,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; - print ''; @@ -142,7 +142,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; - print ''; @@ -150,7 +150,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; - print ''; @@ -159,7 +159,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; - print '\n"; @@ -168,14 +168,14 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; - print ''; print ''; - print ''; @@ -187,7 +187,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print '
'; } -if ($conf->global->TAKEPOS_BAR_RESTAURANT) { +if (!empty($conf->global->TAKEPOS_BAR_RESTAURANT)) { if ($conf->global->TAKEPOS_QR_MENU) { $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file @@ -197,10 +197,10 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ''; print "\n"; print ''; print ''; print '
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").''.$langs->trans("Value").'
'; print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; print ''; + print ''; print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0); //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); print '
'; print $langs->trans("OrderNotes"); print ''; + print ''; print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0); //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1); print '
'; print $langs->trans("BasicPhoneLayout"); print ''; + print ''; //print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0); print '
'; print $langs->trans("ProductSupplements"); print ''; + print ''; //print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1); print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); print '
'; print $langs->trans("SupplementCategory"); print ''; + print ''; print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0); print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY'); print "
'; print 'QR - '.$langs->trans("CustomerMenu"); print ''; + print ''; print ajax_constantonoff("TAKEPOS_QR_MENU", array(), $conf->entity, 0, 0, 1, 0); print '
'; print 'QR - '.$langs->trans("AutoOrder"); print ''; + print ''; print ajax_constantonoff("TAKEPOS_AUTO_ORDER", array(), $conf->entity, 0, 0, 1, 0); print '
'.$langs->trans("URL").''.$langs->trans("QR").'
'; - print "".$urlwithroot."/takepos/public/menu.php"; + print ''.$urlwithroot.'/takepos/public/menu.php'; print ''; - print ""; + print ''; print '
'; } diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index c7a01e5d8bc..a4fc10c788a 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -974,12 +974,12 @@ if ($action == "search") { function SendTicket(id) { console.log("Open box to select the Print/Send form"); - $.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:"trans("SendTicket"); ?>"}); + $.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:'trans("SendTicket")); ?>'}); } function Print(id, gift){ - $.colorbox({href:"receipt.php?facid="+id+"&gift="+gift, width:"40%", height:"90%", transition:"none", iframe:"true", title:"trans("PrintTicket"); ?>"}); + console.log("Call Print() to generate the receipt."); + $.colorbox({href:"receipt.php?facid="+id+"&gift="+gift, width:"40%", height:"90%", transition:"none", iframe:"true", title:'trans("PrintTicket")); ?>'}); } function TakeposPrinting(id){ diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index e9d721a44e3..d978d2ac792 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -50,7 +50,7 @@ include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("main", "cashdesk", "companies")); -$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $facid = GETPOST('facid', 'int'); @@ -318,5 +318,6 @@ if (!empty($conf->global->TAKEPOS_FOOTER) || !empty($conf->global->{$constFreeTe +