OrderSprinter 1.2.18
This commit is contained in:
parent
2221756de7
commit
70ab4d14d7
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -69,6 +69,7 @@ var BILL_TABLE = ["Tisch","Table","Mesa"];
|
||||||
var BILL_UPDATE = ["Aktualisieren","Update","Actualizar"];
|
var BILL_UPDATE = ["Aktualisieren","Update","Actualizar"];
|
||||||
var BILL_PRINT = ["Drucken","Print","Imprimir"];
|
var BILL_PRINT = ["Drucken","Print","Imprimir"];
|
||||||
var BILL_STORNO = ["Storno","Cancel","Contrapartida"];
|
var BILL_STORNO = ["Storno","Cancel","Contrapartida"];
|
||||||
|
var BILL_STORNO_AND_DELETE = ["Storno und Produkte löschen","Cancel and Remove Products","Contrapartida y removar productos"];
|
||||||
var BILL_CLOSED = ["abgeschlossen","closed","cerrado"];
|
var BILL_CLOSED = ["abgeschlossen","closed","cerrado"];
|
||||||
var BILL_DO_HOST = ["Bewirtungsbeleg","Guest receipt","Tique de invitados"];
|
var BILL_DO_HOST = ["Bewirtungsbeleg","Guest receipt","Tique de invitados"];
|
||||||
var BILL_UNDO_HOST = ["Rückgängig Bewirtungsbeleg","Undo guest receipt","No tique de invitados"];
|
var BILL_UNDO_HOST = ["Rückgängig Bewirtungsbeleg","Undo guest receipt","No tique de invitados"];
|
||||||
|
@ -76,7 +77,9 @@ var BILL_TITLE = ["Kassenbons","Receipts","Tiques"];
|
||||||
var BILL_YES = ["Ja","Yes","Si"];
|
var BILL_YES = ["Ja","Yes","Si"];
|
||||||
var BILL_NO = ["Nein","No","No"];
|
var BILL_NO = ["Nein","No","No"];
|
||||||
var BILL_STORNO_QUEST_TITLE = ["Storno?","Cancel?","Contrapartida?"];
|
var BILL_STORNO_QUEST_TITLE = ["Storno?","Cancel?","Contrapartida?"];
|
||||||
var BILL_STORNO_QUEST_TEXT = ["Bon stornieren?","Cancel the receipt?","Contrapartida del tique"];
|
var BILL_STORNO_DEL_QUEST_TITLE = ["Storno und Bestellung entfernen?","Cancel and remove products?","Contraüartida y removar productos?"];
|
||||||
|
var BILL_STORNO_QUEST_TEXT = ["Bon stornieren und Artikel als unbezahlt im System lassen?","Cancel the receipt and leave productis as unpaid in the queue?","Contrapartida del tique y quedar productis en el systema?"];
|
||||||
|
var BILL_STORNO_DEL_QUEST_TEXT = ["Bon stornieren und Bestellung entfernen?","Cancel the receipt and remove the orders?","Contrapartida del tique y removar las ordenes"];
|
||||||
var BILL_NO_CANCEL_POSS = ["Der Stornovorgang ist fehlgeschlagen. Die wahrscheinlichste Ursache ist ein Tagesabschluss, der den zu stornierenden Bon einschließt. In diesem Fall darf der Bon rückwirkend nicht mehr annuliert werden.",
|
var BILL_NO_CANCEL_POSS = ["Der Stornovorgang ist fehlgeschlagen. Die wahrscheinlichste Ursache ist ein Tagesabschluss, der den zu stornierenden Bon einschließt. In diesem Fall darf der Bon rückwirkend nicht mehr annuliert werden.",
|
||||||
"Cancelling was not possible. Probably the receipt to cancel is already part of a closing. In this case the receipt cannot be cancelled.",
|
"Cancelling was not possible. Probably the receipt to cancel is already part of a closing. In this case the receipt cannot be cancelled.",
|
||||||
"Contrapartida no fue posible. Probablemente el tique esta ya cerrado."];
|
"Contrapartida no fue posible. Probablemente el tique esta ya cerrado."];
|
||||||
|
@ -178,7 +181,18 @@ function doAjaxCancelBill(billid,stornocode,reason) {
|
||||||
var data = {
|
var data = {
|
||||||
billid: billid,
|
billid: billid,
|
||||||
stornocode: stornocode,
|
stornocode: stornocode,
|
||||||
reason:reason.trim()
|
reason:reason.trim(),
|
||||||
|
removeproducts: 0
|
||||||
|
};
|
||||||
|
doAjax("POST","php/contenthandler.php?module=bill&command=cancelBill",data,cancelBill,"Bonstorno abgebrochen");
|
||||||
|
}
|
||||||
|
|
||||||
|
function doAjaxCancelDeleteBill(billid,stornocode,reason) {
|
||||||
|
var data = {
|
||||||
|
billid: billid,
|
||||||
|
stornocode: stornocode,
|
||||||
|
reason:reason.trim(),
|
||||||
|
removeproducts: 1
|
||||||
};
|
};
|
||||||
doAjax("POST","php/contenthandler.php?module=bill&command=cancelBill",data,cancelBill,"Bonstorno abgebrochen");
|
doAjax("POST","php/contenthandler.php?module=bill&command=cancelBill",data,cancelBill,"Bonstorno abgebrochen");
|
||||||
}
|
}
|
||||||
|
@ -245,12 +259,14 @@ function displayBillsWithContent (jsonContent) {
|
||||||
|
|
||||||
var printbuttonid = 'print_' + billid;
|
var printbuttonid = 'print_' + billid;
|
||||||
var cancelbuttonid = 'cancel_' + billid;
|
var cancelbuttonid = 'cancel_' + billid;
|
||||||
|
var canceldeletebuttonid = 'cancelanddelete_' + billid;
|
||||||
|
|
||||||
$("#collapse_" + billid).find("#billdate").html(date_time);
|
$("#collapse_" + billid).find("#billdate").html(date_time);
|
||||||
var contentToPrint = new Array(id,longdate,bill[0]);
|
var contentToPrint = new Array(id,longdate,bill[0]);
|
||||||
$("#" + printbuttonid).data("entrydata", contentToPrint);
|
$("#" + printbuttonid).data("entrydata", contentToPrint);
|
||||||
if (entry.isClosed == 0) {
|
if (entry.isClosed == 0) {
|
||||||
$("#" + cancelbuttonid).data("billid", id);
|
$("#" + cancelbuttonid).data("billid", id);
|
||||||
|
$("#" + canceldeletebuttonid).data("billid", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#collapse_" + billid).trigger("create");
|
$("#collapse_" + billid).trigger("create");
|
||||||
|
@ -280,6 +296,15 @@ function displayBillsWithContent (jsonContent) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".canceldeletebuttons").off("click").on("click", function (e) {
|
||||||
|
var billid = this.id.split("_")[1];
|
||||||
|
$("#stornocode").val("");
|
||||||
|
$("#stornoreason").val("");
|
||||||
|
areYouSure(BILL_STORNO_DEL_QUEST_TITLE[lang], BILL_STORNO_DEL_QUEST_TEXT[lang], BILL_YES[lang], function() {
|
||||||
|
doAjaxCancelDeleteBill(billid,$("#stornocode").val(),$("#stornoreason").val());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$(".changehostbuttons").off("click").on("click", function (e) {
|
$(".changehostbuttons").off("click").on("click", function (e) {
|
||||||
var billid = this.id.split("_")[1];
|
var billid = this.id.split("_")[1];
|
||||||
var isNowHost = this.id.split("_")[2];
|
var isNowHost = this.id.split("_")[2];
|
||||||
|
@ -321,11 +346,13 @@ function getBillWithId(id) {
|
||||||
|
|
||||||
var printbuttonid = 'print_' + id;
|
var printbuttonid = 'print_' + id;
|
||||||
var cancelbuttonid = 'cancel_' + id;
|
var cancelbuttonid = 'cancel_' + id;
|
||||||
|
var canceldeletebuttonid = 'cancelanddelete_' + id;
|
||||||
var changehostbuttonid = 'changehost_' + id + "_" + entry.host;
|
var changehostbuttonid = 'changehost_' + id + "_" + entry.host;
|
||||||
var collapse_elem_id = 'collapse_' + id;
|
var collapse_elem_id = 'collapse_' + id;
|
||||||
|
|
||||||
var printbutton = '<a href="#" data-role="button" id="' + printbuttonid + '" data-theme="f" class="printbuttons">' + BILL_PRINT[lang] + '</a>';
|
var printbutton = '<a href="#" data-role="button" id="' + printbuttonid + '" data-theme="f" class="printbuttons">' + BILL_PRINT[lang] + '</a>';
|
||||||
var cancelButton = '<a href="#" data-role="button" id="' + cancelbuttonid + '" data-theme="f" class="cancelbuttons">' + BILL_STORNO[lang] + '</a>';
|
var cancelButton = '<a href="#" data-role="button" id="' + cancelbuttonid + '" data-theme="f" class="cancelbuttons">' + BILL_STORNO[lang] + '</a>';
|
||||||
|
var cancelAndDeleteButton = '<a href="#" data-role="button" id="' + canceldeletebuttonid + '" data-theme="f" class="canceldeletebuttons">' + BILL_STORNO_AND_DELETE[lang] + '</a>';
|
||||||
var toggleHostTxt = BILL_DO_HOST[lang];
|
var toggleHostTxt = BILL_DO_HOST[lang];
|
||||||
if (entry.host == 1) {
|
if (entry.host == 1) {
|
||||||
toggleHostTxt = BILL_UNDO_HOST[lang];
|
toggleHostTxt = BILL_UNDO_HOST[lang];
|
||||||
|
@ -337,7 +364,7 @@ function getBillWithId(id) {
|
||||||
|
|
||||||
var txt = '<center>' + printbutton;
|
var txt = '<center>' + printbutton;
|
||||||
if (entry.isClosed == 0) {
|
if (entry.isClosed == 0) {
|
||||||
txt += cancelButton + changehostbutton + '<br>' + content + '</center>';
|
txt += cancelButton + cancelAndDeleteButton + changehostbutton + '<br>' + content + '</center>';
|
||||||
} else {
|
} else {
|
||||||
txt += '<p><center>' + '<br>' + content + '</center>';
|
txt += '<p><center>' + '<br>' + content + '</center>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#actmenudlg{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;border:2px solid #73ad21;background-color:#ddd}#actmenudlg>*{padding:10px;flex:1 100%}#actprodinfo{background:coral}#actcounttogo,#actdiscount,#actremark,#actprice{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:stretch;align-items:stretch}.actbtn{background-color:#ff0;margin:10px;height:20px;width:100px;border-radius:4px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;-webkit-justify-content:center;justify-content:center;box-shadow:10px 10px 5px #888}.actbtn_notclickable{background-color:#ff0;margin:10px;height:20px;width:100px;border-radius:4px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888}
|
#actmenudlg{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;border:2px solid #73ad21;background-color:#ddd}#actmenudlg>*{padding:10px;flex:1 100%}#actprodinfo{background:coral}#actcounttogo,#actdiscount,#actremark,#actprice{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:stretch;align-items:stretch}.actbtn{background-color:#ff0;margin:10px;height:20px;width:100px;border-radius:4px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;-webkit-justify-content:center;justify-content:center;box-shadow:10px 10px 5px #888}.actbtnlarge{background-color:#fa0;margin:10px;height:20px;width:500px;border-radius:4px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;-webkit-justify-content:center;justify-content:center;box-shadow:10px 10px 5px #888}.actbtn_notclickable{background-color:#ff0;margin:10px;height:20px;width:100px;border-radius:4px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888}
|
|
@ -4,7 +4,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -203,7 +203,7 @@ function handleResultOfInstallCheck(is_installed) {
|
||||||
if (is_installed == "Yes") {
|
if (is_installed == "Yes") {
|
||||||
useInstallation();
|
useInstallation();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){document.location.href = "install.html?v=1.2.17"},500);
|
setTimeout(function(){document.location.href = "install.html?v=1.2.18"},500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -679,7 +679,7 @@ $(document).ready(function() {
|
||||||
<tr id=updateline>
|
<tr id=updateline>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td align=center>
|
<td align=center>
|
||||||
<button id="updatebtn">Update -> 1.2.17</button>
|
<button id="updatebtn">Update -> 1.2.18</button>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1612,6 +1612,33 @@ return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateUserTable1217_1218($prefix, $version, $dbname) {
|
||||||
|
$pdo = $this->pdo;
|
||||||
|
try {
|
||||||
|
if ($version != "1.2.17") {
|
||||||
|
$ret = $this->updateUserTable1216_1217($prefix, $version, $dbname);
|
||||||
|
if (!$ret) {
|
||||||
|
echo "Version update v1.2.16 to 1.2.17 not successful.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DbUtils::overrulePrefix($prefix);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
|
||||||
|
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||||
|
$stmt->execute(array('printandqueuejobs','0'));
|
||||||
|
$stmt->execute(array('cashenabled','1'));
|
||||||
|
$stmt->execute(array('beepcooked','0'));
|
||||||
|
|
||||||
|
$this->updateVersion($pdo, '1.2.18');
|
||||||
|
return true;
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "Error in v1.2.17 to 1.2.18: $e";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setVersion($prefix,$theVersion) {
|
function setVersion($prefix,$theVersion) {
|
||||||
$pdo = $this->pdo;
|
$pdo = $this->pdo;
|
||||||
try {
|
try {
|
||||||
|
@ -1729,7 +1756,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.17')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.18')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
||||||
|
@ -1763,6 +1790,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'oneprodworkreceipts', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'oneprodworkreceipts', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'digiprintwork', '1')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'digiprintwork', '1')");
|
||||||
|
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'printandqueuejobs', '0')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'cashenabled', '1')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'beepcooked', '0')");
|
||||||
|
|
||||||
// prepare for later inconsistency check if version is obsolete
|
// prepare for later inconsistency check if version is obsolete
|
||||||
date_default_timezone_set($timezone);
|
date_default_timezone_set($timezone);
|
||||||
$installDate = date('Y-m-d H:i:s');
|
$installDate = date('Y-m-d H:i:s');
|
||||||
|
@ -2097,7 +2128,7 @@ $zones[] = $timezone_identifiers[$i];
|
||||||
}
|
}
|
||||||
echo json_encode($zones);
|
echo json_encode($zones);
|
||||||
} else if ($command == 'update') {
|
} else if ($command == 'update') {
|
||||||
$installerVersion = "1.2.17";
|
$installerVersion = "1.2.18";
|
||||||
|
|
||||||
$admin = new InstallAdmin();
|
$admin = new InstallAdmin();
|
||||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||||
|
@ -2127,7 +2158,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
||||||
"1.0.40","1.0.41","1.0.42","1.0.43",
|
"1.0.40","1.0.41","1.0.42","1.0.43",
|
||||||
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
|
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
|
||||||
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
||||||
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16"
|
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!in_array($version, $supportedVersions)) {
|
if (!in_array($version, $supportedVersions)) {
|
||||||
|
@ -2135,7 +2166,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $admin->updateUserTable1216_1217($_POST['prefix'], $version, $_POST['db']);
|
$ret = $admin->updateUserTable1217_1218($_POST['prefix'], $version, $_POST['db']);
|
||||||
|
|
||||||
if(session_id() == '') {
|
if(session_id() == '') {
|
||||||
session_start();
|
session_start();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -148,6 +148,12 @@ var MAN_DIGI_PRINTWORK = ["Arbeitsbons in Küchen-/Baransicht","Work receipts in
|
||||||
var MAN_DIGI_PRINTWORK_HINT = ["Sollen Arbeitsbon erstellt werden, wenn in der Küchen-/Baransicht Produkte als zubereitet markiert werden?",
|
var MAN_DIGI_PRINTWORK_HINT = ["Sollen Arbeitsbon erstellt werden, wenn in der Küchen-/Baransicht Produkte als zubereitet markiert werden?",
|
||||||
"Shall work receipts be printed if products are declared cooked in the kitchen or bar view?",
|
"Shall work receipts be printed if products are declared cooked in the kitchen or bar view?",
|
||||||
"Imprimir tiques de trabajo si productos estan declarados cocinados en el module cocina or bar?"];
|
"Imprimir tiques de trabajo si productos estan declarados cocinados en el module cocina or bar?"];
|
||||||
|
var MAN_PRINT_AND_QUEUE_HINT = ["Wird dieser Wert auf 'ja' gesetzt, so werden die Druckaufträge im digitalen Workflow zusätzlich auf Arbeitsbons ausgedruckt.",
|
||||||
|
"If this setting is set to 'yes' in the digital workflow the orders are additionally printed.",
|
||||||
|
"Si el valor esta 'si', orders van a ser imprimidos también en el modo digital."];
|
||||||
|
var MAN_CASH_HINT = ["Die Kassen kann mit dieser Einstellung übergangen werden (Einstellung: nein). Jede Bestellung wird dann sofort mit der Übermittlung an den Server als als bar bezahlt deklariert.",
|
||||||
|
"The cash function can be skipped ('no'). In this case every order will be declared as paid by cash automatically.",
|
||||||
|
"Si configurado a 'no', cada ordern va a ser declarada pagada."];
|
||||||
var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese Einstellung, ob bei Druck auf den Button 'Kasse' Arbeitsbons gedruckt werden sollen.",
|
var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese Einstellung, ob bei Druck auf den Button 'Kasse' Arbeitsbons gedruckt werden sollen.",
|
||||||
"In the 'only work receipts' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view work receipts shall be printed.",
|
"In the 'only work receipts' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view work receipts shall be printed.",
|
||||||
"En el modus 'solo tiques de trabajar' este boton especifica se debe imprimido el tique de trabajar despues el click en el boton 'caja' en la vista de camarero."];
|
"En el modus 'solo tiques de trabajar' este boton especifica se debe imprimido el tique de trabajar despues el click en el boton 'caja' en la vista de camarero."];
|
||||||
|
@ -300,9 +306,14 @@ var MAN_CONFIRM_GO_LIVE = ["Die Umsatz- und Logdaten wurden gelöscht und nur di
|
||||||
"La configuración esta re-creado. Entonces es necesario registrar de nuevo."];
|
"La configuración esta re-creado. Entonces es necesario registrar de nuevo."];
|
||||||
var MAN_GENSECTION_TXT = ["Allgemeine Einstellungen:","General settings:","Configuración general:"];
|
var MAN_GENSECTION_TXT = ["Allgemeine Einstellungen:","General settings:","Configuración general:"];
|
||||||
var MAN_MOBILSECTION_TXT = ["Einstellungen für die Mobilansicht:","Settings for the mobil view:","Configuración para la vista mobil:"];
|
var MAN_MOBILSECTION_TXT = ["Einstellungen für die Mobilansicht:","Settings for the mobil view:","Configuración para la vista mobil:"];
|
||||||
|
var MAN_PRINT_AND_QUEUE = ["Drucke Jobs und zeige sie auch in der Küchen-/Baransicht an","Print jobs and show them also in the kitchen/bar view","Imprimir orders y también inserta en la vista de cocina/bar"];
|
||||||
|
var MAN_CASH = ["Kassenfunktion aktiviert","Enabled cash function","Caja activada"];
|
||||||
|
var MAN_BEEP_COOKED = ["Signalton, wenn neues Produkt serviert werden kann (experimentell)","Audio signal if new product can be served (experimental)","Señal audio si un producto nuevo esta cocinado"];
|
||||||
|
var MAN_SPECIAL_SETTINGS_TXT = ["Einstellungen für spezielle Abläufe:","Settings for special workflows:","Configuración para workflows muy escpeciales:"];
|
||||||
|
var MAN_ROOMCHANGE_WARNING = ["Alten Raumplan löschen und neuen festlegen? Bestellungen offener Tische gehen verloren!","Replace room map? Orders of open tables will be lost!","Sustituir mapa de mesas? Orders de mesas abiertas van a ser borradas!"];
|
||||||
|
|
||||||
var lang = 0;
|
var lang = 0;
|
||||||
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1];
|
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0];
|
||||||
|
|
||||||
var numberOfClosings = 0;
|
var numberOfClosings = 0;
|
||||||
|
|
||||||
|
@ -339,6 +350,9 @@ var generalValuesSettings = [
|
||||||
["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15],
|
["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15],
|
||||||
["oneprodworkreceipts",MAN_ONE_PROD_WORKREC[lang],"s",17],
|
["oneprodworkreceipts",MAN_ONE_PROD_WORKREC[lang],"s",17],
|
||||||
["digiprintwork",MAN_DIGI_PRINTWORK[lang],"s",18],
|
["digiprintwork",MAN_DIGI_PRINTWORK[lang],"s",18],
|
||||||
|
["printandqueuejobs",MAN_PRINT_AND_QUEUE[lang],"s",19],
|
||||||
|
["cashenabled",MAN_CASH[lang],"s",20],
|
||||||
|
["beepcooked",MAN_BEEP_COOKED[lang],"s",21],
|
||||||
["addreceipttoprinter",MAN_ADD_RECPRINTER[lang],"s",16],
|
["addreceipttoprinter",MAN_ADD_RECPRINTER[lang],"s",16],
|
||||||
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
|
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
|
||||||
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
|
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
|
||||||
|
@ -467,6 +481,9 @@ function setLanguage(l) {
|
||||||
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
|
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
|
||||||
$("#generalsectiontxt").html(MAN_GENSECTION_TXT[l]);
|
$("#generalsectiontxt").html(MAN_GENSECTION_TXT[l]);
|
||||||
$("#mobilviewsectiontxt").html(MAN_MOBILSECTION_TXT[l]);
|
$("#mobilviewsectiontxt").html(MAN_MOBILSECTION_TXT[l]);
|
||||||
|
$("#specialsettingssectiontxt").html(MAN_SPECIAL_SETTINGS_TXT[l]);
|
||||||
|
$("#printandqueuehint").html(MAN_PRINT_AND_QUEUE_HINT[l]);
|
||||||
|
$("#cashhint").html(MAN_CASH_HINT[l]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMonthSelection(label) {
|
function createMonthSelection(label) {
|
||||||
|
@ -568,6 +585,9 @@ function insertGeneralConfigItems(configResult) {
|
||||||
$("#partOfWaitergopayprint").html(createWaitergopayprint(values.waitergopayprint));
|
$("#partOfWaitergopayprint").html(createWaitergopayprint(values.waitergopayprint));
|
||||||
$("#partOfOneprodworkreceipts").html(createOneprodworkreceipts(values.oneprodworkreceipts));
|
$("#partOfOneprodworkreceipts").html(createOneprodworkreceipts(values.oneprodworkreceipts));
|
||||||
$("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork));
|
$("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork));
|
||||||
|
$("#partOfPrintAndQueueJobs").html(createPrintAndQueueJobs(values.printandqueuejobs));
|
||||||
|
$("#partOfCash").html(createCash(values.cashenabled));
|
||||||
|
$("#partOfBeepCooked").html(createBeepCooked(values.beepcooked));
|
||||||
|
|
||||||
var language = values.billlanguage;
|
var language = values.billlanguage;
|
||||||
generalVals[2] = language;
|
generalVals[2] = language;
|
||||||
|
@ -606,6 +626,9 @@ function insertGeneralConfigItems(configResult) {
|
||||||
generalVals[15] = values.waitergopayprint;
|
generalVals[15] = values.waitergopayprint;
|
||||||
generalVals[17] = values.oneprodworkreceipts;
|
generalVals[17] = values.oneprodworkreceipts;
|
||||||
generalVals[18] = values.digiprintwork;
|
generalVals[18] = values.digiprintwork;
|
||||||
|
generalVals[19] = values.printandqueuejobs;
|
||||||
|
generalVals[20] = values.cashenabled;
|
||||||
|
generalVals[21] = values.beepcooked;
|
||||||
|
|
||||||
$("#smtphost").val(values.smtphost);
|
$("#smtphost").val(values.smtphost);
|
||||||
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
|
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
|
||||||
|
@ -747,6 +770,15 @@ function createDigiprintwork(theValue) {
|
||||||
function createGroupWorkItemsPart(theValue) {
|
function createGroupWorkItemsPart(theValue) {
|
||||||
return createYesNo("groupworkitems", MAN_GROUP_WORK_ITEMS, theValue);
|
return createYesNo("groupworkitems", MAN_GROUP_WORK_ITEMS, theValue);
|
||||||
}
|
}
|
||||||
|
function createPrintAndQueueJobs(theValue) {
|
||||||
|
return createYesNo("printandqueuejobs",MAN_PRINT_AND_QUEUE, theValue);
|
||||||
|
}
|
||||||
|
function createCash(theValue) {
|
||||||
|
return createYesNo("cashenabled",MAN_CASH, theValue);
|
||||||
|
}
|
||||||
|
function createBeepCooked(theValue) {
|
||||||
|
return createYesNo("beepcooked",MAN_BEEP_COOKED, theValue);
|
||||||
|
}
|
||||||
|
|
||||||
function createYesNo(label,nameOnGui,theValue) {
|
function createYesNo(label,nameOnGui,theValue) {
|
||||||
var html = '<div class="ui-field-contain">';
|
var html = '<div class="ui-field-contain">';
|
||||||
|
@ -1172,7 +1204,7 @@ function binding() {
|
||||||
$("#roomfield_apply").off("click").on("click", function (e) {
|
$("#roomfield_apply").off("click").on("click", function (e) {
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
areYouSure("Raumdefinition", "Alten Raumplan löschen und neuen festlegen", "Ja", function() {
|
areYouSure("Raumdefinition", MAN_ROOMCHANGE_WARNING[lang], "Ja", function() {
|
||||||
roomfield_apply();
|
roomfield_apply();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2494,6 +2526,12 @@ $(document).on("pageinit", "#admin-page", function () {
|
||||||
<div id="partOfBigFontWorkReceipt"></div>
|
<div id="partOfBigFontWorkReceipt"></div>
|
||||||
<div id="partOfGroupWorkItems"></div>
|
<div id="partOfGroupWorkItems"></div>
|
||||||
|
|
||||||
|
<div id="partOfDiscount1"></div>
|
||||||
|
<div id="partOfDiscount2"></div>
|
||||||
|
<div id="partOfDiscount3"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="partOfAustria"></div>
|
<div id="partOfAustria"></div>
|
||||||
|
|
||||||
<div id="partIfAustriaEnabled">
|
<div id="partIfAustriaEnabled">
|
||||||
|
@ -2536,9 +2574,21 @@ $(document).on("pageinit", "#admin-page", function () {
|
||||||
|
|
||||||
<div id="partOfProminentSearch"></div>
|
<div id="partOfProminentSearch"></div>
|
||||||
|
|
||||||
<div id="partOfDiscount1"></div>
|
<br><b><u><span id="specialsettingssectiontxt">Spezialeinstellungen</span></u></b><br><br>
|
||||||
<div id="partOfDiscount2"></div>
|
|
||||||
<div id="partOfDiscount3"></div>
|
<div>
|
||||||
|
<div id="partOfPrintAndQueueJobs"></div>
|
||||||
|
<i id=printandqueuehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div id="partOfCash"></div>
|
||||||
|
<i id=cashhint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="partOfBeepCooked"></div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
|
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
|
||||||
</form><!-- Konfiguration -->
|
</form><!-- Konfiguration -->
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -711,7 +711,7 @@ class Admin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'"));
|
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'","'cashenabled'"));
|
||||||
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
@ -796,6 +796,9 @@ class Admin {
|
||||||
$paymentconfig = CommonUtils::getConfigValue($pdo,"paymentconfig",0);
|
$paymentconfig = CommonUtils::getConfigValue($pdo,"paymentconfig",0);
|
||||||
$workflowconfig = CommonUtils::getConfigValue($pdo,"workflowconfig",0);
|
$workflowconfig = CommonUtils::getConfigValue($pdo,"workflowconfig",0);
|
||||||
$addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter","");
|
$addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter","");
|
||||||
|
$printandqueuejobs = CommonUtils::getConfigValue($pdo,"printandqueuejobs",0);
|
||||||
|
$cashenabled = CommonUtils::getConfigValue($pdo,"cashenabled",1);
|
||||||
|
$beepcooked = CommonUtils::getConfigValue($pdo,"beepcooked",0);
|
||||||
|
|
||||||
$smtphost = "";
|
$smtphost = "";
|
||||||
$smtpauth = 1;
|
$smtpauth = 1;
|
||||||
|
@ -844,7 +847,8 @@ class Admin {
|
||||||
"webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3,
|
"webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3,
|
||||||
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts,
|
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts,
|
||||||
"digiprintwork" => $digiprintwork,
|
"digiprintwork" => $digiprintwork,
|
||||||
"paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "addreceipttoprinter" => $addreceipttoprinter
|
"paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "addreceipttoprinter" => $addreceipttoprinter,
|
||||||
|
"printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "beepcooked" => $beepcooked
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($forHtml) {
|
if ($forHtml) {
|
||||||
|
@ -936,7 +940,7 @@ class Admin {
|
||||||
$view = "preferences.html";
|
$view = "preferences.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($view . "?v=1.2.17");
|
echo json_encode($view . "?v=1.2.18");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1142,24 +1146,24 @@ class Admin {
|
||||||
|
|
||||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||||
if ($_SESSION['modus'] == 0) {
|
if ($_SESSION['modus'] == 0) {
|
||||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.17"); };
|
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.18"); };
|
||||||
} else {
|
} else {
|
||||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.17"); };
|
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.18"); };
|
||||||
}
|
}
|
||||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.17"); };
|
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.17"); };
|
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.17"); };
|
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.18"); };
|
||||||
if ($_SESSION['modus'] == 0) {
|
if ($_SESSION['modus'] == 0) {
|
||||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.17"); };
|
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.18"); };
|
||||||
}
|
}
|
||||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.17"); };
|
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.17"); };
|
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.17"); };
|
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.17"); };
|
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.17"); };
|
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.18"); };
|
||||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.17"); };
|
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.18"); };
|
||||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.17");
|
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.18");
|
||||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.17");
|
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.18");
|
||||||
}
|
}
|
||||||
|
|
||||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||||
|
@ -1168,7 +1172,7 @@ class Admin {
|
||||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||||
}
|
}
|
||||||
// CAUTION: change version also in config.txt!!!
|
// CAUTION: change version also in config.txt!!!
|
||||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.17",
|
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.18",
|
||||||
"user" => $currentUser,
|
"user" => $currentUser,
|
||||||
"menu" => $mainMenu,
|
"menu" => $mainMenu,
|
||||||
"waitermessage" => $waiterMessage,
|
"waitermessage" => $waiterMessage,
|
||||||
|
@ -1395,6 +1399,9 @@ class Admin {
|
||||||
"remoteaccesscode" => array("dbcol" => "remoteaccesscode","checknum" => 0),
|
"remoteaccesscode" => array("dbcol" => "remoteaccesscode","checknum" => 0),
|
||||||
"webimpressum" => array("dbcol" => "webimpressum","checknum" => 0),
|
"webimpressum" => array("dbcol" => "webimpressum","checknum" => 0),
|
||||||
"cancelunpaidcode" => array("dbcol" => "cancelunpaidcode","checknum" => 0),
|
"cancelunpaidcode" => array("dbcol" => "cancelunpaidcode","checknum" => 0),
|
||||||
|
"printandqueuejobs" => array("dbcol" => "printandqueuejobs","checknum" => 0),
|
||||||
|
"cashenabled" => array("dbcol" => "cashenabled","checknum" => 0),
|
||||||
|
"beepcooked" => array("dbcol" => "beepcooked","checknum" => 0),
|
||||||
"smtphost" => array("dbcol" => "smtphost","checknum" => 0),
|
"smtphost" => array("dbcol" => "smtphost","checknum" => 0),
|
||||||
"smtpauth" => array("dbcol" => "smtpauth","checknum" => 1),
|
"smtpauth" => array("dbcol" => "smtpauth","checknum" => 1),
|
||||||
"smtpuser" => array("dbcol" => "smtpuser","checknum" => 0),
|
"smtpuser" => array("dbcol" => "smtpuser","checknum" => 0),
|
||||||
|
|
|
@ -126,7 +126,7 @@ class Bill {
|
||||||
$this->getLastBillsWithContent($_GET['day'],$_GET['month'],$_GET['year']);
|
$this->getLastBillsWithContent($_GET['day'],$_GET['month'],$_GET['year']);
|
||||||
} else if ($command == 'cancelBill') {
|
} else if ($command == 'cancelBill') {
|
||||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
$this->cancelBill($pdo,$_POST['billid'],$_POST['stornocode'],$_POST['reason'],true,true,true);
|
$this->cancelBill($pdo,$_POST['billid'],$_POST['stornocode'],$_POST['reason'],true,true,true,$_POST['removeproducts']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
|
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
|
||||||
|
@ -549,7 +549,7 @@ class Bill {
|
||||||
$stmt->execute(array($billid));
|
$stmt->execute(array($billid));
|
||||||
$row = $stmt->fetchObject();
|
$row = $stmt->fetchObject();
|
||||||
|
|
||||||
$ok = $this->cancelBill($pdo, $billid, "", "OrderSprinter-Bewirtungseigenschaft", false, false, false);
|
$ok = $this->cancelBill($pdo, $billid, "", "OrderSprinter-Bewirtungseigenschaft", false, false, false, 0);
|
||||||
if (!$ok) {
|
if (!$ok) {
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_CANCEL_IMOSSIBLE, "msg" => ERROR_BILL_CANCEL_IMOSSIBLE_MSG));
|
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_CANCEL_IMOSSIBLE, "msg" => ERROR_BILL_CANCEL_IMOSSIBLE_MSG));
|
||||||
|
@ -611,7 +611,7 @@ class Bill {
|
||||||
/*
|
/*
|
||||||
* Cancel a bill - set all queue items to not paid and drop the bill entry
|
* Cancel a bill - set all queue items to not paid and drop the bill entry
|
||||||
*/
|
*/
|
||||||
private function cancelBill($pdo,$billid,$stornocode,$reason,$doOwnTransaction,$doEcho,$checkStornoCode) {
|
private function cancelBill($pdo,$billid,$stornocode,$reason,$doOwnTransaction,$doEcho,$checkStornoCode,$removeproducts = 0) {
|
||||||
// current time
|
// current time
|
||||||
date_default_timezone_set(DbUtils::getTimeZone());
|
date_default_timezone_set(DbUtils::getTimeZone());
|
||||||
$currentTime = date('Y-m-d H:i:s');
|
$currentTime = date('Y-m-d H:i:s');
|
||||||
|
@ -719,7 +719,11 @@ class Bill {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. clear connection between queue item and bill
|
// 1. clear connection between queue item and bill
|
||||||
|
if ($removeproducts == 0) {
|
||||||
$sql = "UPDATE %queue% SET paidtime=null,billid=null WHERE billid=?";
|
$sql = "UPDATE %queue% SET paidtime=null,billid=null WHERE billid=?";
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE %queue% SET ordertime=null,paidtime=null,billid=null WHERE billid=?";
|
||||||
|
}
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||||
$stmt->execute(array($billid));
|
$stmt->execute(array($billid));
|
||||||
|
|
||||||
|
|
|
@ -278,6 +278,25 @@ class CommonUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getRowSqlObject($pdo,$sql,$params) {
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
if (is_null($params)) {
|
||||||
|
$stmt->execute();
|
||||||
|
} else {
|
||||||
|
$stmt->execute($params);
|
||||||
|
}
|
||||||
|
return ($stmt->fetchObject());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function execSql($pdo,$sql,$params) {
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
if (is_null($params)) {
|
||||||
|
$stmt->execute();
|
||||||
|
} else {
|
||||||
|
$stmt->execute($params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function getConfigValue($pdo,$item,$default) {
|
public static function getConfigValue($pdo,$item,$default) {
|
||||||
$sql = "SELECT count(id) as countid FROM %config% WHERE name=?";
|
$sql = "SELECT count(id) as countid FROM %config% WHERE name=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
|
|
@ -101,12 +101,37 @@ class QueueContent {
|
||||||
} else if ($command == 'getJsonProductsOfTableToPay') {
|
} else if ($command == 'getJsonProductsOfTableToPay') {
|
||||||
$this->getJsonProductsOfTableToPay($_GET['tableid']);
|
$this->getJsonProductsOfTableToPay($_GET['tableid']);
|
||||||
} else if ($command == 'declarePaidCreateBillReturnBillId') {
|
} else if ($command == 'declarePaidCreateBillReturnBillId') {
|
||||||
$this->declarePaidCreateBillReturnBillId($_POST['ids'],$_POST['brutto'],$_POST['netto'],$_POST['tableid'],$_POST['paymentid'],$_POST['tax'],$_POST['decpoint'],$_POST['declareready'],$_POST['host']);
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
|
$this->declarePaidCreateBillReturnBillId($pdo,$_POST['ids'],$_POST['tableid'],$_POST['paymentid'],$_POST['declareready'],$_POST['host']);
|
||||||
} else {
|
} else {
|
||||||
echo "Command not supported.";
|
echo "Command not supported.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function setNewProductsToServe($pdo,$val) {
|
||||||
|
$sql = "SELECT count(id) as countid FROM %work% WHERE item=?";
|
||||||
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array("newproductstoserve"));
|
||||||
|
if ($row->countid == 0) {
|
||||||
|
$sql = "INSERT INTO %work% (item,value,signature) VALUES (?,?,?)";
|
||||||
|
CommonUtils::execSql($pdo, $sql, array("newproductstoserve",$val,null));
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE %work% SET value=? WHERE item=?";
|
||||||
|
CommonUtils::execSql($pdo, $sql, array($val,"newproductstoserve"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function getNewProductsToServe($pdo) {
|
||||||
|
$sql = "SELECT count(id) as countid FROM %work% WHERE item=?";
|
||||||
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array("newproductstoserve"));
|
||||||
|
if ($row->countid == 0) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT value FROM %work% WHERE item=?";
|
||||||
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array("newproductstoserve"));
|
||||||
|
return $row->value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getJsonTableNameFromId($tableid) {
|
function getJsonTableNameFromId($tableid) {
|
||||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
$commonUtils = new CommonUtils();
|
$commonUtils = new CommonUtils();
|
||||||
|
@ -117,9 +142,7 @@ class QueueContent {
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
|
||||||
$sql = "SELECT username FROM %user% WHERE id=?";
|
$sql = "SELECT username FROM %user% WHERE id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($userid));
|
||||||
$stmt->execute(array($userid));
|
|
||||||
$row =$stmt->fetchObject();
|
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
return($row->username);
|
return($row->username);
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,9 +152,7 @@ class QueueContent {
|
||||||
|
|
||||||
private function areBillExisting($pdo) {
|
private function areBillExisting($pdo) {
|
||||||
$sql = "SELECT count(id) as countid FROM %bill%";
|
$sql = "SELECT count(id) as countid FROM %bill%";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
|
||||||
$stmt->execute();
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$count = intval($row->countid);
|
$count = intval($row->countid);
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -343,9 +364,7 @@ class QueueContent {
|
||||||
$queueStr = implode(',',$queueIds);
|
$queueStr = implode(',',$queueIds);
|
||||||
|
|
||||||
$sql = "SELECT setting FROM %config% where name=?";
|
$sql = "SELECT setting FROM %config% where name=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array('groupworkitems'));
|
||||||
$stmt->execute(array('groupworkitems'));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$groupworkitems = $row->setting;
|
$groupworkitems = $row->setting;
|
||||||
if (is_null($groupworkitems)) {
|
if (is_null($groupworkitems)) {
|
||||||
$groupworkitems = 1;
|
$groupworkitems = 1;
|
||||||
|
@ -366,9 +385,7 @@ class QueueContent {
|
||||||
|
|
||||||
if (!is_null($tableid) && ($tableid != 0)) {
|
if (!is_null($tableid) && ($tableid != 0)) {
|
||||||
$sql = "SELECT DISTINCT %room%.printer as printer FROM %queue%,%resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id LIMIT 1";
|
$sql = "SELECT DISTINCT %room%.printer as printer FROM %queue%,%resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id LIMIT 1";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($tableid));
|
||||||
$stmt->execute(array($tableid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$roomPrinter = $row->printer;
|
$roomPrinter = $row->printer;
|
||||||
if (!is_null($roomPrinter)) {
|
if (!is_null($roomPrinter)) {
|
||||||
$thePrinter = $roomPrinter;
|
$thePrinter = $roomPrinter;
|
||||||
|
@ -395,14 +412,12 @@ class QueueContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($groupworkitems) {
|
if ($groupworkitems) {
|
||||||
// new put the count number into the longname
|
// now put the count number into the longname
|
||||||
foreach($jobs as &$aJob) {
|
foreach($jobs as &$aJob) {
|
||||||
$cnt = $aJob["count"];
|
$cnt = $aJob["count"];
|
||||||
if ($cnt > 1) {
|
|
||||||
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
|
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $jobs;
|
return $jobs;
|
||||||
}
|
}
|
||||||
|
@ -458,8 +473,11 @@ class QueueContent {
|
||||||
$this->createAWorkReceiptAndQueueWorkPrint($pdo,$drinkJobsPrinter2,$theTableid,1,2,$username,$lang);
|
$this->createAWorkReceiptAndQueueWorkPrint($pdo,$drinkJobsPrinter2,$theTableid,1,2,$username,$lang);
|
||||||
}
|
}
|
||||||
if ($declareReadyDelivered) {
|
if ($declareReadyDelivered) {
|
||||||
|
$printAndQueueJobs = CommonUtils::getConfigValue($pdo, "printandqueuejobs", 0);
|
||||||
|
if ($printAndQueueJobs == 0) {
|
||||||
$this->declareReadyAndDelivered($pdo, $insertedQueueIds);
|
$this->declareReadyAndDelivered($pdo, $insertedQueueIds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result = array_merge($foodJobsPrinter1,$foodJobsPrinter2,$drinkJobsPrinter1,$drinkJobsPrinter2);
|
$result = array_merge($foodJobsPrinter1,$foodJobsPrinter2,$drinkJobsPrinter1,$drinkJobsPrinter2);
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -504,9 +522,7 @@ class QueueContent {
|
||||||
$tablename = $takeAwayStr[$lang];
|
$tablename = $takeAwayStr[$lang];
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT tableno,%room%.abbreviation FROM %resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id";
|
$sql = "SELECT tableno,%room%.abbreviation FROM %resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($theTableid));
|
||||||
$stmt->execute(array($theTableid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
|
|
||||||
if (is_null($row->abbreviation)) {
|
if (is_null($row->abbreviation)) {
|
||||||
$tablename = $row->tableno;
|
$tablename = $row->tableno;
|
||||||
|
@ -643,9 +659,7 @@ class QueueContent {
|
||||||
|
|
||||||
function getTableIdOfQueue($pdo,$queueid) {
|
function getTableIdOfQueue($pdo,$queueid) {
|
||||||
$sql = "SELECT tablenr as tableid FROM %queue% WHERE id=?";
|
$sql = "SELECT tablenr as tableid FROM %queue% WHERE id=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
|
||||||
$stmt->execute(array($queueid));
|
|
||||||
$row =$stmt->fetchObject();
|
|
||||||
return $row->tableid;
|
return $row->tableid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,9 +673,7 @@ class QueueContent {
|
||||||
|
|
||||||
// is product already cooking or will it be set to cooking?
|
// is product already cooking or will it be set to cooking?
|
||||||
$sql = "SELECT cooking,productid FROM %queue% WHERE id=?";
|
$sql = "SELECT cooking,productid FROM %queue% WHERE id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
|
||||||
$stmt->execute(array($queueid));
|
|
||||||
$row =$stmt->fetchObject();
|
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
$cooking = $row->cooking;
|
$cooking = $row->cooking;
|
||||||
$productid = $row->productid;
|
$productid = $row->productid;
|
||||||
|
@ -678,6 +690,8 @@ class QueueContent {
|
||||||
if ($useConditions["usesupply"] == 0) {
|
if ($useConditions["usesupply"] == 0) {
|
||||||
// can bypass the supplydesk
|
// can bypass the supplydesk
|
||||||
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
|
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
|
||||||
|
} else {
|
||||||
|
self::setNewProductsToServe($pdo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$payprinttype = CommonUtils::getConfigValue($pdo, 'payprinttype', "l");
|
$payprinttype = CommonUtils::getConfigValue($pdo, 'payprinttype', "l");
|
||||||
|
@ -733,9 +747,7 @@ class QueueContent {
|
||||||
|
|
||||||
// first: is the product still declared as delivered?
|
// first: is the product still declared as delivered?
|
||||||
$sql = "SELECT id FROM %queue% WHERE id=? AND readytime IS NOT NULL";
|
$sql = "SELECT id FROM %queue% WHERE id=? AND readytime IS NOT NULL";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
|
||||||
$stmt->execute(array($queueid));
|
|
||||||
$row =$stmt->fetchObject();
|
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
$foundid = $row->id;
|
$foundid = $row->id;
|
||||||
if ($foundid == $queueid) {
|
if ($foundid == $queueid) {
|
||||||
|
@ -759,17 +771,13 @@ class QueueContent {
|
||||||
|
|
||||||
private function findCategoryOfProd($pdo,$prodid) {
|
private function findCategoryOfProd($pdo,$prodid) {
|
||||||
$sql = "SELECT category FROM %products% WHERE id=?";
|
$sql = "SELECT category FROM %products% WHERE id=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($prodid));
|
||||||
$stmt->execute(array($prodid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
return $row->category;
|
return $row->category;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getUseKitchenAndSupplyForProdInCat($pdo,$catid) {
|
private function getUseKitchenAndSupplyForProdInCat($pdo,$catid) {
|
||||||
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype% WHERE id=?";
|
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype% WHERE id=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($catid));
|
||||||
$stmt->execute(array($catid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
|
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,9 +788,7 @@ class QueueContent {
|
||||||
|
|
||||||
private function getUseKitchenAndSupplyForProdWithPdo($pdo,$prodid) {
|
private function getUseKitchenAndSupplyForProdWithPdo($pdo,$prodid) {
|
||||||
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype%,%products% WHERE %products%.category=%prodtype%.id AND %products%.id=?";
|
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype%,%products% WHERE %products%.category=%prodtype%.id AND %products%.id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($prodid));
|
||||||
$stmt->execute(array($prodid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
|
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
|
||||||
} else {
|
} else {
|
||||||
|
@ -798,6 +804,7 @@ class QueueContent {
|
||||||
* managed here as well
|
* managed here as well
|
||||||
*/
|
*/
|
||||||
function addProductListToQueue($theTableid,$prods,$doPrint,$payprinttype) {
|
function addProductListToQueue($theTableid,$prods,$doPrint,$payprinttype) {
|
||||||
|
|
||||||
if (intval($theTableid) == 0) {
|
if (intval($theTableid) == 0) {
|
||||||
$theTableid = null; // togo room
|
$theTableid = null; // togo room
|
||||||
}
|
}
|
||||||
|
@ -806,8 +813,16 @@ class QueueContent {
|
||||||
session_start();
|
session_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
date_default_timezone_set(DbUtils::getTimeZone());
|
||||||
|
$ordertime = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
|
||||||
|
$printAndQueueJobs = CommonUtils::getConfigValue($pdo, "printandqueuejobs", 0);
|
||||||
|
if ($printAndQueueJobs == 1) {
|
||||||
|
$doPrint = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$pdo->beginTransaction();
|
$pdo->beginTransaction();
|
||||||
|
|
||||||
$togotax = CommonUtils::getExistingConfigValue($pdo, 'togotax');
|
$togotax = CommonUtils::getExistingConfigValue($pdo, 'togotax');
|
||||||
|
@ -831,9 +846,7 @@ class QueueContent {
|
||||||
|
|
||||||
// now get the price for this pricelevel
|
// now get the price for this pricelevel
|
||||||
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
|
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($getPriceSql));
|
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
|
||||||
$stmt->execute(array($productid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
if ($row == null) {
|
if ($row == null) {
|
||||||
echo "Fehler: Preise nicht vorhanden"; // error
|
echo "Fehler: Preise nicht vorhanden"; // error
|
||||||
return;
|
return;
|
||||||
|
@ -911,9 +924,7 @@ class QueueContent {
|
||||||
$extraid = $anExtra["id"];
|
$extraid = $anExtra["id"];
|
||||||
$extraname = $anExtra["name"];
|
$extraname = $anExtra["name"];
|
||||||
$sql = "SELECT price FROM %extras% WHERE id=?";
|
$sql = "SELECT price FROM %extras% WHERE id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($extraid));
|
||||||
$stmt->execute(array($extraid));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$price += floatval($row->price);
|
$price += floatval($row->price);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -922,9 +933,6 @@ class QueueContent {
|
||||||
// first get category of product
|
// first get category of product
|
||||||
$useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
|
$useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
|
||||||
|
|
||||||
date_default_timezone_set(DbUtils::getTimeZone());
|
|
||||||
$ordertime = date('Y-m-d H:i:s');
|
|
||||||
|
|
||||||
$insertSql = "INSERT INTO `%queue%` (
|
$insertSql = "INSERT INTO `%queue%` (
|
||||||
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
|
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
|
||||||
VALUES (
|
VALUES (
|
||||||
|
@ -965,6 +973,12 @@ class QueueContent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cashenabled = CommonUtils::getConfigValue($pdo, "cashenabled", 1);
|
||||||
|
if ($cashenabled == 0) {
|
||||||
|
$idStr = join(',',$insertedQueueIds);
|
||||||
|
$this->declarePaidCreateBillReturnBillId($pdo,$idStr, $theTableid, 1, 0, 0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if ($doPrint == 1) {
|
if ($doPrint == 1) {
|
||||||
if ($payprinttype == "s") {
|
if ($payprinttype == "s") {
|
||||||
$this->doWorkPrint($pdo,$theTableid,$insertedQueueIds,$_SESSION['currentuser'],$payprinttype, $_SESSION['language']);
|
$this->doWorkPrint($pdo,$theTableid,$insertedQueueIds,$_SESSION['currentuser'],$payprinttype, $_SESSION['language']);
|
||||||
|
@ -991,9 +1005,7 @@ class QueueContent {
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
|
||||||
$sql = "SELECT count(id) as countid FROM %bill%";
|
$sql = "SELECT count(id) as countid FROM %bill%";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
|
||||||
$stmt->execute();
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$hasBills = ($row->countid > 0 ? true : false);
|
$hasBills = ($row->countid > 0 ? true : false);
|
||||||
|
|
||||||
if ($hasBills) {
|
if ($hasBills) {
|
||||||
|
@ -1069,9 +1081,8 @@ class QueueContent {
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT count(id) as countid FROM %bill%";
|
$sql = "SELECT count(id) as countid FROM %bill%";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
|
||||||
$stmt->execute();
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
if ($row->countid == 0) {
|
if ($row->countid == 0) {
|
||||||
$sql = "SELECT DISTINCT %queue%.id as quid, ordertime FROM %queue% WHERE ordertime is not null AND isclosed is null AND ";
|
$sql = "SELECT DISTINCT %queue%.id as quid, ordertime FROM %queue% WHERE ordertime is not null AND isclosed is null AND ";
|
||||||
} else {
|
} else {
|
||||||
|
@ -1519,7 +1530,12 @@ class QueueContent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(array_merge($preparedProds,$preparedProds_incomplete_tables));
|
$newProdsToServe = self::getNewProductsToServe($pdo);
|
||||||
|
self::setNewProductsToServe($pdo, 0);
|
||||||
|
|
||||||
|
$items = array_merge($preparedProds,$preparedProds_incomplete_tables);
|
||||||
|
|
||||||
|
echo json_encode(array("items" => $items, "newproductstoserve" => $newProdsToServe));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1616,36 +1632,38 @@ class QueueContent {
|
||||||
* Create bill
|
* Create bill
|
||||||
* Return a bill id
|
* Return a bill id
|
||||||
*/
|
*/
|
||||||
function declarePaidCreateBillReturnBillId($ids,$brutto,$netto,$tableid,$paymentId,$tax,$decpoint,$declareready,$host) {
|
function declarePaidCreateBillReturnBillId($pdo,$ids,$tableid,$paymentId,$declareready,$host,$calledInternally = false) {
|
||||||
|
|
||||||
$userid = $this->getUserId();
|
$userid = $this->getUserId();
|
||||||
|
|
||||||
$ids_array = explode ( ',', $ids );
|
$ids = trim($ids, ",");
|
||||||
|
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$ids_array = explode ( ',', $ids );
|
||||||
|
|
||||||
if (CommonUtils::callPlugin($pdo, "createBill", "replace")) {
|
if (CommonUtils::callPlugin($pdo, "createBill", "replace")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CommonUtils::callPlugin($pdo, "createBill", "before");
|
CommonUtils::callPlugin($pdo, "createBill", "before");
|
||||||
|
|
||||||
|
if (!$calledInternally) {
|
||||||
$pdo->beginTransaction();
|
$pdo->beginTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
// check if all items are not paid yet!
|
// check if all items are not paid yet! Also get rid of empty entries
|
||||||
$allNotPaid = true;
|
$allNotPaid = true;
|
||||||
for ($i=0;$i<count($ids_array);$i++) {
|
for ($i=0;$i<count($ids_array);$i++) {
|
||||||
$anId = $ids_array[$i];
|
$anId = $ids_array[$i];
|
||||||
if (is_numeric($anId)) {
|
if (is_numeric($anId)) {
|
||||||
$sql = "SELECT count(id) as countid FROM %queue% WHERE paidtime is not null AND id=?";
|
$sql = "SELECT count(id) as countid FROM %queue% WHERE paidtime is not null AND id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($anId));
|
||||||
$stmt->execute(array($anId));
|
|
||||||
$row =$stmt->fetchObject();
|
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
$aCount = $row->countid;
|
$aCount = $row->countid;
|
||||||
if (($aCount != null) && ($aCount == 1)) {
|
if (($aCount != null) && ($aCount == 1)) {
|
||||||
$allNotPaid = false;
|
$allNotPaid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$allNotPaid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1657,7 +1675,6 @@ class QueueContent {
|
||||||
if ($allNotPaid == true) {
|
if ($allNotPaid == true) {
|
||||||
$billid = -1;
|
$billid = -1;
|
||||||
|
|
||||||
// find highest bill id
|
|
||||||
$sql = "SELECT id from %bill% ORDER BY id DESC";
|
$sql = "SELECT id from %bill% ORDER BY id DESC";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
@ -1670,14 +1687,14 @@ class QueueContent {
|
||||||
if ($row != null) {
|
if ($row != null) {
|
||||||
$billid = intval($row->id)+1;
|
$billid = intval($row->id)+1;
|
||||||
$sql = "SELECT brutto,netto,prevbrutto,prevnetto FROM %bill% WHERE id=?";
|
$sql = "SELECT brutto,netto,prevbrutto,prevnetto FROM %bill% WHERE id=?";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($row->id));
|
||||||
$stmt->execute(array($row->id));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$newprevbrutto = $row->prevbrutto + $row->brutto;
|
$newprevbrutto = $row->prevbrutto + $row->brutto;
|
||||||
$newprevnetto = $row->prevnetto + $row->netto;
|
$newprevnetto = $row->prevnetto + $row->netto;
|
||||||
} else {
|
} else {
|
||||||
|
if (!$calledInternally) {
|
||||||
echo " - row ist null - ";
|
echo " - row ist null - ";
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1686,8 +1703,10 @@ class QueueContent {
|
||||||
|
|
||||||
// Test if it is allowed to use this billid or if manipulation has happened
|
// Test if it is allowed to use this billid or if manipulation has happened
|
||||||
if (!$this->commonUtils->verifyLastBillId($pdo, $billid)) {
|
if (!$this->commonUtils->verifyLastBillId($pdo, $billid)) {
|
||||||
|
if (!$calledInternally) {
|
||||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
|
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
|
||||||
$pdo->rollBack();
|
$pdo->rollBack();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// ok - then increment that last id in the work table
|
// ok - then increment that last id in the work table
|
||||||
|
@ -1698,6 +1717,12 @@ class QueueContent {
|
||||||
$tableid = 0;
|
$tableid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$idlist = join("','",$ids_array);
|
||||||
|
$sql = "SELECT SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue% WHERE id IN ('$idlist')";
|
||||||
|
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
|
||||||
|
$brutto = $row->brutto;
|
||||||
|
$netto = $row->netto;
|
||||||
|
|
||||||
// now calculate the signature for the bill entry
|
// now calculate the signature for the bill entry
|
||||||
$signature = $this->commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
|
$signature = $this->commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
|
||||||
|
|
||||||
|
@ -1725,7 +1750,9 @@ class QueueContent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!$calledInternally) {
|
||||||
$pdo->commit();
|
$pdo->commit();
|
||||||
|
}
|
||||||
|
|
||||||
$billInfo = array("billid" => $billid, "date" => $currentTime);
|
$billInfo = array("billid" => $billid, "date" => $currentTime);
|
||||||
|
|
||||||
|
@ -1733,8 +1760,10 @@ class QueueContent {
|
||||||
|
|
||||||
CommonUtils::log($pdo, "QUEUE", "Created bill with id=$billid from user $userid");
|
CommonUtils::log($pdo, "QUEUE", "Created bill with id=$billid from user $userid");
|
||||||
|
|
||||||
|
if (!$calledInternally) {
|
||||||
echo json_encode(array("status" => "OK", "msg" => $billInfo));
|
echo json_encode(array("status" => "OK", "msg" => $billInfo));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getUserId() {
|
private function getUserId() {
|
||||||
|
|
|
@ -289,7 +289,7 @@ class Reports {
|
||||||
foreach ($prods as $aProd) {
|
foreach ($prods as $aProd) {
|
||||||
$aProdId = $aProd['prodid'];
|
$aProdId = $aProd['prodid'];
|
||||||
|
|
||||||
$sql = "SELECT sum(price) as sumprice from %queue%,%bill%,%products% ";
|
$sql = "SELECT sum(price) as sumprice, count(%queue%.id) as prodcount from %queue%,%bill%,%products% ";
|
||||||
$sql .= "WHERE %queue%.productid=%products%.id ";
|
$sql .= "WHERE %queue%.productid=%products%.id ";
|
||||||
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
|
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
|
||||||
$sql .= "AND billdate between ? AND ? ";
|
$sql .= "AND billdate between ? AND ? ";
|
||||||
|
@ -306,7 +306,8 @@ class Reports {
|
||||||
$sumMax = $sumprice;
|
$sumMax = $sumprice;
|
||||||
}
|
}
|
||||||
if ($sumprice != null) {
|
if ($sumprice != null) {
|
||||||
$prodinfos[] = array("prodid" => $aProdId,"iter" => $aProd['prodname'], "sum" => $sumprice);
|
$prodinfo = $aProd['prodname'] . " (" . $row->prodcount . "x)";
|
||||||
|
$prodinfos[] = array("prodid" => $aProdId,"iter" => $prodinfo, "sum" => $sumprice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.17">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.18">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -66,6 +66,7 @@ var S_PROVISION = ["Bereitstellung","Prepared Products","Productos preparados"];
|
||||||
var S_SHOW_POS = ["Zeige Positionen an/aus","Show position on/off","Mostrar posición si/no"];
|
var S_SHOW_POS = ["Zeige Positionen an/aus","Show position on/off","Mostrar posición si/no"];
|
||||||
|
|
||||||
var lang = 0;
|
var lang = 0;
|
||||||
|
var beepCooked = 0;
|
||||||
|
|
||||||
function setLanguage(language) {
|
function setLanguage(language) {
|
||||||
lang = language;
|
lang = language;
|
||||||
|
@ -80,6 +81,7 @@ function insertGeneralConfigItems(configResult) {
|
||||||
if (configResult.status == "OK") {
|
if (configResult.status == "OK") {
|
||||||
var values = configResult.msg;
|
var values = configResult.msg;
|
||||||
setLanguage(values.userlanguage);
|
setLanguage(values.userlanguage);
|
||||||
|
beepCooked = values.beepcooked;
|
||||||
initializeEverything();
|
initializeEverything();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
|
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
|
||||||
|
@ -185,9 +187,19 @@ function listOfTable(table) {
|
||||||
return aList;
|
return aList;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillTableWithPreparedProds(entriesToCook) {
|
function beep() {
|
||||||
|
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/wW+kSJ5//rLobkLSiKmqP/0ikJuDaSaSf/6JiLYLEYnW/+kXg1WRVJL/9EmQ1YZIsv/6Qzwy5qk7/+tEU0nkls3/zIUMPKNX/6yZLf+kFgAfgGyLFAUwY//uQZAUABcd5UiNPVXAAAApAAAAAE0VZQKw9ISAAACgAAAAAVQIygIElVrFkBS+Jhi+EAuu+lKAkYUEIsmEAEoMeDmCETMvfSHTGkF5RWH7kz/ESHWPAq/kcCRhqBtMdokPdM7vil7RG98A2sc7zO6ZvTdM7pmOUAZTnJW+NXxqmd41dqJ6mLTXxrPpnV8avaIf5SvL7pndPvPpndJR9Kuu8fePvuiuhorgWjp7Mf/PRjxcFCPDkW31srioCExivv9lcwKEaHsf/7ow2Fl1T/9RkXgEhYElAoCLFtMArxwivDJJ+bR1HTKJdlEoTELCIqgEwVGSQ+hIm0NbK8WXcTEI0UPoa2NbG4y2K00JEWbZavJXkYaqo9CRHS55FcZTjKEk3NKoCYUnSQ0rWxrZbFKbKIhOKPZe1cJKzZSaQrIyULHDZmV5K4xySsDRKWOruanGtjLJXFEmwaIbDLX0hIPBUQPVFVkQkDoUNfSoDgQGKPekoxeGzA4DUvnn4bxzcZrtJyipKfPNy5w+9lnXwgqsiyHNeSVpemw4bWb9psYeq//uQZBoABQt4yMVxYAIAAAkQoAAAHvYpL5m6AAgAACXDAAAAD59jblTirQe9upFsmZbpMudy7Lz1X1DYsxOOSWpfPqNX2WqktK0DMvuGwlbNj44TleLPQ+Gsfb+GOWOKJoIrWb3cIMeeON6lz2umTqMXV8Mj30yWPpjoSa9ujK8SyeJP5y5mOW1D6hvLepeveEAEDo0mgCRClOEgANv3B9a6fikgUSu/DmAMATrGx7nng5p5iimPNZsfQLYB2sDLIkzRKZOHGAaUyDcpFBSLG9MCQALgAIgQs2YunOszLSAyQYPVC2YdGGeHD2dTdJk1pAHGAWDjnkcLKFymS3RQZTInzySoBwMG0QueC3gMsCEYxUqlrcxK6k1LQQcsmyYeQPdC2YfuGPASCBkcVMQQqpVJshui1tkXQJQV0OXGAZMXSOEEBRirXbVRQW7ugq7IM7rPWSZyDlM3IuNEkxzCOJ0ny2ThNkyRai1b6ev//3dzNGzNb//4uAvHT5sURcZCFcuKLhOFs8mLAAEAt4UWAAIABAAAAAB4qbHo0tIjVkUU//uQZAwABfSFz3ZqQAAAAAngwAAAE1HjMp2qAAAAACZDgAAAD5UkTE1UgZEUExqYynN1qZvqIOREEFmBcJQkwdxiFtw0qEOkGYfRDifBui9MQg4QAHAqWtAWHoCxu1Yf4VfWLPIM2mHDFsbQEVGwyqQoQcwnfHeIkNt9YnkiaS1oizycqJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
|
||||||
|
snd.play();
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillTableWithPreparedProds(answer) {
|
||||||
var aList = '';
|
var aList = '';
|
||||||
|
|
||||||
|
var newproductstoserve = answer.newproductstoserve;
|
||||||
|
if ((newproductstoserve == 1) && (beepCooked == 1)) {
|
||||||
|
beep();
|
||||||
|
}
|
||||||
|
var entriesToCook = answer.items;
|
||||||
$.each(entriesToCook, function (i, table) {
|
$.each(entriesToCook, function (i, table) {
|
||||||
aList += listOfTable(table);
|
aList += listOfTable(table);
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue