OrderSprinter 1.4.13

This commit is contained in:
Geno 2020-11-19 23:10:37 +01:00
parent e5159e0e2b
commit 5e910e3f7c
27 changed files with 119 additions and 87 deletions

View File

@ -9,8 +9,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" href="css/gueststyle.css?v=1.4.12" /> <link rel="stylesheet" href="css/gueststyle.css?v=1.4.13" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.4.12" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.4.13" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
@ -105,7 +105,7 @@
<div data-role="footer" data-theme="b" id="thefooter1"> <div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a"> <div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div> <div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.4.12&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">1.4.13&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
} else { } else {
echo "<html>"; echo "<html>";
echo "<head><title>Installation Gastsystem</title>"; echo "<head><title>Installation Gastsystem</title>";
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.4.12">'; echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.4.13">';
echo "</head>"; echo "</head>";
echo "<body><div class=surround>"; echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.4.12</span><br><br>"; echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.4.13</span><br><br>";
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />"; echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />";
echo "<br><input type=submit value='Installation starten' class=installbtn />"; echo "<br><input type=submit value='Installation starten' class=installbtn />";
echo "</form></div></html>"; echo "</form></div></html>";

View File

@ -85,7 +85,7 @@ class Installer {
} }
Database::dropTables($pdo); Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix); Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.4.12"); Database::setVersion($pdo,$prefix,"1.4.13");
Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
return array("status" => "OK","msg" => "Installation successful"); return array("status" => "OK","msg" => "Installation successful");

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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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

@ -9,8 +9,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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.12"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.13">
<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" />
@ -215,7 +215,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") { if (is_installed == "Yes") {
useInstallation(); useInstallation();
} else { } else {
setTimeout(function(){document.location.href = "install.html?v=1.4.12"},500); setTimeout(function(){document.location.href = "install.html?v=1.4.13"},500);
} }
} }

View File

@ -727,7 +727,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.4.12</button> <button id="updatebtn">Update -> 1.4.13</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -413,7 +413,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
set_time_limit(60*30); set_time_limit(60*30);
$installerVersion = "1.4.12"; $installerVersion = "1.4.13";
$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']);

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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -1253,7 +1253,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.4.12"; document.location.href = "index.html?v=1.4.13";
},250); },250);
} }
}, },
@ -1791,9 +1791,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis(); var millis=getMillis();
setTimeout(function(){ setTimeout(function(){
document.location.href = "install.html?v=1.4.12&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.4.13&mode=onlyupdate&n=" + millis;
},250); },250);
document.location.href = "install.html?v=1.4.12&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.4.13&mode=onlyupdate&n=" + millis;
} }
function handleUpdateReplace(answer) { function handleUpdateReplace(answer) {

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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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

@ -1273,7 +1273,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.4.12"); echo json_encode($view . "?v=1.4.13");
} }
} }
@ -1484,27 +1484,27 @@ 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.4.12"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.13"); };
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.12"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.13"); };
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.12"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.13"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.12"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.13"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.12"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.13"); };
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.12"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.13"); };
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.12"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.13"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.12"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.13"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.12"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.13"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.12"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.13"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.12"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.13"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.12"); }; if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.13"); };
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.12"); }; if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.13"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.12"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.13"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.12"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.13");
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.12"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.13");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.12"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.13");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");

View File

