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();'); +} ?>