diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe
index 5c1a6e1..c9285f0 100644
Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ
diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe
index 5c1a6e1..c9285f0 100644
Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ
diff --git a/webapp/bar.html b/webapp/bar.html
index 7afb156..3233eb9 100644
--- a/webapp/bar.html
+++ b/webapp/bar.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/bill.html b/webapp/bill.html
index 9b2abba..12a721d 100644
--- a/webapp/bill.html
+++ b/webapp/bill.html
@@ -5,7 +5,7 @@
-
+
@@ -82,6 +82,10 @@ var BILL_STORNO_REASON = ["Stornogrund","Reason","Razón"];
var BILL_TOGGLE_HOST = ["Der ursprüngliche Bon wurde storniert und mit geänderter Bewirtungseigenschaft neu angelegt. Er befindet sich an erster Stelle in der Bonliste.",
"Der original receipt was discarded and recreated with the changed guest receipt property. The new receipt is on top of the list",
"El tique original esta descartado y iniciado de nuevo en la forma modificada"];;
+var BILL_WRONG_FORMAT = ["Falsches Zahlenformat","Wrong number format","Formato de precio incorecto"];
+var BILL_FIRST_JOB = ["Erste Bon-ID","First job id","Id primero"];
+var BILL_LAST_JOB = ["Letzte Bon-ID","Last job id","Id último"];
+var BILL_BATCH = ["Stapelverarbeitung","Batch processing","Accion con muchos elementos"];
var lang = 0;
@@ -101,6 +105,11 @@ function setLanguage(language) {
$("#billnocancelposs").html(BILL_NO_CANCEL_POSS[lang]);
$("#datetxt").html(BILL_DATE[lang]);
$("#stornoreasontxt").html(BILL_STORNO_REASON[lang]);
+
+ $("#printjobstxt").html(BILL_PRINT[lang]);
+ $("#fromjobidtxt").html(BILL_FIRST_JOB[lang]);
+ $("#tojobidtxt").html(BILL_LAST_JOB[lang]);
+ $("#batchheadertxt").html(BILL_BATCH[lang]);
var langtxt = "de";
if (lang == 1) {
@@ -129,6 +138,29 @@ function updatelistener() {
});
}
+function batchjoblistener() {
+ $("#printjobsbtn").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ var start = $("#fromjobidfield").val();
+ var end = $("#tojobidfield").val();
+
+ if (!isInt(start) || !isInt(end)) {
+ alert(BILL_WRONG_FORMAT[lang]);
+ return;
+ }
+ doAjax("POST","php/contenthandler.php?module=printqueue&command=batchReceiptPrintJob",{start : start, end:end }, handleBatchResult, null);
+ });
+}
+
+function handleBatchResult(answer) {
+ if (answer.status != "OK") {
+ alert("Fehler " + answer.code + ": " + answer.msg);
+ } else {
+ $("#fromjobidfield").val("");
+ $("#tojobidfield").val("");
+ }
+}
function getLastBills() {
var date = $("#datepicker").datepicker("getDate");
@@ -360,7 +392,13 @@ function insertGenConfigStartRest(configResult) {
setLanguage(values.userlanguage);
getLastBills();
updatelistener();
+ batchjoblistener();
bindWhenSelection();
+
+ if (values.payprinttype == "s") {
+ // REM* only then allow batch processing
+ $("#batchpanel").show();
+ }
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
}
@@ -383,6 +421,8 @@ $(document).on("pageinit", "#bill-page", function () {
hideMenu();
$.ajaxSetup({ cache: false });
getGeneralConfigItems();
+ $("#fromjobidfield").val("");
+ $("#tojobidfield").val("");
});
@@ -390,7 +430,7 @@ $(document).on("pageinit", "#bill-page", function () {
-
Module
+
Module
@@ -409,6 +449,17 @@ $(document).on("pageinit", "#bill-page", function () {
Aktualisieren
+
+
+
Stapelverarbeitung
+
+
+
+
-
+
Storno fehlgeschlagen
diff --git a/webapp/css/bestformat.css b/webapp/css/bestformat.css
index a4e54d9..7c9fd98 100644
--- a/webapp/css/bestformat.css
+++ b/webapp/css/bestformat.css
@@ -1 +1 @@
-@charset "UTF-8";table.viewtable{width:100%;display:block;table-layout:fixed}table.viewtable th{background:#7abe5f;font-size:10pt;border-bottom:1px solid rgba(255,255,255,.7);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);-o-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.2);padding:6px 10px}table.viewtable td{background:#eed33f;font-size:8pt;border-bottom:1px solid #fafafa;border-bottom:1px solid rgba(255,255,255,.5);padding:6px 10px;color:rgba(0,0,0,255)}table.viewtable th.complete{background:#17370b;color:rgba(255,255,255,0)}table.viewtable th.incomplete{background:#9c9224;color:rgba(0,0,0,255)}table.viewtable td.complete{background:#78bb5e;color:rgba(0,0,0,255)}table.viewtable td.incomplete{background:#eed33f;color:rgba(0,0,0,255)}table.viewtable tr:last-child td{border-bottom:0}table.viewtable tr:hover td{background-color:#faf}table.receipttable td{border:solid black 0;padding:3px;text-align:left;vertical-align:bottom}table.receipttable td.price{border:solid black 0;padding:3px;text-align:right;vertical-align:bottom}table.receipttable td.restinfo{text-align:center;vertical-align:bottom}table.receipttable td.declaration{font-weight:bold;text-align:right}table.gridtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:2px;border-color:#666;border-collapse:collapse;width:100%}table.gridtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.gridtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#fff}table.linetable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:2px;border-color:#666;border-collapse:collapse;width:100%}table.linetable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.linetable td{border-width:1px;padding:8px;border-style:solid;border-color:#666}table.linetable tr{background:#fff}table.linetable tr:hover{background-color:#faf}table.reporttable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border:solid black 2px;border-color:#666;border-collapse:collapse;width:100%;border-spacing:10px}table.reporttable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.reporttable td{border:solid black 0 padding:8px;text-align:left;vertical-align:top}table.reporttable tr{background:#d6f8be}table.reporttable tr:hover{background-color:#faf}table.commandtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.commandtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#e4d662;font-weight:bold}table.commandtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#fff;font-weight:bold}table.navitable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.navitable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#d09696;font-weight:bold}table.navitable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c08f8f}table.infotable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.infotable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold}table.infotable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff}table.billtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#000;border:solid black 2px;border-color:#000;border-collapse:collapse;width:100%;border-spacing:10px}table.billtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:left}table.billtable #pricecolheader{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:right}table.billtable td{border:solid black 0 padding:8px;background-color:#fff;text-align:left}table.billtable #pricecol{border:solid black 0 padding:8px;background-color:#fff;text-align:right}table.billtable #totalprice{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:center}.grid_right{text-align:right;font-style:italic}.userinfo{font-style:italic}.counting{position:absolute;top:0;bottom:0;right:90px;width:80px;border:0;background-color:rgb(246,246,246,0.0) !important}.counting:hover{background-color:#0f0}.goup{position:absolute;top:5px;bottom:0;right:90px;border:0;background-color:#f6f6f6 !important}.osroom-1{height:40px !important}.osroom-2{height:70px !important}.ostable-1{height:40px !important}.ostable-2{height:70px !important}.osprod-1{height:40px !important}.osprod-2{height:70px !important}.osbigbtn.ui-btn{height:40px !important;text-align:center;line-height:30px}table.prodtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:70%}table.prodtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:OrangeRed;font-weight:bold}table.prodtable .prodtype td{background-color:DarkGreen}table.prodtable tr>td:first-child{text-align:left}table.prodtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:LimeGreen;text-align:right;font-weight:bold;white-space:nowrap;max-width:50%;word-break:break-all}table.prodtable input{line-height:30px;background-color:PaleGreen;font-weight:bold}table.prodtable select{background-color:PaleGreen;font-weight:bold;width:100%}table.prodtable option.yes{background-color:green}table.prodtable option.no{background-color:red}table.prodtable .prodpriceA{width:50px;text-align:right}table.prodtable .prodpriceB{width:50px;text-align:right}table.prodtable .prodpriceC{width:50px;text-align:right}.prodinfo,.srinfo{position:absolute;top:0;bottom:0;right:20px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.waitinfo{position:absolute;top:0;bottom:0;right:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.waitinfo img{position:absolute;top:0;bottom:0;right:20px;height:35px;border:0;background-color:rgb(246,246,246,0.0) !important}.typehigher{text-align:right;background-color:rgb(246,246,246,0.0) !important}.typetop{text-align:left;background-color:rgb(246,246,246,0.0) !important}@media all and (min-width:0){.typetop img{width:100px}.typehigher img{width:100px}}@media all and (min-width:20em){.typetop img{width:120px}.typehigher img{width:120px}}@media all and (min-width:40em){.typetop img{width:160px}.typehigher img{width:160px}}.prodminus,.srminus{position:absolute;top:0;bottom:0;right:130px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodcount,.srprodcount{position:absolute;top:10px;bottom:0;right:95px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodplus,.srplus{position:absolute;top:0;bottom:0;right:60px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodplus img{width:30px}.prodminus img{width:30px}.srplus img{width:30px}.srminus img{width:30px}.srminus:hover,.prodminus:hover{height:40px;width:30px;background-color:#0f0}.srplus:hover,.prodplus:hover{height:40px;width:30px;background-color:#0f0}.prodinfo img:hover,.srinfo img:hover{background-color:#0f0}.tbusy{color:black !important;font-weight:bold;font-style:italic}.tempty{color:gray !important;color:gray !important;font-weight:normal}.overlaytxt{background:linear-gradient(red,yellow);color:black;font-weight:bold;border-radius:25px;border:3px solid #000;padding:8px}.overlayfull{background:linear-gradient(red,yellow)}.overlayempty{background:linear-gradient(green,yellow)}.overlaysize-0{font-size:7px}.overlaysize-1{font-size:12px}.overlaysize-2{font-size:15px}.prodreadyicon{position:absolute;top:0;bottom:0;right:70px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodreadyicon:hover{height:40px;background-color:#0f0}.prodreadycount{position:absolute;top:10px;bottom:0;right:40px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.changetableprodlist{width:100%;background-color:LightCyan;resize:none}.usersums{border:solid black 3px;background-color:#ffe8bc}.usersums td{border:solid black 1px;padding:3px;text-align:right;vertical-align:bottom}.taxessums{border:solid black 3px;background-color:#f0e8bc}.taxessums td{border:solid black 1px;padding:3px;text-align:right;vertical-align:bottom}
\ No newline at end of file
+@charset "UTF-8";table.viewtable{width:100%;display:block;table-layout:fixed}table.viewtable th{background:#7abe5f;font-size:10pt;border-bottom:1px solid rgba(255,255,255,.7);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);-o-box-shadow:inset 0 1px 0 rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.2);padding:6px 10px}table.viewtable td{background:#eed33f;font-size:8pt;border-bottom:1px solid #fafafa;border-bottom:1px solid rgba(255,255,255,.5);padding:6px 10px;color:rgba(0,0,0,255)}table.viewtable th.complete{background:#17370b;color:rgba(255,255,255,0)}table.viewtable th.incomplete{background:#9c9224;color:rgba(0,0,0,255)}table.viewtable td.complete{background:#78bb5e;color:rgba(0,0,0,255)}table.viewtable td.incomplete{background:#eed33f;color:rgba(0,0,0,255)}table.viewtable tr:last-child td{border-bottom:0}table.viewtable tr:hover td{background-color:#faf}table.receipttable td{border:solid black 0;padding:3px;text-align:left;vertical-align:bottom}table.receipttable td.price{border:solid black 0;padding:3px;text-align:right;vertical-align:bottom}table.receipttable td.restinfo{text-align:center;vertical-align:bottom}table.receipttable td.declaration{font-weight:bold;text-align:right}table.gridtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:2px;border-color:#666;border-collapse:collapse;width:100%}table.gridtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.gridtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#fff}table.linetable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:2px;border-color:#666;border-collapse:collapse;width:100%}table.linetable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.linetable td{border-width:1px;padding:8px;border-style:solid;border-color:#666}table.linetable tr{background:#fff}table.linetable tr:hover{background-color:#faf}table.reporttable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border:solid black 2px;border-color:#666;border-collapse:collapse;width:100%;border-spacing:10px}table.reporttable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#dedede;font-weight:bold}table.reporttable td{border:solid black 0;padding:8px;text-align:left;vertical-align:top}table.reporttable tr{background:#d6f8be}table.reporttable tr:hover{background-color:#faf}table.commandtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.commandtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#e4d662;font-weight:bold}table.commandtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#fff;font-weight:bold}table.navitable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.navitable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#d09696;font-weight:bold}table.navitable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c08f8f}table.infotable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:100%}table.infotable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold}table.infotable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff}table.billtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#000;border:solid black 2px;border-color:#000;border-collapse:collapse;width:100%;border-spacing:10px}table.billtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:left}table.billtable #pricecolheader{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:right}table.billtable td{border:solid black 0;padding:8px;background-color:#fff;text-align:left}table.billtable #pricecol{border:solid black 0;padding:8px;background-color:#fff;text-align:right}table.billtable #totalprice{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:#c3c3ff;font-weight:bold;text-align:center}.grid_right{text-align:right;font-style:italic}.userinfo{font-style:italic}.counting{position:absolute;top:0;bottom:0;right:90px;width:80px;border:0;background-color:rgb(246,246,246,0.0) !important}.counting:hover{background-color:#0f0}.goup{position:absolute;top:5px;bottom:0;right:90px;border:0;background-color:#f6f6f6 !important}.osroom-1{height:40px !important}.osroom-2{height:70px !important}.ostable-1{height:40px !important}.ostable-2{height:70px !important}.osprod-1{height:40px !important}.osprod-2{height:70px !important}.osbigbtn.ui-btn{height:40px !important;text-align:center;line-height:30px}table.prodtable{font-family:verdana,arial,sans-serif;font-size:20px;color:#333;border-width:1px;border-color:#666;border-collapse:collapse;width:70%}table.prodtable th{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:OrangeRed;font-weight:bold}table.prodtable .prodtype td{background-color:DarkGreen}table.prodtable tr>td:first-child{text-align:left}table.prodtable td{border-width:1px;padding:8px;border-style:solid;border-color:#666;background-color:LimeGreen;text-align:right;font-weight:bold;white-space:nowrap;max-width:50%;word-break:break-all}table.prodtable input{line-height:30px;background-color:PaleGreen;font-weight:bold}table.prodtable select{background-color:PaleGreen;font-weight:bold;width:100%}table.prodtable option.yes{background-color:green}table.prodtable option.no{background-color:red}table.prodtable .prodpriceA{width:50px;text-align:right}table.prodtable .prodpriceB{width:50px;text-align:right}table.prodtable .prodpriceC{width:50px;text-align:right}.prodinfo,.srinfo{position:absolute;top:0;bottom:0;right:20px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.waitinfo{position:absolute;top:0;bottom:0;right:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.waitinfo img{position:absolute;top:0;bottom:0;right:20px;height:35px;border:0;background-color:rgb(246,246,246,0.0) !important}.typehigher{text-align:right;background-color:rgb(246,246,246,0.0) !important}.typetop{text-align:left;background-color:rgb(246,246,246,0.0) !important}@media all and (min-width:0){.typetop img{width:100px}.typehigher img{width:100px}}@media all and (min-width:20em){.typetop img{width:120px}.typehigher img{width:120px}}@media all and (min-width:40em){.typetop img{width:160px}.typehigher img{width:160px}}.prodminus,.srminus{position:absolute;top:0;bottom:0;right:130px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodcount,.srprodcount{position:absolute;top:10px;bottom:0;right:95px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodplus,.srplus{position:absolute;top:0;bottom:0;right:60px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodplus img{width:30px}.prodminus img{width:30px}.srplus img{width:30px}.srminus img{width:30px}.srminus:hover,.prodminus:hover{height:40px;width:30px;background-color:#0f0}.srplus:hover,.prodplus:hover{height:40px;width:30px;background-color:#0f0}.prodinfo img:hover,.srinfo img:hover{background-color:#0f0}.tbusy{color:black !important;font-weight:bold;font-style:italic}.tempty{color:gray !important;color:gray !important;font-weight:normal}.overlaytxt{background:linear-gradient(red,yellow);color:black;font-weight:bold;border-radius:25px;border:3px solid #000;padding:8px}.overlayfull{background:linear-gradient(red,yellow)}.overlayempty{background:linear-gradient(green,yellow)}.overlaysize-0{font-size:7px}.overlaysize-1{font-size:12px}.overlaysize-2{font-size:15px}.prodreadyicon{position:absolute;top:0;bottom:0;right:70px;height:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.prodreadyicon:hover{height:40px;background-color:#0f0}.prodreadycount{position:absolute;top:10px;bottom:0;right:40px;width:20px;border:0;background-color:rgb(246,246,246,0.0) !important}.changetableprodlist{width:100%;background-color:LightCyan;resize:none}.usersums{border:solid black 3px;background-color:#ffe8bc}.usersums td{border:solid black 1px;padding:3px;text-align:right;vertical-align:bottom}.taxessums{border:solid black 3px;background-color:#f0e8bc}.taxessums td{border:solid black 1px;padding:3px;text-align:right;vertical-align:bottom}.scrolllistview{height:150px;top:10px;overflow:auto;background-color:blanchedalmond;-webkit-overflow-scrolling:touch}.scrolllistview li{height:15px;vertical-align:middle}.selecteditem{color:black;font-weight:bold}.unselecteditem{color:gray}
\ No newline at end of file
diff --git a/webapp/customer/menulegend.txt b/webapp/customer/menulegend.txt
index 0dafdff..b496e93 100755
--- a/webapp/customer/menulegend.txt
+++ b/webapp/customer/menulegend.txt
@@ -1,61 +1,5 @@
-# ***** Diese Speisekarte hat ein bestimmtes Format. ****
-# ***** Das Format, insbesondere die Einrückungen, müssen ****
-# ***** genau eingehalten werden, damit der Inhalt korrekt ****
-# ***** übernommen werden kann. ****
#
-# Einrückungen bauen die Produktpalette hierarchisch auf
-# Die tiefsten Einrückungen stellen die Produkte dar, alle
-# Ebenen darüber die Kategorien
-#
-# Die einfachste Struktur sieht wie folgt aus (Beispiel):
+# ***** Diese Speisekarte ist vom System bereits eingespeichert worden (erkennbar an den zugewiesenen IDs). ****
#
-# Speisen
-# Gericht 1 ; 2,90
-# Gericht 2 ; 3,90
-# Untergruppe xy
-# Gericht 3 ; 2,90
-# Getränke
-# ...
-#
-# Kategorien und Produkte können zusätzlich noch weiter spezifiziert
-# werden:
-#
-# Ein Produkteintrag hat folgendes Format:
-# Kurzname (ID:123); NormalPreis (Stufe A); Langname # Preis (Stufe B); Preis (Stufe C); Steuersatz
-# dabei ist der Kurzname nur in der Kellneransicht bei der Produktauswahl zu sehen,
-# anschließend wird stets der Langname angezeigt.
-# Nur Kurzname und Preis (A) sind erforderlich, die anderen Teile werden bei
-# Auslassung automatisch gefüllt (Preis B=C=A und Langname = Kurzname).
-#
-# Wurde dem Produkt bereits eine ID von OrderSprinter zugewiesen, wird diese angezeigt.
-# So können spätere Produktänderungen vom OrderSprinter erkannt werden.
-# Es ist wichtig, keine eigenen IDs zu vergeben, denn neue IDs werden stets vom
-# OrderSprinter erzeugt!
-#
-# Wird ein Steuersatz angegeben, der für das Produkt vorgegeben sein soll, so
-# müssen auch die Preise A und B angegeben werden.
-#
-# Bei Kategorien:
-# Das Gleichheitszeichen dient als Trenner zwischen Namen und weiteren Eigenschaften.
-# Wird ein K und B mitgegeben, so werden diese Produkte über die Küchen-
-# und Bereitstellungsansicht geführt. Die Einstellung wird auf die Unterkategorien
-# vererbt, wenn die darunter liegenden Kategorien keine Angabe dazu machen.
-# Hinter dem zweiten Gleichheitszeichen kann die Nummer eines Arbeitsbondruckers
-# des jeweiligen Typs (Speise/Getränk) angegeben werden.
-#
-# Wenn ein D da steht, wird als Typ "Getränk" angenommen, bei einem F "Speise".
-# Auch hier wird der übergeordnete Eintrag genommen, wenn Angabe fehlt.
-#
-# Extras werden mit einem Ausrufezeichen am Zeilenanfang deklariert.
-# Das Format ist:
-# !Extraname (ID:8) # 12,34 ; (45),Langname eines Produkts,(49),(50)
-# - Die ID-Angabe ist optional (kann weggelassen werden)
-# - Der Wert 12,34 ist der Aufpreis
-# - Hinter dem Semikolon können Komma-getrennt Produkte angegebenen werden, die
-# dieses Extra haben dürfen. Angabe entweder ID des Produkts in Klammern oder
-# der Langname eines Produkts. (Gibt es den Langnamen mehrfach, wird das Extra
-# auch mehrfach zugewiesen.)
-#
-# Reservierte Buchstaben: = ; # !
-# (Diese werden als Trenner verwendet!)
+# ***** Eine Erklärung der Syntax ist im Aufklappfeld "Legende" zu lesen.
#
diff --git a/webapp/customer/speisekarte.txt b/webapp/customer/speisekarte.txt
index 4b16936..5c13186 100755
--- a/webapp/customer/speisekarte.txt
+++ b/webapp/customer/speisekarte.txt
@@ -1,100 +1,62 @@
+#
# ***** Diese Speisekarte kann als Vorlage dienen. ****
#
-# Einrückungen bauen die Produktpalette hierarchisch auf
-# Die tiefsten Einrückungen stellen die Produkte dar, alle
-# Ebenen darüber die Kategorien
+# ***** Eine Erklärung der Syntax ist im Aufklappfeld "Legende" zu lesen.
#
-# Ein Produkteintrag hat folgendes Format:
-# Kurzname ; NormalPreis (Stufe A); Langname # Preis (Stufe B); Preis (Stufe C)
-# dabei ist der Kurzname nur in der Kellneransicht bei der Produktauswahl zu sehen,
-# anschließend wird stets der Langname angezeigt.
-# Nur Kurzname und Preis (A) sind erforderlich, die anderen Teile werden bei
-# Auslassung automatisch gefüllt (Preis B=C=A und Langname = Kurzname)
-# Wird ein Steuersatz angegeben, der für das Produkt vorgegeben sein soll, so
-# müssen auch die Preise A und B angegeben werden.
-# Wurde dem Produkt bereits eine ID von OrderSprinter zugewiesen, wird diese angezeigt.
-# So können spätere Produktänderungen vom OrderSprinter erkannt werden.
-# Es ist wichtig, keine eigenen IDs zu vergeben, denn neue IDs werden stets vom
-# OrderSprinter erzeugt!
-#
-# Bei Kategorien:
-# Das Gleichheitszeichen dient als Trenner zwischen Namen und weiteren Eigenschaften.
-# Wird ein K und B mitgegeben, so werden diese Produkte über die Küchen-
-# und Bereitstellungsansicht geführt. Die Einstellung wird auf die Unterkategorien
-# vererbt, wenn die darunter liegenden Kategorien keine Angabe dazu machen.
-# Hinter dem zweiten Gleichheitszeichen kann die Nummer eines Arbeitsbondruckers
-# des jeweiligen Typs (Speise/Getränk) angegeben werden.
-#
-# Wenn ein D da steht, wird als Typ "Getränk" angenommen, bei einem F "Speise".
-# Auch hier wird der übergeordnete Eintrag genommen, wenn Angabe fehlt.
-#
-# Extras werden mit einem Ausrufezeichen am Zeilenanfang deklariert.
-# Das Format ist:
-# !Extraname (ID:8) # 12,34 ; (45),Langname eines Produkts,(49),(50)
-# - Die ID-Angabe ist optional (kann weggelassen werden)
-# - Der Wert 12,34 ist der Aufpreis
-# - Hinter dem Semikolon können Komma-getrennt Produkte angegebenen werden, die
-# dieses Extra haben dürfen. Angabe entweder ID des Produkts in Klammern oder
-# der Langname eines Produkts. (Gibt es den Langnamen mehrfach, wird das Extra
-# auch mehrfach zugewiesen.)
-#
-# Reservierte Buchstaben: = ; # !
-# (Diese werden als Trenner verwendet!)
-#
-Speisen = KBF
- Fastfood
- Pommes ; 3,00
- Schnitzel ; 4,00
- Vom Grill
- El Greco 2P; 26{.}90; EL Greco 2 Personen # 20{.}90; 13{.}80
- El Greco 1P; 14{.}80; EL Greco 1 Person
- Fleisch-Gerichte
- Lammkotelett; 13{.}50; Lammkotelett # 11{.}30; 6{.}00
- Zigeuner/Jägerschnitzel; 10{.}50 # 9{.}80; 3{.}50
- Suzukakia 4H; 10{.}50; Suzukakia 4 Hacksteaks
- Suzukakia 2H; 10{.}50; Suzukakia 2 Hacksteaks
- Souvlaki; 10{.}50
- Italienische Küche
- Pizza
- Siciliana
- klein; 7{.}50; Pizza Siciliana klein
- groß; 7{.}50; Pizza Siciliana groß
- Salami
- klein; 6{.}20; Pizza Salami klein
- groß; 7{.}80; Pizza Salami groß
- Special; 6{.}90; Ital. Tagesspecial
- Kategorie Selbstbedienung =
- Frühstücksbuffet; 8{.}90
- Frühstücksbuffet + Kaffe; 12{.}20
- Kategorie vorbereitet = B
- Deserts; 2{.}20
- Fertigprodukte; 1{.}20
- Kategorie Nur Küche = K
- Tischzubereitung Fisch; 2{.}20
- Tischzubereitung Fleischmenü; 1{.}20
-Getränke = KBD
- Kaffee
- Cappuchino ; 2,50
- Tasse Kaffee ; 3,00
- Becher Kaffee ; 3,50
- Latte Macchiato ; 3,00
- Biere
- Holsten; 1{.}60 # 1{.}00; 0{.}80
- Warsteiner; 1{.}80 # 1{.}20
- Becks Gold; 1{.}80
- Alsterwasser; 1{.}50
- Softdrinks
- Coca-Cola; 2{.}50
- Fanta; 2{.}50
- Ohne Zucker = B
- Cola Zero; 2{.}21
- Sprite; 2{.}50
- Eistee; 1{.}60
- Wasser
- Apollinaris; 2{.}20
- still; 1{.}20; Stilles Wasser
- Weine
- Lambrusco; 7{.}00; Wein Lambrusco
+Speisen = KBF = 1
+ Fastfood = KBF = 1
+ Pommes; 3,00
+ Schnitzel; 4,00
+ Vom Grill = KBF = 1
+ EL Greco 2 Personen; 26,00 # Kurzname:El Greco 2P; PreisB:20,00; PreisC:13,00
+ EL Greco 1 Person; 14,00 # Kurzname:El Greco 1P
+ Fleisch-Gerichte = KBF = 1
+ Lammkotelett; 13,00 # PreisB:11,00; PreisC:6,00
+ Zigeuner/Jägerschnitzel; 10,00 # PreisB:9,00; PreisC:3,00
+ Suzukakia 4 Hacksteaks; 10,00 # Kurzname:Suzukakia 4H
+ Suzukakia 2 Hacksteaks; 10,00 # Kurzname:Suzukakia 2H
+ Souvlaki; 10,00 # ID:9
+ Italienische Küche = KBF = 1
+ Ital. Tagesspecial; 6,00 # Kurzname:Special
+ Pizza = KBF = 1
+ Siciliana = KBF = 1
+ Pizza Siciliana klein; 7,00 # Kurzname:klein
+ Pizza Siciliana groß; 7,00 # Kurzname:groß
+ Salami = KBF = 1
+ Pizza Salami klein; 6,00 # Kurzname:klein
+ Pizza Salami groß; 7,00 # Kurzname:groß
+ Kategorie Selbstbedienung = F = 1
+ Frühstücksbuffet; 8,00
+ Frühstücksbuffet + Kaffe; 12,00
+ Kategorie vorbereitet = BF = 1
+ Deserts; 2,00
+ Fertigprodukte; 1,00
+ Kategorie Nur Küche = KF = 1
+ Tischzubereitung Fisch; 2,00
+ Tischzubereitung Fleischmenü; 1,00
+Getränke = KBD = 1
+ Kaffee = KBD = 1
+ Cappuchino; 2,50
+ Tasse Kaffee; 3,00
+ Becher Kaffee; 3,50
+ Latte Macchiato; 3,00
+ Biere = KBD = 1
+ Holsten; 1,00 # PreisB:1,00; PreisC:0,00
+ Warsteiner; 1,00
+ Becks Gold; 1,00
+ Alsterwasser; 1,00
+ Softdrinks = KBD = 1
+ Coca-Cola; 2,00
+ Fanta; 2,00
+ Sprite; 2,00
+ Eistee; 1,00
+ Ohne Zucker = BD = 1
+ Cola Zero; 2,00
+ Wasser = KBD = 1
+ Apollinaris; 2,00
+ Stilles Wasser; 1,00 # Kurzname:still
+ Weine = KBD = 1
+ Wein Lambrusco; 7,00 # Kurzname:Lambrusco
#
# Es folgen die Extras
!Sahne # 0,50 ; Tasse Kaffee , Becher Kaffee
diff --git a/webapp/feedback.html b/webapp/feedback.html
index d043a7d..5426a1b 100644
--- a/webapp/feedback.html
+++ b/webapp/feedback.html
@@ -4,7 +4,7 @@
-
+
diff --git a/webapp/index.html b/webapp/index.html
index 3b29e71..7532fe3 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/webapp/install.html b/webapp/install.html
index 3e3887d..432b0bb 100644
--- a/webapp/install.html
+++ b/webapp/install.html
@@ -679,7 +679,7 @@ $(document).ready(function() {
-
+
diff --git a/webapp/install/installer.php b/webapp/install/installer.php
index 295c4d3..2335d6e 100644
--- a/webapp/install/installer.php
+++ b/webapp/install/installer.php
@@ -46,9 +46,9 @@ function setTimeZone($zone) {
$this->timezone = $zone;
}
-function openDbAndReturnPdo ($host,$db,$user,$password) {
-$dsn = 'mysql:host=' . $host . ';dbname=' . $db;
-$pdo = null;
+function openDbAndReturnPdo ($host,$db,$user,$password) {
+$dsn = 'mysql:host=' . $host . ';dbname=' . $db;
+$pdo = null;
try {
$pdo = new PDO($dsn, $user, $password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@@ -56,8 +56,8 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
catch (PDOException $e) {
echo 'Verbindungsproblem: ' . $e->getMessage();
$pdo = null;
-}
-return $pdo;
+}
+return $pdo;
}
function checkPhpStatus() {
@@ -95,6 +95,39 @@ $ret = array("extensions_status" => $extensions_status, "missing_extensions" =>
echo json_encode($ret);
}
+private function getForeignKeyName($pdo,$fromtable,$totable,$dbname) {
+$foreignKey = null;
+try {
+$sql = "SELECT constraint_name as foreignkey FROM information_schema.REFERENTIAL_CONSTRAINTS WHERE constraint_schema = '$dbname' AND table_name = '%$fromtable%' AND REFERENCED_TABLE_NAME='%$totable%'";
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute();
+$result = $stmt->fetchAll();
+if (count($result) != 1) {
+return null;
+}
+$foreignKey = $result[0]["foreignkey"];
+} catch (Exception $e) {
+return null;
+}
+
+return $foreignKey;
+}
+
+private function replaceForeignIdKey($pdo,$fromtable,$totable,$dbname,$foreignkeyname,$colname) {
+$foreignkeyorig = $this->getForeignKeyName($pdo, $fromtable, $totable, $dbname);
+if (!is_null($foreignkeyorig)) {
+$this->execSql($pdo, "alter table %$fromtable% drop foreign key $foreignkeyorig");
+$this->execSql($pdo, "ALTER TABLE %$fromtable% ADD CONSTRAINT $foreignkeyname FOREIGN KEY ($colname) REFERENCES %$totable%(id)");
+}
+}
+
+private function replaceForeignKeysToBillAndClosing($pdo,$dbname) {
+$this->replaceForeignIdKey($pdo, 'billproducts', 'bill', $dbname, 'billprodref', 'billid');
+$this->replaceForeignIdKey($pdo, 'queue', 'bill', $dbname, 'queuebillref', 'billid');
+$this->replaceForeignIdKey($pdo, 'bill', 'closing', $dbname, 'billclosingref', 'closingid');
+$this->replaceForeignIdKey($pdo, 'bill', 'bill', $dbname, 'billbillref', 'ref');
+}
+
function updateVersion($pdo,$version) {
$setVersion = "update %config% set setting=? where name='version'";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($setVersion));
@@ -1168,6 +1201,39 @@ return false;
}
}
+private function execSql($pdo,$sql) {
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute();
+}
+
+function updateUserTable1130_1200($prefix, $version, $dbname) {
+$pdo = $this->pdo;
+try {
+if ($version != "1.1.30") {
+$ret = $this->updateUserTable1129_1130($prefix, $version);
+if (!$ret) {
+return false;
+}
+}
+
+DbUtils::overrulePrefix($prefix);
+
+$this->replaceForeignKeysToBillAndClosing($pdo,$dbname);
+
+$this->execSql($pdo, "ALTER TABLE %user% ADD right_closing INT (1) NULL AFTER right_products");
+$this->execSql($pdo, "ALTER TABLE %histuser% ADD right_closing INT (1) NULL AFTER right_products");
+$this->execSql($pdo, "UPDATE %user% SET right_closing=right_manager");
+$this->execSql($pdo, "UPDATE %histuser% SET right_closing=right_manager");
+$this->execSql($pdo, "ALTER TABLE %user% MODIFY right_closing INT(1) NOT NULL");
+$this->execSql($pdo, "ALTER TABLE %histuser% MODIFY right_closing INT(1) NOT NULL");
+
+$this->updateVersion($pdo, '1.2.0');
+return true;
+} catch (PDOException $e) {
+return false;
+}
+}
+
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
try {
@@ -1194,31 +1260,31 @@ $rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
return $rect;
}
-function createTables($decpoint,$billlanguage,$currency,$timezone)
-{
-$pdo = $this->pdo;
+function createTables($decpoint,$billlanguage,$currency,$timezone)
+{
+$pdo = $this->pdo;
$this->basedb->setTimeZone($timezone);
$this->basedb->dropTables($pdo);
$this->basedb->createRatingsTable($pdo);
-$this->createPaymentTable($pdo);
-$this->basedb->createUserTable($pdo);
+$this->createPaymentTable($pdo);
+$this->basedb->createUserTable($pdo);
$this->basedb->createRoomTable($pdo);
$this->basedb->createRestTables($pdo);
$this->basedb->createTableMapsTable($pdo);
-$this->basedb->createTablePosTable($pdo);
-$this->basedb->createConfigTable($pdo);
-$this->basedb->createProdTypeTable($pdo);
-$this->basedb->createProductTable($pdo);
-$this->basedb->createPriceLevelTable($pdo);
-$this->basedb->createClosingTable($pdo);
-$this->basedb->createBillTable($pdo);
-$this->basedb->createQueueTable($pdo);
-$this->basedb->createBillProductsTable($pdo);
+$this->basedb->createTablePosTable($pdo);
+$this->basedb->createConfigTable($pdo);
+$this->basedb->createProdTypeTable($pdo);
+$this->basedb->createProductTable($pdo);
+$this->basedb->createPriceLevelTable($pdo);
+$this->basedb->createClosingTable($pdo);
+$this->basedb->createBillTable($pdo);
+$this->basedb->createQueueTable($pdo);
+$this->basedb->createBillProductsTable($pdo);
$this->basedb->createHistTables($pdo);
-$this->defineHistActions($pdo);
+$this->defineHistActions($pdo);
$this->basedb->createPrintJobsTable($pdo);
$this->basedb->createWorkTable($pdo);
$this->basedb->createCommentsTable($pdo);
@@ -1236,23 +1302,23 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%pricelevel%` (`id` , `name`,`info`,`inf
$this->basedb->doSQL($pdo,"INSERT INTO `%pricelevel%` (`id` , `name`,`info`,`info_en`,`info_esp`) VALUES ('2', 'B', 'Wochenendtarif', 'Weekend prices','Tarifa del fin de semana')");
$this->basedb->doSQL($pdo,"INSERT INTO `%pricelevel%` (`id` , `name`,`info`,`info_en`,`info_esp`) VALUES ('3', 'C', 'Happy Hour', 'Happy Hour','Happy Hour')");
-$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'pricelevel', '1')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'pricelevel', '1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'tax', '19.0')");
-$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'togotax', '7.0')");
-$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'stornocode', '123')");
-$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'printpass', '$printpass')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'togotax', '7.0')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'stornocode', '123')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'printpass', '$printpass')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'companyinfo', 'Musterrestaurant\nBeispielstrasse 123\n12345 Musterort')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'rectemplate', '$rect')");
$resTxt = 'Vielen Dank für Ihre Reservierung am DATUM um ZEIT Uhr für ANZAHL Personen.\n\nWir freuen uns auf Ihren Besuch!\n\nBETRIEBSINFO';
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'reservationnote', '$resTxt')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'serverurl', '')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'email', '')");
-$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiveremail', '')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiveremail', '')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'payprinttype', 's')");
$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.1.30')");
+$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.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 , 'decpoint', '$decpoint')");
@@ -1288,7 +1354,7 @@ $installDate = date('Y-m-d H:i:s');
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'installdate', '$installDate')");
$this->readConfigTableAndSendToHist($pdo);
-return;
+return;
}
public function getCurrentVersion() {
@@ -1321,108 +1387,108 @@ return false;
}
}
-function readConfigTableAndSendToHist($pdo) {
-$sql_query = "SELECT * FROM %config%";
-
-$sql_insert_histconfig = "INSERT INTO %histconfig% (id,configid,setting) VALUES (NULL,?,?)";
-
-$stmt_query = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_query));
-$stmt_insert_histconfig = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_histconfig));
-
-$stmt_query->execute();
-$result = $stmt_query->fetchAll();
-foreach($result as $row){
-$stmt_insert_histconfig->execute(array($row['id'],$row['setting']));
-$newRefIdForHist = $pdo->lastInsertId();
-$this->insertIntoHist($pdo, '2', $newRefIdForHist);
-}
+function readConfigTableAndSendToHist($pdo) {
+$sql_query = "SELECT * FROM %config%";
+
+$sql_insert_histconfig = "INSERT INTO %histconfig% (id,configid,setting) VALUES (NULL,?,?)";
+
+$stmt_query = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_query));
+$stmt_insert_histconfig = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_histconfig));
+
+$stmt_query->execute();
+$result = $stmt_query->fetchAll();
+foreach($result as $row){
+$stmt_insert_histconfig->execute(array($row['id'],$row['setting']));
+$newRefIdForHist = $pdo->lastInsertId();
+$this->insertIntoHist($pdo, '2', $newRefIdForHist);
+}
}
-private function insertIntoHist($pdo,$action,$refIdForHist) {
-date_default_timezone_set($this->timezone);
-$currentTime = date('Y-m-d H:i:s');
-
-$sql_insert_hist = "INSERT INTO %hist% (id,date,action,refid) VALUES (NULL,?,?,?)";
-$stmt_insert_hist = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_hist));
-$stmt_insert_hist->execute(array($currentTime, $action, $refIdForHist));
+private function insertIntoHist($pdo,$action,$refIdForHist) {
+date_default_timezone_set($this->timezone);
+$currentTime = date('Y-m-d H:i:s');
+
+$sql_insert_hist = "INSERT INTO %hist% (id,date,action,refid) VALUES (NULL,?,?,?)";
+$stmt_insert_hist = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_hist));
+$stmt_insert_hist->execute(array($currentTime, $action, $refIdForHist));
}
function insertUser($username,$adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,
$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,
-$right_manager,$right_reservation,$right_rating,$lang,$prefertablemap) {
+$right_manager,$right_closing,$right_reservation,$right_rating,$lang,$prefertablemap) {
$md5adminpass = md5($adminpass);
$pdo = $this->pdo;
-$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1','1')";
+$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_closing`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1','1')";
$stmt = $pdo->prepare(DbUtils::substTableAlias($userInsertSql));
-$stmt->execute(array($username,$md5adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_manager,$right_reservation,$right_rating,$lang,$prefertablemap,0));
+$stmt->execute(array($username,$md5adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_manager,$right_closing,$right_reservation,$right_rating,$lang,$prefertablemap,0));
$newUserIdForHist = $pdo->lastInsertId();
// now insert into hist
-$sql_insert_histuser = "INSERT INTO %histuser% (`id` , `userid`, `username` ,
-`is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,
-`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_reservation`,`right_rating`,`active`) VALUES (
-NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
-$stmt_insert_histuser = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_histuser));
-$stmt_insert_histuser->execute(array($newUserIdForHist,$username,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_manager,$right_reservation,$right_rating,1));
-$newRefIdForHist = $pdo->lastInsertId();
+$sql_insert_histuser = "INSERT INTO %histuser% (`id` , `userid`, `username` ,
+`is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,
+`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_closing`,`right_reservation`,`right_rating`,`active`) VALUES (
+NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+$stmt_insert_histuser = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_histuser));
+$stmt_insert_histuser->execute(array($newUserIdForHist,$username,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_manager,$right_closing,$right_reservation,$right_rating,1));
+$newRefIdForHist = $pdo->lastInsertId();
$this->insertIntoHist($pdo, '3', $newRefIdForHist);
}
-
+
function createPaymentTable($pdo) {
-$this->basedb->createPaymentTable($pdo);
-
-$sql = "INSERT INTO %payment% (id,name,name_en,name_esp) VALUES (?,?,?,?)";
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-
+$this->basedb->createPaymentTable($pdo);
+
+$sql = "INSERT INTO %payment% (id,name,name_en,name_esp) VALUES (?,?,?,?)";
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+
$stmt->execute(array('1', 'Barzahlung', 'Cash', 'Contado'));
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-
-$stmt->execute(array('2', 'EC-Kartenzahlung','Electr. purse (EC)','Pago con tarjeta EC'));
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-$stmt->execute(array('3', 'Kreditkartenzahlung','Credit card','Tarjeta de credito'));
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-$stmt->execute(array('4', 'Rechnung','bill','Factura'));
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-$stmt->execute(array('5', 'Ueberweisung','Bank transfer','Transferencia'));
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-$stmt->execute(array('6', 'Lastschrift','Debit','Cargo en cuenta'));
-}
-public function defineHistActions ($pdo) {
-$sql = "INSERT INTO %histactions% (id,name,description) VALUES (?,?,?)";
-$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-
-$stmt->execute(array('1', 'ProdInit', 'Initiales Befuellen der Produkttabelle'));
-$stmt->execute(array('2', 'ConfigInit', 'Initiales Befuellen der Konfigurationstabelle'));
-$stmt->execute(array('3', 'UserInit', 'Initiales Befuellen der Benutzertabelle'));
-$stmt->execute(array('4', 'ProdChange', 'Modifikation der Produktdaten'));
-$stmt->execute(array('5', 'ProdCreation', 'Neues Produkt'));
-$stmt->execute(array('6', 'ConfigChange', 'Modifikation der Konfiguration'));
-$stmt->execute(array('7', 'UserCreation', 'Neuer Benutzer'));
-$stmt->execute(array('8', 'UserChange', 'Modifikation eines Benutzers'));
+$stmt->execute(array('2', 'EC-Kartenzahlung','Electr. purse (EC)','Pago con tarjeta EC'));
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute(array('3', 'Kreditkartenzahlung','Credit card','Tarjeta de credito'));
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute(array('4', 'Rechnung','bill','Factura'));
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute(array('5', 'Ueberweisung','Bank transfer','Transferencia'));
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+$stmt->execute(array('6', 'Lastschrift','Debit','Cargo en cuenta'));
+}
+
+public function defineHistActions ($pdo) {
+$sql = "INSERT INTO %histactions% (id,name,description) VALUES (?,?,?)";
+$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
+
+$stmt->execute(array('1', 'ProdInit', 'Initiales Befuellen der Produkttabelle'));
+$stmt->execute(array('2', 'ConfigInit', 'Initiales Befuellen der Konfigurationstabelle'));
+$stmt->execute(array('3', 'UserInit', 'Initiales Befuellen der Benutzertabelle'));
+$stmt->execute(array('4', 'ProdChange', 'Modifikation der Produktdaten'));
+$stmt->execute(array('5', 'ProdCreation', 'Neues Produkt'));
+$stmt->execute(array('6', 'ConfigChange', 'Modifikation der Konfiguration'));
+$stmt->execute(array('7', 'UserCreation', 'Neuer Benutzer'));
+$stmt->execute(array('8', 'UserChange', 'Modifikation eines Benutzers'));
}
function testDbConnection($host,$dbname,$user,$pass) {
-$pdo = $this->openDbAndReturnPdo($host,$dbname,$user,$pass);
-if (!is_null($pdo)) {
-echo json_encode("OK");
-} else {
-echo json_encode("ERROR");
-}
+$pdo = $this->openDbAndReturnPdo($host,$dbname,$user,$pass);
+if (!is_null($pdo)) {
+echo json_encode("OK");
+} else {
+echo json_encode("ERROR");
+}
}
function writeConfigFile($host,$db,$user,$password,$prefix) {
$errorlevel = " "sha512",
-"private_key_bits" => 4096,
-"private_key_type" => OPENSSL_KEYTYPE_RSA,
+$sslconfig = array(
+"digest_alg" => "sha512",
+"private_key_bits" => 4096,
+"private_key_type" => OPENSSL_KEYTYPE_RSA,
);
-// thus the signature is exactly 512 bytes
-
-// Create the private and public key
-$res = openssl_pkey_new($sslconfig);
+// thus the signature is exactly 512 bytes
+
+// Create the private and public key
+$res = openssl_pkey_new($sslconfig);
if (is_null($res) || ($res=="")) {
// openssl may be incorrectly installed
return false;
}
-
-// Extract the private key from $res to $privKey
-openssl_pkey_export($res, $privKey);
-
-// Extract the public key from $res to $pubKey
-$pubKey = openssl_pkey_get_details($res);
+
+// Extract the private key from $res to $privKey
+openssl_pkey_export($res, $privKey);
+
+// Extract the public key from $res to $pubKey
+$pubKey = openssl_pkey_get_details($res);
$pubKey = $pubKey["key"];
$sql = "INSERT INTO `%work%` (`id` , `item`,`value`,`signature`) VALUES ( NULL,?,?,?)";
@@ -1556,7 +1622,7 @@ $checker->checkPhpStatus();
} else if ($command == 'testDbConnection') {
$admin = new InstallAdmin();
try {
-if (isset($_POST['host']) && isset($_POST['dbname']) && isset($_POST['user']) && isset($_POST['pass'])) {
+if (isset($_POST['host']) && isset($_POST['dbname']) && isset($_POST['user']) && isset($_POST['pass'])) {
$admin->testDbConnection($_POST['host'],$_POST['dbname'],$_POST['user'],$_POST['pass']);
} else {
echo json_encode("ERROR");
@@ -1616,7 +1682,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
-$installerVersion = "1.1.30";
+$installerVersion = "1.2.0";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@@ -1645,7 +1711,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39",
"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.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"
);
if (!in_array($version, $supportedVersions)) {
@@ -1653,7 +1719,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
-$ret = $admin->updateUserTable1129_1130($_POST['prefix'], $version);
+$ret = $admin->updateUserTable1130_1200($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();
diff --git a/webapp/kitchen.html b/webapp/kitchen.html
index 19c8818..be18a9a 100644
--- a/webapp/kitchen.html
+++ b/webapp/kitchen.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/manager.html b/webapp/manager.html
index 34c81ea..b45da11 100644
--- a/webapp/manager.html
+++ b/webapp/manager.html
@@ -5,7 +5,7 @@
-
+
@@ -65,6 +65,7 @@ var MAN_RESERVATION = ["Reservierung","Reservation","Reserva"];
var MAN_RATING = ["Bewertung","Rating","Valoración"];
var MAN_CHANGEPRICE = ["Preisänderung während Bestellung","Change price during ordering","Modificar precio durante ordenar"];
var MAN_MANAGER = ["Verwaltung","Administration","Administración"];
+var MAN_CLOSINGRIGHT = ["Tageserfassung","Closing","Cerrar día"];
var MAN_USER_NAME = ["Benutzername","User name","Nombre de usario"];
var MAN_USER_PASS = ["Passwort","Password","Contraseña"];
var MAN_YES = ["Ja","Yes","Si"];
@@ -169,11 +170,12 @@ var MAN_BAK_REST_INFO_ALL = ['Die Datensicherung kann auch die gesamte Datenbank
'Exportar puede guarda la base de datos completamente. Con "Importar" este data se puede re-importado. '
+ 'Las acciones estan escritos en un log.'];
var MAN_REST_INFO = ["Der Import dauert eine Weile...","The import takes a while...","Importar necesita un rato..."];
-var MAN_UPLOAD_FILE = ["Diese Datei hochladen: ", "Upload this file: ","Importar este file: "];
+var MAN_UPLOAD_FILE = ["Diese Datei hochladen (importieren): ", "Upload this file: ","Importar este file: "];
var MAN_BAK_REST_HEAD = ["Sicherung und Import","Backup and Restore","Exportar y Importar"];
var MAN_BAK_BTN = ["Sicherung (Konfiguration)","Backup (Configuration)","Exportar (configuración)"];
var MAN_BAK_BTN_ALL = ["Sicherung (Alles)","Backup (all)","Exportar (todo)"];
var MAN_RESTORE_BTN = ["Importieren","Restore","Importar"];
+var MAN_GO_LIVE = ["Starte Produktivbetrieb","Start productive mode","Empezar trabajar realmente"];
var MAN_SHUTDOWN = ["Server herunterfahren","Shutdown server","Apagar servidor"];
var MAN_SHUTDOWN_HINT = ["(Herunterfahren nur möglich, wenn Webserver die erforderlichen Rechte besitzt).",
"(Shutdown only possible if web server has the required privileges to do so.)",
@@ -210,6 +212,7 @@ var MAN_PRINTER = ["Kassenbon-Drucker","Receipts Printer","Impresora de tiques"]
var MAN_FOOD_PRINTER = ["Speisearbeitsbon-Drucker","Food work ticket printer","Impreso de tiques de comida"];
var MAN_DRINK_PRINTER = ["Getränkearbeitsbon-Drucker","Drinks work ticket printer","Impreso de tiques de bebidas"];
var MAN_UPDATE_PRINTJOBS = ["Aktualisieren","Update","Actualizar"];
+var MAN_CLEAR_PRINTJOBS = ["Alle Druckjobs löschen","Clear all print jobs","Remover todo"];
var MAN_PRINT_JOBS_COUNT = ["Druckaufträge","print jobs","tareas de impresión"];
var MAN_PARSE_ERROR = ["Speisekarte konnte nicht erfolgreich eingelesen werden. Stimmt die Syntax, z.B. die korrekte Einrückung?",
"Menu could not be parsed - is the intendation correct?",
@@ -272,6 +275,9 @@ var MAN_AESKEY_WRONG_LENGTH = ["Ein AES256-Schlüssel muss in Hex-Darstellung 64
var MAN_AESKEY_NO_HEX = ["Der AES-Schlüssel muss als Hex-Zahl angegeben werden.","The AES key must be specified as hex number","La llava AES tiene que especificado en formato hex."];
var MAN_CERTIFICATE_SN = ["Zertifikatsseriennummer", "Certificate Serial No","Certificado ID"];
var MAN_TAX = ["Steuersatz (%)","Tax (%)","Impuesto (%)"];
+var MAN_CONFIRM_GO_LIVE = ["Die Umsatz- und Logdaten wurden gelöscht und nur die Konfiguration übernommen. Deswegen ist nun ein erneutes Einloggen erforderlich.",
+ "The sales and log data is deleted and configuration is recreated. Therefore a log-in is required now.",
+ "La configuración esta re-creado. Entonces es necesario registrar de nuevo."];
var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0];
@@ -391,6 +397,7 @@ function setLanguage(l) {
$("#backupbtntxt").html(MAN_BAK_BTN[l]);
$("#backupbtntxtall").html(MAN_BAK_BTN_ALL[l]);
$("#restorebtntxt").html(MAN_RESTORE_BTN[l]);
+ $("#golivetxt").html(MAN_GO_LIVE[l]);
$("#shutdownbtntxt").html(MAN_SHUTDOWN[l]);
$("#shutdownhinttxt").html(MAN_SHUTDOWN_HINT[l]);
@@ -401,6 +408,7 @@ function setLanguage(l) {
$("#printjobsheader").html(MAN_PRINTJOBS[l]);
$("#updateprintqueue").html(MAN_UPDATE_PRINTJOBS[l]);
+ $("#clearprintqueue").html(MAN_CLEAR_PRINTJOBS[l]);
$("#tmimgdelbtntxt").html(MAN_TM_DEL[l]);
$("#tmimgbtntxt").html(MAN_TM[l]);
@@ -438,16 +446,21 @@ function createMonthSelection(label) {
return monthHtml;
}
-function hideElementsForNonAdminUser(jsonAnswer) {
- if (jsonAnswer != "Yes") {
- $("#dbactionui").hide();
- }
-}
-
-function hideElementsForNonAdminManagerUser(jsonAnswer) {
- if (jsonAnswer != "Yes") {
- $("#allpagecontent").hide();
- }
+function showPanelsDueToUserStatus(jsonAnswer) {
+ if (jsonAnswer == "admin") {
+ $("#dbactionui").show();
+ }
+ if (jsonAnswer == "manager" || (jsonAnswer == 'admin')) {
+ $("#userpart").show();
+ $("#configpart").show();
+ $("#printerqueue").show();
+ $("#dataexport").show();
+ $("#printserverdownloadpart").show();
+ }
+
+ if(jsonAnswer == "No") {
+ $("#allpagecontent").hide();
+ }
}
function getSpeisekarte() {
@@ -771,10 +784,10 @@ function changeConfig(changedEntries) {
}
function reactOnConfigChange(result) {
- if (result == "OK") {
+ if (result.status == "OK") {
alert(MAN_CONFIG_CHANGED[lang]);
} else {
- alert(MAN_CONFIG_CHANGE_ERROR[lang]);
+ alert(MAN_CONFIG_CHANGE_ERROR[lang] + ": " + result.msg);
}
}
@@ -1006,7 +1019,6 @@ function binding() {
};
if (isValid) {
changeConfig(changedEntries);
- setTimeout(function(){document.location.href = "manager.html"},500);
}
});
}
@@ -1092,6 +1104,14 @@ function binding() {
$("#restinfoafterclick").html(MAN_REST_INFO[lang]);
});
+ $("#golive").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ areYouSure("Produktivbetrieb beginnen", "Alle Umsatz- und Logdaten löschen?", "Ja", function() {
+ golive();
+ });
+ });
+
$("#shutdown_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
@@ -1115,6 +1135,11 @@ function binding() {
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
});
+ $("#clearprintqueue").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ doAjax("GET","php/contenthandler.php?module=printqueue&command=clearprintjobs",null,insertPrintQueue,null);
+ });
$("#taxass_apply").off("click").on("click", function (e) {
e.stopImmediatePropagation();
@@ -1486,7 +1511,7 @@ function createLabelWithOption(aLabel,displayedName,hasTheRight) {
* the username and the rights that the user has to work in the
* various modules.
*/
-function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rManager,forNewUser) {
+function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rClosing, rManager,forNewUser) {
var collapsiblePart = '
';
@@ -1511,6 +1536,7 @@ function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSuppl
collapsiblePart += createLabelWithOption("reservation",MAN_RESERVATION[lang],rReservation);
collapsiblePart += createLabelWithOption("rating",MAN_RATING[lang],rRating);
collapsiblePart += createLabelWithOption("changeprice",MAN_CHANGEPRICE[lang],rChangeprice);
+ collapsiblePart += createLabelWithOption("closingright",MAN_CLOSINGRIGHT[lang],rClosing);
collapsiblePart += createLabelWithOption("manager",MAN_MANAGER[lang],rManager);
if (forNewUser) {
@@ -1531,6 +1557,7 @@ function fillUserListIntoGui(userinfo) {
$.each(userinfo, function (i, aUser) {
var userid = aUser.id;
var username = aUser.username;
+
userPart += createCollapsibeOfUser(
"userid_" + userid,
username,
@@ -1546,6 +1573,7 @@ function fillUserListIntoGui(userinfo) {
aUser.right_reservation == 1,
aUser.right_rating == 1,
aUser.right_changeprice == 1,
+ aUser.right_closing == 1,
aUser.right_manager == 1,
false
);
@@ -1554,7 +1582,7 @@ function fillUserListIntoGui(userinfo) {
userPart += createCollapsibeOfUser(
"userid_newuser",
MAN_NEW_USER[lang],
- false,false,false,false,false,false,false,false,false,false,false,false,false,true);
+ false,false,false,false,false,false,false,false,false,false,false,false,false,false,true);
$("#userlist").html(userPart);
$('#userpart').trigger('create');
@@ -1597,6 +1625,7 @@ function dynamicUserBinding() {
var rRating = newUserInfoContainer.find("#userlabel_rating").val();
var rChangeprice = newUserInfoContainer.find("#userlabel_changeprice").val();
var rManager = newUserInfoContainer.find("#userlabel_manager").val();
+ var rClosing = newUserInfoContainer.find("#userlabel_closingright").val();
if ((username.length == 0) || (password.length == 0)) {
alert ("Benutzername oder Passwort sind nicht gesetzt");
@@ -1616,7 +1645,8 @@ function dynamicUserBinding() {
rReservation: rReservation,
rRating: rRating,
rChangeprice : rChangeprice,
- rManager: rManager
+ rManager: rManager,
+ rClosing: rClosing
};
doAjax("POST","php/contenthandler.php?module=admin&command=createNewUser",data,doCreateNewUser,"Anlegen neuer Benutzer");
}
@@ -1641,6 +1671,7 @@ function dynamicUserBinding() {
var rRating = userInfoContainer.find("#userlabel_rating").val();
var rChangeprice = userInfoContainer.find("#userlabel_changeprice").val();
var rManager = userInfoContainer.find("#userlabel_manager").val();
+ var rClosing = userInfoContainer.find("#userlabel_closingright").val();
var data = {
userid: userid,
@@ -1656,7 +1687,8 @@ function dynamicUserBinding() {
rReservation: rReservation,
rRating: rRating,
rChangeprice: rChangeprice,
- rManager: rManager
+ rManager: rManager,
+ rClosing: rClosing
};
doAjax("POST","php/contenthandler.php?module=admin&command=updateUser",data,askAndFillUserListNoData,"Benutzerdaten");
});
@@ -1711,14 +1743,11 @@ function reloadPage(dummyData) {
}
function doCreateNewUser(result) {
- if (result == "exists") {
- alert ("Benutzer existiert bereits");
- }
- else if (result == "noadmin") {
- alert (MAN_NO_ADMIN_CREATE[lang]);
- } else {
- askAndFillUserList("OK");
- }
+ if (result.status == "OK") {
+ askAndFillUserList("OK");
+ } else {
+ alert("Fehler: " + result.msg);
+ }
}
function handleResultOfDbAction(jsonText) {
@@ -1949,6 +1978,20 @@ function initroomfield(roomfield_json) {
var roomMap = new Roommap("#tablemaps");
}
+function golive() {
+ doAjax("POST","php/contenthandler.php?module=admin&command=golive",null,handleGoLive,"Produktivbetriebsstart");
+
+}
+
+function handleGoLive(answer) {
+ if (answer.status == "OK") {
+ alert(MAN_CONFIRM_GO_LIVE[lang]);
+ setTimeout(function(){document.location.href = "logout.php"},250);
+ } else {
+ alert("Error: " + answer.msg);
+ }
+}
+
function roomfield_prefill() {
var n = $("#maxrooms_val").val();
var m = $("#maxtables_val").val();
@@ -2051,12 +2094,10 @@ function insertPrintQueue(queue) {
$(document).on("pageinit", "#admin-page", function () {
initializeMainMenu("#modulemenu");
getGeneralConfigItems();
- doAjax("GET","php/contenthandler.php?module=admin&command=isLoggedinUserAdminOrManager",null,hideElementsForNonAdminManagerUser,"Fehler");
+ doAjax("GET","php/contenthandler.php?module=admin&command=isLoggedinUserAdminOrManagerOrTE",null,showPanelsDueToUserStatus,"Fehler");
askAndFillUserList();
hideMenu();
-
- doAjax("GET","php/contenthandler.php?module=admin&command=isLoggedinUserAdmin",null,hideElementsForNonAdminUser,"Pruefe Adminberechtigung");
createYearPartFor("select-year","#yearselection",'#closinglist');
createYearPartFor("select-year-export-start","#yearselectionexportstart",'#dataexport');
@@ -2133,7 +2174,7 @@ $(document).on("pageinit", "#admin-page", function () {
-
+
Datenexport
Hier können Sie eine csv-Datei erzeugen lassen, die ...
@@ -2180,13 +2221,13 @@ $(document).on("pageinit", "#admin-page", function () {
-
+
Benutzer
-
+
Konfiguration
-
Wenn dieser Text dargestellt wird, liegt ein Fehler vor!