@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) { if (strlen($status) > 150) {
$status = substr($status, 0,149); $status = substr($status, 0,149);
} }
$version = "1.4.12"; $version = "1.4.13";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion); $arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else { } else {

View File

@ -19,6 +19,8 @@ class PrintQueue {
private static $CLOSING = 4; private static $CLOSING = 4;
public static $CANCELFOOD = 5; public static $CANCELFOOD = 5;
public static $CANCELDRINK = 6; public static $CANCELDRINK = 6;
public static $FOOD_PRINTSERVER = 0;
public static $DRINK_PRINTSERVER = 1;
function __construct() { function __construct() {
$this->dbutils = new DbUtils(); $this->dbutils = new DbUtils();
@ -178,8 +180,13 @@ class PrintQueue {
$queueid = $aProd["id"]; $queueid = $aProd["id"];
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($idOfWorkJob,$queueid)); $stmt->execute(array($idOfWorkJob,$queueid));
if (isset($aProd["allqueueids"])) {
foreach($aProd["allqueueids"] as $aQueueId) {
$stmt->execute(array($idOfWorkJob,$aQueueId));
}
}
} }
CommonUtils::log($pdo,"QUEUE","Create work job with id=$idOfWorkJob for tableid $table from user $username of kind $kind for printer=$printer"); CommonUtils::log($pdo,"QUEUE","Create work job with id=$idOfWorkJob for tableid $table from user $username of kind $kind for printer=$printer");
} }
@ -661,6 +668,16 @@ class PrintQueue {
$workarray = array(); $workarray = array();
foreach($result as $aWorkJob) { foreach($result as $aWorkJob) {
$aWork = (array) json_decode($aWorkJob["content"]); // is in json format $aWork = (array) json_decode($aWorkJob["content"]); // is in json format
$ps = (array) ($aWork["products"]);
foreach($ps as $p) {
if (isset($p->singleprod)) {
unset($p->singleprod);
}
if (isset($p->allqueueids)) {
unset($p->allqueueids);
}
}
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: collect work receipt with id=" . $aWorkJob["id"] . " for printer=$printer"); CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: collect work receipt with id=" . $aWorkJob["id"] . " for printer=$printer");
$workid = $aWork["workid"]; $workid = $aWork["workid"];
@ -772,11 +789,15 @@ class PrintQueue {
$workid = $aWork["workid"]; $workid = $aWork["workid"];
unset($aWork["workid"]); unset($aWork["workid"]);
$showType = self::$FOOD_PRINTSERVER;
if ($theType == self::$CANCELDRINK) {
$showType = self::$DRINK_PRINTSERVER;
}
$workarray[] = array("workid" => $workid, $workarray[] = array("workid" => $workid,
"id" => $aWorkJob["id"], "id" => $aWorkJob["id"],
"refworkid" => $aWork["refworkid"], "refworkid" => $aWork["refworkid"],
"longname" => $aWork["longname"], "longname" => $aWork["longname"],
"kind" => $theType, "kind" => $showType,
"table" => $aWork["table"], "table" => $aWork["table"],
"time" => $aWork["time"], "time" => $aWork["time"],
"price" => $aWork["price"], "price" => $aWork["price"],

View File

@ -420,11 +420,12 @@ class QueueContent {
} }
} }
if ($groupworkitems) { if ($groupworkitems == 1) {
foreach($jobs as &$aJob) { foreach($jobs as &$aJob) {
$aJob["singleprod"] = $aJob["longname"]; $aJob["singleprod"] = $aJob["longname"];
$cnt = $aJob["count"]; $cnt = $aJob["count"];
$aJob["longname"] = $cnt . "x " . $aJob["longname"]; $aJob["longname"] = $cnt . "x " . $aJob["longname"];
$aJob["allqueueids"] = $queueIds;
} }
} }
@ -564,7 +565,8 @@ class QueueContent {
"extras" => $extras, "extras" => $extras,
"ordertime" => $germanTime, "ordertime" => $germanTime,
"kind" => $kind, "kind" => $kind,
"printer" => $printer "printer" => $printer,
"allqueueids" => $aJob["allqueueids"]
); );
$resultarray[] = $arr; $resultarray[] = $arr;
} }

View File

