From 10ab6f480dd5b2c515d5fc790914fa9361fbb2f8 Mon Sep 17 00:00:00 2001 From: David Beniamine Date: Fri, 15 Mar 2019 11:27:49 +0100 Subject: [PATCH] Automatically print receipt --- htdocs/langs/en_US/cashdesk.lang | 3 ++- htdocs/langs/fr_FR/cashdesk.lang | 1 + htdocs/takepos/admin/setup.php | 8 ++++++++ htdocs/takepos/invoice.php | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 83939e94187..c488c6bce64 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -55,4 +55,5 @@ Numberspad=Numbers Pad BillsCoinsPad=Bills and Coins Pad DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr TakeposNeedsCategories=TakePOS needs product categories to work -OrderNotes=Order Notes \ No newline at end of file +OrderNotes=Order Notes +AutoPrintTickets=Automatically print tickets diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index f588b04a751..e67b48f8826 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -49,3 +49,4 @@ AmountAtEndOfPeriod=Montant en fin de période (jour, mois ou année) TheoricalAmount=Montant théorique RealAmount=Montant réel CashFenceDone=Clôture de caisse faite pour la période +AutoPrintTickets=Imprimet les tickets automatiquement diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index c00fa060493..90cd3cb717c 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -64,6 +64,7 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -123,6 +124,13 @@ if (! empty($conf->service->enabled)) print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1); print "\n"; } +print ''; +print $langs->trans("AutoPrintTickets"); +print ''; +print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1); +print "\n"; + + print ''; print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc")); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 45a65af3f94..e1a4b32d935 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -376,7 +376,8 @@ if ($action=="valid") { print '

'.$invoice->ref." ".$langs->trans('BillShortStatusValidated').'

'; if ($conf->global->TAKEPOSCONNECTOR) print '
'; - else print '
'; + else print '
'; + if($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) print ''; } if ($action == "search")