From 3255c185671198dba0cb1f29cdf0367ff459b959 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Thu, 2 Apr 2020 22:11:16 +0200 Subject: [PATCH 1/2] Receipt compatibility with receipt printer module --- htdocs/takepos/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 1012e62f65d..4c86e26c2c4 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -870,11 +870,13 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { $menus[$r++] = array('title'=>$langs->trans("Order"), 'action'=>'TakeposPrintingOrder();'); } - //add temp ticket button + //Button to print receipt before payment if ($conf->global->TAKEPOS_BAR_RESTAURANT) { if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'TakeposPrinting(placeid);'); + } else if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { + $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'DolibarrTakeposPrinting(placeid);'); } else { $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'Print(placeid);'); } From 27eec2e5dbb9f99072f17c7695b321ae8d044493 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Thu, 2 Apr 2020 23:28:25 +0200 Subject: [PATCH 2/2] Travis fix --- htdocs/takepos/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 4c86e26c2c4..4f5ef29bc70 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -875,7 +875,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'TakeposPrinting(placeid);'); - } else if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { + } elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'DolibarrTakeposPrinting(placeid);'); } else { $menus[$r++] = array('title'=>'
'.$langs->trans("Receipt").'
', 'action'=>'Print(placeid);');