OrderSprinter 1.2.22

This commit is contained in:
Geno 2020-11-19 23:01:07 +01:00
parent ba59256a4a
commit 0e8a91ecff
25 changed files with 138 additions and 78 deletions

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.2.21"); Database::setVersion($pdo,$prefix,"1.2.22");
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.2.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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" />

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,8 @@
/** var tminfo = null;
*
*/ function insertTMInfo(jsonTminfo) {
tminfo = jsonTminfo;
}
function Tablemap (roomid,tables,elem) { function Tablemap (roomid,tables,elem) {
this.tables = tables; this.tables = tables;
@ -88,7 +90,10 @@ Tablemap.prototype.binding = function(instance) {
}); });
} }
Tablemap.prototype.createOverlay = function (elem,positions,payTxt,decpoint,currency,tables,ostablebtnsize) { Tablemap.prototype.createOverlay = function (elem,positions,payTxt,decpoint,currency,tables,ostablebtnsize,selectedTableid) {
if (typeof selectedTableid === 'undefined') {
selectedTableid = null;
}
var t = []; var t = [];
var sizeclass = ""; var sizeclass = "";
@ -101,42 +106,54 @@ Tablemap.prototype.createOverlay = function (elem,positions,payTxt,decpoint,curr
} }
for (var i=0;i<positions.length;i++) { for (var i=0;i<positions.length;i++) {
var aPos = positions[i]; var aPos = positions[i];
if (aPos.haspos == 1) { if (aPos.haspos == 1) {
var posOfATable = aPos.pos; var posOfATable = aPos.pos;
var tableId = aPos.id; var tableId = aPos.id;
var tablename = aPos.name; var tablename = aPos.name;
var price = '0.00'; var price = '0.00';
for (j=0;j<tables.length;j++) { for (j=0;j<tables.length;j++) {
if (tables[j].id == tableId) { if (tables[j].id == tableId) {
price = tables[j].pricesum; price = tables[j].pricesum;
break; break;
} }
} }
var left = posOfATable.x; var left = posOfATable.x;
var top =posOfATable.y; //100 / height * posOfATable.y; var top =posOfATable.y; //100 / height * posOfATable.y;
var spanid = "overlay_" + tableId; var spanid = "overlay_" + tableId;
var priceTxt = price.replace(".", decpoint) + " " + currency; var priceTxt = price.replace(".", decpoint) + " " + currency;
var txt = '<span id="' + spanid + '" class="overlaytxt overlayempty ' + sizeclass + '" style="z-index:100;position:absolute;left:' + left + '%;top:' + top + '%;">' + tablename; var selectedCss = '';
if (selectedTableid == tableId) {
selectedCss = ' selectedtable ';
}
var txt = '<span id="' + spanid + '" class="overlaytxt overlayempty ' + selectedCss + sizeclass + '" style="z-index:100;position:absolute;left:' + left + '%;top:' + top + '%;">' + tablename;
if (price != 0.00) { if (price != 0.00) {
txt = '<span id="' + spanid + '" class="overlaytxt overlayfull ' + sizeclass + '" style="z-index:100;position:absolute;left:' + left + '%;top:' + top + '%;">' + tablename; txt = '<span id="' + spanid + '" class="overlaytxt overlayfull ' + selectedCss + sizeclass + '" style="z-index:100;position:absolute;left:' + left + '%;top:' + top + '%;">' + tablename;
if (payTxt != '') { if (payTxt != '') {
txt += '<br>(' + payTxt + ': ' + priceTxt + ')'; txt += '<br>(' + payTxt + ': ' + priceTxt + ')';
} else { } else {
txt += '<br>(' + priceTxt + ')'; txt += '<br>(' + priceTxt + ')';
} }
} }
txt += '</span>'; txt += '</span>';
t[t.length] = txt; t[t.length] = txt;
} }
} }
return t; return t;
} }
Tablemap.prototype.bindingForOverlaySelection = function(fct,roomid,tables) { Tablemap.prototype.bindingForOverlaySelection = function(fct,roomid,tables,fctZoomView) {
$(".overlaytxt").off("click").on("click", function (e) { if (fctZoomView != null) {
$("#tablemapcontent:not(.overlaytxt)").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
fctZoomView();
});
}
$("#tablemapcontent .overlaytxt").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
@ -265,3 +282,16 @@ Tablemap.prototype.imgUploaded = function(text,instance) {
Tablemap.prototype.imgNotUploaded = function(text) { Tablemap.prototype.imgNotUploaded = function(text) {
alert("Bild konnte nicht hochgeladen werden. Ist es zu groß (> 1 MB)? Oder wurde der Dateiname nicht angegeben?"); alert("Bild konnte nicht hochgeladen werden. Ist es zu groß (> 1 MB)? Oder wurde der Dateiname nicht angegeben?");
} }
function shallDisplayRoom(roomid) {
var xyz = tminfo;
if (tminfo == null) {
return {show:false};
}
for (var i=0;i<tminfo.length;i++) {
if (tminfo[i].roomid == roomid) {
return {show:tminfo[i].displaymap == 1 ? true : false,pos:tminfo[i].tablepositions};
}
}
return {show:false};
}

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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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

@ -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.2.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.21"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.22">
<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" />
@ -203,7 +203,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.2.21"},500); setTimeout(function(){document.location.href = "install.html?v=1.2.22"},500);
} }
} }

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.21</button> <button id="updatebtn">Update -> 1.2.22</button>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>

