From 463aff45407bf6905352709249fc6087b1a87513 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 21 Nov 2018 16:54:40 +0100 Subject: [PATCH] Cash drawer button --- htdocs/takepos/takepos.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 8dec143bffe..c84f283d9f2 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -36,7 +36,7 @@ $place = GETPOST('place','int'); if ($place=="") $place="0"; $action = GETPOST('action','alpha'); -$langs->loadLangs(array("bills","orders","commercial","cashdesk")); +$langs->loadLangs(array("bills","orders","commercial","cashdesk","receiptprinter")); /* @@ -292,6 +292,14 @@ function TakeposPrintingOrder(){ }); } +function OpenDrawer(){ + $.ajax({ + type: "POST", + url: 'http://global->TAKEPOS_PRINT_SERVER;?>:8111/print', + data: "opendrawer" + }); +} + $( document ).ready(function() { PrintCategories(0); LoadProducts(0); @@ -347,6 +355,10 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){ 'action'=>'TakeposPrintingOrder();'); } } +if ($conf->global->TAKEBOX){ + $menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"), + 'action'=>'OpenDrawer();'); +} ?>