From 6b864adf57002a600d3e4070ab30fddc6786c439 Mon Sep 17 00:00:00 2001 From: Geno Date: Thu, 19 Nov 2020 23:03:23 +0100 Subject: [PATCH] OrderSprinter 1.3.15 --- javaprinter/javaprinter.jar | Bin 60306 -> 60373 bytes 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/dash.php | 49 ++++-- webapp/elements/dash.js | 5 + webapp/feedback.html | 2 +- webapp/index.html | 6 +- webapp/install.html | 2 +- webapp/install/installer.php | 30 +++- webapp/kitchen.html | 2 +- webapp/manager.html | 7 +- webapp/paydesk.html | 2 +- webapp/php/admin.php | 195 ++++++++++++----------- webapp/php/commonutils.php | 10 ++ webapp/php/config.php | 0 webapp/php/reports.php | 22 +++ 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 +- 27 files changed, 220 insertions(+), 136 deletions(-) mode change 100755 => 100644 webapp/php/config.php diff --git a/javaprinter/javaprinter.jar b/javaprinter/javaprinter.jar index 85c22a5f6a2cbf613c8fb24549f6cd57d06fffea..acf3def2505598241905f7a05918a15ad3796316 100644 GIT binary patch delta 4158 zcmY+HXIN8Bw}wLkNJ;3OAVH*vAYFP@r1v1w5kb0uARPm|0)m3zrq>7}y@n<|geJYH z^w2v3DpEyGWO>h`~8ocV@Xz7TXwlu0Pl!tJD=gc!|QTdoOs{xOaaABI3$1=&NJ7@)k zYJm~aWhN8&w+#te732bP=;>$G+C)=)%)pEmBEg$-%sMGMe}21z3e{gscCe~9jnYDU z8=t(>KmbGMS^d@eQG-PZyzAd$wm)<0ux`+@2sPyIM3x$SG_A(WRD0@YFyssWOg1j% zPET1yRsUGpxaY_>v``v`=bi08gBpl=QLRT$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HmC0TC zqqZ{r&o88O65gYR61cgql{Bk&*E}|i4>fBvuq8K#g~{2V1ST4>nqHeZP2wEIFqZ3^ z*BCcektwapN>2|EC;bc!yVYLzROu>5wmAp|X{^&KH~AOM*6m+VR`-KdO)Kj$N!|;c z67~;tx9@i?j>k?r0nsh(-n^-iypw_wm8{?GO1U?L!@|~+nsxVh)N4$-Id%dL=eIKx zQ*d|Gnycf|1KUy9M&*d^Yqi1l8-KQUj<@S5fp+gi7j+P;{6<@aLLZ1HJ`k^+ca%zd zQHWJT`yEQ9pk9-Eh5Uscu)!Ah?ky&I)Lim^a%RUS)Siyw5=x>~IZedS)w2>u=_r>& z2Q6BK_^}+ZMd~y9s+*)hid3@~pr8`mTOe~+0+&V3qjYCjcy5AGdJ6ZiU#payFcf}_iYl7vC~EDWW(C(X>F~>` zqDnMB&u)0wSS2-x{6>5HcP0ZTzL`@;f#`8nY8)6at_d{if(G9>!O3w2AWHvlc?^`B zkOZz=`;9?A@yGSQksfrtK@Sd3AOL=A(8u~T==qHml$qqEegW!FY6FUnpu`j>SUkyi z#yh$|`@exm=$`;|ba(t!2m{9*8AS}PQUe@Rf1NphWu^Z{hExAH2?WKbt^x#S@Dz~` zd^Lpt_WzO-Q)p^D2q&5VSwTl*&|r4(EfE1w!oe@Z%hXa}4-pEAOe+8jap2{jX~TE= z0sxKwDNllx({jMZU()OqGsrr_c&6*;BK~bI6&3vd7QvoyG*5p<4)9GqlFO+l!GakC zu$q2^Rv8fR`^*JEDB}oY@>sy^3}(<^76ClX{B5PoB7x4V->CbR38eh2(8&JRnv)00 zbADs)oD6U(?{DM-nMeqL``zzR3`qfS!-0|uFtGUNNX}n!mm~`;6dk!*^C&RyiIV8bXESii(d-!b~Dr~d;f C-t+?i diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index 9adef074b6f59a67816f02773ce686af88cfb0b2..c15a1af16612e22183ff5ef2d3f5b7949fa2df61 100644 GIT binary patch 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$v8UHZt=&vpyP5r)82Pr}Zem`htzu?q=4Rw-YN=~x>13*F zVq#{l>*(a>tn23H>geihVrb%MV7`6nI_Aatj3(PX?=c_d6o}NzPu!ZB?y~yN|5tAu zz1X+QykO?$2TE&vXHH|}U1V diff --git a/spider/install/installer.php b/spider/install/installer.php index e3d8cf3..23487d3 100644 --- a/spider/install/installer.php +++ b/spider/install/installer.php @@ -85,7 +85,7 @@ class Installer { } Database::dropTables($pdo); Database::createEmptyTables($pdo, $prefix); - Database::setVersion($pdo,$prefix,"1.3.14"); + Database::setVersion($pdo,$prefix,"1.3.15"); Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour return array("status" => "OK","msg" => "Installation successful"); diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe index 9adef074b6f59a67816f02773ce686af88cfb0b2..c15a1af16612e22183ff5ef2d3f5b7949fa2df61 100644 GIT binary patch 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$v8UHZt=&vpyP5r)82Pr}Zem`htzu?q=4Rw-YN=~x>13*F zVq#{l>*(a>tn23H>geihVrb%MV7`6nI_Aatj3(PX?=c_d6o}NzPu!ZB?y~yN|5tAu zz1X+QykO?$2TE&vXHH|}U1V diff --git a/webapp/bar.html b/webapp/bar.html index ec8d1fd..e43f4dd 100644 --- a/webapp/bar.html +++ b/webapp/bar.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/bill.html b/webapp/bill.html index 7b2d41a..7c73ee1 100644 --- a/webapp/bill.html +++ b/webapp/bill.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/dash.php b/webapp/dash.php index 0359eed..f0c58ba 100644 --- a/webapp/dash.php +++ b/webapp/dash.php @@ -8,10 +8,15 @@ - - - + + + + + + + + @@ -56,7 +61,9 @@ $(document).ready(function () { getGeneralConfigItems(); - doAjax("GET", "php/contenthandler.php?module=admin&command=getJsonMenuItemsAndVersion", null, saveMenuInfo, null, true); + initializeMainMenu("#modulemenu"); + hideMenu(); + //doAjax("GET", "php/contenthandler.php?module=admin&command=getJsonMenuItemsAndVersion", null, saveMenuInfo, null, true); }); function getGeneralConfigItems() { @@ -177,7 +184,6 @@ function createDashSlot(dash,slotId,diagramNumber,stat) { if (diagramNumber == 0) { - // REM* nothing $(slotId).hide(); return; } @@ -194,17 +200,29 @@ dash.createMonthReport(slotId,stat.thismonth, currency); } else if (diagramNumber == 6) { dash.createDayReport(slotId,stat.today, currency); + } else if (diagramNumber == 7) { + dash.createDurationReport(slotId,stat.durations, currency); }; } -
- Dashboard - -
+
+
+
    +
  • Hauptmenü
  • +
+
+
+

OrderSprinter

+ +
+ +
+ -
@@ -218,10 +236,13 @@ -
- - -
+
+
+
+
+
+
+ diff --git a/webapp/elements/dash.js b/webapp/elements/dash.js index 96617a5..0267e93 100644 --- a/webapp/elements/dash.js +++ b/webapp/elements/dash.js @@ -64,6 +64,11 @@ function Dash() { }); }; + this.createDurationReport = function(slotid,hourdata,currency) { + $(slotid + " h1").html('Verweildauer (Minuten)'); + this.createDashReport(slotid,hourdata,'Verweildauer (Minuten)',"hour","average",'line'); + }; + this.createMonthReport = function(slotid,monthdata,currency) { $(slotid + " h1").html('Monatseinnahme (' + currency + ")"); this.createDashReport(slotid,monthdata.content,'Monatseinnahme (' + currency + ")","iter","sum",'line'); diff --git a/webapp/feedback.html b/webapp/feedback.html index eecb832..c2b04c0 100644 --- a/webapp/feedback.html +++ b/webapp/feedback.html @@ -4,7 +4,7 @@ - + diff --git a/webapp/index.html b/webapp/index.html index 48d81ba..0111a1a 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.14"},500); + setTimeout(function(){document.location.href = "install.html?v=1.3.15"},500); } } diff --git a/webapp/install.html b/webapp/install.html index 39e9ee5..3177c46 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 c5565df..c6ac09b 100644 --- a/webapp/install/installer.php +++ b/webapp/install/installer.php @@ -2215,6 +2215,28 @@ return false; } } +function updateUserTable1314_1315($prefix, $version, $dbname) { +$pdo = $this->pdo; +try { +if ($version != "1.3.14") { +$ret = $this->updateUserTable1313_1314($prefix, $version, $dbname); +if (!$ret) { +echo "Version update v1.3.13 to 1.3.14 not successful."; +return false; +} +} + +DbUtils::overrulePrefix($prefix); + +$this->updateVersion($pdo, '1.3.15'); + +return true; +} catch (PDOException $e) { +echo "Error in v1.3.14 to 1.3.15: $e"; +return false; +} +} + function setVersion($prefix,$theVersion) { $pdo = $this->pdo; @@ -2341,7 +2363,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.14')"); +$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 , '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')"); @@ -2769,7 +2791,7 @@ $zones[] = $timezone_identifiers[$i]; } echo json_encode($zones); } else if ($command == 'update') { -$installerVersion = "1.3.14"; +$installerVersion = "1.3.15"; $admin = new InstallAdmin(); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); @@ -2800,7 +2822,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.13","1.3.14" ); if (!in_array($version, $supportedVersions)) { @@ -2808,7 +2830,7 @@ echo json_encode("Quellversion nicht unterstützt"); return; } -$ret = $admin->updateUserTable1313_1314($_POST['prefix'], $version, $_POST['db']); +$ret = $admin->updateUserTable1314_1315($_POST['prefix'], $version, $_POST['db']); if(session_id() == '') { session_start(); diff --git a/webapp/kitchen.html b/webapp/kitchen.html index b68bf60..e56b1f8 100644 --- a/webapp/kitchen.html +++ b/webapp/kitchen.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/manager.html b/webapp/manager.html index 66caf6f..6baa756 100644 --- a/webapp/manager.html +++ b/webapp/manager.html @@ -5,7 +5,7 @@ - + @@ -1018,6 +1018,7 @@ function createDashslotPart(number,value) { html += ''; html += ''; html += ''; + html += ''; html += ''; @@ -1650,9 +1651,9 @@ function handleUpdateCheckResult(answer) { var millis=getMillis(); setTimeout(function(){ - document.location.href = "install.html?v=1.3.14&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.15&mode=onlyupdate&n=" + millis; },250); - document.location.href = "install.html?v=1.3.14&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.15&mode=onlyupdate&n=" + millis; } function handleUpdateReplace(answer) { diff --git a/webapp/paydesk.html b/webapp/paydesk.html index 13fd5eb..41a85b3 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 39df186..e14143a 100644 --- a/webapp/php/admin.php +++ b/webapp/php/admin.php @@ -887,69 +887,72 @@ class Admin { $pdo = $this->dbutils->openDbAndReturnPdo(); } - $companyInfo = CommonUtils::getConfigValue($pdo,"companyinfo",null); - $hosttext = CommonUtils::getConfigValue($pdo,"hosttext",null); - $rectemplate = CommonUtils::getConfigValue($pdo,"rectemplate",null); - $foodtemplate = CommonUtils::getConfigValue($pdo,"foodtemplate",null); - $drinktemplate = CommonUtils::getConfigValue($pdo,"drinktemplate",null); - $decpoint = CommonUtils::getConfigValue($pdo,"decpoint",null); - $version = CommonUtils::getConfigValue($pdo,"version",null); - $payprinttype = CommonUtils::getConfigValue($pdo,"payprinttype",null); - $cancelunpaidcode = CommonUtils::getConfigValue($pdo,"cancelunpaidcode",null); - $cancelguestcode = CommonUtils::getConfigValue($pdo,"cancelguestcode",null); - $tax = CommonUtils::getConfigValue($pdo,"tax",null); - $togotax = CommonUtils::getConfigValue($pdo,"togotax",null); - $taxaustrianormal = CommonUtils::getConfigValue($pdo,"taxaustrianormal",null); - $taxaustriaerm1 = CommonUtils::getConfigValue($pdo,"taxaustriaerm1",null); - $taxaustriaerm2 = CommonUtils::getConfigValue($pdo,"taxaustriaerm2",null); - $taxaustriaspecial = CommonUtils::getConfigValue($pdo,"taxaustriaspecial",null); - $serverurl = CommonUtils::getConfigValue($pdo,"serverurl",null); - $email = CommonUtils::getConfigValue($pdo,"email",null); - $bigfontworkreceipt = CommonUtils::getConfigValue($pdo,"bigfontworkreceipt",null); - $prominentsearch = CommonUtils::getConfigValue($pdo,"prominentsearch",null); - $discount1 = CommonUtils::getConfigValue($pdo,"discount1",null); - $discount2 = CommonUtils::getConfigValue($pdo,"discount2",null); - $discount3 = CommonUtils::getConfigValue($pdo,"discount3",null); - $austria = CommonUtils::getConfigValue($pdo,"austria",null); - $digigopaysetready = CommonUtils::getConfigValue($pdo,"digigopaysetready",1); - $waitergopayprint = CommonUtils::getConfigValue($pdo,"waitergopayprint",0); - $oneprodworkreceipts = CommonUtils::getConfigValue($pdo,"oneprodworkreceipts",0); - $digiprintwork = CommonUtils::getConfigValue($pdo,"digiprintwork",1); - $groupworkitems = CommonUtils::getConfigValue($pdo,"groupworkitems",1); - $receiveremail = CommonUtils::getConfigValue($pdo,"receiveremail",""); - $emailbadrating = CommonUtils::getConfigValue($pdo,"emailbadrating",""); - $emailratingcontact = CommonUtils::getConfigValue($pdo,"emailratingcontact",""); - $billlanguage = CommonUtils::getConfigValue($pdo,"billlanguage",null); - $hotelinterface = CommonUtils::getConfigValue($pdo,"hotelinterface",0); - $hsinfile = CommonUtils::getConfigValue($pdo,"hsinfile",null); - $hsoutfile = CommonUtils::getConfigValue($pdo,"hsoutfile",null); - $hscurrency = CommonUtils::getConfigValue($pdo,"hscurrency",null); - $currency = CommonUtils::getConfigValue($pdo,"currency",null); - $receiptfontsize = CommonUtils::getConfigValue($pdo,"receiptfontsize",null); - $reservationnote = CommonUtils::getConfigValue($pdo,"reservationnote",null); - $paymentconfig = CommonUtils::getConfigValue($pdo,"paymentconfig",0); - $workflowconfig = CommonUtils::getConfigValue($pdo,"workflowconfig",0); - $dashslot1 = CommonUtils::getConfigValue($pdo,"dashslot1",1); - $dashslot2 = CommonUtils::getConfigValue($pdo,"dashslot2",2); - $dashslot3 = CommonUtils::getConfigValue($pdo,"dashslot3",3); - $addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter",""); - $printandqueuejobs = CommonUtils::getConfigValue($pdo,"printandqueuejobs",0); - $cashenabled = CommonUtils::getConfigValue($pdo,"cashenabled",1); - $returntoorder = CommonUtils::getConfigValue($pdo,"returntoorder",1); - $beepcooked = CommonUtils::getConfigValue($pdo,"beepcooked",0); + $sql = "SELECT count(id) as countid FROM %config% WHERE name=?"; + $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); + + $companyInfo = CommonUtils::getConfigValueStmt($pdo,$stmt,"companyinfo",null); + $hosttext = CommonUtils::getConfigValueStmt($pdo,$stmt,"hosttext",null); + $rectemplate = CommonUtils::getConfigValueStmt($pdo,$stmt,"rectemplate",null); + $foodtemplate = CommonUtils::getConfigValueStmt($pdo,$stmt,"foodtemplate",null); + $drinktemplate = CommonUtils::getConfigValueStmt($pdo,$stmt,"drinktemplate",null); + $decpoint = CommonUtils::getConfigValueStmt($pdo,$stmt,"decpoint",null); + $version = CommonUtils::getConfigValueStmt($pdo,$stmt,"version",null); + $payprinttype = CommonUtils::getConfigValueStmt($pdo,$stmt,"payprinttype",null); + $cancelunpaidcode = CommonUtils::getConfigValueStmt($pdo,$stmt,"cancelunpaidcode",null); + $cancelguestcode = CommonUtils::getConfigValueStmt($pdo,$stmt,"cancelguestcode",null); + $tax = CommonUtils::getConfigValueStmt($pdo,$stmt,"tax",null); + $togotax = CommonUtils::getConfigValueStmt($pdo,$stmt,"togotax",null); + $taxaustrianormal = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustrianormal",null); + $taxaustriaerm1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustriaerm1",null); + $taxaustriaerm2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustriaerm2",null); + $taxaustriaspecial = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustriaspecial",null); + $serverurl = CommonUtils::getConfigValueStmt($pdo,$stmt,"serverurl",null); + $email = CommonUtils::getConfigValueStmt($pdo,$stmt,"email",null); + $bigfontworkreceipt = CommonUtils::getConfigValueStmt($pdo,$stmt,"bigfontworkreceipt",null); + $prominentsearch = CommonUtils::getConfigValueStmt($pdo,$stmt,"prominentsearch",null); + $discount1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount1",null); + $discount2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount2",null); + $discount3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount3",null); + $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); + $digiprintwork = CommonUtils::getConfigValueStmt($pdo,$stmt,"digiprintwork",1); + $groupworkitems = CommonUtils::getConfigValueStmt($pdo,$stmt,"groupworkitems",1); + $receiveremail = CommonUtils::getConfigValueStmt($pdo,$stmt,"receiveremail",""); + $emailbadrating = CommonUtils::getConfigValueStmt($pdo,$stmt,"emailbadrating",""); + $emailratingcontact = CommonUtils::getConfigValueStmt($pdo,$stmt,"emailratingcontact",""); + $billlanguage = CommonUtils::getConfigValueStmt($pdo,$stmt,"billlanguage",null); + $hotelinterface = CommonUtils::getConfigValueStmt($pdo,$stmt,"hotelinterface",0); + $hsinfile = CommonUtils::getConfigValueStmt($pdo,$stmt,"hsinfile",null); + $hsoutfile = CommonUtils::getConfigValueStmt($pdo,$stmt,"hsoutfile",null); + $hscurrency = CommonUtils::getConfigValueStmt($pdo,$stmt,"hscurrency",null); + $currency = CommonUtils::getConfigValueStmt($pdo,$stmt,"currency",null); + $receiptfontsize = CommonUtils::getConfigValueStmt($pdo,$stmt,"receiptfontsize",null); + $reservationnote = CommonUtils::getConfigValueStmt($pdo,$stmt,"reservationnote",null); + $paymentconfig = CommonUtils::getConfigValueStmt($pdo,$stmt,"paymentconfig",0); + $workflowconfig = CommonUtils::getConfigValueStmt($pdo,$stmt,"workflowconfig",0); + $dashslot1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"dashslot1",1); + $dashslot2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"dashslot2",2); + $dashslot3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"dashslot3",3); + $addreceipttoprinter = CommonUtils::getConfigValueStmt($pdo,$stmt,"addreceipttoprinter",""); + $printandqueuejobs = CommonUtils::getConfigValueStmt($pdo,$stmt,"printandqueuejobs",0); + $cashenabled = CommonUtils::getConfigValueStmt($pdo,$stmt,"cashenabled",1); + $returntoorder = CommonUtils::getConfigValueStmt($pdo,$stmt,"returntoorder",1); + $beepcooked = CommonUtils::getConfigValueStmt($pdo,$stmt,"beepcooked",0); - $closshowci = CommonUtils::getConfigValue($pdo,"closshowci",1); - $closshowpaytaxes = CommonUtils::getConfigValue($pdo,"closshowpaytaxes",1); - $closshowprods = CommonUtils::getConfigValue($pdo,"closshowprods",1); - $showpayment2 = CommonUtils::getConfigValue($pdo,"showpayment2",1); - $showpayment3 = CommonUtils::getConfigValue($pdo,"showpayment3",1); - $showpayment4 = CommonUtils::getConfigValue($pdo,"showpayment4",1); - $showpayment5 = CommonUtils::getConfigValue($pdo,"showpayment5",1); - $showpayment6 = CommonUtils::getConfigValue($pdo,"showpayment6",1); - $showpayment7 = CommonUtils::getConfigValue($pdo,"showpayment7",1); - $showpayment8 = CommonUtils::getConfigValue($pdo,"showpayment8",1); + $closshowci = CommonUtils::getConfigValueStmt($pdo,$stmt,"closshowci",1); + $closshowpaytaxes = CommonUtils::getConfigValueStmt($pdo,$stmt,"closshowpaytaxes",1); + $closshowprods = CommonUtils::getConfigValueStmt($pdo,$stmt,"closshowprods",1); + $showpayment2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment2",1); + $showpayment3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment3",1); + $showpayment4 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment4",1); + $showpayment5 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment5",1); + $showpayment6 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment6",1); + $showpayment7 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment7",1); + $showpayment8 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment8",1); - $restaurantmode = CommonUtils::getConfigValue($pdo,"restaurantmode",1); + $restaurantmode = CommonUtils::getConfigValueStmt($pdo,$stmt,"restaurantmode",1); $smtphost = ""; $smtpauth = 1; @@ -959,27 +962,27 @@ class Admin { $smtpport = ""; if ( (isset($_SESSION['is_admin']) && ($_SESSION['is_admin'] == 1)) || (isset($_SESSION['right_manager']) && ($_SESSION['right_manager'] == 1))) { - $smtphost = CommonUtils::getConfigValue($pdo,"smtphost",""); - $smtpauth = CommonUtils::getConfigValue($pdo,"smtpauth",1); - $smtpuser = CommonUtils::getConfigValue($pdo,"smtpuser",""); - $smtppass = CommonUtils::getConfigValue($pdo,"smtppass",""); - $smtpsecure = CommonUtils::getConfigValue($pdo,"smtpsecure",1); - $smtpport = CommonUtils::getConfigValue($pdo,"smtpport",""); + $smtphost = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtphost",""); + $smtpauth = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtpauth",1); + $smtpuser = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtpuser",""); + $smtppass = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtppass",""); + $smtpsecure = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtpsecure",1); + $smtpport = CommonUtils::getConfigValueStmt($pdo,$stmt,"smtpport",""); } - $discountname1 = trim(CommonUtils::getConfigValue($pdo, "discountname1", '')); - $discountname2 = trim(CommonUtils::getConfigValue($pdo, "discountname2", '')); - $discountname3 = trim(CommonUtils::getConfigValue($pdo, "discountname3", '')); + $discountname1 = trim(CommonUtils::getConfigValueStmt($pdo,$stmt, "discountname1", '')); + $discountname2 = trim(CommonUtils::getConfigValueStmt($pdo,$stmt, "discountname2", '')); + $discountname3 = trim(CommonUtils::getConfigValueStmt($pdo,$stmt, "discountname3", '')); - $memorylimit = CommonUtils::getConfigValue($pdo,"memorylimit",256); - $updateurl = CommonUtils::getConfigValue($pdo,"updateurl",""); - $hs3refresh = CommonUtils::getConfigValue($pdo, "hs3refresh", 60); + $memorylimit = CommonUtils::getConfigValueStmt($pdo,$stmt,"memorylimit",256); + $updateurl = CommonUtils::getConfigValueStmt($pdo,$stmt,"updateurl",""); + $hs3refresh = CommonUtils::getConfigValueStmt($pdo,$stmt, "hs3refresh", 60); - $paydeskid = CommonUtils::getConfigValue($pdo,"paydeskid",""); - $aeskey = CommonUtils::getConfigValue($pdo,"aeskey",""); - $certificatesn = CommonUtils::getConfigValue($pdo,"certificatesn",""); - $rksvserver = CommonUtils::getConfigValue($pdo,"rksvserver",""); - $webimpressum = CommonUtils::getConfigValue($pdo,"webimpressum",""); + $paydeskid = CommonUtils::getConfigValueStmt($pdo,$stmt,"paydeskid",""); + $aeskey = CommonUtils::getConfigValueStmt($pdo,$stmt,"aeskey",""); + $certificatesn = CommonUtils::getConfigValueStmt($pdo,$stmt,"certificatesn",""); + $rksvserver = CommonUtils::getConfigValueStmt($pdo,$stmt,"rksvserver",""); + $webimpressum = CommonUtils::getConfigValueStmt($pdo,$stmt,"webimpressum",""); $userlang = 0; // of no interest, if not called from web $receiptprinter = 1; // of no interest, if not called from web @@ -1112,7 +1115,7 @@ class Admin { $view = "preferences.html"; } - echo json_encode($view . "?v=1.3.14"); + echo json_encode($view . "?v=1.3.15"); } } @@ -1315,26 +1318,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.14"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.15"); }; } else { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.14"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.15"); }; } - if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.14"); }; - if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.14"); }; - if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.14"); }; + 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['modus'] == 0) { - if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.14"); }; + if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.15"); }; } - if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.14"); }; - if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.14"); }; - if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.14"); }; - if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.14"); }; - if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.14"); }; - if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.14"); }; - if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.14"); }; - if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.14"); }; - $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.14"); - $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.14"); + 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"); } $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); @@ -1342,7 +1345,7 @@ class Admin { $waiterMessage = $this->getMessage(null, "waitermessage"); } - $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.14", + $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.15", "user" => $currentUser, "menu" => $mainMenu, "waitermessage" => $waiterMessage, diff --git a/webapp/php/commonutils.php b/webapp/php/commonutils.php index f219893..60a62cd 100644 --- a/webapp/php/commonutils.php +++ b/webapp/php/commonutils.php @@ -306,6 +306,16 @@ class CommonUtils { } } + public static function getConfigValueStmt($pdo,$stmt,$item,$default) { + $stmt->execute(array($item)); + $row =$stmt->fetchObject(); + if ($row->countid == 0) { + return $default; + } else { + return self::getExistingConfigValue($pdo, $item); + } + } + public static function getConfigValue($pdo,$item,$default) { $sql = "SELECT count(id) as countid FROM %config% WHERE name=?"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); diff --git a/webapp/php/config.php b/webapp/php/config.php old mode 100755 new mode 100644 diff --git a/webapp/php/reports.php b/webapp/php/reports.php index a782bf3..1bc92d4 100644 --- a/webapp/php/reports.php +++ b/webapp/php/reports.php @@ -188,6 +188,7 @@ class Reports { $retArray["tables"] = self::getOpenTables($pdo); $retArray["prodscount"] = self::getMaxSoldProductsCount($pdo); $retArray["prodssum"] = self::getMaxSoldProductsSum($pdo); + $retArray["durations"] = self::getGuestDuration($pdo); } return $retArray; @@ -481,4 +482,25 @@ class Reports { return $result; } + + public static function getGuestDuration($pdo) { + date_default_timezone_set(DbUtils::getTimeZone()); + $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 .= " 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++) { + $stmt->execute(array($hour)); + $result = $stmt->fetchAll(); + if (count($result) > 0) { + $stat[] = array("hour" => $hour,"average" => $result[0]["average"]); + } else { + $stat[] = array("hour" => $hour,"average" => 0); + } + } + + return $stat; + } } diff --git a/webapp/php/updater.php b/webapp/php/updater.php index 938c636..831f2a7 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.14',trim($infoFileLines[0])); + $checkIfNewerVersion = self::isV2Newer('1.3.15',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 b431912..767068b 100644 --- a/webapp/preferences.html +++ b/webapp/preferences.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/products.html b/webapp/products.html index 5eb39e2..ece0913 100644 --- a/webapp/products.html +++ b/webapp/products.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/rating.html b/webapp/rating.html index e3a90c8..86f0447 100644 --- a/webapp/rating.html +++ b/webapp/rating.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reports.html b/webapp/reports.html index 7b79e31..9582d5d 100644 --- a/webapp/reports.html +++ b/webapp/reports.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reservation.html b/webapp/reservation.html index 9060d2e..383a854 100644 --- a/webapp/reservation.html +++ b/webapp/reservation.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html index e277f92..e23ffb9 100644 --- a/webapp/supplydesk.html +++ b/webapp/supplydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/waiter.html b/webapp/waiter.html index c40fcb1..11a1aa2 100644 --- a/webapp/waiter.html +++ b/webapp/waiter.html @@ -4,8 +4,8 @@ - - + +
  - +