diff --git a/htdocs/takepos/admin/orderprinters.php b/htdocs/takepos/admin/orderprinters.php
index b396655dea4..c7ebbebffb7 100644
--- a/htdocs/takepos/admin/orderprinters.php
+++ b/htdocs/takepos/admin/orderprinters.php
@@ -42,6 +42,7 @@ $catname = GETPOST('catname', 'alpha');
$action = GETPOST('action', 'aZ09');
$printer1 = GETPOST('printer1', 'alpha');
$printer2 = GETPOST('printer2', 'alpha');
+$printer3 = GETPOST('printer3', 'alpha');
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
@@ -64,6 +65,14 @@ if ($action == "SavePrinter2") {
dolibarr_set_const($db, "TAKEPOS_PRINTED_CATEGORIES_2", $printedcategories, 'chaine', 0, '', $conf->entity);
}
+if ($action == "SavePrinter3") {
+ $printedcategories = ";";
+ if (is_array($printer3)) foreach ($printer3 as $cat) {
+ $printedcategories = $printedcategories.$cat.";";
+ }
+ dolibarr_set_const($db, "TAKEPOS_PRINTED_CATEGORIES_3", $printedcategories, 'chaine', 0, '', $conf->entity);
+}
+
/*
* View
@@ -206,6 +215,33 @@ if ($nbofentries > 0)
print '';
print '';
}
+
+//Printer3
+print '
';
+print '| '.$langs->trans("Printer").' 3 | | ';
+print ' |
';
+$nbofentries = (count($data) - 1);
+print '
";
print '';
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index 384be4f8f13..108fdea0b64 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -87,6 +87,7 @@ if (GETPOST('action', 'alpha') == 'set')
$res = dolibarr_set_const($db, "TAKEPOS_PRINTER_TO_USE".$terminaltouse, GETPOST('TAKEPOS_PRINTER_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTER1_TO_USE".$terminaltouse, GETPOST('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTER2_TO_USE".$terminaltouse, GETPOST('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTER3_TO_USE".$terminaltouse, GETPOST('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
@@ -242,6 +243,10 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
print '';
print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}), 1);
print ' | ';
+ print '| '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 3 | ';
+ print '';
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}), 1);
+ print ' |
';
}
$printer->listPrintersTemplates();
$templates = array();
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index eee4faf9d43..82f97b88dc3 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -532,8 +532,10 @@ if ($action == "order" and $placeid != 0)
$footerorder = ''.dol_print_date(dol_now(), 'dayhour').'