FIX Open Drawer with new TakePOS connector

This commit is contained in:
jove@bisquerra.com 2020-12-19 22:28:16 +01:00
parent 70d1cc79e0
commit ba4f6c5a6b

View File

@ -686,7 +686,10 @@ function OpenDrawer(){
console.log("OpenDrawer call ajax url http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print");
$.ajax({
type: "POST",
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print',
<?php
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) echo "url: '".$conf->global->TAKEPOS_PRINT_SERVER."/printer/drawer.php',";
else echo "url: 'http://".$conf->global->TAKEPOS_PRINT_SERVER.":8111/print',";
?>
data: "opendrawer"
});
}