OrderSprinter 1.2.18

This commit is contained in:
Geno 2020-11-19 23:00:55 +01:00
parent 2221756de7
commit 70ab4d14d7
25 changed files with 388 additions and 205 deletions

Binary file not shown.

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />
@ -69,6 +69,7 @@ var BILL_TABLE = ["Tisch","Table","Mesa"];
var BILL_UPDATE = ["Aktualisieren","Update","Actualizar"];
var BILL_PRINT = ["Drucken","Print","Imprimir"];
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_DO_HOST = ["Bewirtungsbeleg","Guest receipt","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_NO = ["Nein","No","No"];
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.",
"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."];
@ -177,8 +180,19 @@ function getLastBills() {
function doAjaxCancelBill(billid,stornocode,reason) {
var data = {
billid: billid,
stornocode: stornocode,
reason:reason.trim()
stornocode: stornocode,
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");
}
@ -245,12 +259,14 @@ function displayBillsWithContent (jsonContent) {
var printbuttonid = 'print_' + billid;
var cancelbuttonid = 'cancel_' + billid;
var canceldeletebuttonid = 'cancelanddelete_' + billid;
$("#collapse_" + billid).find("#billdate").html(date_time);
var contentToPrint = new Array(id,longdate,bill[0]);
$("#" + printbuttonid).data("entrydata", contentToPrint);
if (entry.isClosed == 0) {
$("#" + cancelbuttonid).data("billid", id);
$("#" + canceldeletebuttonid).data("billid", id);
}
$("#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) {
var billid = this.id.split("_")[1];
var isNowHost = this.id.split("_")[2];
@ -321,11 +346,13 @@ function getBillWithId(id) {
var printbuttonid = 'print_' + id;
var cancelbuttonid = 'cancel_' + id;
var canceldeletebuttonid = 'cancelanddelete_' + id;
var changehostbuttonid = 'changehost_' + id + "_" + entry.host;
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 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];
if (entry.host == 1) {
toggleHostTxt = BILL_UNDO_HOST[lang];
@ -337,7 +364,7 @@ function getBillWithId(id) {
var txt = '<center>' + printbutton;
if (entry.isClosed == 0) {
txt += cancelButton + changehostbutton + '<br>' + content + '</center>';
txt += cancelButton + cancelAndDeleteButton + changehostbutton + '<br>' + content + '</center>';
} else {
txt += '<p><center>' + '<br>' + content + '</center>';
}

View File

@ -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}

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/jquery.mobile.icons.min.css" />

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/numfield.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.18">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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") {
useInstallation();
} 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);
}
}

View File

@ -679,7 +679,7 @@ $(document).ready(function() {
<tr id=updateline>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.2.17</button>
<button id="updatebtn">Update -> 1.2.18</button>
</td>
<td>&nbsp;</td>
</tr>

View File

@ -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) {
$pdo = $this->pdo;
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 , '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 , '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 , 'remoteaccesscode', null)");
$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 , '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
date_default_timezone_set($timezone);
$installDate = date('Y-m-d H:i:s');
@ -2097,7 +2128,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
$installerVersion = "1.2.17";
$installerVersion = "1.2.18";
$admin = new InstallAdmin();
$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.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.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)) {
@ -2135,7 +2166,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1216_1217($_POST['prefix'], $version, $_POST['db']);
$ret = $admin->updateUserTable1217_1218($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/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?",
"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?"];
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.",
"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."];
@ -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."];
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_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 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;
@ -339,6 +350,9 @@ var generalValuesSettings = [
["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15],
["oneprodworkreceipts",MAN_ONE_PROD_WORKREC[lang],"s",17],
["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],
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
@ -467,6 +481,9 @@ function setLanguage(l) {
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
$("#generalsectiontxt").html(MAN_GENSECTION_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) {
@ -568,7 +585,10 @@ function insertGeneralConfigItems(configResult) {
$("#partOfWaitergopayprint").html(createWaitergopayprint(values.waitergopayprint));
$("#partOfOneprodworkreceipts").html(createOneprodworkreceipts(values.oneprodworkreceipts));
$("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork));
$("#partOfPrintAndQueueJobs").html(createPrintAndQueueJobs(values.printandqueuejobs));
$("#partOfCash").html(createCash(values.cashenabled));
$("#partOfBeepCooked").html(createBeepCooked(values.beepcooked));
var language = values.billlanguage;
generalVals[2] = language;
$("#partOfBillLanguage").html(createBillLanguagePart(language));
@ -606,6 +626,9 @@ function insertGeneralConfigItems(configResult) {
generalVals[15] = values.waitergopayprint;
generalVals[17] = values.oneprodworkreceipts;
generalVals[18] = values.digiprintwork;
generalVals[19] = values.printandqueuejobs;
generalVals[20] = values.cashenabled;
generalVals[21] = values.beepcooked;
$("#smtphost").val(values.smtphost);
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
@ -747,7 +770,16 @@ function createDigiprintwork(theValue) {
function createGroupWorkItemsPart(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) {
var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '">' + nameOnGui[lang] + ':</label>';
@ -1172,7 +1204,7 @@ function binding() {
$("#roomfield_apply").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
areYouSure("Raumdefinition", "Alten Raumplan löschen und neuen festlegen", "Ja", function() {
areYouSure("Raumdefinition", MAN_ROOMCHANGE_WARNING[lang], "Ja", function() {
roomfield_apply();
});
});
@ -2493,7 +2525,13 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfOneprodworkreceipts"></div>
<div id="partOfBigFontWorkReceipt"></div>
<div id="partOfGroupWorkItems"></div>
<div id="partOfDiscount1"></div>
<div id="partOfDiscount2"></div>
<div id="partOfDiscount3"></div>
<div id="partOfAustria"></div>
<div id="partIfAustriaEnabled">
@ -2534,12 +2572,24 @@ $(document).on("pageinit", "#admin-page", function () {
<br><b><u><span id="mobilviewsectiontxt">MOBILANSICHT</span></u></b><br><br>
<div id="partOfProminentSearch"></div>
<div id="partOfProminentSearch"></div>
<div id="partOfDiscount1"></div>
<div id="partOfDiscount2"></div>
<div id="partOfDiscount3"></div>
<br><b><u><span id="specialsettingssectiontxt">Spezialeinstellungen</span></u></b><br><br>
<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>&nbsp;
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
</form><!-- Konfiguration -->

File diff suppressed because one or more lines are too long

View File

@ -711,7 +711,7 @@ class Admin {
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)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
@ -796,6 +796,9 @@ class Admin {
$paymentconfig = CommonUtils::getConfigValue($pdo,"paymentconfig",0);
$workflowconfig = CommonUtils::getConfigValue($pdo,"workflowconfig",0);
$addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter","");
$printandqueuejobs = CommonUtils::getConfigValue($pdo,"printandqueuejobs",0);
$cashenabled = CommonUtils::getConfigValue($pdo,"cashenabled",1);
$beepcooked = CommonUtils::getConfigValue($pdo,"beepcooked",0);
$smtphost = "";
$smtpauth = 1;
@ -844,7 +847,8 @@ class Admin {
"webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3,
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts,
"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) {
@ -936,7 +940,7 @@ class Admin {
$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 ($_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 {
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_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.17"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.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.18"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.18"); };
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_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.17"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.17"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.17"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.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.17"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.17");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.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.18"); };
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.18"); };
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.18"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.18");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.18");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1168,7 +1172,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
// CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.17",
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.18",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@ -1395,6 +1399,9 @@ class Admin {
"remoteaccesscode" => array("dbcol" => "remoteaccesscode","checknum" => 0),
"webimpressum" => array("dbcol" => "webimpressum","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),
"smtpauth" => array("dbcol" => "smtpauth","checknum" => 1),
"smtpuser" => array("dbcol" => "smtpuser","checknum" => 0),

View File

@ -126,7 +126,7 @@ class Bill {
$this->getLastBillsWithContent($_GET['day'],$_GET['month'],$_GET['year']);
} else if ($command == 'cancelBill') {
$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 {
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));
$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) {
$pdo->rollBack();
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
*/
private function cancelBill($pdo,$billid,$stornocode,$reason,$doOwnTransaction,$doEcho,$checkStornoCode) {
private function cancelBill($pdo,$billid,$stornocode,$reason,$doOwnTransaction,$doEcho,$checkStornoCode,$removeproducts = 0) {
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
@ -719,7 +719,11 @@ class Bill {
}
// 1. clear connection between queue item and bill
$sql = "UPDATE %queue% SET paidtime=null,billid=null WHERE billid=?";
if ($removeproducts == 0) {
$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->execute(array($billid));

View File

@ -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) {
$sql = "SELECT count(id) as countid FROM %config% WHERE name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));

View File

@ -101,12 +101,37 @@ class QueueContent {
} else if ($command == 'getJsonProductsOfTableToPay') {
$this->getJsonProductsOfTableToPay($_GET['tableid']);
} 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 {
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) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$commonUtils = new CommonUtils();
@ -117,9 +142,7 @@ class QueueContent {
$pdo = $this->dbutils->openDbAndReturnPdo();
$sql = "SELECT username FROM %user% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($userid));
$row =$stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($userid));
if ($row != null) {
return($row->username);
} else {
@ -129,9 +152,7 @@ class QueueContent {
private function areBillExisting($pdo) {
$sql = "SELECT count(id) as countid FROM %bill%";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
$count = intval($row->countid);
if ($count > 0) {
return true;
@ -343,9 +364,7 @@ class QueueContent {
$queueStr = implode(',',$queueIds);
$sql = "SELECT setting FROM %config% where name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('groupworkitems'));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array('groupworkitems'));
$groupworkitems = $row->setting;
if (is_null($groupworkitems)) {
$groupworkitems = 1;
@ -366,9 +385,7 @@ class QueueContent {
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";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($tableid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($tableid));
$roomPrinter = $row->printer;
if (!is_null($roomPrinter)) {
$thePrinter = $roomPrinter;
@ -395,12 +412,10 @@ class QueueContent {
}
if ($groupworkitems) {
// new put the count number into the longname
// now put the count number into the longname
foreach($jobs as &$aJob) {
$cnt = $aJob["count"];
if ($cnt > 1) {
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
}
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
}
}
@ -458,7 +473,10 @@ class QueueContent {
$this->createAWorkReceiptAndQueueWorkPrint($pdo,$drinkJobsPrinter2,$theTableid,1,2,$username,$lang);
}
if ($declareReadyDelivered) {
$this->declareReadyAndDelivered($pdo, $insertedQueueIds);
$printAndQueueJobs = CommonUtils::getConfigValue($pdo, "printandqueuejobs", 0);
if ($printAndQueueJobs == 0) {
$this->declareReadyAndDelivered($pdo, $insertedQueueIds);
}
}
$result = array_merge($foodJobsPrinter1,$foodJobsPrinter2,$drinkJobsPrinter1,$drinkJobsPrinter2);
@ -504,9 +522,7 @@ class QueueContent {
$tablename = $takeAwayStr[$lang];
} else {
$sql = "SELECT tableno,%room%.abbreviation FROM %resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($theTableid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($theTableid));
if (is_null($row->abbreviation)) {
$tablename = $row->tableno;
@ -643,9 +659,7 @@ class QueueContent {
function getTableIdOfQueue($pdo,$queueid) {
$sql = "SELECT tablenr as tableid FROM %queue% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($queueid));
$row =$stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
return $row->tableid;
}
@ -659,9 +673,7 @@ class QueueContent {
// is product already cooking or will it be set to cooking?
$sql = "SELECT cooking,productid FROM %queue% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($queueid));
$row =$stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
if ($row != null) {
$cooking = $row->cooking;
$productid = $row->productid;
@ -678,6 +690,8 @@ class QueueContent {
if ($useConditions["usesupply"] == 0) {
// can bypass the supplydesk
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
} else {
self::setNewProductsToServe($pdo, 1);
}
$payprinttype = CommonUtils::getConfigValue($pdo, 'payprinttype', "l");
@ -733,9 +747,7 @@ class QueueContent {
// first: is the product still declared as delivered?
$sql = "SELECT id FROM %queue% WHERE id=? AND readytime IS NOT NULL";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($queueid));
$row =$stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
if ($row != null) {
$foundid = $row->id;
if ($foundid == $queueid) {
@ -759,17 +771,13 @@ class QueueContent {
private function findCategoryOfProd($pdo,$prodid) {
$sql = "SELECT category FROM %products% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($prodid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($prodid));
return $row->category;
}
private function getUseKitchenAndSupplyForProdInCat($pdo,$catid) {
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($catid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($catid));
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
}
@ -780,9 +788,7 @@ class QueueContent {
private function getUseKitchenAndSupplyForProdWithPdo($pdo,$prodid) {
$sql = "SELECT usekitchen, usesupplydesk FROM %prodtype%,%products% WHERE %products%.category=%prodtype%.id AND %products%.id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($prodid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($prodid));
if ($row != null) {
return array("usekitchen" => $row->usekitchen, "usesupply" => $row->usesupplydesk);
} else {
@ -798,6 +804,7 @@ class QueueContent {
* managed here as well
*/
function addProductListToQueue($theTableid,$prods,$doPrint,$payprinttype) {
if (intval($theTableid) == 0) {
$theTableid = null; // togo room
}
@ -806,8 +813,16 @@ class QueueContent {
session_start();
}
date_default_timezone_set(DbUtils::getTimeZone());
$ordertime = date('Y-m-d H:i:s');
$pdo = $this->dbutils->openDbAndReturnPdo();
$printAndQueueJobs = CommonUtils::getConfigValue($pdo, "printandqueuejobs", 0);
if ($printAndQueueJobs == 1) {
$doPrint = 1;
}
$pdo->beginTransaction();
$togotax = CommonUtils::getExistingConfigValue($pdo, 'togotax');
@ -831,9 +846,7 @@ class QueueContent {
// now get the price for this pricelevel
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($getPriceSql));
$stmt->execute(array($productid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
if ($row == null) {
echo "Fehler: Preise nicht vorhanden"; // error
return;
@ -911,9 +924,7 @@ class QueueContent {
$extraid = $anExtra["id"];
$extraname = $anExtra["name"];
$sql = "SELECT price FROM %extras% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($extraid));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($extraid));
$price += floatval($row->price);
}
}
@ -921,9 +932,6 @@ class QueueContent {
if (is_null($theTableid) || (is_numeric($theTableid) && is_numeric($productid))) {
// first get category of product
$useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
date_default_timezone_set(DbUtils::getTimeZone());
$ordertime = date('Y-m-d H:i:s');
$insertSql = "INSERT INTO `%queue%` (
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
@ -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 ($payprinttype == "s") {
$this->doWorkPrint($pdo,$theTableid,$insertedQueueIds,$_SESSION['currentuser'],$payprinttype, $_SESSION['language']);
@ -991,9 +1005,7 @@ class QueueContent {
$pdo = $this->dbutils->openDbAndReturnPdo();
$sql = "SELECT count(id) as countid FROM %bill%";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
$hasBills = ($row->countid > 0 ? true : false);
if ($hasBills) {
@ -1069,9 +1081,8 @@ class QueueContent {
$sql = "SELECT count(id) as countid FROM %bill%";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, null);
if ($row->countid == 0) {
$sql = "SELECT DISTINCT %queue%.id as quid, ordertime FROM %queue% WHERE ordertime is not null AND isclosed is null AND ";
} 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
* 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();
$ids_array = explode ( ',', $ids );
$ids = trim($ids, ",");
$pdo = $this->dbutils->openDbAndReturnPdo();
$ids_array = explode ( ',', $ids );
if (CommonUtils::callPlugin($pdo, "createBill", "replace")) {
return;
}
CommonUtils::callPlugin($pdo, "createBill", "before");
$pdo->beginTransaction();
if (!$calledInternally) {
$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;
for ($i=0;$i<count($ids_array);$i++) {
$anId = $ids_array[$i];
if (is_numeric($anId)) {
$sql = "SELECT count(id) as countid FROM %queue% WHERE paidtime is not null AND id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($anId));
$row =$stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($anId));
if ($row != null) {
$aCount = $row->countid;
if (($aCount != null) && ($aCount == 1)) {
$allNotPaid = false;
}
}
} else {
$allNotPaid = false;
}
}
@ -1657,7 +1675,6 @@ class QueueContent {
if ($allNotPaid == true) {
$billid = -1;
// find highest bill id
$sql = "SELECT id from %bill% ORDER BY id DESC";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute();
@ -1670,14 +1687,14 @@ class QueueContent {
if ($row != null) {
$billid = intval($row->id)+1;
$sql = "SELECT brutto,netto,prevbrutto,prevnetto FROM %bill% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($row->id));
$row = $stmt->fetchObject();
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($row->id));
$newprevbrutto = $row->prevbrutto + $row->brutto;
$newprevnetto = $row->prevnetto + $row->netto;
} else {
echo " - row ist null - ";
$pdo->rollBack();
if (!$calledInternally) {
echo " - row ist null - ";
$pdo->rollBack();
}
return;
}
} else {
@ -1686,8 +1703,10 @@ class QueueContent {
// Test if it is allowed to use this billid or if manipulation has happened
if (!$this->commonUtils->verifyLastBillId($pdo, $billid)) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
$pdo->rollBack();
if (!$calledInternally) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
$pdo->rollBack();
}
return;
} else {
// ok - then increment that last id in the work table
@ -1698,6 +1717,12 @@ class QueueContent {
$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
$signature = $this->commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
@ -1725,7 +1750,9 @@ class QueueContent {
}
}
}
$pdo->commit();
if (!$calledInternally) {
$pdo->commit();
}
$billInfo = array("billid" => $billid, "date" => $currentTime);
@ -1733,7 +1760,9 @@ class QueueContent {
CommonUtils::log($pdo, "QUEUE", "Created bill with id=$billid from user $userid");
echo json_encode(array("status" => "OK", "msg" => $billInfo));
if (!$calledInternally) {
echo json_encode(array("status" => "OK", "msg" => $billInfo));
}
}

View File

@ -40,21 +40,21 @@ class Reports {
}
function handleCommand($command) {
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// canUserCallCommands($currentCmd, $cmdArray,$right)
$cmdArray = array('getStats');
if (in_array($command, $cmdArray)) {
if (!($this->userrights->hasCurrentUserRight('right_statistics'))) {
echo "Benutzerrechte nicht ausreichend!";
return false;
}
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// canUserCallCommands($currentCmd, $cmdArray,$right)
$cmdArray = array('getStats');
if (in_array($command, $cmdArray)) {
if (!($this->userrights->hasCurrentUserRight('right_statistics'))) {
echo "Benutzerrechte nicht ausreichend!";
return false;
}
}
if($command == 'getStats') {
$this->getStats();
if($command == 'getStats') {
$this->getStats();
} else {
echo "Command not supported.";
}
@ -72,7 +72,7 @@ class Reports {
}
static private function getDates() {
date_default_timezone_set(DbUtils::getTimeZone());
date_default_timezone_set(DbUtils::getTimeZone());
$currentTimeStr = date('Y-m-d H:i:s');
$curTime = strtotime($currentTimeStr);
@ -82,7 +82,7 @@ class Reports {
// now for this month
$firstDayOfThisMonth = date("Y-m-01", strtotime($currentTimeStr));
$currentDay = date("d",strtotime($currentTimeStr)); // current day (4 if date is 4 Jan 2014)
$currentDay = date("d",strtotime($currentTimeStr)); // current day (4 if date is 4 Jan 2014)
$month = date("m",strtotime($currentTimeStr));
$monthName = self::getMonthName($month);
$monthAndYearOfThisMonth = date("Y-m",strtotime($currentTimeStr));
@ -92,8 +92,8 @@ class Reports {
$last_month_ini = new DateTime("first day of last month");
$last_month_end = new DateTime("last day of last month");
$firstDayOfLastMonth = $last_month_ini->format('Y-m-d');
$lastDayOfLastMonth = $last_month_end-> format('d');
$iterations = intval($last_month_end->format('d'));
$lastDayOfLastMonth = $last_month_end-> format('d');
$iterations = intval($last_month_end->format('d'));
$lastMonth = intval($last_month_ini->format('m'));
$monthAndYearOfLastMonth = $last_month_end->format('Y-m');
$lastMonthComplete = $last_month_ini->format('Y-m-d') . " 00:00:00";
@ -122,22 +122,22 @@ class Reports {
return $retArray;
}
public static function getMonthName($monthNo) {
$mons = array(
1 => "Januar",
2 => "Februar",
3 => "März",
4 => "April",
5 => "Mai",
6 => "Juni",
7 => "Juli",
8 => "August",
9 => "September",
10 => "Oktober",
11 => "November",
12 => "Dezember");
return ($mons[intval($monthNo)]);
public static function getMonthName($monthNo) {
$mons = array(
1 => "Januar",
2 => "Februar",
3 => "März",
4 => "April",
5 => "Mai",
6 => "Juni",
7 => "Juli",
8 => "August",
9 => "September",
10 => "Oktober",
11 => "November",
12 => "Dezember");
return ($mons[intval($monthNo)]);
}
private function getReports ($allDates) {
@ -146,7 +146,7 @@ class Reports {
}
private function getReportsCore($allDates) {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// bills of today independently of closing
@ -190,14 +190,14 @@ class Reports {
private function iterateForHours($pdo,$theDateStr,$noOfIterations,$mustBeClosed) {
$retArray = array();
$sumMax = 0.0;
for ($i=0;$i<$noOfIterations;$i++) {
$startDateTime = $theDateStr . " $i:00:00";
for ($i=0;$i<$noOfIterations;$i++) {
$startDateTime = $theDateStr . " $i:00:00";
$endDateTime = $theDateStr . " $i:59:59";
$sum = $this->sumBetween($pdo,$startDateTime,$endDateTime,$mustBeClosed);
if ($sumMax < $sum) {
$sumMax = $sum;
}
$retArray[] = array("iter" => $i, "sum" => $sum);
if ($sumMax < $sum) {
$sumMax = $sum;
}
$retArray[] = array("iter" => $i, "sum" => $sum);
}
return array("max" => $sumMax, "content" => $retArray);
}
@ -230,12 +230,12 @@ class Reports {
if ($mustBeClosed) {
$sql .= "AND closingid is not null"; // and must be in a closing
}
$sum = 0.0;
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime));
$sum = 0.0;
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime));
$row =$stmt->fetchObject();
if ($row != null) {
if ($row != null) {
$theSqlSum = $row->sumtotal;
if ($theSqlSum != null) {
$sum = $theSqlSum;
@ -244,14 +244,14 @@ class Reports {
return $sum;
}
function cmp($a, $b)
{
$asum = $a['sum'];
$bsum = $b['sum'];
if ($asum == $bsum) {
return 0;
}
return ($asum < $bsum) ? 1 : -1;
function cmp($a, $b)
{
$asum = $a['sum'];
$bsum = $b['sum'];
if ($asum == $bsum) {
return 0;
}
return ($asum < $bsum) ? 1 : -1;
}
/*
@ -270,10 +270,10 @@ class Reports {
$sql .= "AND %bill%.closingid is not null ";
$sql .= "AND %bill%.status is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime));
$result = $stmt->fetchAll();
$prods = array();
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime));
$result = $stmt->fetchAll();
$prods = array();
$sql = "SELECT longname FROM %products% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -289,31 +289,32 @@ class Reports {
foreach ($prods as $aProd) {
$aProdId = $aProd['prodid'];
$sql = "SELECT sum(price) as sumprice from %queue%,%bill%,%products% ";
$sql .= "WHERE %queue%.productid=%products%.id ";
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
$sql .= "AND billdate between ? AND ? ";
$sql = "SELECT sum(price) as sumprice, count(%queue%.id) as prodcount from %queue%,%bill%,%products% ";
$sql .= "WHERE %queue%.productid=%products%.id ";
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
$sql .= "AND billdate between ? AND ? ";
$sql .= "AND %bill%.closingid is not null ";
$sql .= " AND productid=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime,$aProdId));
$row =$stmt->fetchObject();
$row =$stmt->fetchObject();
if ($row != null) {
$sumprice = $row->sumprice;
if ($sumMax < $sumprice) {
$sumMax = $sumprice;
if ($sumMax < $sumprice) {
$sumMax = $sumprice;
}
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);
}
}
}
uasort($prodinfos, array($this,'cmp'));
// due to a bug somehow the order is not kept when transformed to json - copy...
// due to a bug somehow the order is not kept when transformed to json - copy...
$prodInfoSorted = array();
foreach($prodinfos as $prodinfo) {
$prodInfoSorted[] = array("iter" => $prodinfo['iter'],"sum" => $prodinfo['sum']);

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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/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 lang = 0;
var beepCooked = 0;
function setLanguage(language) {
lang = language;
@ -80,6 +81,7 @@ function insertGeneralConfigItems(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
setLanguage(values.userlanguage);
beepCooked = values.beepcooked;
initializeEverything();
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
@ -185,9 +187,19 @@ function listOfTable(table) {
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 newproductstoserve = answer.newproductstoserve;
if ((newproductstoserve == 1) && (beepCooked == 1)) {
beep();
}
var entriesToCook = answer.items;
$.each(entriesToCook, function (i, 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