diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index 7d5ba35..0a8cd0b 100644 Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe index 7d5ba35..0a8cd0b 100644 Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ diff --git a/webapp/bar.html b/webapp/bar.html index d626984..9bab1d0 100644 --- a/webapp/bar.html +++ b/webapp/bar.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/bill.html b/webapp/bill.html index 8c7b1a4..416d53d 100644 --- a/webapp/bill.html +++ b/webapp/bill.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/feedback.html b/webapp/feedback.html index d952638..0250c75 100644 --- a/webapp/feedback.html +++ b/webapp/feedback.html @@ -4,7 +4,7 @@ - + diff --git a/webapp/index.html b/webapp/index.html index b7cc8d4..5b41f2a 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -2,12 +2,15 @@ OrderSprinter Startseite + + + - - + + @@ -200,7 +203,7 @@ function handleResultOfInstallCheck(is_installed) { if (is_installed == "Yes") { useInstallation(); } else { - setTimeout(function(){document.location.href = "install.html"},500); + setTimeout(function(){document.location.href = "install.html?v=1.2.17"},500); } } diff --git a/webapp/install.html b/webapp/install.html index b543735..88d6822 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 86712fd..7757526 100644 --- a/webapp/install/installer.php +++ b/webapp/install/installer.php @@ -1591,6 +1591,27 @@ return false; } } +function updateUserTable1216_1217($prefix, $version, $dbname) { +$pdo = $this->pdo; +try { +if ($version != "1.2.16") { +$ret = $this->updateUserTable1215_1216($prefix, $version, $dbname); +if (!$ret) { +echo "Version update v1.2.15 to 1.2.16 not successful."; +return false; +} +} + +DbUtils::overrulePrefix($prefix); + +$this->updateVersion($pdo, '1.2.17'); +return true; +} catch (PDOException $e) { +echo "Error in v1.2.16 to 1.2.17: $e"; +return false; +} +} + function setVersion($prefix,$theVersion) { $pdo = $this->pdo; try { @@ -1708,7 +1729,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')"); -$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.16')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.17')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , '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')"); @@ -2076,7 +2097,7 @@ $zones[] = $timezone_identifiers[$i]; } echo json_encode($zones); } else if ($command == 'update') { -$installerVersion = "1.2.16"; +$installerVersion = "1.2.17"; $admin = new InstallAdmin(); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); @@ -2106,7 +2127,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27" "1.0.40","1.0.41","1.0.42","1.0.43", "1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17", "1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30", -"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15" +"1.2.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" ); if (!in_array($version, $supportedVersions)) { @@ -2114,7 +2135,7 @@ echo json_encode("Quellversion nicht unterstützt"); return; } -$ret = $admin->updateUserTable1215_1216($_POST['prefix'], $version, $_POST['db']); +$ret = $admin->updateUserTable1216_1217($_POST['prefix'], $version, $_POST['db']); if(session_id() == '') { session_start(); diff --git a/webapp/kitchen.html b/webapp/kitchen.html index bceeb4b..28f8eec 100644 --- a/webapp/kitchen.html +++ b/webapp/kitchen.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/manager.html b/webapp/manager.html index cce445e..4e756b8 100644 --- a/webapp/manager.html +++ b/webapp/manager.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/paydesk.html b/webapp/paydesk.html index f1608f1..baa4aff 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 769d34b..d87a2cc 100644 --- a/webapp/php/admin.php +++ b/webapp/php/admin.php @@ -936,7 +936,7 @@ class Admin { $view = "preferences.html"; } - echo json_encode($view . "?v=1.2.16"); + echo json_encode($view . "?v=1.2.17"); } } @@ -1142,24 +1142,24 @@ class Admin { if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if ($_SESSION['modus'] == 0) { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.16"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.17"); }; } else { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.16"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.17"); }; } - if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.16"); }; - if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.16"); }; - if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.16"); }; + if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.17"); }; + if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.17"); }; + if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.17"); }; if ($_SESSION['modus'] == 0) { - if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.16"); }; + if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.17"); }; } - if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.16"); }; - if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.16"); }; - if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.16"); }; - if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.16"); }; - if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.16"); }; - if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.16"); }; - $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.16"); - $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.16"); + if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.17"); }; + if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.17"); }; + if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.17"); }; + if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.17"); }; + if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.17"); }; + if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.17"); }; + $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.17"); + $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.17"); } $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); @@ -1168,7 +1168,7 @@ class Admin { $waiterMessage = $this->getMessage(null, "waitermessage"); } // CAUTION: change version also in config.txt!!! - $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.16", + $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.17", "user" => $currentUser, "menu" => $mainMenu, "waitermessage" => $waiterMessage, diff --git a/webapp/php/queuecontent.php b/webapp/php/queuecontent.php index 6edba6c..05c3375 100644 --- a/webapp/php/queuecontent.php +++ b/webapp/php/queuecontent.php @@ -351,7 +351,7 @@ class QueueContent { $groupworkitems = 1; } - $sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,anoption,%prodtype%.kind as kind,%prodtype%.printer as printer FROM %queue%,%products%,%prodtype% WHERE %prodtype%.kind=? AND %queue%.id IN ($queueStr) AND productid=%products%.id AND %products%.category=%prodtype%.id ORDER BY productname"; + $sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,anoption,%prodtype%.kind as kind,%prodtype%.printer as printer FROM %queue%,%products%,%prodtype% WHERE %prodtype%.kind=? AND %queue%.id IN ($queueStr) AND productid=%products%.id AND %products%.category=%prodtype%.id ORDER BY longname"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array($kind)); $queueItems = $stmt->fetchAll(); @@ -1073,9 +1073,9 @@ class QueueContent { $stmt->execute(); $row = $stmt->fetchObject(); if ($row->countid == 0) { - $sql = "SELECT DISTINCT %queue%.id as quid FROM %queue% WHERE ordertime is not null AND isclosed is null AND "; + $sql = "SELECT DISTINCT %queue%.id as quid, ordertime FROM %queue% WHERE ordertime is not null AND isclosed is null AND "; } else { - $sql = "SELECT DISTINCT %queue%.id as quid FROM %queue%,%bill% WHERE ordertime is not null AND isclosed is null AND ((%queue%.billid is null AND %queue%.paidtime is null) OR (%queue%.billid=%bill%.id AND %bill%.closingid is null)) AND "; + $sql = "SELECT DISTINCT %queue%.id as quid, ordertime FROM %queue%,%bill% WHERE ordertime is not null AND isclosed is null AND ((%queue%.billid is null AND %queue%.paidtime is null) OR (%queue%.billid=%bill%.id AND %bill%.closingid is null)) AND "; } if ($tableid == 0) { @@ -1218,7 +1218,7 @@ class QueueContent { function getJsonProductsOfTableToPay($tableid) { $pdo = DbUtils::openDbAndReturnPdoStatic(); - $sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo + $sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo, ordertime FROM %queue% INNER JOIN %products% ON %queue%.productid = %products%.id INNER JOIN %pricelevel% ON %queue%.pricelevel = %pricelevel%.id "; diff --git a/webapp/preferences.html b/webapp/preferences.html index cdba006..f470f1d 100644 --- a/webapp/preferences.html +++ b/webapp/preferences.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/products.html b/webapp/products.html index 39a1ed6..0b8b92e 100644 --- a/webapp/products.html +++ b/webapp/products.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/rating.html b/webapp/rating.html index 7494883..76f001e 100644 --- a/webapp/rating.html +++ b/webapp/rating.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reports.html b/webapp/reports.html index 8eeffbd..f14c630 100644 --- a/webapp/reports.html +++ b/webapp/reports.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reservation.html b/webapp/reservation.html index 145d058..f8f3150 100644 --- a/webapp/reservation.html +++ b/webapp/reservation.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html index 9c465d9..b5cbaf8 100644 --- a/webapp/supplydesk.html +++ b/webapp/supplydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/waiter.html b/webapp/waiter.html index e8e6da7..ca4fd98 100644 --- a/webapp/waiter.html +++ b/webapp/waiter.html @@ -4,7 +4,7 @@ - +