From fb6400e5ae2041e391974f659d46445722e53d56 Mon Sep 17 00:00:00 2001 From: Geno Date: Thu, 19 Nov 2020 23:03:26 +0100 Subject: [PATCH] OrderSprinter 1.3.16 --- printserver/OrderSprinterPrintserver.exe | Bin 261632 -> 261632 bytes spider/install/installer.php | 2 +- webapp/OrderSprinterPrintserver.exe | Bin 261632 -> 261632 bytes webapp/bar.html | 2 +- webapp/bill.html | 2 +- webapp/feedback.html | 2 +- webapp/index.html | 6 +-- webapp/install.html | 2 +- webapp/install/installer.php | 64 ++++++++++++++++++++--- webapp/kitchen.html | 2 +- webapp/manager.html | 55 ++++++++++++------- webapp/paydesk.html | 2 +- webapp/php/admin.php | 54 ++++++++++--------- webapp/php/closing.php | 2 +- webapp/php/contenthandler.php | 4 +- webapp/php/queuecontent.php | 54 ++++++++++++++++--- webapp/php/reports.php | 6 +-- webapp/php/roomtables.php | 2 +- webapp/php/updater.php | 2 +- webapp/preferences.html | 2 +- webapp/products.html | 2 +- webapp/rating.html | 2 +- webapp/reports.html | 2 +- webapp/reservation.html | 2 +- webapp/supplydesk.html | 2 +- webapp/waiter.html | 4 +- 26 files changed, 194 insertions(+), 85 deletions(-) diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index c15a1af16612e22183ff5ef2d3f5b7949fa2df61..efc07b51327db650ad2367921817912aad28254d 100644 GIT binary patch delta 162 zcmZqp!{6|Se?kYdT7gPqcWXCeYd6!@Zf5@`MuF|Oo0ykrtGJq5ni`v%80eaqSQzP= zxS2WYS~{CK>RMX38CV)Pn;M!K7;Rs=j(M>@quF-Pd(4M91su$$K5uf#@t>151En>-Gp8|f3NSD;FfuSO2yCDJgE^iNDE|E?^J*YHeerK*b5=73JqClx OhKx$v8UHZKpn delta 162 zcmZqp!{6|Se?kYdhpK#IcWXCeYd6!@Zf5@`M*i)$o0ykrtC(0C7`QqaIP1C^TDa+& z7+PBBS~|Ko>6$q^xmmaxx;YsbJ8xgQj(M>@qv>|fd(4M91$bUFc=kV>;W+Dd&i+36 z4K~|lUNCd>1En>-Gp8|f@-r|qFfuSO@Nb{~gE^iNDE|E?^J*YHeerK*b5>IZJqClx OhKx$v8UHZ "OK","msg" => "Installation successful"); diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe index c15a1af16612e22183ff5ef2d3f5b7949fa2df61..efc07b51327db650ad2367921817912aad28254d 100644 GIT binary patch delta 162 zcmZqp!{6|Se?kYdT7gPqcWXCeYd6!@Zf5@`MuF|Oo0ykrtGJq5ni`v%80eaqSQzP= zxS2WYS~{CK>RMX38CV)Pn;M!K7;Rs=j(M>@quF-Pd(4M91su$$K5uf#@t>151En>-Gp8|f3NSD;FfuSO2yCDJgE^iNDE|E?^J*YHeerK*b5=73JqClx OhKx$v8UHZKpn delta 162 zcmZqp!{6|Se?kYdhpK#IcWXCeYd6!@Zf5@`M*i)$o0ykrtC(0C7`QqaIP1C^TDa+& z7+PBBS~|Ko>6$q^xmmaxx;YsbJ8xgQj(M>@qv>|fd(4M91$bUFc=kV>;W+Dd&i+36 z4K~|lUNCd>1En>-Gp8|f@-r|qFfuSO@Nb{~gE^iNDE|E?^J*YHeerK*b5>IZJqClx OhKx$v8UHZ - + diff --git a/webapp/bill.html b/webapp/bill.html index 7c73ee1..f0952d3 100644 --- a/webapp/bill.html +++ b/webapp/bill.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/feedback.html b/webapp/feedback.html index c2b04c0..2e731d3 100644 --- a/webapp/feedback.html +++ b/webapp/feedback.html @@ -4,7 +4,7 @@ - + diff --git a/webapp/index.html b/webapp/index.html index 0111a1a..8a101fe 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -9,8 +9,8 @@ - - + + @@ -206,7 +206,7 @@ function handleResultOfInstallCheck(is_installed) { if (is_installed == "Yes") { useInstallation(); } else { - setTimeout(function(){document.location.href = "install.html?v=1.3.15"},500); + setTimeout(function(){document.location.href = "install.html?v=1.3.16"},500); } } diff --git a/webapp/install.html b/webapp/install.html index 3177c46..a5156b2 100644 --- a/webapp/install.html +++ b/webapp/install.html @@ -725,7 +725,7 @@ $(document).ready(function() {   - +   diff --git a/webapp/install/installer.php b/webapp/install/installer.php index c6ac09b..5c6aae3 100644 --- a/webapp/install/installer.php +++ b/webapp/install/installer.php @@ -2237,6 +2237,56 @@ return false; } } +function updateUserTable1315_1316($prefix, $version, $dbname) { +$pdo = $this->pdo; +try { +if ($version != "1.3.15") { +$ret = $this->updateUserTable1314_1315($prefix, $version, $dbname); +if (!$ret) { +echo "Version update v1.3.14 to 1.3.15 not successful."; +return false; +} +} + +DbUtils::overrulePrefix($prefix); + +$sql = "UPDATE %config% SET name=? WHERE name=?"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('groupworkitemsf','groupworkitems')); + +$sql = "SELECT setting FROM %config% WHERE name=?"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('groupworkitemsf')); +$row = $stmt->fetchObject(); +$groupworkitemsf = $row->setting; + +$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('groupworkitemsd',$groupworkitemsf)); + +$sql = "UPDATE %config% SET name=? WHERE name=?"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('oneprodworkrecf','oneprodworkreceipts')); + +$sql = "SELECT setting FROM %config% WHERE name=?"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('oneprodworkrecf')); +$row = $stmt->fetchObject(); +$oneprodworkrecf = $row->setting; + +$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('oneprodworkrecd',$oneprodworkrecf)); + +$this->updateVersion($pdo, '1.3.16'); + +return true; +} catch (PDOException $e) { +echo "Error in v1.3.15 to 1.3.16: $e"; +return false; +} +} + function setVersion($prefix,$theVersion) { $pdo = $this->pdo; @@ -2363,7 +2413,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.3.15')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.16')"); $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')"); @@ -2372,7 +2422,8 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'cancelunpaidcode', '')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'bigfontworkreceipt', '0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'prominentsearch', '0')"); -$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitems', '1')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsf', '1')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsd', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'addreceipttoprinter', null)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'smtphost', '')"); @@ -2395,7 +2446,8 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'digigopaysetready', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'waitergopayprint', '0')"); -$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'oneprodworkreceipts', '0')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'oneprodworkrecf', '0')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'oneprodworkrecd', '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')"); @@ -2791,7 +2843,7 @@ $zones[] = $timezone_identifiers[$i]; } echo json_encode($zones); } else if ($command == 'update') { -$installerVersion = "1.3.15"; +$installerVersion = "1.3.16"; $admin = new InstallAdmin(); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); @@ -2822,7 +2874,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27" "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.17", "1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12", -"1.3.13","1.3.14" +"1.3.13","1.3.14","1.3.15" ); if (!in_array($version, $supportedVersions)) { @@ -2830,7 +2882,7 @@ echo json_encode("Quellversion nicht unterstützt"); return; } -$ret = $admin->updateUserTable1314_1315($_POST['prefix'], $version, $_POST['db']); +$ret = $admin->updateUserTable1315_1316($_POST['prefix'], $version, $_POST['db']); if(session_id() == '') { session_start(); diff --git a/webapp/kitchen.html b/webapp/kitchen.html index e56b1f8..a3879c6 100644 --- a/webapp/kitchen.html +++ b/webapp/kitchen.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/manager.html b/webapp/manager.html index 6baa756..308b2b2 100644 --- a/webapp/manager.html +++ b/webapp/manager.html @@ -5,7 +5,7 @@ - + @@ -146,7 +146,8 @@ var MAN_DIGI_GOPAY_DESCR = ["Im Arbeitsablauf 'nur digital' bestimmt diese Einst "In the 'only digital' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view and paying the products shall be handled as served.", "En el modus 'digital' este boton especifica si los productos deben declarados como servidos despues pagar por click en el boton 'caja' en la vista de camarero."]; var MAN_WAITER_GOPAY_PRINT = ["Bestell-Kassenbutton druckt Arbeitsbons","Waiter's paydesk button prints also work receipts","Boton caja en vista de camarero imprime también tiquets de trabajo"]; -var MAN_ONE_PROD_WORKREC = ["Nur ein Produkt pro Arbeitsbon","Max. one product on a work receipt","Sólo un producto en un tique de trabajo"]; +var MAN_ONE_PROD_WORKREC_F = ["Nur ein Produkt pro Speise-Arbeitsbon","Max. one product on a food work receipt","Sólo un producto en un tique de trabajo (comidas)"]; +var MAN_ONE_PROD_WORKREC_D = ["Nur ein Produkt pro Getränke-Arbeitsbon","Max. one product on a drink work receipt","Sólo un producto en un tique de trabajo (bebidas)"]; var MAN_DIGI_PRINTWORK = ["Arbeitsbons in Küchen-/Baransicht","Work receipts in kitchen/bar view","Tiques de trabajo en modulo de cocina"]; 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?", @@ -166,7 +167,8 @@ var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese var MAN_ADD_RECPRINTER_DESCR = ["Wird hier ein weiterer Drucker angegeben, so werden alle Kassenbons beim Druck über die Kassenansicht zusätzlich auf diesem Drucker ausgedruckt.", "If a printer is set every print job that is invoked on the paydesk view will be printed also on the specified printer", "Si esta seleccionado una imprimadora aquí cada tiquet va a ser imprimido en la imprimidora también"]; -var MAN_GROUP_WORK_ITEMS = ["Artikelzusammenfassung Arbeitsbon","Summary articels on work receipt", "Agrupación articulos tique d. tr." ]; +var MAN_GROUP_WORK_ITEMS_F = ["Artikelzus.fass. Speise-Arbeitsbons","Summary articels on food work receipt", "Agrupación articulos tique d. tr. (comidas(" ]; +var MAN_GROUP_WORK_ITEMS_D = ["Artikelzus.fass. Getränke-Arbeitsbons","Summary articels on drink work receipt", "Agrupación articulos tique d. tr. (bebidas)" ]; var MAN_RES_NOTE = ["Reservierungsbestätigung","Confirmation reservation","Text de email para reservación"]; var MAN_CHANGE_CONFIG_HEAD = ["Konfiguration ändern?","Change configuration?","Modificar configuración?"]; var MAN_CHANGE_CONFIG_CONTENT = ["Sollen folgende Werte geändert werden? ","Do you want to change these values? ","Debe ser cambiado estos datos? "]; @@ -375,7 +377,7 @@ var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"]; var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"]; var lang = 0; -var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3]; +var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0]; var numberOfClosings = 0; @@ -408,14 +410,16 @@ var generalValuesSettings = [ ["paymentconfig",MAN_PAYMENT_CONFIG[lang],"s",3], ["bigfontworkreceipt",MAN_WORKFONT_CONFIG[lang],"s",7], ["prominentsearch",MAN_PROMINENT_SEARCH[lang],"s",8], - ["groupworkitems",MAN_GROUP_WORK_ITEMS[lang],"s",9], + ["groupworkitemsf",MAN_GROUP_WORK_ITEMS_F[lang],"s",9], + ["groupworkitemsd",MAN_GROUP_WORK_ITEMS_D[lang],"s",38], ["discount1",MAN_DISCOUNT1[lang],"s",11], ["discount2",MAN_DISCOUNT2[lang],"s",12], ["discount3",MAN_DISCOUNT3[lang],"s",13], ["austria",MAN_AUSTRIA[lang],"s",10], ["digigopaysetready",MAN_DIGI_GOPAY_SET_READY[lang],"s",14], ["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15], - ["oneprodworkreceipts",MAN_ONE_PROD_WORKREC[lang],"s",17], + ["oneprodworkrecf",MAN_ONE_PROD_WORKREC_F[lang],"s",17], + ["oneprodworkrecd",MAN_ONE_PROD_WORKREC_D[lang],"s",39], ["digiprintwork",MAN_DIGI_PRINTWORK[lang],"s",18], ["printandqueuejobs",MAN_PRINT_AND_QUEUE[lang],"s",19], ["cashenabled",MAN_CASH[lang],"s",20], @@ -725,12 +729,14 @@ function insertGeneralConfigItems(configResult) { $("#partOfDashslot3").html(createDashslotPart(3,values.dashslot3)); $("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt)); $("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch)); - $("#partOfGroupWorkItems").html(createGroupWorkItemsPart(values.groupworkitems)); + $("#partOfGroupWorkItemsf").html(createGroupWorkItemsPartf(values.groupworkitemsf)); + $("#partOfGroupWorkItemsd").html(createGroupWorkItemsPartd(values.groupworkitemsd)); $("#partOfAustria").html(createAustriaPart(values.austria)); $("#partOfDigigopaysetready").html(createDigigopaysetready(values.digigopaysetready)); $("#partOfWaitergopayprint").html(createWaitergopayprint(values.waitergopayprint)); - $("#partOfOneprodworkreceipts").html(createOneprodworkreceipts(values.oneprodworkreceipts)); + $("#partOfOneprodworkrecf").html(createOneprodworkreceiptsf(values.oneprodworkrecf)); + $("#partOfOneprodworkrecd").html(createOneprodworkreceiptsd(values.oneprodworkrecd)); $("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork)); $("#partOfPrintAndQueueJobs").html(createPrintAndQueueJobs(values.printandqueuejobs)); $("#partOfCash").html(createCash(values.cashenabled)); @@ -779,7 +785,8 @@ function insertGeneralConfigItems(configResult) { generalVals[6] = values.smtpsecure; generalVals[7] = values.bigfontworkreceipt; generalVals[8] = values.prominentsearch; - generalVals[9] = values.groupworkitems; + generalVals[9] = values.groupworkitemsf; + generalVals[38] = values.groupworkitemsd; generalVals[11] = parseInt(values.discount1); generalVals[12] = parseInt(values.discount2); @@ -790,7 +797,8 @@ function insertGeneralConfigItems(configResult) { generalVals[10] = values.austria; generalVals[14] = values.digigopaysetready; generalVals[15] = values.waitergopayprint; - generalVals[17] = values.oneprodworkreceipts; + generalVals[17] = values.oneprodworkrecf; + generalVals[39] = values.oneprodworkrecd; generalVals[18] = values.digiprintwork; generalVals[19] = values.printandqueuejobs; generalVals[20] = values.cashenabled; @@ -960,14 +968,20 @@ function createDigigopaysetready(theValue) { function createWaitergopayprint(theValue) { return createYesNo("waitergopayprint",MAN_WAITER_GOPAY_PRINT, theValue); } -function createOneprodworkreceipts(theValue) { - return createYesNo("oneprodworkreceipts",MAN_ONE_PROD_WORKREC, theValue); +function createOneprodworkreceiptsf(theValue) { + return createYesNo("oneprodworkrecf",MAN_ONE_PROD_WORKREC_F, theValue); +} +function createOneprodworkreceiptsd(theValue) { + return createYesNo("oneprodworkrecd",MAN_ONE_PROD_WORKREC_D, theValue); } function createDigiprintwork(theValue) { return createYesNo("digiprintwork",MAN_DIGI_PRINTWORK,theValue); } -function createGroupWorkItemsPart(theValue) { - return createYesNo("groupworkitems", MAN_GROUP_WORK_ITEMS, theValue); +function createGroupWorkItemsPartf(theValue) { + return createYesNo("groupworkitemsf", MAN_GROUP_WORK_ITEMS_F, theValue); +} +function createGroupWorkItemsPartd(theValue) { + return createYesNo("groupworkitemsd", MAN_GROUP_WORK_ITEMS_D, theValue); } function createPrintAndQueueJobs(theValue) { return createYesNo("printandqueuejobs",MAN_PRINT_AND_QUEUE, theValue); @@ -1651,9 +1665,9 @@ function handleUpdateCheckResult(answer) { var millis=getMillis(); setTimeout(function(){ - document.location.href = "install.html?v=1.3.15&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.16&mode=onlyupdate&n=" + millis; },250); - document.location.href = "install.html?v=1.3.15&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.16&mode=onlyupdate&n=" + millis; } function handleUpdateReplace(answer) { @@ -3113,13 +3127,16 @@ $(document).on("pageinit", "#admin-page", function () {
- -
+ + +
+
Hinweis: Nicht für eigene Layouts
-
+
+
diff --git a/webapp/paydesk.html b/webapp/paydesk.html index 41a85b3..0731872 100644 --- a/webapp/paydesk.html +++ b/webapp/paydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/php/admin.php b/webapp/php/admin.php index e14143a..44cb449 100644 --- a/webapp/php/admin.php +++ b/webapp/php/admin.php @@ -916,9 +916,11 @@ class Admin { $austria = CommonUtils::getConfigValueStmt($pdo,$stmt,"austria",null); $digigopaysetready = CommonUtils::getConfigValueStmt($pdo,$stmt,"digigopaysetready",1); $waitergopayprint = CommonUtils::getConfigValueStmt($pdo,$stmt,"waitergopayprint",0); - $oneprodworkreceipts = CommonUtils::getConfigValueStmt($pdo,$stmt,"oneprodworkreceipts",0); + $oneprodworkrecf = CommonUtils::getConfigValueStmt($pdo,$stmt,"oneprodworkrecf",0); + $oneprodworkrecd = CommonUtils::getConfigValueStmt($pdo,$stmt,"oneprodworkrecd",0); $digiprintwork = CommonUtils::getConfigValueStmt($pdo,$stmt,"digiprintwork",1); - $groupworkitems = CommonUtils::getConfigValueStmt($pdo,$stmt,"groupworkitems",1); + $groupworkitemsf = CommonUtils::getConfigValueStmt($pdo,$stmt,"groupworkitemsf",1); + $groupworkitemsd = CommonUtils::getConfigValueStmt($pdo,$stmt,"groupworkitemsd",1); $receiveremail = CommonUtils::getConfigValueStmt($pdo,$stmt,"receiveremail",""); $emailbadrating = CommonUtils::getConfigValueStmt($pdo,$stmt,"emailbadrating",""); $emailratingcontact = CommonUtils::getConfigValueStmt($pdo,$stmt,"emailratingcontact",""); @@ -1005,11 +1007,11 @@ class Admin { "userlanguage" => $userlang, "receiptprinter" => $receiptprinter, "receiptfontsize" => $receiptfontsize, "reservationnote" => $reservationnote, "paymentconfig" => $paymentconfig, "workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating, - "rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitems" => $groupworkitems, + "rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitemsf" => $groupworkitemsf,"groupworkitemsd" => $groupworkitemsd, "sday" => $now["mday"],"smonth" => $now["mon"], "syear" => $now["year"], "shour" => $now["hours"], "smin" => $now["minutes"], "smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport, "webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "cancelguestcode" => $cancelguestcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3, - "austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts, + "austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkrecf" => $oneprodworkrecf, "oneprodworkrecd" => $oneprodworkrecd, "digiprintwork" => $digiprintwork, "memorylimit" => $memorylimit, "updateurl" => $updateurl, "hs3refresh" => $hs3refresh, "paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "rksvserver" => $rksvserver, "addreceipttoprinter" => $addreceipttoprinter, "printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "returntoorder" => $returntoorder, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode, @@ -1115,7 +1117,7 @@ class Admin { $view = "preferences.html"; } - echo json_encode($view . "?v=1.3.15"); + echo json_encode($view . "?v=1.3.16"); } } @@ -1318,26 +1320,26 @@ 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.3.15"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.16"); }; } else { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.15"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.16"); }; } - if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.15"); }; - if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.15"); }; - if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.15"); }; + if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.16"); }; + if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.16"); }; + if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.16"); }; if ($_SESSION['modus'] == 0) { - if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.15"); }; + if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.16"); }; } - if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.15"); }; - if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.15"); }; - if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.15"); }; - if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.15"); }; - if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.15"); }; - if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.15"); }; - if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.15"); }; - if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.15"); }; - $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.15"); - $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.15"); + if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.16"); }; + if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.16"); }; + if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.16"); }; + if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.16"); }; + if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.16"); }; + if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.16"); }; + if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.16"); }; + if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.16"); }; + $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.16"); + $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.16"); } $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); @@ -1345,7 +1347,7 @@ class Admin { $waiterMessage = $this->getMessage(null, "waitermessage"); } - $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.15", + $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.16", "user" => $currentUser, "menu" => $mainMenu, "waitermessage" => $waiterMessage, @@ -1473,7 +1475,7 @@ class Admin { $sql .= " ((checkin <= CURDATE()) AND (CURDATE() <= checkout)) "; $sql .= " OR (checkin is null AND (CURDATE() <= checkout)) "; $sql .= " OR ((checkin <= CURDATE()) AND checkout is null) "; - $sql .= ") GROUP BY id"; + $sql .= ") GROUP BY id,object,guest"; $guests = CommonUtils::fetchSqlAll($pdo, $sql, null); return(array("status" => "OK","guests" => $guests)); } catch (Exception $ex) { @@ -1696,9 +1698,11 @@ class Admin { "austria" => array("dbcol" => "austria","checknum" => 0), "digigopaysetready" => array("dbcol" => "digigopaysetready","checknum" => 0), "waitergopayprint" => array("dbcol" => "waitergopayprint","checknum" => 0), - "oneprodworkreceipts" => array("dbcol" => "oneprodworkreceipts","checknum" => 0), + "oneprodworkrecf" => array("dbcol" => "oneprodworkrecf","checknum" => 0), + "oneprodworkrecd" => array("dbcol" => "oneprodworkrecd","checknum" => 0), "digiprintwork" => array("dbcol" => "digiprintwork","checknum" => 0), - "groupworkitems" => array("dbcol" => "groupworkitems","checknum" => 0), + "groupworkitemsf" => array("dbcol" => "groupworkitemsf","checknum" => 0), + "groupworkitemsd" => array("dbcol" => "groupworkitemsd","checknum" => 0), "workflowconfig" => array("dbcol" => "workflowconfig","checknum" => 0), "dashslot1" => array("dbcol" => "dashslot1","checknum" => 0), "dashslot2" => array("dbcol" => "dashslot2","checknum" => 0), diff --git a/webapp/php/closing.php b/webapp/php/closing.php index 7edfba6..d58ca4e 100644 --- a/webapp/php/closing.php +++ b/webapp/php/closing.php @@ -290,7 +290,7 @@ $sql .= "ROUND(sum(if(paymentid='1',brutto,'0.00')),2) as sumonlybar,"; $sql .= "ROUND(sum(if(status = 'c',brutto,'0.00')),2) as sumcash "; -$sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid=? GROUP BY userid"; +$sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid=? GROUP BY userid,username"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array($closingid)); diff --git a/webapp/php/contenthandler.php b/webapp/php/contenthandler.php index 43bb54d..66a7795 100644 --- a/webapp/php/contenthandler.php +++ b/webapp/php/contenthandler.php @@ -97,6 +97,4 @@ function havePlugins() { } } return null; -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/webapp/php/queuecontent.php b/webapp/php/queuecontent.php index d5e5711..5b02622 100644 --- a/webapp/php/queuecontent.php +++ b/webapp/php/queuecontent.php @@ -356,9 +356,13 @@ class QueueContent { $queueStr = implode(',',$queueIds); $decpoint = CommonUtils::getConfigValue($pdo, 'decpoint', '.'); - + + $groupWorkItems = 'groupworkitemsf'; + if ($kind == 1) { + $groupWorkItems = 'groupworkitemsd'; + } $sql = "SELECT setting FROM %config% where name=?"; - $row = CommonUtils::getRowSqlObject($pdo, $sql, array('groupworkitems')); + $row = CommonUtils::getRowSqlObject($pdo, $sql, array($groupWorkItems)); $groupworkitems = $row->setting; if (is_null($groupworkitems)) { $groupworkitems = 1; @@ -443,14 +447,48 @@ class QueueContent { } } + private function filterKindQueueIds($pdo,$idArr,$kind) { + $retArr = array(); + if (is_null($idArr) || (count($idArr) == 0)) { + return $retArr; + } + + $sql = "SELECT %queue%.id as id,kind from %prodtype%,%products%,%queue% where %queue%.id=? AND productid=%products%.id AND category=%prodtype%.id"; + $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); + foreach($idArr as $id) { + $stmt->execute(array($id)); + $row = $stmt->fetchObject(); + if ($row->kind == $kind) { + $retArr[] = $id; + } + } + return $retArr; + } + private function doWorkPrint($pdo,$theTableid,$insertedQueueIds,$username,$payPrintType,$lang,$declareReadyDelivered = true) { - $oneProdForEachWorkRec = CommonUtils::getConfigValue($pdo, 'oneprodworkreceipts', 0); - if (($payPrintType != "s") || ($oneProdForEachWorkRec == 0)) { - return ($this->doWorkPrintCore($pdo,$theTableid,$insertedQueueIds,$username,$payPrintType,$lang,$declareReadyDelivered)); + $oneProdForEachWorkRecf = CommonUtils::getConfigValue($pdo, 'oneprodworkrecf', 0); + $oneProdForEachWorkRecd = CommonUtils::getConfigValue($pdo, 'oneprodworkrecd', 0); + + $foodIds = $this->filterKindQueueIds($pdo, $insertedQueueIds, 0); + $drinkIds = $this->filterKindQueueIds($pdo, $insertedQueueIds, 1); + + if (($payPrintType != "s") || ($oneProdForEachWorkRecf == 0)) { + $this->doWorkPrintCore($pdo,$theTableid,$foodIds,$username,$payPrintType,$lang,$declareReadyDelivered); } - $oneProdForEachWorkRec = CommonUtils::getConfigValue($pdo, 'oneprodworkreceipts', 0); - if ($oneProdForEachWorkRec == 1) { - foreach($insertedQueueIds as $aQueueId) { + if (($payPrintType != "s") || ($oneProdForEachWorkRecd == 0)) { + $this->doWorkPrintCore($pdo,$theTableid,$drinkIds,$username,$payPrintType,$lang,$declareReadyDelivered); + } + + if ($payPrintType != 's') { + return; + } + if ($oneProdForEachWorkRecf == 1) { + foreach($foodIds as $aQueueId) { + $this->doWorkPrintCore($pdo,$theTableid,array($aQueueId),$username,$payPrintType,$lang,$declareReadyDelivered); + } + } + if ($oneProdForEachWorkRecd == 1) { + foreach($drinkIds as $aQueueId) { $this->doWorkPrintCore($pdo,$theTableid,array($aQueueId),$username,$payPrintType,$lang,$declareReadyDelivered); } } diff --git a/webapp/php/reports.php b/webapp/php/reports.php index 1bc92d4..be78d23 100644 --- a/webapp/php/reports.php +++ b/webapp/php/reports.php @@ -400,7 +400,7 @@ class Reports { $sql .= "ROUND(sum(if(status = 'c',brutto,'0.00')),2) as sumcash "; - $sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid is null GROUP BY userid"; + $sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid is null GROUP BY userid,username"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(); @@ -433,7 +433,7 @@ class Reports { $sql = "SELECT %resttables%.id as id,%resttables%.tableno as name,IFNULL(SUM(IF(%queue%.ordertime is not null AND %queue%.paidtime is null AND %queue%.isclosed is null,%queue%.price,0.00)),0.00) as pricesum FROM %resttables% "; $sql .= " LEFT OUTER JOIN %queue% ON %queue%.tablenr=%resttables%.id WHERE %resttables%.removed is null AND "; - $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id"; + $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id,name"; $tables = CommonUtils::fetchSqlAll($pdo, $sql, array($roomId)); @@ -488,7 +488,7 @@ class Reports { $currentHour = date('H'); $stat = array(); - $sql = "SELECT productname, ordertime,paidtime,HOUR(paidtime) as hour,ROUND(AVG(TIME_TO_SEC(TIMEDIFF(paidtime,ordertime))/60)) as average"; + $sql = "SELECT HOUR(paidtime) as hour,ROUND(AVG(TIME_TO_SEC(TIMEDIFF(paidtime,ordertime))/60)) as average"; $sql .= " FROM %queue% WHERE paidtime is not null AND ordertime is not null AND DATE(paidtime) = DATE(NOW()) AND HOUR(paidtime)=? GROUP BY hour"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); for ($hour = 0; $hour <= $currentHour; $hour++) { diff --git a/webapp/php/roomtables.php b/webapp/php/roomtables.php index 96c869c..7df8f26 100644 --- a/webapp/php/roomtables.php +++ b/webapp/php/roomtables.php @@ -189,7 +189,7 @@ class Roomtables { $sql = "SELECT %resttables%.id as id,%resttables%.tableno as name,IFNULL(SUM(IF(%queue%.ordertime is not null AND %queue%.paidtime is null AND %queue%.isclosed is null,%queue%.price,0.00)),0.00) as pricesum FROM %resttables% "; $sql .= " LEFT OUTER JOIN %queue% ON %queue%.tablenr=%resttables%.id WHERE %resttables%.removed is null AND "; - $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id"; + $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id,name"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); diff --git a/webapp/php/updater.php b/webapp/php/updater.php index 831f2a7..8b34bfa 100644 --- a/webapp/php/updater.php +++ b/webapp/php/updater.php @@ -117,7 +117,7 @@ class Updater { $infoFileLines = $infoFile["msg"]; if (count($infoFileLines) > 1) { - $checkIfNewerVersion = self::isV2Newer('1.3.15',trim($infoFileLines[0])); + $checkIfNewerVersion = self::isV2Newer('1.3.16',trim($infoFileLines[0])); return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0)); } else { return array("status" => "ERROR","msg" => "Info file not valid","url" => $url); diff --git a/webapp/preferences.html b/webapp/preferences.html index 767068b..1927c17 100644 --- a/webapp/preferences.html +++ b/webapp/preferences.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/products.html b/webapp/products.html index ece0913..7035dbd 100644 --- a/webapp/products.html +++ b/webapp/products.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/rating.html b/webapp/rating.html index 86f0447..b214842 100644 --- a/webapp/rating.html +++ b/webapp/rating.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reports.html b/webapp/reports.html index 9582d5d..ba86c8c 100644 --- a/webapp/reports.html +++ b/webapp/reports.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reservation.html b/webapp/reservation.html index 383a854..0b4f586 100644 --- a/webapp/reservation.html +++ b/webapp/reservation.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html index e23ffb9..a4eed69 100644 --- a/webapp/supplydesk.html +++ b/webapp/supplydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/waiter.html b/webapp/waiter.html index 11a1aa2..060b309 100644 --- a/webapp/waiter.html +++ b/webapp/waiter.html @@ -4,8 +4,8 @@ - - + +