@ -819,6 +819,9 @@ class Version {
public static function upd_1411_1412($pdo, $prefix, $dbname) { public static function upd_1411_1412($pdo, $prefix, $dbname) {
return array(true); return array(true);
} }
public static function upd_1412_1413($pdo, $prefix, $dbname) {
return array(true);
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
@ -860,7 +863,8 @@ class Version {
"1.4.8" => array("upd_1408_1409","1.4.9"), "1.4.8" => array("upd_1408_1409","1.4.9"),
"1.4.9" => array("upd_1409_1410","1.4.10"), "1.4.9" => array("upd_1409_1410","1.4.10"),
"1.4.10" => array("upd_1410_1411","1.4.11"), "1.4.10" => array("upd_1410_1411","1.4.11"),
"1.4.11" => array("upd_1411_1412","1.4.12") "1.4.11" => array("upd_1411_1412","1.4.12"),
"1.4.12" => array("upd_1412_1413","1.4.13")
); );
// RE;* also for install process no check is required // RE;* also for install process no check is required

View File

@ -49,42 +49,47 @@ class Workreceipts {
$time = $origJob["time"]; $time = $origJob["time"];
$products = $origJob["products"]; $products = $origJob["products"];
foreach ($products as $prod) { $sql = "SELECT productname,productid,price FROM pos_queue WHERE id=?";
$id = $prod["id"]; $res = CommonUtils::fetchSqlAll($pdo, $sql, array($queueid));
if ($id == $queueid) { if (count($res) > 0) {
$kind = $prod["kind"]; $longname = $res[0]["productname"];
$longname = $prod["longname"]; $prodid = $res[0]["productid"];
if (isset($prod["singleprod"])) { $price = $res[0]["price"];
$longname = $prod["singleprod"]; $sql = "select %extras%.name as name,%extras%.id FROM %queueextras%,%extras% WHERE extraid=%extras%.id AND queueid=?";
} $extrares = CommonUtils::fetchSqlAll($pdo, $sql, array($queueid));
$price = $prod["price"]; $extrasArr = array();
$extrasArr = $prod["extras"]; foreach($extrares as $e) {
$extrasStr = implode(",", $extrasArr); $extrasArr[] = $e["name"];
$cancelJob = array(
"workid" => $workid,
"refworkid" => $refworkid,
"table" => $table,
"time" => $time,
"longname" => $longname,
"kind" => $kind,
"price" => $price,
"extras" => $extrasStr);
$cancelJobJson = json_encode($cancelJob);
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
$type = PrintQueue::$CANCELFOOD;
if ($kind == 1) {
$type = PrintQueue::$CANCELDRINK;
}
$stmt->execute(array($cancelJobJson,$type,$printer));
$idOfWorkJob = $pdo->lastInsertId();
CommonUtils::log($pdo,"QUEUE","Create cancel work job with id=$idOfWorkJob for tableid $table of kind $kind for printer=$printer");
} }
$extrasStr = implode(",",$extrasArr);
$sql = "select kind,category from pos_products,pos_prodtype where pos_products.category=pos_prodtype.id AND pos_products.id=?";
$reskind = CommonUtils::fetchSqlAll($pdo, $sql, array($prodid));
$kind = $reskind[0]["kind"];
$cancelJob = array(
"workid" => $workid,
"refworkid" => $refworkid,
"table" => $table,
"time" => $time,
"longname" => $longname,
"kind" => $kind,
"price" => $price,
"extras" => $extrasStr);
$cancelJobJson = json_encode($cancelJob);
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
$type = PrintQueue::$CANCELFOOD;
if ($kind == 1) {
$type = PrintQueue::$CANCELDRINK;
}
$stmt->execute(array($cancelJobJson,$type,$printer));
$idOfWorkJob = $pdo->lastInsertId();
CommonUtils::log($pdo,"QUEUE","Create cancel work job with id=$idOfWorkJob for tableid $table of kind $kind for printer=$printer");
} }
} }
} catch (Exception $ex) { } catch (Exception $ex) {

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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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,8 +4,8 @@
<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.4.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.13">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.12"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.13">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />