OrderSprinter 1.2.15

This commit is contained in:
Geno 2020-11-19 23:00:46 +01:00
parent 2d6faf9e3b
commit 6c73221599
24 changed files with 218 additions and 154 deletions

Binary file not shown.

Binary file not shown.

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -6,8 +6,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -679,7 +679,7 @@ $(document).ready(function() {
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.2.14</button> <button id="updatebtn">Update -> 1.2.15</button>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>

View File

@ -1206,6 +1206,11 @@ $stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(); $stmt->execute();
} }
private function execSqlWithParam($pdo,$sql,$param) {
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute($param);
}
function updateUserTable1130_1200($prefix, $version, $dbname) { function updateUserTable1130_1200($prefix, $version, $dbname) {
$pdo = $this->pdo; $pdo = $this->pdo;
try { try {
@ -1503,6 +1508,7 @@ try {
if ($version != "1.2.12") { if ($version != "1.2.12") {
$ret = $this->updateUserTable1211_1212($prefix, $version, $dbname); $ret = $this->updateUserTable1211_1212($prefix, $version, $dbname);
if (!$ret) { if (!$ret) {
echo "Version update v1.2.11 to 1.2.12 not successful.";
return false; return false;
} }
} }
@ -1522,6 +1528,7 @@ try {
if ($version != "1.2.13") { if ($version != "1.2.13") {
$ret = $this->updateUserTable1212_1213($prefix, $version, $dbname); $ret = $this->updateUserTable1212_1213($prefix, $version, $dbname);
if (!$ret) { if (!$ret) {
echo "Version update v1.2.12 to 1.2.13 not successful.";
return false; return false;
} }
} }
@ -1531,6 +1538,34 @@ DbUtils::overrulePrefix($prefix);
$this->updateVersion($pdo, '1.2.14'); $this->updateVersion($pdo, '1.2.14');
return true; return true;
} catch (PDOException $e) { } catch (PDOException $e) {
echo "Error in v1.2.13 to 1.2.14: $e";
return false;
}
}
function updateUserTable1214_1215($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.2.14") {
$ret = $this->updateUserTable1213_1214($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.2.13 to 1.2.14 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$this->execSql($pdo, "ALTER TABLE %queue% MODIFY readytime DATETIME NULL");
$this->execSqlWithParam($pdo, "UPDATE %queue% SET readytime=? WHERE readytime=?",array(null,'0000-00-00 00:00:00'));
$this->execSqlWithParam($pdo, "UPDATE %queue% SET paidtime=? WHERE paidtime=?",array(null,'0000-00-00 00:00:00'));
$this->execSqlWithParam($pdo, "UPDATE %queue% SET delivertime=? WHERE delivertime=?",array(null,'0000-00-00 00:00:00'));
$this->execSql($pdo, "OPTIMIZE TABLE %queue%");
$this->updateVersion($pdo, '1.2.15');
return true;
} catch (PDOException $e) {
echo "Error in v1.2.14 to 1.2.15: $e";
return false; return false;
} }
} }
@ -1652,7 +1687,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 , '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 , '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 , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.14')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.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 , '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 , 'remoteaccesscode', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
@ -1949,7 +1984,6 @@ self::insertSampleMenu($pdo,$adminCl);
} }
} }
$command = $_GET["command"]; $command = $_GET["command"];
if ($command == 'checkWriteAccess') { if ($command == 'checkWriteAccess') {
$checker = new Checks(); $checker = new Checks();
@ -1993,6 +2027,7 @@ return;
$admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,1,1,0,0,$_POST['lang'],1); $admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,1,1,0,0,$_POST['lang'],1);
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']); $admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
} }
@ -2020,8 +2055,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.2.15";
$installerVersion = "1.2.14";
$admin = new InstallAdmin(); $admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@ -2051,7 +2085,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.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.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.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.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"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -2059,12 +2093,13 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1213_1214($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1214_1215($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
} }
session_destroy(); session_destroy();
if ($ret) { if ($ret) {
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']); $admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
echo json_encode("OK"); echo json_encode("OK");

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -190,6 +190,10 @@ var MAN_SHUTDOWN = ["Server herunterfahren","Shutdown server","Apagar servidor"]
var MAN_SHUTDOWN_HINT = ["(Herunterfahren nur möglich, wenn Webserver die erforderlichen Rechte besitzt).", var MAN_SHUTDOWN_HINT = ["(Herunterfahren nur möglich, wenn Webserver die erforderlichen Rechte besitzt).",
"(Shutdown only possible if web server has the required privileges to do so.)", "(Shutdown only possible if web server has the required privileges to do so.)",
"(Apagar el servidor sólo es posible si webserver tiene el derecho para hacerlo.)"]; "(Apagar el servidor sólo es posible si webserver tiene el derecho para hacerlo.)"];
var MAN_OPTIMIZE = ["Datenbank optimieren","Optimize database","Arreglar base de datos"];
var MAN_OPTIMIZE_HINT = ["Beim Optimieren der Datenbank werden Haupttabellen aufgeräumt. Dieser Prozess kann bei einer großen Datenbank etwas Zeit in Anspruch nehmen. Die Optimierung sollte immer dann vorgenommen werden, wenn die Server-Geschwindigkeit abgenommen hat.",
"Optimize data base means that the main tables are cleaned. This process may take a while for big databases. The optimization should always be executed in ase the server's performance has worsened.",
"La arreglación de la base de datos es para mejorar la velocidad del servidor. El proceso puede durar un poco."];
var MAN_UPLOAD_LOGO = ["Logo-Datei hochladen","Upload Logo image","Leer imagen de logo"]; var MAN_UPLOAD_LOGO = ["Logo-Datei hochladen","Upload Logo image","Leer imagen de logo"];
var MAN_NO_LOGO_BTN = ["Kein Logo","No logo","No imagen"]; var MAN_NO_LOGO_BTN = ["Kein Logo","No logo","No imagen"];
var MAN_WORKFLOW = ["Arbeitsablauf","Workflow","Modo de trabajar"]; var MAN_WORKFLOW = ["Arbeitsablauf","Workflow","Modo de trabajar"];
@ -430,6 +434,8 @@ function setLanguage(l) {
$("#shutdownbtntxt").html(MAN_SHUTDOWN[l]); $("#shutdownbtntxt").html(MAN_SHUTDOWN[l]);
$("#shutdownhinttxt").html(MAN_SHUTDOWN_HINT[l]); $("#shutdownhinttxt").html(MAN_SHUTDOWN_HINT[l]);
$("#optimizebtntxt").html(MAN_OPTIMIZE[l]);
$("#optimizehinttxt").html(MAN_OPTIMIZE_HINT[l]);
$("#upllogotxt").html(MAN_UPLOAD_LOGO[l]); $("#upllogotxt").html(MAN_UPLOAD_LOGO[l]);
$("#dellogobtn").html(MAN_NO_LOGO_BTN[l]); $("#dellogobtn").html(MAN_NO_LOGO_BTN[l]);
@ -1214,6 +1220,12 @@ function binding() {
doAjax("GET","php/contenthandler.php?module=admin&command=shutdown",null,handleAnswerShutdown,"Skriptproblem"); doAjax("GET","php/contenthandler.php?module=admin&command=shutdown",null,handleAnswerShutdown,"Skriptproblem");
}); });
$("#optimize_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=optimize",null,handleAnswerOptimize,"Skriptproblem");
});
$("#dellogobtn").off("click").on("click", function (e) { $("#dellogobtn").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
@ -1362,6 +1374,13 @@ function handleAnswerShutdown(result) {
} }
} }
function handleAnswerOptimize(result) {
if (result.status == "OK") {
alert("Die Datenbanktabellen wurden aufgeräumt.");
} else {
alert("Fehler " + result.code + ": " + result.msg);
}
}
function hasChangedData(idOfElem) { function hasChangedData(idOfElem) {
var fieldChangedAttr = $("" + idOfElem).data("changed"); var fieldChangedAttr = $("" + idOfElem).data("changed");
if (typeof fieldChangedAttr != 'undefined') { if (typeof fieldChangedAttr != 'undefined') {
@ -2781,9 +2800,12 @@ $(document).on("pageinit", "#admin-page", function () {
<p> <p>
<form action="dummy" method="GET"> <form action="dummy" method="GET">
<button type="submit" data-theme="d" id="shutdown_btn"><span id="shutdownbtntxt">Shutdown</span></button> <button type="submit" data-theme="d" id="optimize_btn"><span id="optimizebtntxt">Datenbank optimieren</span></button>
<div id="optimizehinttxt"></div><br>
<button type="submit" data-theme="d" id="shutdown_btn"><span id="shutdownbtntxt">Shutdown</span></button>
<div id="shutdownhinttxt"></div>
</form> </form>
<div id="shutdownhinttxt"></div>
</div> <!-- collapsible Datenbank --> </div> <!-- collapsible Datenbank -->

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -51,6 +51,7 @@ class Admin {
"getPayments" => array("loggedin" => 1, "isadmin" => 0, "rights" => null), "getPayments" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"autobackup" => array("loggedin" => 0, "isadmin" => 0, "rights" => null), "autobackup" => array("loggedin" => 0, "isadmin" => 0, "rights" => null),
"shutdown" => array("loggedin" => 1, "isadmin" => 1, "rights" => null), "shutdown" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"optimize" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"backup" => array("loggedin" => 1, "isadmin" => 1, "rights" => null), "backup" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"restore" => array("loggedin" => 1, "isadmin" => 1, "rights" => null), "restore" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"golive" => array("loggedin" => 1, "isadmin" => 1, "rights" => null), "golive" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
@ -207,6 +208,9 @@ class Admin {
} else if ($command == 'shutdown') { } else if ($command == 'shutdown') {
$this->shutdown(); $this->shutdown();
return; return;
} else if ($command == 'optimize') {
$this->optimize();
return;
} else if ($command == 'assignTaxes') { } else if ($command == 'assignTaxes') {
$this->assignTaxes($_POST['food'],$_POST['drinks']); $this->assignTaxes($_POST['food'],$_POST['drinks']);
return; return;
@ -800,7 +804,7 @@ class Admin {
$smtpsecure = 1; $smtpsecure = 1;
$smtpport = ""; $smtpport = "";
if ($_SESSION['is_admin'] || $_SESSION['right_manager']) { if ( (isset($_SESSION['is_admin']) && ($_SESSION['is_admin'] == 1)) || (isset($_SESSION['right_manager']) && ($_SESSION['right_manager'] == 1))) {
$smtphost = CommonUtils::getConfigValue($pdo,"smtphost",""); $smtphost = CommonUtils::getConfigValue($pdo,"smtphost","");
$smtpauth = CommonUtils::getConfigValue($pdo,"smtpauth",1); $smtpauth = CommonUtils::getConfigValue($pdo,"smtpauth",1);
$smtpuser = CommonUtils::getConfigValue($pdo,"smtpuser",""); $smtpuser = CommonUtils::getConfigValue($pdo,"smtpuser","");
@ -932,7 +936,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.2.14"); echo json_encode($view . "?v=1.2.15");
} }
} }
@ -1138,24 +1142,24 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.14"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.15"); };
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.14"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.15"); };
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.14"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.15"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.14"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.15"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.14"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.15"); };
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.14"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.15"); };
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.14"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.15"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.14"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.15"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.14"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.15"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.14"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.15"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.14"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.15"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.14"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.15"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.14"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.15");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.14"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.15");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1164,7 +1168,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage"); $waiterMessage = $this->getMessage(null, "waitermessage");
} }
// CAUTION: change version also in config.txt!!! // CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.14", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.15",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,
@ -2083,6 +2087,19 @@ class Admin {
} }
private function optimize() {
try {
$pdo = DButils::openDbAndReturnPdoStatic();
self::doSql($pdo, "OPTIMIZE TABLE %queue%", null);
self::doSql($pdo, "OPTIMIZE TABLE %billproducts%", null);
self::doSql($pdo, "OPTIMIZE TABLE %extrasprods%", null);
self::doSql($pdo, "OPTIMIZE TABLE %queueextras%", null);
echo json_encode(array("status" => "OK"));
} catch (Exception $ex) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_COMMAND_ERROR, "msg" => ERROR_COMMAND_ERROR_MSG));
}
}
private function golive() { private function golive() {
try { try {
$pdo = DButils::openDbAndReturnPdoStatic(); $pdo = DButils::openDbAndReturnPdoStatic();

View File

@ -163,7 +163,7 @@ $sql = "UPDATE %queue% set paidtime=?,delivertime=? WHERE billid is not null AND
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($closingTime,$closingTime)); $stmt->execute(array($closingTime,$closingTime));
$sql = "UPDATE %queue% set delivertime=?,workprinted=? WHERE billid is not null AND delivertime = '0000-00-00 00:00:00'"; $sql = "UPDATE %queue% set delivertime=?,workprinted=? WHERE billid is not null AND delivertime IS NULL";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($closingTime,1)); $stmt->execute(array($closingTime,1));

View File

@ -107,22 +107,12 @@ class QueueContent {
} }
} }
// needed if paydesk gets the tableid by direct call
function getJsonTableNameFromId($tableid) { function getJsonTableNameFromId($tableid) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$commonUtils = new CommonUtils(); $commonUtils = new CommonUtils();
echo json_encode($commonUtils->getTableNameFromId($pdo,$tableid)); echo json_encode($commonUtils->getTableNameFromId($pdo,$tableid));
} }
function getDateValueAsBoolInterpretatedIcon($aValue) {
if ($aValue != '0000-00-00 00:00:00' ) {
$imgFile = "ok.png";
} else {
$imgFile = "wait.png";
}
return "<img src=img/" . $imgFile . " />";
}
function getUserName($userid) { function getUserName($userid) {
$pdo = $this->dbutils->openDbAndReturnPdo(); $pdo = $this->dbutils->openDbAndReturnPdo();
@ -175,7 +165,7 @@ class QueueContent {
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,%resttables%.id as tableid,tablenr,longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue%,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT %queue%.id as id,%resttables%.id as tableid,tablenr,longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue%,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime = '0000-00-00 00:00:00' AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= " ordertime is not null AND "; $sql .= " ordertime is not null AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "%queue%.productid=%products%.id AND ";
$sql .= "%queue%.tablenr = %resttables%.id AND "; $sql .= "%queue%.tablenr = %resttables%.id AND ";
@ -199,7 +189,7 @@ class QueueContent {
$sql = "SELECT DISTINCT q.id as id,'-' as tableid,'-' as tablenr,longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%resttables%, %queue% q LEFT OUTER JOIN %bill% b "; $sql = "SELECT DISTINCT q.id as id,'-' as tableid,'-' as tablenr,longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%resttables%, %queue% q LEFT OUTER JOIN %bill% b ";
$sql .= " ON q.billid=b.id "; $sql .= " ON q.billid=b.id ";
$sql .= "WHERE (readytime = '0000-00-00 00:00:00' AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= " ordertime is not null AND "; $sql .= " ordertime is not null AND ";
$sql .= "q.productid=%products%.id AND "; $sql .= "q.productid=%products%.id AND ";
$sql .= "q.tablenr is null AND "; $sql .= "q.tablenr is null AND ";
@ -536,8 +526,8 @@ class QueueContent {
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,tablenr,longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT %queue%.id as id,tablenr,longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' AND "; $sql .= "WHERE (readytime IS NOT NULL AND ";
$sql .= "delivertime = '0000-00-00 00:00:00' AND "; $sql .= "delivertime IS NULL AND ";
$sql .= "ordertime is not null AND "; $sql .= "ordertime is not null AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "%queue%.productid=%products%.id AND ";
$sql .= "%queue%.tablenr = %resttables%.id AND "; $sql .= "%queue%.tablenr = %resttables%.id AND ";
@ -563,8 +553,8 @@ class QueueContent {
$sql = "SELECT DISTINCT %queue%.id as id,0 as tablenr,longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT %queue%.id as id,0 as tablenr,longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' AND "; $sql .= "WHERE (readytime IS NOT NULL AND ";
$sql .= "delivertime = '0000-00-00 00:00:00' AND "; $sql .= "delivertime IS NULL AND ";
$sql .= "ordertime is not null AND "; $sql .= "ordertime is not null AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "%queue%.productid=%products%.id AND ";
$sql .= "%queue%.tablenr is null AND "; $sql .= "%queue%.tablenr is null AND ";
@ -620,7 +610,7 @@ class QueueContent {
$sql .= "FROM %queue%,%resttables%,%products%,%bill%,%prodtype% "; $sql .= "FROM %queue%,%resttables%,%products%,%bill%,%prodtype% ";
$sql .= "WHERE (%queue%.productid=%products%.id "; $sql .= "WHERE (%queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr=%resttables%.id "; $sql .= "AND %queue%.tablenr=%resttables%.id ";
$sql .= "AND %queue%.readytime <> '0000-00-00 00:00:00' "; $sql .= "AND %queue%.readytime IS NOT NULL ";
$sql .= "AND toremove <> '1' AND "; $sql .= "AND toremove <> '1' AND ";
$sql .= "ordertime is not null AND "; $sql .= "ordertime is not null AND ";
$sql .= "(%queue%.productid = %products%.id AND %products%.category = %prodtype%.id AND %prodtype%.kind=? AND %prodtype%.usesupplydesk='0' AND %prodtype%.usekitchen='1') AND "; $sql .= "(%queue%.productid = %products%.id AND %products%.category = %prodtype%.id AND %prodtype%.kind=? AND %prodtype%.usesupplydesk='0' AND %prodtype%.usekitchen='1') AND ";
@ -742,16 +732,16 @@ class QueueContent {
$pdo->beginTransaction(); $pdo->beginTransaction();
// first: is the product still declared as delivered? // first: is the product still declared as delivered?
$sql = "SELECT id FROM %queue% WHERE id=? AND readytime <> '0000-00-00 00:00:00'"; $sql = "SELECT id FROM %queue% WHERE id=? AND readytime IS NOT NULL";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($queueid)); $stmt->execute(array($queueid));
$row =$stmt->fetchObject(); $row =$stmt->fetchObject();
if ($row != null) { if ($row != null) {
$foundid = $row->id; $foundid = $row->id;
if ($foundid == $queueid) { if ($foundid == $queueid) {
$sql = "UPDATE %queue% SET readytime='0000-00-00 00:00:00', delivertime='0000-00-00 00:00:00', cooking=NULL WHERE id=?"; $sql = "UPDATE %queue% SET readytime=?, delivertime=?, cooking=NULL WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($queueid)); $stmt->execute(array(null,null,$queueid));
$pdo->commit(); $pdo->commit();
echo json_encode(array("status" => "OK")); echo json_encode(array("status" => "OK"));
} else { } else {
@ -938,7 +928,7 @@ class QueueContent {
$insertSql = "INSERT INTO `%queue%` ( $insertSql = "INSERT INTO `%queue%` (
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`) `id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
VALUES ( VALUES (
NULL , ?,?,?,?,?,?,?,?,?,?,?,?, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL,NULL,'0',NULL,'0');"; NULL , ?,?,?,?,?,?,?,?,?,?,?,?, null, null, NULL,NULL,'0',NULL,'0');";
$stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql));
$stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo)); $stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo));
@ -1011,11 +1001,11 @@ class QueueContent {
} else { } else {
$sql = "UPDATE %queue% "; $sql = "UPDATE %queue% ";
} }
$sql .= "SET ordertime=null WHERE %queue%.id=? AND ordertime <> '0000-00-00 00:00:00' "; $sql .= "SET ordertime=null WHERE %queue%.id=? AND ordertime IS NOT NULL ";
if ($isPaid == '1') { if ($isPaid == '1') {
$sql .= " AND paidtime <> '0000-00-00 00:00:00' "; $sql .= " AND paidtime IS NOT NULL ";
} else { } else {
$sql .= " AND (paidtime = '0000-00-00 00:00:00' or paidtime is null) "; $sql .= " AND (paidtime IS NULL or paidtime is null) ";
} }
if ($isCooking == '1') { if ($isCooking == '1') {
$sql .= " AND cooking is not null "; $sql .= " AND cooking is not null ";
@ -1023,9 +1013,9 @@ class QueueContent {
$sql .= " AND cooking is null "; $sql .= " AND cooking is null ";
} }
if ($isReady == '1') { if ($isReady == '1') {
$sql .= " AND readytime <> '0000-00-00 00:00:00' "; $sql .= " AND readytime IS NOT NULL ";
} else { } else {
$sql .= " AND (readytime = '0000-00-00 00:00:00' or readytime is null) "; $sql .= " AND (readytime IS NULL or readytime is null) ";
} }
// and not in a closing: // and not in a closing:
if ($hasBills) { if ($hasBills) {
@ -1101,8 +1091,8 @@ class QueueContent {
$allNotClosedQueueIds = $stmt->fetchAll(); $allNotClosedQueueIds = $stmt->fetchAll();
$resultids = array(); $resultids = array();
$sql = "SELECT count(id) as countid FROM %queue% WHERE %queue%.id=? AND (%queue%.delivertime = '0000-00-00 00:00:00' "; $sql = "SELECT count(id) as countid FROM %queue% WHERE %queue%.id=? AND (%queue%.delivertime IS NULL ";
$sql .= " OR %queue%.readytime = '0000-00-00 00:00:00' "; $sql .= " OR %queue%.readytime IS NULL ";
$sql .= " OR (%queue%.billid is null AND %queue%.paidtime is null)) "; $sql .= " OR (%queue%.billid is null AND %queue%.paidtime is null)) ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
foreach($allNotClosedQueueIds as $aQueueId) {# foreach($allNotClosedQueueIds as $aQueueId) {#
@ -1126,7 +1116,7 @@ class QueueContent {
$isDelivered = "1"; $isDelivered = "1";
$isPaid = "1"; $isPaid = "1";
$isCooking = '1'; $isCooking = '1';
if ($row->readytime == '0000-00-00 00:00:00') { if ($row->readytime == null) {
$isReady = "0"; // not yet prepared by the kitchen $isReady = "0"; // not yet prepared by the kitchen
} }
if ($row->paidtime == null) { if ($row->paidtime == null) {
@ -1175,8 +1165,8 @@ class QueueContent {
$sql = "SELECT %queue%.id as queueid,productname FROM "; $sql = "SELECT %queue%.id as queueid,productname FROM ";
$sql .= "%queue% LEFT OUTER JOIN %bill% ON %queue%.billid=%bill%.id WHERE "; $sql .= "%queue% LEFT OUTER JOIN %bill% ON %queue%.billid=%bill%.id WHERE ";
$sql .= "(tablenr=? OR (tablenr IS NULL AND ? IS NULL)) AND ordertime is not null AND isclosed is null AND billid is null AND ("; $sql .= "(tablenr=? OR (tablenr IS NULL AND ? IS NULL)) AND ordertime is not null AND isclosed is null AND billid is null AND (";
$sql .= "%queue%.delivertime = '0000-00-00 00:00:00' OR "; $sql .= "%queue%.delivertime IS NULL OR ";
$sql .= "(%queue%.delivertime <> '0000-00-00 00:00:00' AND workprinted='1')) "; $sql .= "(%queue%.delivertime IS NOT NULL AND workprinted='1')) ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($tableid,$tableid)); $stmt->execute(array($tableid,$tableid));
$undeliveredresultungrouped = $stmt->fetchAll(); $undeliveredresultungrouped = $stmt->fetchAll();
@ -1326,7 +1316,7 @@ class QueueContent {
if (is_numeric($queueid)) { if (is_numeric($queueid)) {
date_default_timezone_set(DbUtils::getTimeZone()); date_default_timezone_set(DbUtils::getTimeZone());
$delivertime = date('Y-m-d H:i:s'); $delivertime = date('Y-m-d H:i:s');
$updateSql = "UPDATE %queue% SET delivertime='0000-00-00 00:00:00' WHERE id=?"; $updateSql = "UPDATE %queue% SET delivertime IS NULL WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($updateSql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($updateSql));
$stmt->execute(array($queueid)); $stmt->execute(array($queueid));
} }
@ -1340,7 +1330,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue%,%products%,%resttables% "; $sql .= "FROM %queue%,%products%,%resttables% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' and delivertime = '0000-00-00 00:00:00' "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND %queue%.productid=%products%.id "; $sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr=%resttables%.id "; $sql .= "AND %queue%.tablenr=%resttables%.id ";
$sql .= "AND %queue%.isclosed is null "; $sql .= "AND %queue%.isclosed is null ";
@ -1363,7 +1353,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue%,%products%,%resttables% "; $sql .= "FROM %queue%,%products%,%resttables% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' and delivertime = '0000-00-00 00:00:00' "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND %queue%.productid=%products%.id "; $sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr is null "; $sql .= "AND %queue%.tablenr is null ";
$sql .= "AND ordertime is not null "; $sql .= "AND ordertime is not null ";
@ -1418,7 +1408,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue% "; $sql .= "FROM %queue% ";
} }
$sql .= "WHERE delivertime = '0000-00-00 00:00:00' "; $sql .= "WHERE delivertime IS NULL ";
$sql .= "AND ordertime is not null "; $sql .= "AND ordertime is not null ";
$sql .= "AND %queue%.isclosed is null "; $sql .= "AND %queue%.isclosed is null ";
$sql .= "AND workprinted='0' "; $sql .= "AND workprinted='0' ";
@ -1449,7 +1439,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue%,%resttables% "; $sql .= "FROM %queue%,%resttables% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' and delivertime = '0000-00-00 00:00:00' "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND toremove <> '1' "; $sql .= "AND toremove <> '1' ";
$sql .= "AND %queue%.tablenr=%resttables%.id AND "; $sql .= "AND %queue%.tablenr=%resttables%.id AND ";
$sql .= "ordertime is not null AND "; $sql .= "ordertime is not null AND ";
@ -1474,7 +1464,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue% "; $sql .= "FROM %queue% ";
} }
$sql .= "WHERE (readytime <> '0000-00-00 00:00:00' and delivertime = '0000-00-00 00:00:00' "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND toremove <> '1' "; $sql .= "AND toremove <> '1' ";
$sql .= "AND %queue%.tablenr is null AND "; $sql .= "AND %queue%.tablenr is null AND ";
$sql .= "ordertime is not null AND "; $sql .= "ordertime is not null AND ";
@ -1545,7 +1535,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue%,%resttables%,%products% "; $sql .= "FROM %queue%,%resttables%,%products% ";
} }
$sql .= "WHERE (delivertime <> '0000-00-00 00:00:00' "; $sql .= "WHERE (delivertime IS NOT NULL ";
$sql .= "AND %queue%.productid=%products%.id "; $sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr=%resttables%.id "; $sql .= "AND %queue%.tablenr=%resttables%.id ";
$sql .= "AND toremove <> '1' AND "; $sql .= "AND toremove <> '1' AND ";
@ -1572,7 +1562,7 @@ class QueueContent {
} else { } else {
$sql .= "FROM %queue%,%resttables%,%products% "; $sql .= "FROM %queue%,%resttables%,%products% ";
} }
$sql .= "WHERE (delivertime <> '0000-00-00 00:00:00' "; $sql .= "WHERE (delivertime IS NOT NULL ";
$sql .= "AND %queue%.productid=%products%.id "; $sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr is null "; $sql .= "AND %queue%.tablenr is null ";
$sql .= "AND toremove <> '1' AND "; $sql .= "AND toremove <> '1' AND ";

View File

@ -519,7 +519,7 @@ class Basedb {
`anoption` VARCHAR( 150 ) NULL , `anoption` VARCHAR( 150 ) NULL ,
`pricechanged` INT(1) NULL , `pricechanged` INT(1) NULL ,
`togo` INT(1) NULL , `togo` INT(1) NULL ,
`readytime` DATETIME NOT NULL, `readytime` DATETIME NULL,
`delivertime` DATETIME NULL, `delivertime` DATETIME NULL,
`paidtime` DATETIME NULL, `paidtime` DATETIME NULL,
`billid` INT(10), `billid` INT(10),

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.14"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.15">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />