diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe
index 5fd2922..572058f 100644
Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ
diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe
index 5fd2922..572058f 100644
Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ
diff --git a/webapp/bar.html b/webapp/bar.html
index 66551bf..4dbbdf4 100644
--- a/webapp/bar.html
+++ b/webapp/bar.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/bill.html b/webapp/bill.html
index cd8cd54..ae56539 100644
--- a/webapp/bill.html
+++ b/webapp/bill.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/css/ospage.css b/webapp/css/ospage.css
index 952517c..c2a303d 100644
--- a/webapp/css/ospage.css
+++ b/webapp/css/ospage.css
@@ -1 +1 @@
-html{overflow-y:scroll}.ospage{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.header{background:black}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}#loggedinuser{text-align:left;width:50%}#versioninfo{text-align:right;color:white;width:50%}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.footer{order:5}}.input100{width:100%;height:50px}.input50{width:49%;height:50px}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.extraitem:last-child{border-bottom:0}#loggedinuser{color:black}.buttonarea{box-shadow:10px 10px 5px #888}
\ No newline at end of file
+html{overflow-y:scroll}.ospage{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.header{background:black}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}#loggedinuser{text-align:left;width:50%}#versioninfo{text-align:right;color:white;width:50%}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.footer{order:5}}.input100{width:100%;height:50px}.input50{width:49%;height:50px}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.inputblue[type="text"]{background-color:#8ee5ee}.inputblue[type="submit"]{background-color:#8ee5ee}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.extraitem:last-child{border-bottom:0}#loggedinuser{color:black}.buttonarea{box-shadow:10px 10px 5px #888}
\ No newline at end of file
diff --git a/webapp/css/productpanel.css b/webapp/css/productpanel.css
index 4c633c0..fd3681f 100644
--- a/webapp/css/productpanel.css
+++ b/webapp/css/productpanel.css
@@ -1 +1 @@
-.productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;width:100px;height:100px;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}
\ No newline at end of file
+.productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;width:100px;height:100px;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}.prodToMoveEl{padding:8px 16px;border-bottom:1px solid #ddd;height:40px;font-size:16px;font-weight:bold}.proditemselected{background-color:#0f0}.proditemunselected{background-color:#eee}
\ No newline at end of file
diff --git a/webapp/css/roompanel.css b/webapp/css/roompanel.css
index 9d3dce5..bf7fbc6 100644
--- a/webapp/css/roompanel.css
+++ b/webapp/css/roompanel.css
@@ -1 +1 @@
-.roompanel{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background-color:lightgrey;width:100%;-webkit-align-items:stretch;align-items:stretch}.roomitem{background-color:#fff6b5;height:60px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid #aaa;-webkit-flex:1;flex:10;box-shadow:10px 10px 5px #888;word-wrap:break-word}.roomitemselected{background-color:#eee6b5;height:65px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid red;-webkit-flex:1;flex:15;box-shadow:10px 10px 5px #888}.roomtogo{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row wrap;flex-flow:row wrap}.roomname{width:100%}.roomtogoaccounted{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}
\ No newline at end of file
+.roompanel{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background-color:lightgrey;width:100%;-webkit-align-items:stretch;align-items:stretch}.roomitem{background-color:#fff6b5;height:60px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid #aaa;-webkit-flex:1;flex:10;box-shadow:10px 10px 5px #888;word-wrap:break-word}.roomitemselected{background-color:#eee6b5;height:65px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid red;-webkit-flex:1;flex:15;box-shadow:10px 10px 5px #888}.roomtogo{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row wrap;flex-flow:row wrap}.roomname{width:100%}.roomtogoaccounted{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.roomchangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#dd0;height:40px;font-size:16px;font-weight:bold}
\ No newline at end of file
diff --git a/webapp/css/tablepanel.css b/webapp/css/tablepanel.css
index c0c1702..362816c 100644
--- a/webapp/css/tablepanel.css
+++ b/webapp/css/tablepanel.css
@@ -1 +1 @@
-.tablepanel{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.tablepanel>*{padding:10px;-webkit-flex-wrap:wrap;flex-flow:wrap}.tablepanelcontent{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;-webkit-justify-content:center;justify-content:center}.tablepanelheader{background:black;flex:100%}.tableelement{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;width:100px;height:40px;padding:5px;box-shadow:10px 10px 5px #888}.tableelement>*{flex:1 100%}.tableitem{background-color:LightGreen;color:black;margin:5px;border-radius:15px;border:2px solid #73ad21;font-weight:bold;text-align:center}.tableitemselected{background-color:LightGreen;color:black;border-radius:15px;border:4px solid red;font-weight:bold;text-align:center}.tablename{order:1;padding:0;width:100%}.tableopen{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.tableready{background:white;color:black;-webkit-flex:1;flex:1;order:3}
\ No newline at end of file
+.tablepanel{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.tablepanel>*{padding:10px;-webkit-flex-wrap:wrap;flex-flow:wrap}.tablepanelcontent{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;-webkit-justify-content:center;justify-content:center}.tablepanelheader{background:black;flex:100%}.tableelement{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;width:100px;height:40px;padding:5px;box-shadow:10px 10px 5px #888}.tableelement>*{flex:1 100%}.tableitem{background-color:LightGreen;color:black;margin:5px;border-radius:15px;border:2px solid #73ad21;font-weight:bold;text-align:center}.tableitemselected{background-color:LightGreen;color:black;border-radius:15px;border:4px solid red;font-weight:bold;text-align:center}.tablename{order:1;padding:0;width:100%}.tableopen{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.tableready{background:white;color:black;-webkit-flex:1;flex:1;order:3}.tablechangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#ff0;height:40px;font-size:16px;font-weight:bold}
\ No newline at end of file
diff --git a/webapp/feedback.html b/webapp/feedback.html
index a2b534a..026e9d2 100644
--- a/webapp/feedback.html
+++ b/webapp/feedback.html
@@ -4,7 +4,7 @@
-
+
diff --git a/webapp/index.html b/webapp/index.html
index cee212c..7fd5936 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/webapp/install.html b/webapp/install.html
index 62cd334..6d012da 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 85a89ed..cc68638 100644
--- a/webapp/install/installer.php
+++ b/webapp/install/installer.php
@@ -1360,12 +1360,30 @@ return false;
DbUtils::overrulePrefix($prefix);
-
$this->updateVersion($pdo, '1.2.6');
return true;
} catch (PDOException $e) {
return false;
}
+}
+
+function updateUserTable1206_1207($prefix, $version, $dbname) {
+$pdo = $this->pdo;
+try {
+if ($version != "1.2.6") {
+$ret = $this->updateUserTable1205_1206($prefix, $version, $dbname);
+if (!$ret) {
+return false;
+}
+}
+
+DbUtils::overrulePrefix($prefix);
+
+$this->updateVersion($pdo, '1.2.7');
+return true;
+} catch (PDOException $e) {
+return false;
+}
}
function setVersion($prefix,$theVersion) {
@@ -1480,7 +1498,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.6')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.7')");
$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')");
@@ -1849,7 +1867,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones);
} else if ($command == 'update') {
-$installerVersion = "1.2.6";
+$installerVersion = "1.2.7";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@@ -1879,7 +1897,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.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6"
);
if (!in_array($version, $supportedVersions)) {
@@ -1887,7 +1905,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
-$ret = $admin->updateUserTable1205_1206($_POST['prefix'], $version, $_POST['db']);
+$ret = $admin->updateUserTable1206_1207($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();
diff --git a/webapp/kitchen.html b/webapp/kitchen.html
index a9693b6..f58b17b 100644
--- a/webapp/kitchen.html
+++ b/webapp/kitchen.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/manager.html b/webapp/manager.html
index 0f227c9..3381245 100644
--- a/webapp/manager.html
+++ b/webapp/manager.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/paydesk.html b/webapp/paydesk.html
index 528a62d..e302050 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 d11d0c8..b8244ee 100644
--- a/webapp/php/admin.php
+++ b/webapp/php/admin.php
@@ -1069,7 +1069,7 @@ class Admin {
$view = "preferences.html";
}
- echo json_encode($view . "?v=1.2.6");
+ echo json_encode($view . "?v=1.2.7");
}
}
@@ -1286,24 +1286,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.6"); };
+ if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.7"); };
} else {
- if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.6"); };
+ if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.7"); };
}
- if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.6"); };
- if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.6"); };
- if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.6"); };
+ if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.7"); };
+ if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.7"); };
+ if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.7"); };
if ($_SESSION['modus'] == 0) {
- if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.6"); };
+ if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.7"); };
}
- if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.6"); };
- if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.6"); };
- if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.6"); };
- if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.6"); };
- if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.6"); };
- if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.6"); };
- $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.6");
- $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.6");
+ if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.7"); };
+ if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.7"); };
+ if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.7"); };
+ if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.7"); };
+ if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.7"); };
+ if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.7"); };
+ $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.7");
+ $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.7");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@@ -1312,7 +1312,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
// CAUTION: change version also in config.txt!!!
- $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.6",
+ $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.7",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
diff --git a/webapp/php/queuecontent.php b/webapp/php/queuecontent.php
index 8ca2c3b..8cf1bb0 100644
--- a/webapp/php/queuecontent.php
+++ b/webapp/php/queuecontent.php
@@ -1065,11 +1065,11 @@ class QueueContent {
}
if ($tableid == 0) {
- $sql .= "%queue%.tablenr is null ORDER BY ordertime";
+ $sql .= "%queue%.tablenr is null ORDER BY ordertime, quid";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
} else {
- $sql .= "%queue%.tablenr=? ORDER BY ordertime";
+ $sql .= "%queue%.tablenr=? ORDER BY ordertime, quid";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($tableid));
}
@@ -1092,7 +1092,7 @@ class QueueContent {
}
$prods = array();
- $sql = "SELECT productid,readytime,paidtime,cooking,productname,anoption,productname,togo,pricechanged,price FROM %queue% WHERE id=?";
+ $sql = "SELECT productid,readytime,paidtime,cooking,productname,anoption,productname,togo,pricechanged,price FROM %queue% WHERE id=? ORDER BY productid ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
foreach ($resultids as $anId) {
$stmt->execute(array($anId));
@@ -1213,7 +1213,7 @@ class QueueContent {
} else {
$sql .= "WHERE tablenr = $tableid ";
}
- $sql .= "AND paidtime is null AND toremove <> '1' AND ordertime is not null AND isclosed is null ORDER BY ordertime;";
+ $sql .= "AND paidtime is null AND toremove <> '1' AND ordertime is not null AND isclosed is null ORDER BY ordertime, id;";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
diff --git a/webapp/preferences.html b/webapp/preferences.html
index 7e300d3..b9b35b5 100644
--- a/webapp/preferences.html
+++ b/webapp/preferences.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/products.html b/webapp/products.html
index 9133f17..c172586 100644
--- a/webapp/products.html
+++ b/webapp/products.html
@@ -7,7 +7,7 @@
-
+
diff --git a/webapp/rating.html b/webapp/rating.html
index db940f6..6df9ef4 100644
--- a/webapp/rating.html
+++ b/webapp/rating.html
@@ -7,7 +7,7 @@
-
+
diff --git a/webapp/reports.html b/webapp/reports.html
index 9fb772e..10170ac 100644
--- a/webapp/reports.html
+++ b/webapp/reports.html
@@ -7,7 +7,7 @@
-
+
diff --git a/webapp/reservation.html b/webapp/reservation.html
index 493e48d..96dc9b8 100644
--- a/webapp/reservation.html
+++ b/webapp/reservation.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html
index 6fd6516..e38bc9b 100644
--- a/webapp/supplydesk.html
+++ b/webapp/supplydesk.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/waiter.html b/webapp/waiter.html
index 05a16ee..2d91c2d 100644
--- a/webapp/waiter.html
+++ b/webapp/waiter.html
@@ -4,7 +4,7 @@
-
+
diff --git a/webapp/waiterdesktop.php b/webapp/waiterdesktop.php
index b929d24..9dcbb5c 100644
--- a/webapp/waiterdesktop.php
+++ b/webapp/waiterdesktop.php
@@ -49,16 +49,19 @@ function handleSentNewOrders(answer) {
alert("Es ist ein Fehler beim Versenden der Bestellung aufgetreten");
} else {
neworders = [];
- requestRoomInformation();
- //showTablesForRoomIndex();
- clearProductsSelection();
- requestProdInformation();
- requestOrderedInformation();
$("#search").val("");
- displayPanels();
+ refreshGui();
}
}
+function refreshGui() {
+ requestRoomInformation();
+ clearProductsSelection();
+ requestProdInformation();
+ requestOrderedInformation();
+ displayPanels();
+}
+
function getTableid() {
if (selectedroomindex !== null) {
if (selectedroomindex < 0) {
@@ -87,6 +90,43 @@ function disableSendButton() {
// $("#sendNewOrders").addClass("inputwhite");
}
+function moveItems() {
+ $( "#selectiondialog" ).dialog({
+ autoOpen: false,
+ modal: true,
+ height: 400,
+ buttons: {
+ Abbrechen: function() {$(this).dialog("close"); }
+ }
+ });
+ var roomstxt = getRoomsForDialog();
+
+ $("#selectiondialog").html(roomstxt);
+
+ $( "#selectiondialog" ).dialog("open");
+
+ $(".ui-dialog-buttonset .ui-button").css('background-color', '#44ff44');
+ $(".ui-widget-header").css('background-color', '#ff4400');
+
+ bindMoveItemsRoom();
+}
+
+// REM* in the change tabe view a room was selected
+function bindMoveItemsRoom() {
+ $(".roomchangeitem").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ // REM* now display tables of that room
+ var newRoom = parseInt(this.id.split('_')[1]);
+
+ var tabletxt = getTablesForDialog(newRoom);
+
+ $( "#selectiondialog" ).dialog("open");
+ $("#selectiondialog").html(tabletxt);
+ bindMoveItemsTable(newRoom);
+ });
+}
+
function bindRightButtons() {
$("#sendNewOrders").off("click").on("click", function (e) {
e.stopImmediatePropagation();
@@ -123,19 +163,169 @@ function bindRightButtons() {
$("#mainmenudlg").dialog(
{autoOpen: false,
modal: true,
-
-
});
-// $("#mainmenudlg").dialog(
-// {autoOpen: false,
-// modal: true,
-// height: 580,
-// position:{my:"right top",at:"right+100 top+100", of:"body"},
-// buttons: {
-// Abbrechen: function() {$(this).dialog("close"); }
-// }
-// });
+ $("#changetablebtn").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ moveItems();
+ });
+}
+
+function bindMoveItemsTable(roomindex) {
+ $(".tablechangeitem").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+
+ moveToRoomIndex = roomindex;
+ var chosenTableIndex = parseInt(this.id.split('_')[1]);
+
+ var theTable = roominfo.roomstables[roomindex].tables[chosenTableIndex];
+ moveToTableId = theTable.id;
+
+ // REM* now show the items that may be moved (the "from" part)
+ if (selectedroomindex != "-1") {
+ var theTable = roominfo.roomstables[selectedroomindex].tables[selectedtableindex];
+ moveFromTableId = theTable.id;
+ $("#selectiondialog").dialog("close");
+ doAjax("GET", "php/contenthandler.php?module=queue&command=getProdsForTableChange", {tableId: moveFromTableId}, insertProductsToChangeTableDlg, null, true);
+ } else {
+ $("#selectiondialog").dialog("close");
+ }
+ });
+}
+
+function insertProductsToChangeTableDlg(jsonContent) {
+ if (jsonContent.status != "OK") {
+ alert("Fehler");
+ return;
+ }
+
+ prodsToMove = jsonContent.msg;
+
+ // REM* modus that shows all items as selected -> so next button press is unselect
+ allselected = 1;
+
+ updateProdToMoveList();
+
+ $("#selectallnothing").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ allselected = 1 - allselected;
+ for (var i = 0; i < prodsToMove.length; i++) {
+ var anEntry = prodsToMove[i];
+ if (allselected === 1) {
+ anEntry["class"] = "selecteditem";
+ } else {
+ anEntry["class"] = "unselecteditem";
+ }
+ }
+ updateProdToMoveList();
+ });
+}
+
+function updateProdToMoveList() {
+ if (allselected === 1) {
+ $("#selectallnothing_txt").val(W_UNSELALL[lang]);
+ } else {
+ $("#selectallnothing_txt").val(W_SELALL[lang]);
+ }
+ var txt = "";
+ for (var i = 0; i < prodsToMove.length; i++) {
+ var anEntry = prodsToMove[i];
+ var id = "prodToMove_" + i;
+ var status = " (unbezahlt)";
+ var theme = "proditemselected";
+ // REM* class property is "selecteditem" or "unselecteditem" - due to user selection of the item
+ if (anEntry["class"] === undefined) {
+ anEntry["class"] = "selecteditem";
+ }
+ var theclass = anEntry["class"];
+ if (theclass == "unselecteditem") {
+ theme = "proditemunselected";
+ }
+ if (anEntry["status"] === "unpaid_undelivered") {
+ status = " (unbezahlt, nicht serviert)";
+ }
+ if ((workflowconfig == WORKFLOW_WORK) || (workflowconfig == WORKFLOW_WORK_TRANSFER)) {
+ // REM* no: undisplay
+ status = "";
+ }
+ var spantxt = "" + anEntry["productname"] + status + "";
+ txt += "" + spantxt + "";
+ }
+ $("#productsToMoveList").html(txt);
+
+ $( "#moveItemdslg" ).dialog({
+ autoOpen: false,
+ modal: true,
+ height: 600,
+ width: 800,
+ buttons: {
+ Abbrechen: function() {$(this).dialog("close"); },
+ Verschieben: function() {$(this).dialog("close"); doMoveItems();}
+ }
+ });
+
+ $("#moveItemdslg").dialog("open");
+
+ handleClickOnMoveableProd();
+}
+
+function handleClickOnMoveableProd() {
+ $(".prodToMoveEl").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ var index = this.id.split("_")[1];
+ var anEntry = prodsToMove[index];
+ var theclass = anEntry["class"];
+ if (theclass == "unselecteditem") {
+ anEntry["class"] = "selecteditem";
+ } else {
+ anEntry["class"] = "unselecteditem";
+ }
+ updateProdToMoveList();
+ });
+
+}
+
+function doMoveItems() {
+ $("#moveItemdslg").dialog("close");
+ var entries = [];
+ for (var i = 0; i < prodsToMove.length; i++) {
+ var anEntry = prodsToMove[i];
+ var theclass = anEntry["class"];
+ if (theclass == "selecteditem") {
+ entries[entries.length] = anEntry["queueid"];
+ }
+ }
+ if (entries.length === 0) {
+ alert(W_NO_PRODS_SELECTED[lang]);
+ } else {
+ var entryCommaTxt = entries.join();
+
+ var data = {
+ fromTableId: moveFromTableId,
+ toTableId: moveToTableId,
+ queueids: entryCommaTxt
+ };
+ doAjax("POST", "php/contenthandler.php?module=queue&command=changeTable", data, resultOfChangeTable, "Fehler Tischwechsel", true);
+ }
+
+}
+
+function resultOfChangeTable (jsonResult) {
+ if (jsonResult.status != "OK") {
+ alert("Fehler "
+ + jsonResult.code
+ + ": "
+ + jsonResult.msg
+ + "\n\nMöglicherweise hat ein Kollege\nin der Zwischenzeit Produkte zugestellt.");
+ } else {
+ alert("Tischwechsel durchgeführt!");
+ }
+
+ refreshGui();
}function requestRoomInformation() {
doAjax("GET", "php/contenthandler.php?module=roomtables&command=showAllRooms", null, insertRoomInfo, null,true);
}
@@ -180,11 +370,23 @@ function showRooms() {
bindingRoom();
}
+// REM* for display in change table dialog
+function getRoomsForDialog() {
+ var allRooms = roominfo.roomstables;
+
+ var txt = "";
+ $.each(allRooms, function (i, aRoom) {
+ txt += '' + aRoom.name + '
';
+ });
+ return txt;
+}
+
function bindingRoom() {
$(".roomitem").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var newRoom = parseInt(this.id.split('_')[1]);
+ $("#changetablebtn").hide();
if (panelMode == "waiter") {
if (neworders.length > 0) {
$( "#unsentorderdlg" ).dialog({
@@ -276,6 +478,18 @@ function showTablesForRoomIndex() {
bindingTable();
}
+// REM* for change table dialog
+function getTablesForDialog(roomindex) {
+ var tables = roominfo.roomstables[roomindex].tables;
+ var txt = "";
+
+ $.each(tables, function (i, aTable) {
+ txt += '' + aTable.name + '
';
+ });
+
+ return txt;
+}
+
function bindingTable() {
$(".tableitem").off("click").on("click", function (e) {
e.stopImmediatePropagation();
@@ -284,6 +498,7 @@ function bindingTable() {
var newTable = parseInt(this.id.split('_')[1]);
if (panelMode == "waiter") {
+ $("#changetablebtn").show();
if (neworders.length > 0) {
$( "#unsentorderdlg" ).dialog({
autoOpen: false,
@@ -1094,8 +1309,23 @@ var WORKFLOW_WORK_TRANSFER = 3;
var productFilter = null;
+// REM* list of products that may be moved
+var prodsToMove = [];
+// REM* if the button "un/select all" in the change table is on or off...
+var allselected = 0;
+
+// REM* room and table from/to which products shall be moved
+var moveFromTableId = null;
+var moveToRoomIndex = null;
+var moveToTableId = null;
+
var panelMode = "waiter";
+
+var W_SELALL = ["Alles auswählen","Select all","Elegir todo"];
+var W_UNSELALL = ["Alles abwählen","Unselect all","No elegir nada"];
+var W_NO_PRODS_SELECTED = ["Es wurden keine Produkte ausgewählt!","You have not chosen any products!","No ha seleccionado ningún producto!"];
+
$(document).ready(function(){
selectedroomindex = null;
productFilter = null;
@@ -1242,6 +1472,14 @@ function bindMainMenuButton() {
height: 400,
width: 200,
});
+
+ $("#moveItemdslg").dialog(
+ {autoOpen: false,
+ modal: true,
+ height: 400,
+ width: 200,
+ });
+
$("#mainmenubtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
@@ -1329,7 +1567,7 @@ function displayPanels() {
$("#productspanel").hide();
$("#remarkpanel").hide();
$("#ordered").hide();
-
+
$("oben").html("");
$("#oben").show();
$("#unten").html("");
@@ -1343,6 +1581,7 @@ function displayPanels() {
// REM* show/hide buttons due to workflowconfig and availability of items
function displayRightButtons() {
+ $("#changetablebtn").hide();
if (panelMode === "waiter") {
if (rightpaydesk == 1) {
$("#paydeskbtn").show();
@@ -1359,6 +1598,9 @@ function displayRightButtons() {
$("#sendNewOrders").show();
}
}
+ if ((selectedtableindex != null) && (neworders.length == 0)) {
+ $("#changetablebtn").show();
+ }
} else {
// REM* paydesk
$("#paydeskbtn").hide();
@@ -2652,6 +2894,7 @@ function printBill(billid) {
+
@@ -2709,5 +2952,13 @@ function printBill(billid) {
Nachbestellen
Abbrechen
+
+
+
Welche Orderelemente sollen dem neuen Tisch zugewiesen werden?
+
+
+
+
+