View File

@ -1691,6 +1691,27 @@ return false;
} }
} }
function updateUserTable1221_1222($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.2.21") {
$ret = $this->updateUserTable1220_1221($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.2.20 to 1.2.21 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$this->updateVersion($pdo, '1.2.22');
return true;
} catch (PDOException $e) {
echo "Error in v1.2.21 to 1.2.22: $e";
return false;
}
}
function setVersion($prefix,$theVersion) { function setVersion($prefix,$theVersion) {
$pdo = $this->pdo; $pdo = $this->pdo;
try { try {
@ -1810,7 +1831,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.21')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.22')");
$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')");
@ -2190,7 +2211,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.2.21"; $installerVersion = "1.2.22";
$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']);
@ -2221,7 +2242,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"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.14","1.2.15","1.2.16","1.2.17", "1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
"1.2.18","1.2.19","1.2.20" "1.2.18","1.2.19","1.2.20","1.2.21"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -2229,7 +2250,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1220_1221($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1221_1222($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();

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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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" />

File diff suppressed because one or more lines are too long

View File

@ -956,7 +956,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.2.21"); echo json_encode($view . "?v=1.2.22");
} }
} }
@ -1162,24 +1162,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.21"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.22"); };
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.21"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.22"); };
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.21"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.22"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.21"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.22"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.21"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.22"); };
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.21"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.22"); };
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.21"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.22"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.21"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.22"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.21"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.22"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.21"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.22"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.21"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.22"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.21"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.22"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.21"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.22");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.21"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.22");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1188,7 +1188,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.21", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.22",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,

View File

@ -306,7 +306,7 @@ class Bill {
} }
// now get all products of this bill // now get all products of this bill
$sql = "select productname,price,%pricelevel%.name as pricelevelname,togo,count(%queue%.productname) as count from %queue%,%pricelevel%,%billproducts% where %billproducts%.billid=? AND %billproducts%.queueid=%queue%.id AND %queue%.pricelevel = %pricelevel%.id group by productname,price,pricelevelname,togo"; $sql = "select productname,price,%pricelevel%.name as pricelevelname,togo,count(%queue%.productname) as count,%prodtype%.kind as kind from %queue%,%pricelevel%,%billproducts%,%prodtype%,%products% where %billproducts%.billid=? AND %billproducts%.queueid=%queue%.id AND %queue%.pricelevel = %pricelevel%.id AND %queue%.productid = %products%.id AND %products%.category = %prodtype%.id group by kind, productname,price,pricelevelname,togo";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($billid)); $stmt->execute(array($billid));
$result = $stmt->fetchAll(); $result = $stmt->fetchAll();
@ -375,6 +375,9 @@ class Bill {
$userId = $this->getUserId(); $userId = $this->getUserId();
// now calculate the signature for the bill entry // now calculate the signature for the bill entry
$commonUtils = new CommonUtils(); $commonUtils = new CommonUtils();
if (trim($money) == '') {
$money = '0.00';
}
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $money, $money, 0.0, $userId); $signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $money, $money, 0.0, $userId);
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`reason`,`signature`) VALUES ( ?, ? , ?,?,?, ?, 'c', ?,?,?,?,?)"; $sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`reason`,`signature`) VALUES ( ?, ? , ?,?,?, ?, 'c', ?,?,?,?,?)";

View File

@ -1229,16 +1229,17 @@ class QueueContent {
function getJsonProductsOfTableToPay($tableid) { function getJsonProductsOfTableToPay($tableid) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo, ordertime $sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo, ordertime
FROM %queue% FROM %queue%
INNER JOIN %products% ON %queue%.productid = %products%.id INNER JOIN %products% ON %queue%.productid = %products%.id
INNER JOIN %pricelevel% ON %queue%.pricelevel = %pricelevel%.id "; INNER JOIN %pricelevel% ON %queue%.pricelevel = %pricelevel%.id
INNER JOIN %prodtype% ON %products%.category = %prodtype%.id ";
if ($tableid == 0) { if ($tableid == 0) {
$sql .= "WHERE tablenr is null "; $sql .= "WHERE tablenr is null ";
} else { } else {
$sql .= "WHERE tablenr = $tableid "; $sql .= "WHERE tablenr = $tableid ";
} }
$sql .= "AND paidtime is null AND toremove <> '1' AND ordertime is not null AND isclosed is null ORDER BY ordertime, id;"; $sql .= "AND paidtime is null AND toremove <> '1' AND ordertime is not null AND isclosed is null ORDER BY kind,ordertime, id;";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(); $stmt->execute();

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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.22">
<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" />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long