Merge pull request #10061 from andreubisquerra/master

Cash drawer button
This commit is contained in:
Laurent Destailleur 2018-11-24 11:05:55 +01:00 committed by GitHub
commit 333efbeadf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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://<?php print $conf->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();');
}
?>
<div style="position:absolute; top:1%; left:65.5%; height:37%; width:32.5%;">
<?php