diff --git a/javaprinter/javaprinter.jar b/javaprinter/javaprinter.jar index d315c69..d36974b 100644 Binary files a/javaprinter/javaprinter.jar and b/javaprinter/javaprinter.jar differ diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index 85b16cb..aa6c46e 100644 Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ diff --git a/spider/install/installer.php b/spider/install/installer.php index 2596c68..cf2cde9 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.5"); + Database::setVersion($pdo,$prefix,"1.3.6"); 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 85b16cb..aa6c46e 100644 Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ diff --git a/webapp/bar.html b/webapp/bar.html index 279a8aa..4f4de87 100644 --- a/webapp/bar.html +++ b/webapp/bar.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/bill.html b/webapp/bill.html index a67f82b..5aae576 100644 --- a/webapp/bill.html +++ b/webapp/bill.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/feedback.html b/webapp/feedback.html index 119ab95..2682cb4 100644 --- a/webapp/feedback.html +++ b/webapp/feedback.html @@ -4,7 +4,7 @@ - + diff --git a/webapp/index.html b/webapp/index.html index 855808f..9163597 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -9,8 +9,8 @@ - - + + @@ -203,7 +203,7 @@ function handleResultOfInstallCheck(is_installed) { if (is_installed == "Yes") { useInstallation(); } else { - setTimeout(function(){document.location.href = "install.html?v=1.3.5"},500); + setTimeout(function(){document.location.href = "install.html?v=1.3.6"},500); } } diff --git a/webapp/install.html b/webapp/install.html index a50bac1..ab1e003 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 117bbb0..0a8b200 100644 --- a/webapp/install/installer.php +++ b/webapp/install/installer.php @@ -1845,6 +1845,11 @@ return false; DbUtils::overrulePrefix($prefix); +$sql = "SHOW COLUMNS FROM %customers% LIKE 'hello'"; +$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); +$stmt->execute(); +$result = $stmt->fetchAll(); +if (count($result) == 0) { $sql = "ALTER TABLE %customers% ADD hello VARCHAR(100) NULL AFTER www"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(); @@ -1852,6 +1857,7 @@ $sql = "ALTER TABLE %customers% ADD regards VARCHAR(100) NULL AFTER hello"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(); $this->execSql($pdo, "OPTIMIZE TABLE %customers%"); +} $sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)"; $stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); @@ -1907,6 +1913,27 @@ return false; } } +function updateUserTable1305_1306($prefix, $version, $dbname) { +$pdo = $this->pdo; +try { +if ($version != "1.3.5") { +$ret = $this->updateUserTable1304_1305($prefix, $version, $dbname); +if (!$ret) { +echo "Version update v1.3.4 to 1.3.5 not successful."; +return false; +} +} + +DbUtils::overrulePrefix($prefix); + +$this->updateVersion($pdo, '1.3.6'); +return true; +} catch (PDOException $e) { +echo "Error in v1.3.5 to 1.3.6: $e"; +return false; +} +} + function setVersion($prefix,$theVersion) { $pdo = $this->pdo; @@ -2033,7 +2060,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.5')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.6')"); $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')"); @@ -2416,7 +2443,7 @@ $zones[] = $timezone_identifiers[$i]; } echo json_encode($zones); } else if ($command == 'update') { -$installerVersion = "1.3.5"; +$installerVersion = "1.3.6"; $admin = new InstallAdmin(); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); @@ -2440,14 +2467,13 @@ echo json_encode("Version nicht bestimmbar"); return; } - $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27","1.0.28","1.0.29", "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.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.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" ); if (!in_array($version, $supportedVersions)) { @@ -2455,7 +2481,7 @@ echo json_encode("Quellversion nicht unterstützt"); return; } -$ret = $admin->updateUserTable1304_1305($_POST['prefix'], $version, $_POST['db']); +$ret = $admin->updateUserTable1305_1306($_POST['prefix'], $version, $_POST['db']); if(session_id() == '') { session_start(); diff --git a/webapp/kitchen.html b/webapp/kitchen.html index cad9ddc..9a99832 100644 --- a/webapp/kitchen.html +++ b/webapp/kitchen.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/manager.html b/webapp/manager.html index 2e2e605..934e2fb 100644 --- a/webapp/manager.html +++ b/webapp/manager.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/paydesk.html b/webapp/paydesk.html index 75af889..41c3cf5 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 f778040..80cbe8f 100644 --- a/webapp/php/admin.php +++ b/webapp/php/admin.php @@ -956,7 +956,7 @@ class Admin { $view = "preferences.html"; } - echo json_encode($view . "?v=1.3.5"); + echo json_encode($view . "?v=1.3.6"); } } @@ -1158,25 +1158,25 @@ 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.5"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.6"); }; } else { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.5"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.6"); }; } - if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.5"); }; - if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.5"); }; - if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.5"); }; + if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.6"); }; + if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.6"); }; + if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.6"); }; if ($_SESSION['modus'] == 0) { - if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.5"); }; + if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.6"); }; } - if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.5"); }; - if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.5"); }; - if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.5"); }; - if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.5"); }; - if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.5"); }; - if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.5"); }; - if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.5"); }; - $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.5"); - $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.5"); + if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.6"); }; + if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.6"); }; + if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.6"); }; + if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.6"); }; + if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.6"); }; + if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.6"); }; + if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.6"); }; + $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.6"); + $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.6"); } $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); @@ -1184,7 +1184,7 @@ class Admin { $waiterMessage = $this->getMessage(null, "waitermessage"); } - $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.5", + $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.6", "user" => $currentUser, "menu" => $mainMenu, "waitermessage" => $waiterMessage, diff --git a/webapp/php/printqueue.php b/webapp/php/printqueue.php index 81bb555..99e4084 100644 --- a/webapp/php/printqueue.php +++ b/webapp/php/printqueue.php @@ -542,8 +542,27 @@ class PrintQueue { foreach($result as $aWorkJob) { $aWork = (array) json_decode($aWorkJob["content"]); // is in json format CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: collect work receipt with id=" . $aWorkJob["id"] . " for printer=$printer"); - if ($fl < 5) { - // if not fl 5 is reached than remove the price from the content + + if (($fl >= 5) && ($fl <= 6)) { + $prods = (array) ($aWork["products"]); + $targetProds = array(); + foreach ($prods as $aProd) { + $theArrProd = (array) $aProd; + + $newTargetProd = array("id" => $theArrProd["id"], + "longname" => $theArrProd["longname"], + "option" => $theArrProd["option"], + "price" => $theArrProd["price"], + "extras" => $theArrProd["extras"], + "ordertime" => $theArrProd["ordertime"], + "kind" => $theArrProd["kind"], + "printer" => $theArrProd["printer"], + ); + $targetProds[] = $newTargetProd; + } + $aWork["products"] = $targetProds; + } else + if ($fl < 5) { $prods = (array) ($aWork["products"]); $targetProds = array(); foreach ($prods as $aProd) { diff --git a/webapp/php/queuecontent.php b/webapp/php/queuecontent.php index 6f85247..d5e5711 100644 --- a/webapp/php/queuecontent.php +++ b/webapp/php/queuecontent.php @@ -364,7 +364,7 @@ class QueueContent { $groupworkitems = 1; } - $sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,%queue%.price as price,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"; + $sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,%queue%.price as price,%queue%.togo as togo,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(); @@ -388,11 +388,13 @@ class QueueContent { if ($thePrinter == $printer) { $extras = $this->getExtrasOfQueueItem($pdo,$queueid); $formattedPrice = number_format($aQueueItem["price"], 2, $decpoint, ''); + $theEntry = array( "id" => $queueid, "productid" => $aQueueItem["productid"], "longname" => $aQueueItem["longname"], "price" => $formattedPrice, + "togo" => $aQueueItem["togo"], "anoption" => $aQueueItem["anoption"], "kind" => $aQueueItem["kind"], "printer" => $aQueueItem["printer"], @@ -421,7 +423,7 @@ class QueueContent { $extrasTxt = join(",",$entry["extras"]); $found = false; foreach($collection as &$anEntry) { - if (($anEntry["longname"] == $entry["longname"]) && ($anEntry["price"] == $entry["price"]) && ($anEntry["anoption"] == $entry["anoption"]) && (join(",",$anEntry["extras"]) == $extrasTxt)) { + if (($anEntry["longname"] == $entry["longname"]) && ($anEntry["price"] == $entry["price"]) && ($anEntry["togo"] == $entry["togo"]) && ($anEntry["anoption"] == $entry["anoption"]) && (join(",",$anEntry["extras"]) == $extrasTxt)) { $found = true; $anEntry["count"] = $anEntry["count"] + 1; } @@ -433,6 +435,7 @@ class QueueContent { "printer" => $entry["printer"], "anoption" => $entry["anoption"], "price" => $entry["price"], + "togo" => $entry["togo"], "kind" => $entry["kind"], "extras" => $entry["extras"], "count" => 1 @@ -500,9 +503,14 @@ class QueueContent { $extras = $this->getExtrasOfQueueItem($pdo,$queueId); + $togo = ""; + if ($aJob['togo'] == 1) { + $togo = "To-Go"; + } $arr = array("id" => $queueId, "longname" => $aJob['longname'], "price" => $aJob['price'], + "togo" => $togo, "option" => $aJob['anoption'], "extras" => $extras, "ordertime" => $germanTime, diff --git a/webapp/preferences.html b/webapp/preferences.html index 239d016..6a6607d 100644 --- a/webapp/preferences.html +++ b/webapp/preferences.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/products.html b/webapp/products.html index b99d13c..57c99f5 100644 --- a/webapp/products.html +++ b/webapp/products.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/rating.html b/webapp/rating.html index 7aaa0cc..c05f06f 100644 --- a/webapp/rating.html +++ b/webapp/rating.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reports.html b/webapp/reports.html index 373adb1..6cd6209 100644 --- a/webapp/reports.html +++ b/webapp/reports.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reservation.html b/webapp/reservation.html index 0b58983..1712b88 100644 --- a/webapp/reservation.html +++ b/webapp/reservation.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html index 97669d2..30f7616 100644 --- a/webapp/supplydesk.html +++ b/webapp/supplydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/waiter.html b/webapp/waiter.html index 94c1759..eb3e275 100644 --- a/webapp/waiter.html +++ b/webapp/waiter.html @@ -4,7 +4,7 @@ - +