OrderSprinter 1.3.2

This commit is contained in:
Geno 2020-11-19 23:02:16 +01:00
parent 127558265b
commit 803f8d00de
33 changed files with 264 additions and 332 deletions

View File

@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.3.1");
Database::setVersion($pdo,$prefix,"1.3.2");
Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -105,13 +105,13 @@ function initializeEverything() {
<div data-role="page" id="bar-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
<h1>Bar <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="allpagecontent">

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -460,13 +460,13 @@ $(document).on("pageinit", "#bill-page", function () {
<div data-role="page" id="bill-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b">Module</li>
<li data-role="list-divider" data-theme="b">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="billtitletxt">Kassenbons</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
</div>
</div>
<div data-role="content">

View File

@ -1 +1 @@
.productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;width:100px;height:100px;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}.prodToMoveEl{padding:8px 16px;border-bottom:1px solid #ddd;height:40px;font-size:16px;font-weight:bold}.proditemselected{background-color:#0f0}.proditemunselected{background-color:#eee}
.productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}.osprod-desk-0{width:100px;height:40px}.osprod-desk-1{width:100px;height:100px}.osprod-desk-2{width:120px;height:130px}.prodToMoveEl{padding:8px 16px;border-bottom:1px solid #ddd;height:40px;font-size:16px;font-weight:bold}.proditemselected{background-color:#0f0}.proditemunselected{background-color:#eee}

View File

@ -1 +1 @@
.roompanel{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background-color:lightgrey;width:100%;-webkit-align-items:stretch;align-items:stretch}.roomitem{background-color:#fff6b5;height:60px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid #aaa;-webkit-flex:1;flex:10;box-shadow:10px 10px 5px #888;word-wrap:break-word}.roomitemselected{background-color:#eee6b5;height:65px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid red;-webkit-flex:1;flex:15;box-shadow:10px 10px 5px #888}.roomtogo{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row wrap;flex-flow:row wrap}.roomname{width:100%}.roomtogoaccounted{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.roomchangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#dd0;height:40px;font-size:16px;font-weight:bold}
.roompanel{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background-color:lightgrey;width:100%;-webkit-align-items:stretch;align-items:stretch}.roomitem{background-color:#fff6b5;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid #aaa;-webkit-flex:1;flex:10;box-shadow:10px 10px 5px #888;word-wrap:break-word}.roomitemselected{background-color:#eee6b5;height:65px;padding:10px;color:black;font-weight:bold;text-align:center;border:2px solid red;-webkit-flex:1;flex:15;box-shadow:10px 10px 5px #888}.roomtogo{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row wrap;flex-flow:row wrap}.osroom-desk-0{height:40px}.osroom-desk-1{height:60px}.osroom-desk-2{height:80px}.osroom-desk-sel-0{height:45px}.osroom-desk-sel-1{height:65px}.osroom-desk-sel-2{height:85px}.roomname{width:100%}.roomtogoaccounted{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.roomchangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#dd0;height:40px;font-size:16px;font-weight:bold}

View File

@ -1 +1 @@
.tablepanel{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.tablepanel>*{padding:10px;-webkit-flex-wrap:wrap;flex-flow:wrap}.tablepanelcontent{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;-webkit-justify-content:center;justify-content:center}.tablepanelheader{background:black;flex:100%}.tableelement{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;width:100px;height:40px;padding:5px;box-shadow:10px 10px 5px #888}.tableelement>*{flex:1 100%}.tableitem{background-color:LightGreen;color:black;margin:5px;border-radius:15px;border:2px solid #73ad21;font-weight:bold;text-align:center}.tableitemselected{background-color:LightGreen;color:black;border-radius:15px;border:4px solid red;font-weight:bold;text-align:center}.tablename{order:1;padding:0;width:100%}.tableopen{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.tableready{background:white;color:black;-webkit-flex:1;flex:1;order:3}.tablechangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#ff0;height:40px;font-size:16px;font-weight:bold}
.tablepanel{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.tablepanel>*{padding:10px;-webkit-flex-wrap:wrap;flex-flow:wrap}.tablepanelcontent{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;-webkit-justify-content:center;justify-content:center}.tablepanelheader{background:black;flex:100%}.tableelement{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;font-weight:bold;text-align:center;width:100px;padding:5px;box-shadow:10px 10px 5px #888}.tableelement>*{flex:1 100%}.tableitem{background-color:LightGreen;color:black;margin:5px;border-radius:15px;border:2px solid #73ad21;font-weight:bold;text-align:center}.tableitemselected{background-color:LightGreen;color:black;border-radius:15px;border:4px solid red;font-weight:bold;text-align:center}.ostable-desk-0{height:30px}.ostable-desk-1{height:50px}.ostable-desk-2{height:70px}.tablename{order:1;padding:0;width:100%}.tableopen{background:white;color:black;-webkit-flex:1;flex:1;order:2;font-weight:normal}.tableready{background:white;color:black;-webkit-flex:1;flex:1;order:3}.tablechangeitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#ff0;height:40px;font-size:16px;font-weight:bold}

View File

@ -114,13 +114,13 @@ $(document).on("pageinit", "#info-page", function () {
<div data-role="page" id="info-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="reportttitletxt">Gäste</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="content">

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -216,13 +216,13 @@ $(document).on("pageinit", "#feedback-page", function () {
<div data-role="page" id="feedback-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed">
<h1>Feedback</h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="allpagecontent">

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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") {
useInstallation();
} else {
setTimeout(function(){document.location.href = "install.html?v=1.3.1"},500);
setTimeout(function(){document.location.href = "install.html?v=1.3.2"},500);
}
}
@ -224,13 +224,13 @@ $(document).on("pageinit", "#index-page", function () {
<div data-role="page" id="index-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1>OrderSprinter <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>

View File

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

View File

@ -1799,7 +1799,6 @@ $sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('cancelguestcode',''));
$this->updateVersion($pdo, '1.3.1');
return true;
} catch (PDOException $e) {
@ -1808,6 +1807,31 @@ return false;
}
}
function updateUserTable1301_1302($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.3.1") {
$ret = $this->updateUserTable1300_1301($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.3.0 to 1.3.1 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('returntoorder','1'));
$this->updateVersion($pdo, '1.3.2');
return true;
} catch (PDOException $e) {
echo "Error in v1.3.1 to 1.3.2: $e";
return false;
}
}
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
@ -1934,7 +1958,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.2')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
@ -1978,6 +2002,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'hs3refresh', '60')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'memorylimit', '256')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'restaurantmode', '1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'returntoorder', '1')");
// prepare for later inconsistency check if version is obsolete
date_default_timezone_set($timezone);
@ -2315,7 +2340,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
$installerVersion = "1.3.1";
$installerVersion = "1.3.2";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@ -2346,7 +2371,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.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0"
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1"
);
if (!in_array($version, $supportedVersions)) {
@ -2354,7 +2379,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1300_1301($_POST['prefix'], $version, $_POST['db']);
$ret = $admin->updateUserTable1301_1302($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -107,13 +107,13 @@ function initializeEverything() {
<div data-role="page" id="kitchen-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
<h1><span id="moduleheadline">Küche</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="allpagecontent">

View File

@ -4,7 +4,6 @@ var KB_TO_MAKE = ["Herzustellen","To prepare","Para preparar"];
var KB_TO_FINISHED = ["Fertig","Ready to serve","Completo"];
var KB_TABLE = ["Tisch","Table","Mesa"];
// user has rights (default: no)
var isInitialized = false;
var displayWorkToDo = false;
@ -15,7 +14,6 @@ var cookedEntries = null;
var entriesToCook = null;
var user = "";
// increase performance by calling AJAX a bit later as a thread
function declareProductBeCookingOrCooked(queueid,action) {
window.setTimeout(function(){declareProductBeCookingOrCooked_orig(queueid,action)},100);
}
@ -48,14 +46,12 @@ function removeOrRedeclareAnIdFromPrepared(theId,doRemove) {
var aList = table.queueitems;
var tablename = table.table;
// now remove this from the list or change entry!
var i=0;
var found = false;
for (i=0;i<aList.length;i++) {
var anEntry = aList[i];
if (anEntry.id == theId) {
// then delete it
found = true;
var longname = anEntry.longname;
var option = anEntry.option;
@ -66,7 +62,6 @@ function removeOrRedeclareAnIdFromPrepared(theId,doRemove) {
if (found) {
if (doRemove) {
aList.splice(i,1);
// add to list above
var newEntry = {
id: theId,
tablename: tablename,
@ -110,7 +105,6 @@ function bindEntriesToCook() {
bindEntriesToCook();
});
$(".preparedlistitem").off("click").on("click", function (e) {
// first get all the ids:
var idlist = this.id;
var idarr = idlist.split("_");
var firstid = idarr[0]; // this is the id to handle!
@ -178,7 +172,6 @@ function listOfTable(table) {
var grouped = groupItemToMake(qset);
// now format these entries
var aList = '<ul data-role="listview" id="' + tableid + '" data-divider-theme="a" data-inset="true">';
aList += '<li data-role="list-divider" data-theme="c" data-role="heading">' + tablename + ' (' + KB_MAX_WAIT[lang] + maxWaitTime + ' min)</li>';
@ -297,7 +290,6 @@ function fillTableWithCookedEntriesCore() {
} else {
// remove also headline of list, if list is empty
$("#listWithCookedEntries").html("");
}
}
@ -346,7 +338,6 @@ function insertGeneralConfigItems(configResult) {
getAndDisplayAllEntries();
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
//alert("Fehler beim Aufruf der Seite: " + configResult.msg);
}
}
@ -363,7 +354,6 @@ function setWorkMode(urlsuffix) {
*/
function setHeadlines() {
if (!displayHeaderFooter) {
// then replace by individual footer (embedded in iframe)
if (displayWorkToDo) {
$("#moduleheadline").html(KB_TO_MAKE[lang]);
} else if (displayFinished) {
@ -403,14 +393,11 @@ function groupMadeItems(theSet) {
var joinedNeedle = name + "-" + option + "-" + "-" + table + "_" + extras;
var index = grouped.joinedvals.indexOf(joinedNeedle);
if (index >= 0) {
// element is already in group
grouped.counts[index] = grouped.counts[index] + 1;
var queueidsarr = grouped.queueids[index];
// append the current queueid
queueidsarr[queueidsarr.length] = queueid;
grouped.queueids[index] = queueidsarr;
} else {
// new element to be inserted in grouped
var gLength = grouped.counts.length;
grouped.counts[gLength] = 1;
grouped.joinedvals[gLength] = joinedNeedle;
@ -453,14 +440,11 @@ function groupItemToMake(theSet) {
var joinedNeedle = name + "-" + option + "-" + waiticon + "-" + cooking;
var index = grouped.joinedvals.indexOf(joinedNeedle);
if (index >= 0) {
// element is already in group
grouped.counts[index] = grouped.counts[index] + 1;
var queueidsarr = grouped.queueids[index];
// append the current queueid
queueidsarr[queueidsarr.length] = queueid;
grouped.queueids[index] = queueidsarr;
} else {
// new element to be inserted in grouped
var gLength = grouped.counts.length;
grouped.counts[gLength] = 1;
grouped.joinedvals[gLength] = joinedNeedle;

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -129,7 +129,7 @@ var MAN_MAX_NO_OF_TABLES = ["Max. Anzahl Tische pro Raum: ","Max. number of tabl
var MAN_CHANGE_ROOM_SIZE = ["Raumgröße ändern","Change room size","Cambiar dimensión de espacio"];
var MAN_ROOM_LABEL = ["Räume","Rooms","Espacios"];
var MAN_TABLE_LABEL = ["Tische","Tables","Mesas"];
var MAN_TABLE_TXT = ["Tisch","Table","Mesa"];
var MAN_LANG_OF_RECEIPT = ["Bonsprache","Receipt language","Idioma de tique"];
var MAN_PRINT_CONCEPT = ["Druckkonzept","Print concept","Concepto de impresión"];
var MAN_PAYMENT_CONFIG = ["Menü Zahlungsweg","Menu Payment Type","Selección tipo de pagar"];
@ -156,6 +156,9 @@ var MAN_PRINT_AND_QUEUE_HINT = ["Wird dieser Wert auf 'ja' gesetzt, so werden di
var MAN_CASH_HINT = ["Die Kassen kann mit dieser Einstellung übergangen werden (Einstellung: nein). Jede Bestellung wird dann sofort mit der Übermittlung an den Server als als bar bezahlt deklariert.",
"The cash function can be skipped ('no'). In this case every order will be declared as paid by cash automatically.",
"Si configurado a 'no', cada ordern va a ser declarada pagada."];
var MAN_RETURN_TO_ORDER_HINT = ["Wird der Wert auf 'ja' gesetzt, so wechselt die Desktopansicht automatisch wieder in den Bestellmodus über, nachdem ein ausgewählter Tisch komplett abgerechnet oder im Kassenmodus auf einen leeren Tisch geklickt wurde.",
"If this value is set to 'true' the mode of the desktop view automatically returns to the ordering after all products of the selected table are marked paid or an empty table was selected.",
"Si es 'si' el modus vuelve a ordenar despues de declarar todos los productos de la mesa estado pagado o si el usario ha seleccionado una mesa vacia."];
var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese Einstellung, ob bei Druck auf den Button 'Kasse' Arbeitsbons gedruckt werden sollen.",
"In the 'only work receipts' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view work receipts shall be printed.",
"En el modus 'solo tiques de trabajar' este boton especifica se debe imprimido el tique de trabajar despues el click en el boton 'caja' en la vista de camarero."];
@ -311,8 +314,10 @@ var MAN_CONFIRM_GO_LIVE = ["Die Umsatz- und Logdaten wurden gelöscht und nur di
"La configuración esta re-creado. Entonces es necesario registrar de nuevo."];
var MAN_GENSECTION_TXT = ["Allgemeine Einstellungen:","General settings:","Configuración general:"];
var MAN_MOBILSECTION_TXT = ["Einstellungen für die Mobilansicht:","Settings for the mobil view:","Configuración para la vista mobil:"];
var MAN_DESKTOP_SECTION_TXT = ["Einstellungen für die Desktop-Ansicht:","Settings for the desktop view","Configuración para la vista de PC"];
var MAN_PRINT_AND_QUEUE = ["Drucke Jobs und zeige sie auch in der Küchen-/Baransicht an","Print jobs and show them also in the kitchen/bar view","Imprimir orders y también inserta en la vista de cocina/bar"];
var MAN_CASH = ["Kassenfunktion aktiviert","Enabled cash function","Caja activada"];
var MAN_RETURNTOORDER = ["Rücksprung Bestellung","Go back to order","Volver a ordenar"];
var MAN_BEEP_COOKED = ["Signalton, wenn neues Produkt serviert werden kann (experimentell)","Audio signal if new product can be served (experimental)","Señal audio si un producto nuevo esta cocinado"];
var MAN_RESTAURANT_MODE = ["Restaurantmodus","Restaurant mode","Usar para restaurantes"];
var MAN_REST_MODE_HINT = ["Hinweis: Wird der Restaurantmodus auf <i>Nein</i> gesetzt, wird in der <b>Desktopansicht</b> die Tischauswahl deaktiviert. Alle Produkte werden als Außer-Haus-Verkauf gebucht.","Hint: If the restautant mode is set to <i>no</i> in the <b>desktop view</b> the table selection is deactivated and all products are ordered as <i>to-go</i>","Nota: Si el modus del restaurante es configurado a <i>no</i> en la vista de <b>Desktop</b> la selección de las mesas es deactivada y todos los productos son ordenados como <i>to-go</i>"];
@ -323,9 +328,11 @@ var MAN_HOTELINTERFACE = ["Anbindung Hotelsoftware","Interface hotel software","
var MAN_HSINFILE = ["HS/3 Datei HS3CASH.IN","HS/3 file HS3CASH.IN","HS/3 file HS3CASH.IN"];
var MAN_HSOUTFILE = ["HS/3 Datei HS3CASH.OUT","HS/3 file HS3CASH.OUT","HS/3 file HS3CASH.OUT"];
var MAN_HSCURRENCY = ["HS/3 Währungsangabe","HS/3 Currency","HS/3 Moneda"];
var MAN_DEL_HINT = ["Zum Löschen anklicken","Click to delete","Click para removar"];
var MAN_FONTSIZE_HINT = ["Die Schriftgröße hat nur Einfluss, wenn kein eigenes Layout festgelegt wurde.","The font size only effects receipts if they do not use a specified layout.","El valor sólo funciona si no se usa un layout individual."];
var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1];
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1];
var numberOfClosings = 0;
@ -366,6 +373,7 @@ var generalValuesSettings = [
["cashenabled",MAN_CASH[lang],"s",20],
["beepcooked",MAN_BEEP_COOKED[lang],"s",21],
["restaurantmode",MAN_RESTAURANT_MODE[lang],"s",23],
["returntoorder",MAN_CASH[lang],"s",24],
["addreceipttoprinter",MAN_ADD_RECPRINTER[lang],"s",16],
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
@ -374,14 +382,12 @@ var generalValuesSettings = [
["remoteaccesscode",MAN_REMOTE_ACCESS[lang],"i",0,""],
["cancelunpaidcode",MAN_CANCEL_UNPAID_CODE[lang],"i",0,""],
["cancelguestcode",MAN_CANCEL_GUEST_CODE[lang],"i",0,""],
// REM SMTP settings
["smtphost",MAN_SMTPHOST[lang],"i",0,""],
["smtpauth",MAN_SMTPAUTH[lang],"s",5],
["smtpuser",MAN_SMTPUSER[lang],"i",0,""],
["smtppass",MAN_SMTPPASS[lang],"i",0,""],
["smtpsecure",MAN_SMTPSECURE[lang],"s",6],
["smtpport",MAN_SMTPPORT[lang],"i",0,""],
// // REM Web setting
["webimpressum",MAN_WEBIMPRESSUM[lang],"i",0,""],
["paydeskid",MAN_PAYDESKID[lang],"i",0,""],
@ -505,14 +511,17 @@ function setLanguage(l) {
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
$("#generalsectiontxt").html(MAN_GENSECTION_TXT[l]);
$("#mobilviewsectiontxt").html(MAN_MOBILSECTION_TXT[l]);
$("#desktopviewsectiontxt").html(MAN_DESKTOP_SECTION_TXT[l]);
$("#specialsettingssectiontxt").html(MAN_SPECIAL_SETTINGS_TXT[l]);
$("#printandqueuehint").html(MAN_PRINT_AND_QUEUE_HINT[l]);
$("#cashhint").html(MAN_CASH_HINT[l]);
$("#returntoorderhint").html(MAN_RETURN_TO_ORDER_HINT[l]);
$("#hsinfiletxt").html(MAN_HSINFILE[l]);
$("#hsoutfiletxt").html(MAN_HSOUTFILE[l]);
$("#hscurrencytxt").html(MAN_HSCURRENCY[l]);
$("#restmodehint").html(MAN_REST_MODE_HINT[l]);
$("#workfontsizehint").html(MAN_FONTSIZE_HINT[l]);
}
function createMonthSelection(label) {
@ -616,6 +625,7 @@ function insertGeneralConfigItems(configResult) {
$("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork));
$("#partOfPrintAndQueueJobs").html(createPrintAndQueueJobs(values.printandqueuejobs));
$("#partOfCash").html(createCash(values.cashenabled));
$("#partOfReturntoorder").html(createReturntoorder(values.returntoorder));
$("#partOfBeepCooked").html(createBeepCooked(values.beepcooked));
$("#partOfRestaurantmode").html(createRestaurantmode(values.restaurantmode));
@ -666,6 +676,7 @@ function insertGeneralConfigItems(configResult) {
generalVals[21] = values.beepcooked;
generalVals[22] = values.hotelinterface;
generalVals[23] = values.restaurantmode;
generalVals[24] = values.returntoorder;
$("#smtphost").val(values.smtphost);
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
@ -818,6 +829,9 @@ function createPrintAndQueueJobs(theValue) {
function createCash(theValue) {
return createYesNo("cashenabled",MAN_CASH, theValue);
}
function createReturntoorder(theValue) {
return createYesNo("returntoorder",MAN_RETURNTOORDER, theValue);
}
function createBeepCooked(theValue) {
return createYesNo("beepcooked",MAN_BEEP_COOKED, theValue);
}
@ -1180,7 +1194,6 @@ function binding() {
$( "#nochangeddata" ).popup( "open", {transition: 'flip'} );
} else {
areYouSure(MAN_CHANGE_CONFIG_HEAD[lang], MAN_CHANGE_CONFIG_CONTENT[lang] + changeInfoText, MAN_YES[lang], function() {
// test for validity
var isValid = true;
for (i=0;i<changedEntries.length;i++) {
var anEntryToChange = changedEntries[i];
@ -1195,13 +1208,11 @@ function binding() {
}
}
if (needsCheck == 1) {
// test for empty string
if (theVal.trim() == "") {
isValid = false;
alert(anEntryToChange.checkTxt);
}
} else if (needsCheck == 2) {
// test for double value
anEntryToChange.value = theVal.replace(",",".");
if (!isNumeric(theVal.replace(",","."))) {
isValid = false;
@ -1339,11 +1350,13 @@ function binding() {
$("#updateprintqueue").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
getSpooledPrintJobs();
});
$("#clearprintqueue").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=printqueue&command=clearprintjobs",null,insertPrintQueue,null);
});
@ -1378,6 +1391,10 @@ function binding() {
bindSelectionsWithActions();
}
function getSpooledPrintJobs() {
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
}
function bindSelectionsWithActions() {
$("#austria").off("change").on("change", function (e) {
e.stopImmediatePropagation();
@ -1435,7 +1452,6 @@ function setVisibilityDueToWorkflow() {
} else {
$("#partIfDigiWorkflow").hide();
}
// REM: 2: Only digital
if (workflowBox == 2) {
$("#partIfWorkReceiptsWorkflow").show();
} else {
@ -1478,7 +1494,6 @@ function confirmMsg (result) {
}
function handleDelLogo() {
// force reload of image
d = new Date();
$("#logoimgpart").attr("src", "php/contenthandler.php?module=printqueue&command=getLogoAsPng&"+d.getTime());
}
@ -1556,7 +1571,6 @@ function doPrintClosingSummary(closingdata) {
html += "<table><tr><th>Summe<th>Netto<th>Zahl.weg<th>Status</tr>";
var i=0;
for (i=0;i<overview.length;i++) {
// sum | tax | name | status
var entry = overview[i];
var sum=parseFloat(entry.sum).toFixed(2).replace(".", decpoint);
var tax=parseFloat(entry.netto).toFixed(2).replace(".", decpoint);
@ -1573,7 +1587,6 @@ function doPrintClosingSummary(closingdata) {
}
html += "</table><br><br>Nach Produkten:<br>";
// count | productname | price | tax | sumprice |
html += "<table><tr><th>Anzahl<th>Prod.<th>Preis<th>Steuer<th>Summe</tr>";
for (i=0;i<details.length;i++) {
var entry = details[i];
@ -1841,7 +1854,6 @@ function fillUserListIntoGui(userinfo) {
$("#userlist").html(userPart);
$('#userpart').trigger('create');
// now set the data for each user to the buttons - that makes life easier... :)
$.each(userinfo, function (i, aUser) {
var userid = aUser.id;
var deleteButtonElem = $("#userlist").find("#userid_" + userid).find(".userDeleteButton");
@ -1852,7 +1864,6 @@ function fillUserListIntoGui(userinfo) {
passwdButtonElem.data("userid",userid);
});
// now put the bindings to the user actions that are all (incl the NewUser part) dynamic
dynamicUserBinding();
}
@ -1988,7 +1999,6 @@ function handleDelUser(result) {
}
}
// only a wrapper to remove argument
function askAndFillUserListNoData(data) {
if (data == "noadmin") {
alert (MAN_NO_ADMIN[lang]);
@ -2079,7 +2089,6 @@ function createClosingPart (aText,id,totalsum,cashsum,usersums,taxessums,cashops
closingPart += '<button type="submit" data-theme="f" class="csvExportAllButton" data-icon="check" id="csvallexport_' + id + '">' + MAN_CSV_EXP_ALL[lang] + '</button>';
// email buttons
var receiverEmail = $("#receiveremail").val();
closingPart += '<fieldset class="ui-grid-a" id="emailfieldset' + id + '">';
closingPart += '<div class="ui-block-a">';
@ -2136,9 +2145,6 @@ function setMonthYearSelection() {
$("#select-year-export-end").selectmenu("refresh", true);
}
//
// Functions for room plans
//
function tablelist(no,rowId) {
var i=0;
@ -2287,7 +2293,6 @@ function roomfield_apply() {
n = parseInt(n);
m = parseInt(m);
if ((n>0) && (n<30) && (m>0) && (m<30)) {
// collect data now!
var room_index, table_index, r_id, t_id;
var rooms = [];
for (room_index = 0; room_index < n; room_index++) {
@ -2318,13 +2323,54 @@ function roomfield_apply() {
rooms.push(roominfo);
}
}
// setRoomInfo
doAjax("POST","php/contenthandler.php?module=roomtables&command=setRoomInfo",{rooms:rooms},askForCurrentRoomField,"Raumplan nicht änderbar");
}
} catch(e) {}
}
function createSpooledPrintJobButton(id,text) {
var txt = '<button type="submit" data-theme="d" class="spooledprintjob" data-icon="delete" id="' + id + '">' + text + '</button>';
return txt;
}
function createSpooledRecPrintButtons(jobs) {
var currency = $("#admin-page").data("currency");
var decpoint = $("#admin-page").data("decpoint");
txt = '';
for (var i=0;i<jobs.length;i++) {
var aJob = jobs[i];
//txt += createPrintJobButton('spooledJob_' + aJob.id,MAN_TABLE_TXT[lang] + ": " + aJob.tablename + (aJob.id + ": " + aJob.billdate + " - " + aJob.brutto.replace(".", decpoint)));
txt += createSpooledPrintJobButton('spooledJob_' + aJob.id,MAN_TABLE_TXT[lang] + ": " + aJob.tablename + " (" + aJob.billid + ": " + aJob.billdate + " " + aJob.brutto.replace('.',decpoint) + " " + currency + ")");
}
if (jobs.length > 0) {
txt += "<i>(" + MAN_DEL_HINT[lang] + ")</i>";
}
return txt;
}
function createSpooledWorkPrintButtons(jobs) {
txt = '';
for (var i=0;i<jobs.length;i++) {
var aJob = jobs[i];
//txt += createPrintJobButton('spooledJob_' + aJob.id,MAN_TABLE_TXT[lang] + ": " + aJob.tablename + (aJob.id + ": " + aJob.billdate + " - " + aJob.brutto.replace(".", decpoint)));
txt += createSpooledPrintJobButton('spooledJob_' + aJob.id,aJob.content.table);
}
if (jobs.length > 0) {
txt += "<i>(" + MAN_DEL_HINT[lang] + ")</i>";
}
return txt;
}
function bindSpooledPrintJob() {
$(".spooledprintjob").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var id = this.id.split("_")[1];
doAjax("POST","php/contenthandler.php?module=printqueue&command=deleteSpooledPrintJob",{id:id},getSpooledPrintJobs,"Problem Printjob löschen");
});
}
function insertPrintQueue(queue) {
if (queue.status == "OK") {
var jobs = queue.msg;
@ -2332,7 +2378,7 @@ function insertPrintQueue(queue) {
for (var i=0;i<jobs.length;i++) {
var printer = parseInt(jobs[i].printer);
var number = jobs[i].jobs;
var number = jobs[i].count;
var printertxt = MAN_PRINTER[lang] + " #" + printer;
if (printer == 7) {
@ -2343,12 +2389,19 @@ function insertPrintQueue(queue) {
li += '<ul id="printqueue_' + i + '" data-role="listview" data-divider-theme="a" data-inset="true">';
li += '<li data-role="list-divider" data-theme="b" data-role="heading">' + printertxt + '</li>';
li += '<li data-role="list-divider" data-theme="d" data-role="heading">' + number + " " + MAN_PRINT_JOBS_COUNT[lang] + '</li>';
li += '<li data-role="list-divider" data-theme="a">' + number + " " + MAN_PRINT_JOBS_COUNT[lang];
if (printer < 7) {
li += createSpooledRecPrintButtons(jobs[i].jobs);
} else {
li += createSpooledWorkPrintButtons(jobs[i].jobs);
}
li += '</li>';
li += '</ul>';
}
$("#printjobsarea").html(li);
$("#printjobsarea").trigger("create");
bindSpooledPrintJob();
}
}
@ -2376,7 +2429,7 @@ $(document).on("pageinit", "#admin-page", function () {
$("#userfile").val('');
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
getSpooledPrintJobs();
});
@ -2385,14 +2438,14 @@ $(document).on("pageinit", "#admin-page", function () {
<div data-role="page" id="admin-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay" class="noprint">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
<h1>Administration <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="allpagecontent">
@ -2624,7 +2677,10 @@ $(document).on("pageinit", "#admin-page", function () {
</div>
<div id="partOfOneprodworkreceipts"></div>
<div>
<div id="partOfBigFontWorkReceipt"></div>
<i id=workfontsizehint style="padding-left: 50px;padding-right: 50px;">Hinweis: Nicht für eigene Layouts</i>
</div>
<div id="partOfGroupWorkItems"></div>
<div id="partOfDiscount1"></div>
@ -2698,6 +2754,13 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfProminentSearch"></div>
<br><b><u><span id="desktopviewsectiontxt">DESKTOPANSICHT</span></u></b><br><br>
<div>
<div id="partOfReturntoorder"></div>
<i id=returntoorderhint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<br><b><u><span id="specialsettingssectiontxt">Spezialeinstellungen</span></u></b><br><br>
<div>

File diff suppressed because one or more lines are too long

View File

@ -287,7 +287,6 @@ class Admin {
echo json_encode("Yes");
}
} else {
// not defined -> it must be version 1.0.3 or lower --> since this is file of 1.0.4: not installed...
echo json_encode("No");
}
}
@ -349,7 +348,6 @@ class Admin {
session_start();
}
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
echo json_encode("NO");
} else {
echo json_encode("YES");
@ -378,7 +376,6 @@ class Admin {
}
}
// for the login mask - if user is authenticated then the first page works different
function tryAuthenticate($userid,$password,$modus,$day,$month,$year,$hour,$minute,$unixtime) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
@ -430,7 +427,6 @@ class Admin {
$_SESSION['angemeldet'] = true;
// now read the rights of the user
$_SESSION['userid'] = $zeile['id'];
$_SESSION['currentuser'] = $username;
@ -721,7 +717,7 @@ class Admin {
return;
}
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'","'cashenabled'","'restaurantmode'"));
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'"));
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
@ -813,6 +809,7 @@ class Admin {
$addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter","");
$printandqueuejobs = CommonUtils::getConfigValue($pdo,"printandqueuejobs",0);
$cashenabled = CommonUtils::getConfigValue($pdo,"cashenabled",1);
$returntoorder = CommonUtils::getConfigValue($pdo,"returntoorder",1);
$beepcooked = CommonUtils::getConfigValue($pdo,"beepcooked",0);
$restaurantmode = CommonUtils::getConfigValue($pdo,"restaurantmode",1);
@ -868,7 +865,7 @@ class Admin {
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts,
"digiprintwork" => $digiprintwork, "memorylimit" => $memorylimit, "hs3refresh" => $hs3refresh,
"paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "addreceipttoprinter" => $addreceipttoprinter,
"printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode
"printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "returntoorder" => $returntoorder, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode
);
if ($forHtml) {
@ -897,7 +894,6 @@ class Admin {
$right_rating = $_SESSION['right_rating'];
if (self::isOnlyRatingUser($rights, $right_rating, true)) {
// rating user always goes into that view - important setting after creation of user
echo json_encode("rating.html");
return;
}
@ -928,7 +924,6 @@ class Admin {
}
}
// test if user has still the right to go into that view
$mapping = array (
"waiter.html" => 'right_waiter',
"kitchen.html" => 'right_kitchen',
@ -946,7 +941,6 @@ class Admin {
$valid = false;
if (($view == 'preferences.html') || ($view == 'feedback.html')) {
// always ok
$valid = true;
} else if ($view == 'manager.html') {
if (($_SESSION['is_admin'] == 1) || ($_SESSION['right_manager'] == 1) || ($_SESSION['right_closing'] == 1)) {
@ -961,11 +955,10 @@ class Admin {
$view = "preferences.html";
}
echo json_encode($view . "?v=1.3.1");
echo json_encode($view . "?v=1.3.2");
}
}
// for client request
function isLoggedinUserAdmin() {
if ($this->isCurrentUserAdmin()) {
echo json_encode(YES);
@ -1028,14 +1021,12 @@ class Admin {
session_start();
}
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
return false;
} else {
return ($_SESSION[$whichRight]);
}
}
// for internal request
function isCurrentUserAdmin() {
return $this->hasCurrentUserRight('is_admin');
}
@ -1101,7 +1092,6 @@ class Admin {
private function fillSampleContent()
{
$pdo = DbUtils::openDbAndReturnPdoStatic();
// first remove previous content, then fill the SQL file
$sql = "DELETE FROM `%queue%`";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
@ -1139,7 +1129,6 @@ class Admin {
$waiterMessage = "";
$loggedIn = true;
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
$mainMenu[] = array("name" => "Startseite", "link" => "index.html");
$loggedIn = false;
} else {
@ -1168,25 +1157,25 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.1"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.2"); };
} else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.1"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.2"); };
}
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.1"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.1"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.1"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.2"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.2"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.2"); };
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.1"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.2"); };
}
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.1"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.1"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.1"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.1"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.1"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.1"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.1"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.1");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.1");
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.2"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.2"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.2"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.2"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.2"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.2"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.2"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.2");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.2");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1194,8 +1183,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
// CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.1",
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.2",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@ -1289,7 +1277,6 @@ class Admin {
echo json_encode(array("status" => "ERROR", "code" => ERROR_NAME_EXISTS_ALREADY, "msg" => ERROR_NAME_EXISTS_ALREADY_MSG));
return;
} else {
// create the new user
if(session_id() == '') {
session_start();
@ -1300,7 +1287,6 @@ class Admin {
echo json_encode(array("status" => "ERROR", "code" => ERROR_COMMAND_NOT_ADMIN, "msg" => ERROR_COMMAND_NOT_ADMIN_MSG));
return;
} else {
// instead if password_hash (PHP > 5.5) use MD5...
$password_hash = md5($password);
$keys = array('id','userpassword','language');
@ -1331,7 +1317,6 @@ class Admin {
}
}
// now this has to be logged in the history tables...
HistFiller::createUserInHist($pdo,$lastId);
}
@ -1473,6 +1458,7 @@ class Admin {
"cancelguestcode" => array("dbcol" => "cancelguestcode","checknum" => 0),
"printandqueuejobs" => array("dbcol" => "printandqueuejobs","checknum" => 0),
"cashenabled" => array("dbcol" => "cashenabled","checknum" => 0),
"returntoorder" => array("dbcol" => "returntoorder","checknum" => 0),
"beepcooked" => array("dbcol" => "beepcooked","checknum" => 0),
"restaurantmode" => array("dbcol" => "restaurantmode","checknum" => 0),
"smtphost" => array("dbcol" => "smtphost","checknum" => 0),
@ -1495,7 +1481,6 @@ class Admin {
$aVal = $aChangeSet['value'];
if ($name == "payprinttype") {
// special care: 1->l 2->s
if (((string)$aVal) == "1") {
$aVal = "l";
}
@ -1567,7 +1552,6 @@ class Admin {
}
function changeOneConfigDbItem($pdo,$theItem,$theValue,$table,$doHist) {
// is the value already there, or has it to be created?
$sql = "SELECT setting from $table WHERE name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -1585,7 +1569,6 @@ class Admin {
}
if ($doHist) {
// now this has to be logged in the history tables...
$this->histfiller->updateConfigInHist($pdo,$theItem, $theValue);
}
}
@ -1600,7 +1583,6 @@ class Admin {
}
function updateUser() {
// get the name of the user
$pdo = DbUtils::openDbAndReturnPdoStatic();
$theUserId = $_POST['userid'];
@ -1675,7 +1657,6 @@ class Admin {
function getCurrentUser() {
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
echo json_encode("Nobody");
} else {
echo json_encode($_SESSION['currentuser']);
@ -1796,7 +1777,6 @@ class Admin {
}
if ($ok) {
// allowed to change password
$newp_hash = md5($newpassword);
$sql = "UPDATE %user% set userpassword=? WHERE active='1' AND username=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -2078,12 +2058,39 @@ class Admin {
$timezone = DbUtils::getTimeZone();
$dbContent = json_decode($content,true);
foreach($dbContent as $table) {
if ($table['table'] == 'config') {
$foundConfigItem = null;
foreach($table['content'] as $aConfigItem) {
foreach($aConfigItem as $aConfigDbPart) {
if (($aConfigDbPart['fieldname'] == 'name') && ($aConfigDbPart['value'] == 'version')) {
$foundConfigItem = $aConfigItem;
break;
}
}
}
if (!is_null($foundConfigItem)) {
foreach($foundConfigItem as $aConfigDbPart) {
if ($aConfigDbPart['fieldname'] == 'setting') {
$bakVersion = base64_decode($aConfigDbPart['value']);
if ($bakVersion != $version) {
header("Location: ../infopage.html?e=manager.html=Backup_hat_die_falsche_Version:_$bakVersion.");
exit();
}
}
}
}
}
}
$basedb->dropTables($pdo);
$basedb->createEmptyTables($pdo);
$dbContent = json_decode($content,true);
$typeIsOnlyConfig = true;
foreach($dbContent as $table) {
@ -2153,7 +2160,6 @@ class Admin {
}
$pdo->commit();
// logout (by the restore other user or rights may have been applied)
if(session_id() == '') {
session_start();
}

View File

@ -36,7 +36,6 @@ class Bill {
function handleCommand($command) {
if ($command == 'exportCsv') {
if ($this->hasCurrentUserAdminOrManagerRights()) {
// yes, we can export the data
$this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_CSV);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
@ -45,7 +44,6 @@ class Bill {
}
if ($command == 'exportXlsx') {
if ($this->hasCurrentUserAdminOrManagerRights()) {
// yes, we can export the data
$this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_EXCEL);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
@ -75,7 +73,6 @@ class Bill {
if ($command == 'exportCsvOfClosing') {
if ($this->hasCurrentUserAdminOrManagerRights()) {
// yes, we can export the data
$this->exportCsvOfClosing($_GET['closingid'],DO_CSV);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_MANAGER_NOT_AUTHOTRIZED, "msg" => ERROR_MANAGER_NOT_AUTHOTRIZED_MSG));
@ -84,7 +81,6 @@ class Bill {
}
if ($command == 'exportXlsxOfClosing') {
if ($this->hasCurrentUserAdminOrManagerRights()) {
// yes, we can export the data
$this->exportCsvOfClosing($_GET['closingid'],DO_EXCEL);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_MANAGER_NOT_AUTHOTRIZED, "msg" => ERROR_MANAGER_NOT_AUTHOTRIZED_MSG));
@ -133,11 +129,9 @@ class Bill {
}
}
// for internal request
private function hasCurrentUserBillRights() {
session_start();
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
return false;
} else {
return ($_SESSION['right_bill']);
@ -147,18 +141,15 @@ class Bill {
private function hasCurrentUserPaydeskRights() {
session_start();
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
return false;
} else {
return ($_SESSION['right_paydesk']);
}
}
// for internal request
private function hasCurrentUserAdminOrManagerRights() {
session_start();
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
return false;
} else {
return ($_SESSION['right_manager'] || $_SESSION['is_admin']);
@ -186,7 +177,6 @@ class Bill {
function getBillWithId($pdo,$billid,$language,$printer,$includeGuestInfo = false) {
set_time_limit(120);
// is bill correct with signature?
$commonUtils = new CommonUtils();
$correct = $commonUtils->verifyBill($pdo, $billid);
if (!$correct) {
@ -194,9 +184,7 @@ class Bill {
return;
}
// first: get the bill overall data
// is the bill for a table or togo
$sql = "SELECT tableid FROM %bill% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($billid));
@ -210,14 +198,12 @@ class Bill {
$tableid = $row->tableid;
if ($qrow->countid == 0) {
if ($tableid == 0) {
// togo
$sql = "SELECT DISTINCT billdate,brutto,netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo FROM %bill%,%user% WHERE %bill%.id=? AND userid=%user%.id AND tableid='0' ";
} else {
$sql = "SELECT DISTINCT billdate,brutto,netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo FROM %bill%,%user%,%resttables% WHERE %bill%.id=? AND userid=%user%.id AND tableid=%resttables%.id ";
}
} else {
if ($tableid == 0) {
// togo
$sql = "SELECT DISTINCT billdate,brutto,netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo FROM %bill%,%user%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid='0' AND paidtime is not null ";
} else {
$sql = "SELECT DISTINCT billdate,brutto,netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo FROM %bill%,%user%,%resttables%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid=%resttables%.id AND paidtime is not null ";
@ -245,7 +231,6 @@ class Bill {
}
if ($row == null) {
// no rows found -> deliver no content
echo json_encode(array("billoverallinfo" => array()));
return;
} else {
@ -305,7 +290,6 @@ class Bill {
);
}
// now get all products of this bill
$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->execute(array($billid));
@ -346,7 +330,6 @@ class Bill {
* insert or take out cash money. The direction done by sign of $money value
*/
private function doCashAction($money,$remark) {
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
@ -361,12 +344,10 @@ class Bill {
if ($row != null) {
$sum = $row->bruttosum;
if (is_null($sum)) {
// no transaction after last closing
$sum = 0.0;
}
if (($sum + floatval($money)) >= 0.0) {
// Test if it is allowed to insert new bill as storno bill or if manipulation has happened
$nextbillid = $this->testForNewBillIdAndUpdateWorkTable($pdo);
if ($nextbillid < 0) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
@ -374,7 +355,6 @@ class Bill {
}
$userId = $this->getUserId();
// now calculate the signature for the bill entry
$commonUtils = new CommonUtils();
if (trim($money) == '') {
$money = '0.00';
@ -418,7 +398,6 @@ class Bill {
function getCashOverviewOfUser() {
$userId = $this->getUserId();
// without cash insert and cash takeout
$onlyCashByGuests = 0.0;
$pdo = $this->dbutils->openDbAndReturnPdo();
$sql = "SELECT sum(brutto) as sumtotal FROM %bill% WHERE closingid is null AND status is null AND paymentid=1 AND userid='$userId'";
@ -431,7 +410,6 @@ class Bill {
}
}
// with cash
$cashByGuestsAndInsertTakeOut = 0.0;
$sql = "SELECT sum(brutto) as sumtotal FROM %bill% WHERE closingid is null AND paymentid='1' AND userid='$userId' AND (status is null OR status ='c')";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
@ -453,7 +431,6 @@ class Bill {
$whenClause = " (billdate >= ? AND billdate <= ?)";
// search for the bill language
$pdo = $this->dbutils->openDbAndReturnPdo();
$admin = new Admin();
$genValues = $admin->getGeneralConfigItems(false, $pdo);
@ -495,7 +472,6 @@ class Bill {
$resultarray[] = $arr;
}
// insert also the host-html just in case it is needed
$hosthtml = file_get_contents("../customer/bon-bewirtungsvorlage.html");
ob_start();
@ -525,7 +501,6 @@ class Bill {
if (!$commonUtils->verifyLastBillId($pdo, $nextbillid)) {
return (-1);
} else {
// ok - then increment that last id in the work table
$commonUtils->setLastBillIdInWorkTable($pdo, $nextbillid);
return $nextbillid;
}
@ -579,13 +554,11 @@ class Bill {
$userid = $this->getUserId();
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
$billid = (-1);
// find highest bill id
$sql = "SELECT id from %bill% ORDER BY id DESC";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
@ -599,7 +572,6 @@ class Bill {
$tableid = 0;
}
// now calculate the signature for the bill entry
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
$billInsertSql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tableid`,`paymentid`,`userid`,`ref`,`tax`,`host`,`reservationid`,`guestinfo`,`intguestid`,`intguestpaid`,`signature`) VALUES (?,?,?,?,?,?,?,NULL,NULL,?,?,?,?,?,?)";
@ -607,7 +579,6 @@ class Bill {
$stmt->execute(array($billid,$currentTime,$brutto,$netto,$tableid,$paymentId,$userid,$host,$reservationid,$guestinfo,$intguestid,$intguestpaid,$signature));
$newBillId = $pdo->lastInsertId();
// now declare them all to be paid:
for ($i=0;$i<count($ids_array);$i++) {
$queueid = $ids_array[$i];
@ -627,15 +598,12 @@ class Bill {
* Cancel a bill - set all queue items to not paid and drop the bill entry
*/
private function cancelBill($pdo,$billid,$stornocode,$reason,$doOwnTransaction,$doEcho,$checkStornoCode,$removeproducts = 0) {
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
// check if stornocode is correct
$stornocodeInDb = CommonUtils::getConfigValue($pdo, 'stornocode', null);
if (is_null($stornocodeInDb)) {
// stornocode not fixed
if ($doEcho) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_STORNO_CODE, "msg" => ERROR_BILL_NOT_STORNO_CODE_MSG));
}
@ -652,19 +620,16 @@ class Bill {
}
if (!is_numeric($billid)) {
// this may be an attack...
if ($doEcho) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_WRONG_NUMERIC_VALUE, "msg" => ERROR_BILL_WRONG_NUMERIC_VALUE_MSG));
}
return false;
}
// Do transactional cancel
if ($doOwnTransaction) {
$pdo->beginTransaction();
}
// is the bill already closed? In this case no cancel is allowed!
$sql = "SELECT brutto,netto,tax,tableid,closingid,status,paymentid,reservationid,guestinfo,intguestid,intguestpaid FROM %bill% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($billid));
@ -673,7 +638,6 @@ class Bill {
if ($row != null) {
$closingId = $row->closingid;
// save the next data for a copy!
$brutto = $row->brutto;
$netto = $row->netto;
$tax = $row->tax;
@ -709,7 +673,6 @@ class Bill {
return false;
}
// is bill correct with signature?
$commonUtils = new CommonUtils();
$correct = $commonUtils->verifyBill($pdo, $billid);
if (!$correct) {
@ -722,7 +685,6 @@ class Bill {
return false;
}
// Test if it is allowed to insert new bill as storno bill or if manipulation has happened
$nextbillid = $this->testForNewBillIdAndUpdateWorkTable($pdo);
if ($nextbillid < 0) {
if ($doEcho) {
@ -734,7 +696,6 @@ class Bill {
return false;
}
// 0. find the queueitems that are related to that bill
$sql = "SELECT id FROM %queue% WHERE billid=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($billid));
@ -745,7 +706,6 @@ class Bill {
$queueIdArray[] = $row['id'];
}
// 1. clear connection between queue item and bill
if ($removeproducts == 0) {
$sql = "UPDATE %queue% SET paidtime=null,billid=null WHERE billid=?";
} else {
@ -754,7 +714,6 @@ class Bill {
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($billid));
// 2. copy bill with negativ brutto as part of storno
$userIdOfStornoUser = $this->getUserId();
$stornval = 0.0 - floatval($brutto);
$stornonettoval = 0.0 - floatval($netto);
@ -775,7 +734,6 @@ class Bill {
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($row->brutto + $row->prevbrutto + $stornval,$row->netto + $row->prevnetto + $stornonettoval,$refIdOfStornoEntry));
// 3. mark bill as part of storno
$sql = "UPDATE %bill% SET status='x', closingid=null, ref=?, intguestid=?,intguestpaid=? WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($refIdOfStornoEntry,null,null,$billid));
@ -786,7 +744,6 @@ class Bill {
$stmt->execute(array($reason,$billid));
}
// 4. now put the queue items into the billproducts so that later storno is evaluable
foreach ($queueIdArray as $aQueueid) {
$billProdsSql = "INSERT INTO `%billproducts%` (`queueid` , `billid`) VALUES ( ?,?)";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($billProdsSql));
@ -798,7 +755,6 @@ class Bill {
if ($doOwnTransaction) {
$pdo->commit();
}
// end of transactional cancel
if ($doEcho) {
echo json_encode(array("status" => "OK", "code" => OK));
@ -892,7 +848,6 @@ class Bill {
$endMonth = "0" . $endMonth;
}
$startDate = $startYear . "-" . $startMonth . "-01 00:00:00";
// now find last day of month of end date!
$endDate = $endYear . "-" . $endMonth . "-01";
$lastdayOfMonth = date("t", strtotime($endDate));
$endDate = $endYear . "-" . $endMonth . "-" . $lastdayOfMonth . " 23:59:59";
@ -942,7 +897,6 @@ class Bill {
$firstRow[] = $this->t['PayWay'][$l];
$firstRow[] = $this->t['ClosRemark'][$l];
} else {
// closing id is know - do not output unnecessary info
$firstRow[] = $this->t['PayWay'][$l];
}
@ -960,10 +914,8 @@ class Bill {
$sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id ";
$sql .= " AND %bill%.paymentid=%payment%.id ";
if ($onlyClosingId == null) {
// search for time span
$sql .= " AND %bill%.billdate BETWEEN ? AND ? ";
} else {
// search for a special closing id
$sql .= " AND closingid=? ";
}
$sql .= " AND %bill%.userid = %user%.id ";

View File

@ -71,6 +71,8 @@ class PrintQueue {
$this->batchReceiptPrintJob($_POST['start'],$_POST['end']);
} else if ($command == 'getLastLog') {
$this->getLastLog($_POST['pass']);
} else if ($command == 'deleteSpooledPrintJob') {
$this->deleteSpooledPrintJob($_POST['id']);
} else {
echo "Kommando nicht erkannt!";
}
@ -139,21 +141,27 @@ class PrintQueue {
$jobs = array();
for ($printer=1;$printer<7;$printer++) {
$sql = "SELECT count(id) as count FROM %printjobs% WHERE printer=? AND type != '1' AND type != '2'";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($printer));
$result = $stmt->fetchObject();
$jobs[] = array("printer" => $printer, "jobs" => $result->count);
$sql = "SELECT %printjobs%.id as id,%bill%.id as billid,billdate,brutto,%resttables%.tableno as tablename FROM %printjobs%,%bill%,%resttables% WHERE printer=? AND type != '1' AND type != '2' AND content=%bill%.id AND %bill%.tableid=%resttables%.id";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($printer));
$jobs[] = array("printer" => $printer, "count" => count($result),"jobs" => $result);
}
$sql = "SELECT count(id) as count FROM %printjobs% WHERE type=?";
$sql = "SELECT %printjobs%.id as id,content FROM %printjobs% WHERE type=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array(1));
$result = $stmt->fetchObject();
$jobs[] = array("printer" => 7, "jobs" => $result->count);
$result = $stmt->fetchAll();
$works = array();
foreach($result as $r) {
$works[] = array("id" => $r['id'],"content" => json_decode($r['content']));
}
$jobs[] = array("printer" => 7, "count" => count($result),"jobs" => $works);
$stmt->execute(array(2));
$result = $stmt->fetchObject();
$jobs[] = array("printer" => 8, "jobs" => $result->count);
$result = $stmt->fetchAll();
$works = array();
foreach($result as $r) {
$works[] = array("id" => $r['id'],"content" => json_decode($r['content']));
}
$jobs[] = array("printer" => 8, "count" => count($result),"jobs" => $works);
echo json_encode(array("status" => "OK", "msg" => $jobs));
}
@ -208,6 +216,20 @@ class PrintQueue {
}
}
function deleteSpooledPrintJob($printjobid) {
if (!($this->userrights->hasCurrentUserRight('right_manager')) &&
!($this->userrights->hasCurrentUserRight('is_admin'))
) {
echo "Benutzerrechte nicht ausreichend!";
return false;
}
$pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "DELETE FROM %printjobs% WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($printjobid));
echo json_encode(array("status" => "OK"));
}
function queueReceiptPrintJob($billid,$useaddrecprinter) {
// waiter, or manager, bill, admin rights required
if (!($this->userrights->hasCurrentUserRight('right_paydesk')) &&

View File

@ -217,7 +217,7 @@ class Products {
}
$sql = "SELECT DISTINCT %extras%.id AS extraid,%extras%.name AS name FROM %extras%,%extrasprods%
WHERE %extrasprods%.prodid=? AND %extras%.id=%extrasprods%.extraid AND %extras%.removed is null";
WHERE %extrasprods%.prodid=? AND %extras%.id=%extrasprods%.extraid AND %extras%.removed is null ORDER BY name";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($row['id']));
@ -356,7 +356,6 @@ class Products {
}
private function getMenuLevelUp($ref) {
// from which type does the current type reference to?
$pdo = $this->dbutils->openDbAndReturnPdo();
$sql = "SELECT reference from %prodtype% where removed is null AND id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
@ -511,7 +510,6 @@ class Products {
$itemsql = $aProdDef["histget"];
if ($item != "") {
if ($itemsql == 'tax') {
// IF(tax is not null, tax, '-') as tax
$value = ($zeile['tax']);
if ($value == null) {
$value = '-';
@ -569,7 +567,6 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// getSortingOfProduct
$this->sorter->resortAfterProduct($pdo, $prodid);
$sql = "UPDATE %products% SET category=? WHERE id=?";
@ -578,7 +575,6 @@ class Products {
$affectedRows = $stmt->rowCount();
$pdo->commit();
if ($affectedRows == 1) {
// now declare as set to end to list
$this->sorter->setMaxSortingForProdId($pdo, $prodid);
echo json_encode(array("status" => "OK"));
} else {
@ -621,7 +617,6 @@ class Products {
return $ids;
}
// to be called by manager-readSpeisekarte
public static function createExtraCore($pdo,$name,$price,$assignedProdIds) {
if (is_null($pdo)) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
@ -731,10 +726,8 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// what is the max sort number because it shall be added afterwards
$maxSorting = $this->getMaxSortOfGenComment($pdo);
// insert the comment
$sql = "INSERT INTO `%comments%` (`id`,`comment`,`prodid`,`active`,`sorting`) VALUES(NULL,?,NULL,1,?)";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($comment,$maxSorting+1));
@ -799,7 +792,6 @@ class Products {
try {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// which sorting has the comment to delete?
$sorting = $this->getSortingOfComment($pdo, $id);
if ($sorting < 0) {
@ -807,12 +799,10 @@ class Products {
return;
}
// delete the comment
$sql = "DELETE FROM %comments% WHERE id=? AND prodid is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($id));
// subtract all sortings by one higher then the deleted sorting index
$sql = "SELECT id,sorting FROM %comments% WHERE sorting>? AND prodid is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($sorting));
@ -840,7 +830,6 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// which sorting has the comment to delete?
$sorting = $this->getSortingOfComment($pdo, $id);
if ($sorting < 0) {
@ -848,20 +837,17 @@ class Products {
return;
}
if ($sorting == 1) {
// finished
$pdo->commit();
echo json_encode(array("status" => "OK"));
return;
}
// get comment before
$sql = "SELECT id FROM %comments% WHERE sorting=? AND prodid is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($sorting - 1));
$row = $stmt->fetchObject();
$previousId = $row->id;
// change these two comments in its ordering
$sql = "UPDATE %comments% SET sorting=? WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($sorting,$previousId));
@ -883,7 +869,6 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// which sorting has the comment to delete?
$sorting = $this->getSortingOfComment($pdo, $id);
if ($sorting < 0) {
@ -891,23 +876,19 @@ class Products {
return;
}
// is it at end of list?
$maxSorting = $this->getMaxSortOfGenComment($pdo);
if (($maxSorting == 0) || ($maxSorting == $sorting)) {
// finished
$pdo->commit();
echo json_encode(array("status" => "OK"));
return;
}
// get comment afterwards
$sql = "SELECT id FROM %comments% WHERE sorting=? AND prodid is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($sorting + 1));
$row = $stmt->fetchObject();
$nextId = $row->id;
// change these two comments in its ordering
$sql = "UPDATE %comments% SET sorting=? WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($sorting,$nextId));
@ -963,7 +944,6 @@ class Products {
if ($changeExtras == 1) {
$this->changeExtraAssignment($pdo, $id, $extras);
}
// now this has to be logged in the history tables...
HistFiller::updateProdInHist($pdo,$id);
} else {
@ -1025,7 +1005,6 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// which kind is the referenced type?
$sql = "SELECT kind FROM %prodtype% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($id));
@ -1067,7 +1046,6 @@ class Products {
return;
}
// now this has to be logged in the history tables...
HistFiller::createProdInHist($pdo, $newProdId);
echo json_encode("OK: sql");
@ -1146,7 +1124,6 @@ class Products {
return $allProdsAndTypesInThisLevel;
}
// return in text format
private function readDbProductsWithRef_json_version($pdo,$ref,$depth) {
$decpoint = $this->getDecPoint($pdo);
$text = "";
@ -1157,7 +1134,6 @@ class Products {
for ($index_prod=0;$index_prod<count($allProdsInThisLevel);$index_prod++) {
$aProd = $allProdsInThisLevel[$index_prod];
// Kurzname ; NormalPreis (Stufe A); Langname # Preis (Stufe B); Preis (Stufe C)
$prodText = ProductEntry::createProductStr($aProd,$decpoint);
$text .= substr(" ", 0, $depth) . $prodText . "\n";
}
@ -1251,7 +1227,6 @@ class Products {
$predef = file_get_contents ("../customer/speisekarte.txt");
$predef = str_replace('{.}',$decpoint,$predef);
if (($numberOfProds == 0) && ($numberOfProdTypes == 0)) {
// no products defined yet - present Beispiel
$text = $legend;
} else {
$text = $legend . $this->readDbProducts($pdo);

View File

@ -172,14 +172,12 @@ class QueueContent {
* $kind=0 -> return only food elements, =1 -> return drinks
*/
private function getJsonAllQueueItemsToMake($kind) {
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
$pdo = $this->dbutils->openDbAndReturnPdo();
// first sort all non-ready products ordered by ordertime
if ($this->areBillExisting($pdo)) {
$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%,%bill% ";
@ -196,7 +194,6 @@ class QueueContent {
$sql .= "%queue%.workprinted='0') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
@ -256,7 +253,6 @@ class QueueContent {
for ($queue_index=0;$queue_index < count($resultarray);$queue_index++) {
$aTable = $resultarray[$queue_index]['tablenr'];
if (($table <> $aTable) && !in_array($aTable,$insertedTables)) {
// sort all entries for this table
$table = $aTable;
$tableid = $resultarray[$queue_index]['tableid'];
$maxWaitTime = $resultarray[$queue_index]['waittime'];
@ -265,9 +261,6 @@ class QueueContent {
if ($resultarray[$i]['tablenr'] == $table) {
$foundItem = $resultarray[$i];
$waittimeofentry = intval($foundItem['waittime']);
// icons of waittime
// 1-20 in 1 min steps
// 25,30,40,50,60min
$waitIconMinStep = 1;
if ($waittimeofentry <= 1) {
$waitIconMinStep = 1;
@ -299,7 +292,6 @@ class QueueContent {
$tableArr[] = $anEntryForThisTable;
}
}
// Now fit max wait time of table to entry wait time steps:
if (($maxWaitTime > 20) && ($maxWaitTime < 60)) {
if ($maxWaitTime >= 50) {
$maxWaitTime = "> 50";
@ -377,7 +369,6 @@ class QueueContent {
$jobs = array();
foreach($queueItems as $aQueueItem) {
// is the job for that printer?
$thePrinter = $aQueueItem["printer"];
$queueid = $aQueueItem["id"];
@ -412,7 +403,6 @@ class QueueContent {
}
if ($groupworkitems) {
// now put the count number into the longname
foreach($jobs as &$aJob) {
$cnt = $aJob["count"];
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
@ -459,7 +449,6 @@ class QueueContent {
}
private function doWorkPrintCore($pdo,$theTableid,$insertedQueueIds,$username,$payPrintType,$lang,$declareReadyDelivered = true) {
// is it server or local print?
$foodJobsPrinter1 = $this->getJobsToPrint($pdo, 0, 1, $insertedQueueIds);
$foodJobsPrinter2 = $this->getJobsToPrint($pdo, 0, 2, $insertedQueueIds);
@ -536,7 +525,6 @@ class QueueContent {
private function getJsonLastMadeItems($kind) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
// first sort all non-ready products ordered by ordertime
if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT %queue%.id as id,tablenr,longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables%,%bill% ";
} else {
@ -553,7 +541,6 @@ class QueueContent {
$sql .= "%queue%.workprinted='0') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
@ -580,7 +567,6 @@ class QueueContent {
$sql .= "%queue%.workprinted='0') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
@ -599,7 +585,6 @@ class QueueContent {
$productid = $zeile['prodid'];
$useConditions = $this->getUseKitchenAndSupplyForProd($pdo,$productid);
if ($useConditions["usekitchen"] == 1) {
// yes, display it in kitchen view as cooked
$arr = array("id" => $zeile['id'],
"tablename" => $zeile['tableno'],
"longname" => $zeile['longname'],
@ -611,11 +596,6 @@ class QueueContent {
}
}
// now look for items that are made and auto-delivered
// They must appear if:
// a) in category autosupply yes
// b) they have the right kind
// c) they shall appear in bar/kitchen module at all
$resultarray = $this->appendProdsForBarKitchenAndAutoDelivery($pdo,$kind, $resultarray);
echo json_encode($resultarray);
@ -632,7 +612,6 @@ class QueueContent {
$sql .= "(%queue%.productid = %products%.id AND %products%.category = %prodtype%.id AND %prodtype%.kind=? AND %prodtype%.usesupplydesk='0' AND %prodtype%.usekitchen='1') AND ";
$sql .= "%queue%.workprinted='0') ";
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
@ -671,7 +650,6 @@ class QueueContent {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// is product already cooking or will it be set to cooking?
$sql = "SELECT cooking,productid FROM %queue% WHERE id=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
if ($row != null) {
@ -679,16 +657,13 @@ class QueueContent {
$productid = $row->productid;
if ($action == 'r') {
// product shall be declared ready
if (is_null($cooking)) {
// a product must be cooking before it can be ready!
$pdo->rollBack();
echo json_encode(array("status" => "ERROR", "code" => ERROR_DB_PAR_ACCESS, "msg" => ERROR_DB_PAR_ACCESS_MSG));
} else {
$this->reallyDeclareAsCooked($pdo,$queueid);
$useConditions = $this->getUseKitchenAndSupplyForProd($pdo,$productid);
if ($useConditions["usesupply"] == 0) {
// can bypass the supplydesk
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
} else {
self::setNewProductsToServe($pdo, 1);
@ -707,9 +682,7 @@ class QueueContent {
echo json_encode(array("status" => "OK"));
}
} else if ($action == 'c') {
// product shall be declared as cooking (in progress)
if (!is_null($cooking)) {
// a product must not be cooking before it can becomes cooking
$pdo->rollBack();
echo json_encode(array("status" => "ERROR", "code" => ERROR_DB_PAR_ACCESS, "msg" => ERROR_DB_PAR_ACCESS_MSG));
} else {
@ -745,7 +718,6 @@ class QueueContent {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// first: is the product still declared as delivered?
$sql = "SELECT id FROM %queue% WHERE id=? AND readytime IS NOT NULL";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($queueid));
if ($row != null) {
@ -830,7 +802,6 @@ class QueueContent {
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
$austria = CommonUtils::getExistingConfigValue($pdo, 'austria');
// get current pricelevel
$currentPriceLevel = $this->commonUtils->getCurrentPriceLevel($pdo);
$currentPriceLevelId = $currentPriceLevel["id"];
@ -844,7 +815,6 @@ class QueueContent {
$theChangedPrice = $aProd["changedPrice"];
$theChangedPrice = str_replace(',','.',$theChangedPrice);
// now get the price for this pricelevel
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
if ($row == null) {
@ -875,7 +845,6 @@ class QueueContent {
$price = $theChangedPrice;
}
// now check if the product is a togo article that might have been booked on a table
$togo = $aProd["togo"];
$tax = $normaltax;
@ -930,7 +899,6 @@ class QueueContent {
}
if (is_null($theTableid) || (is_numeric($theTableid) && is_numeric($productid))) {
// first get category of product
$useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
$insertSql = "INSERT INTO `%queue%` (
@ -958,13 +926,9 @@ class QueueContent {
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
} else {
if ($useConditions["usekitchen"] == 0) {
// no - can bypass the kitchen
$this->reallyDeclareAsCooked($pdo,$queueid);
// then also look for supplydesk, since kitchen action won't do this!
if ($useConditions["usesupply"] == 0) {
// can bypass the supplydesk
$this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
// THIS autop declares as "prepared" (cooked)!!!
}
} else {
$insertedQueueIds[] = $queueid;
@ -1029,7 +993,6 @@ class QueueContent {
} else {
$sql .= " AND (readytime IS NULL or readytime is null) ";
}
// and not in a closing:
if ($hasBills) {
$sql .= " AND (billid is null OR (";
$sql .= " billid = %bill%.id AND %bill%.closingid is null)) ";
@ -1261,8 +1224,6 @@ class QueueContent {
echo json_encode(array("status" => "OK", "msg" => $prodsToPay));
}
// This function gets the items to pay and creates a table, in which these items
// are listed up. It can be used as a receipt to print later
function displayBill($billtableitems,$totalPrice) {
$currency = $this->commonUtils->getCurrency();
$numberOfItemsToPay = count($billtableitems);
@ -1280,9 +1241,6 @@ class QueueContent {
echo "</table>";
}
// **********************************
// * Bereitstellung *
// **********************************
function declareProductBeDeliveredWithGivenPdo($pdo,$queueid) {
@ -1294,7 +1252,6 @@ class QueueContent {
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($updateSql));
$stmt->execute(array($delivertime,$queueid));
// then it was probably already prepared
$updateSql = "UPDATE %queue% SET readytime=? WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($updateSql));
$stmt->execute(array($delivertime,$queueid));
@ -1351,14 +1308,12 @@ class QueueContent {
$sql .= "AND toremove <> '1') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
$sql .= " ORDER BY tableno";
} else {
// togo
$sql = "SELECT DISTINCT %queue%.id as id,'' as tableno,longname,anoption,readytime ";
if ($this->areBillExisting($pdo)) {
$sql .= "FROM %queue%,%products%,%resttables%,%bill% ";
@ -1383,7 +1338,6 @@ class QueueContent {
$stmt->execute();
$dbresult = $stmt->fetchAll();
// create a table that is optimal (sqrt-like size)
$numberOfIcons = count($dbresult);
$arrayOfProdsForTable = array();
$idsProdsOfTable = ''; // this is a hack! All queueids of a table redundant for "Deliver all"
@ -1410,12 +1364,9 @@ class QueueContent {
return array("prods" => $arrayOfProdsForTable, "ids" => $idsProdsOfTable);
}
// total number of products for table
// can later be used for color indication if products can be delivered completly for a table
public function numberOfProductsForTableNotDelivered($pdo,$tableid) {
$sql = "SELECT DISTINCT %queue%.id as id ";
if (!is_null($tableid)) {
// not togo
$sql .= "FROM %queue%,%resttables% ";
} else {
$sql .= "FROM %queue% ";
@ -1426,7 +1377,6 @@ class QueueContent {
$sql .= "AND workprinted='0' ";
$sql .= "AND toremove <> '1' ";
if (!is_null($tableid)) {
// not togo
$sql .= "AND %queue%.tablenr=%resttables%.id ";
$sql .= "AND %resttables%.id=" . $tableid;
} else {
@ -1444,7 +1394,6 @@ class QueueContent {
function getJsonAllPreparedProducts() {
$pdo = DbUtils::openDbAndReturnPdoStatic();
// find out the tables that are relevant
$sql = "SELECT DISTINCT tablenr ";
if ($this->areBillExisting($pdo)) {
$sql .= "FROM %queue%,%resttables%,%bill% ";
@ -1459,7 +1408,6 @@ class QueueContent {
$sql .= "%queue%.workprinted='0') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
@ -1499,7 +1447,6 @@ class QueueContent {
$tablesToServe[] = $zeile['tablenr'];
}
// to sort complete prepared tables use two arrays:
$preparedProds_incomplete_tables = array();
$preparedProds = array();
@ -1545,7 +1492,6 @@ class QueueContent {
*/
function getJsonLastDeliveredProducts() {
$pdo = DbUtils::openDbAndReturnPdoStatic();
// 1. no togo products
$sql = "SELECT DISTINCT %queue%.id as id,tableno,longname,delivertime,anoption,%products%.id as prodid ";
if ($this->areBillExisting($pdo)) {
$sql .= "FROM %queue%,%resttables%,%products%,%bill% ";
@ -1561,7 +1507,6 @@ class QueueContent {
$sql .= "%queue%.workprinted='0') ";
if ($this->areBillExisting($pdo)) {
// now remove closed items
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
@ -1572,7 +1517,6 @@ class QueueContent {
$stmt->execute();
$result1 = $stmt->fetchAll();
// 2.togo products
$sql = "SELECT DISTINCT %queue%.id as id,'' as tableno,longname,delivertime,anoption,%products%.id as prodid ";
if ($this->areBillExisting($pdo)) {
$sql .= "FROM %queue%,%resttables%,%products%,%bill% ";
@ -1603,7 +1547,6 @@ class QueueContent {
$productid = $zeile['prodid'];
$useConditions = $this->getUseKitchenAndSupplyForProd($pdo,$productid);
if ($useConditions["usesupply"] == 1) {
// yes, display it in supplydesk view as cooked
$extras = $this->getExtrasOfQueueItem(null,$zeile['id']);
@ -1621,9 +1564,6 @@ class QueueContent {
}
// **********************************
// * Kasse *
// **********************************
/*
* Test if all queue items with the given ids are not paid
@ -1660,7 +1600,6 @@ class QueueContent {
$pdo->beginTransaction();
}
// check if all items are not paid yet! Also get rid of empty entries
$allNotPaid = true;
for ($i=0;$i<count($ids_array);$i++) {
$anId = $ids_array[$i];
@ -1678,7 +1617,6 @@ class QueueContent {
}
}
// current time
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
@ -1712,7 +1650,6 @@ class QueueContent {
$billid = 1;
}
// Test if it is allowed to use this billid or if manipulation has happened
if (!$this->commonUtils->verifyLastBillId($pdo, $billid)) {
if (!$calledInternally) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_INCONSISTENT_DB, "msg" => ERROR_INCONSISTENT_DB_MSG));
@ -1720,7 +1657,6 @@ class QueueContent {
}
return;
} else {
// ok - then increment that last id in the work table
$this->commonUtils->setLastBillIdInWorkTable($pdo, $billid);
}
@ -1734,14 +1670,12 @@ class QueueContent {
$brutto = $row->brutto;
$netto = $row->netto;
// now calculate the signature for the bill entry
$signature = $this->commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
$billInsertSql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`prevbrutto`,`prevnetto`,`tableid`,`paymentid`,`userid`,`ref`,`tax`,`host`,`reservationid`,`guestinfo`,`intguestid`,`signature`) VALUES (?,?,?,?,?,?,?,?,?,NULL,NULL,?,?,?,?,?)";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($billInsertSql));
$stmt->execute(array($billid,$currentTime,$brutto,$netto,$newprevbrutto,$newprevnetto,$tableid,$paymentId,$userid,$host,$reservationid,$guestinfo,$intguestid,$signature));
// now declare them all to be paid:
for ($i=0;$i<count($ids_array);$i++) {
$queueid = $ids_array[$i];
if (is_numeric($queueid)) {

View File

@ -16,7 +16,6 @@ class Roomtables {
if(session_id() == '') {
session_start();
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
echo json_encode(array("status" => "ERROR", "code" => ERROR_NOT_AUTHOTRIZED, "msg" => ERROR_NOT_AUTHOTRIZED_MSG));
}
}
@ -47,7 +46,6 @@ class Roomtables {
session_start();
}
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
// no user logged in
return false;
} else {
return ($_SESSION['is_admin']);
@ -61,7 +59,6 @@ class Roomtables {
}
public static function getUnpaidTablesCore($pdo,$roomid) {
// first get all tables of that rooms
$tablesSql = "SELECT id,tableno FROM %resttables% WHERE %resttables%.roomid =? AND removed is null";
$stmt = $pdo->prepare(DbUtils::substTableAlias($tablesSql));
@ -126,7 +123,6 @@ class Roomtables {
}
function hasTableUnpaidItems($tableid) {
// sql copied from getJsonProductsOfTableToPay
$sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%pricelevel%.name as pricelevelname,%products%.id as prodid
FROM %queue%
INNER JOIN %products% ON %queue%.productid = %products%.id
@ -176,7 +172,6 @@ class Roomtables {
return $row->pricesum;
}
// Part of chain to choose a product , here we start with chosing a room
private function getAllTablesAndRooms($pdo)
{
$queue = new QueueContent();
@ -190,7 +185,6 @@ class Roomtables {
foreach($dbresult as $zeile) {
$roomid = $zeile['id'];
// now find the tables that are in that room
$tablesArray = array();
$sql = "SELECT %resttables%.id as id,%resttables%.tableno as name,IFNULL(SUM(IF(%queue%.ordertime is not null AND %queue%.paidtime is null AND %queue%.isclosed is null,%queue%.price,0.00)),0.00) as pricesum FROM %resttables% ";
@ -253,17 +247,14 @@ class Roomtables {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
// clear room table
$sql = "UPDATE %room% SET removed=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array('1'));
// clear resttables table
$sql = "UPDATE %resttables% SET removed=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array('1'));
// clear table positions and maps
$sql = "DELETE FROM %tablepos%";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
@ -322,7 +313,6 @@ class Roomtables {
$abbreviation = $row['abbreviation'];
$printer = $row['printer'];
// now get the tables of this room
$sql = "SELECT id,tableno FROM %resttables% WHERE roomid=? AND removed is null ORDER BY 'sorting'";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($row['id']));

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -85,7 +85,6 @@ function insertGeneralConfigItems(configResult) {
setLanguage(values.userlanguage);
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
//alert("Fehler beim Aufruf der Seite: " + configResult.msg);
}
}
@ -309,7 +308,6 @@ function handleGeneralAnswer(json) {
}
function binding() {
// Help buttons
$("#changepasswordbutton").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
@ -406,14 +404,14 @@ $(document).on("pageinit", "#pref-page", function () {
<div data-role="page" id="pref-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay" class="noprint">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
<h1><span id=prefheader></span></span><span id="username"></span></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content">

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -463,7 +463,6 @@ function setLanguage(language) {
var assignedExtras = null;
if (origAssignedExtras != null) {
// the button to assign extras was pressed
var assignedExtras = $("#prodextra_" + prodid).data("assignedextras");
var doChangeExtras = 0;
@ -618,7 +617,6 @@ function setLanguage(language) {
}
}
// reload, also for Chrome working
function reloadPageWithTimeout(result) {
if (result.status != "OK") {
alert("Fehler aufgetreten - bitte Aktion wiederholen!");
@ -923,13 +921,13 @@ function setLanguage(language) {
<div data-role="page" id="info-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="prodtitletxt">Angebot</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="Content">

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -132,13 +132,13 @@ function setLanguage(language) {
<div data-role="page" id="info-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="reportttitletxt">Bewertung</span></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="content">

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -82,7 +82,6 @@ function setLanguage(language) {
REP_YEST_TXT[lang],
"center",10,10,80);
// thismonth
var htmlThisMonth = fillOnePart(jsonText.thismonthname,jsonText.thismonth,REP_DAY[lang],
REP_THIS_MONTH_TXT[lang],
"center",10,10,80);
@ -161,7 +160,6 @@ function setLanguage(language) {
var contentValues = values.content;
var decpoint = $("#info-page").data("decpoint");
// fill content
$.each(contentValues, function (i, aStatValue) {
var hourOrDay = aStatValue.iter;
@ -205,7 +203,6 @@ function setLanguage(language) {
getStats();
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
//alert("Fehler beim Aufruf der Seite: " + configResult.msg);
}
}
@ -220,13 +217,13 @@ function setLanguage(language) {
<div data-role="page" id="info-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="reportttitletxt">Statistik</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="content">

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -88,7 +88,6 @@ var reservationnote = "";
var companyinfo = "";
var emailIsPossible = false;
var emailTemplate = "";
// REM* ther list of customers that are filtered by the server when the user types in the name in the search field
var filteredCustomers = [];
function setLanguage(language) {
@ -176,7 +175,6 @@ function insertGenConfigStartRest(configResult) {
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
$("#fullcontent").hide();
//alert("Fehler beim Aufruf der Seite: " + configResult.msg);
}
}
@ -226,7 +224,6 @@ function bindNewReservationBtn() {
remark: remark
};
// prepare next page for email
var emailtext = emailTemplate;
emailtext = emailtext.replace(/DATUM/g,date.getDate() + "." + (date.getMonth() + 1) + "." + date.getFullYear());
emailtext = emailtext.replace(/ANZAHL/g,persons);
@ -320,12 +317,10 @@ function insertReservations(answer) {
var hour = 0;
var residx = 0;
for (hour=0;hour<24;hour++) {
// collect reservations for hour
var resofhour = [];
times[hour] = resofhour;
}
// now every hour has its (empty) array...
var maxCol = 0;
var hasTotalRes = false;
@ -348,7 +343,6 @@ function insertReservations(answer) {
}
}
// now times table is filled. Create html
if (!hasTotalRes) {
html += "<tr><td>&nbsp;<td><b>" + RES_NORES[lang] + "</b></tr>";
@ -387,7 +381,6 @@ function insertReservations(answer) {
function fitsInCol(times,maxCol,start,end) {
var col = 0;
for (col=0;col<=(maxCol+1);col++) {
// does it fit in this col?
var h = 0;
var fits = true;
for (h=start;h<=end;h++) {
@ -400,7 +393,6 @@ function fitsInCol(times,maxCol,start,end) {
return col;
}
}
// should never be come to this point
return maxCol+1;
}
@ -464,17 +456,14 @@ function bindCusElem() {
e.stopImmediatePropagation();
e.preventDefault();
// REM* find customer in filteredCustomers
var cusid = this.id.split("_")[1];
for (var i=0;i<filteredCustomers.length;i++) {
var aCus = filteredCustomers[i];
if (aCus.id == cusid) {
// REM* found! -> copy customer values into the fields
$("#guestname").val(aCus.name);
$("#email").val(aCus.email);
$("#telno").val(aCus.phone);
// REM* now clean the search stuff
$("#customer").val("");
$("#customerlist").html('');
}
@ -603,7 +592,6 @@ $(document).on("pageinit", "#res-page", function () {
$(document).on("pagebeforeshow", "#changeres-page", function () {
if (lang < 0) {
// user has refreshed change page - that does not work!
setTimeout(function(){document.location.href = "reservation.html?"},500);
} else {
$("#ctimefieldse").selectmenu('refresh', true);
@ -617,13 +605,13 @@ $(document).on("pagebeforeshow", "#changeres-page", function () {
<div data-role="page" id="res-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1><span id="restitletxt">Reservierung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
</div>
</div>
<div data-role="content" id="fullcontent">

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.2">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -281,13 +281,13 @@ function initializeEverything() {
<div data-role="page" id="supplydesk-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed">
<h1><span id="supplyheadline">Bereitstellung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>

View File

@ -111,13 +111,13 @@ $(document).on("pageinit", "#index-page", function () {
<div data-role="page" id="index-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
<h1>Zeitabgleich</h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
</div>
</div>

View File

@ -8,7 +8,7 @@ function initializeMainMenu(menuid) {
$("#versioninfo").html(moduleEntries.version + "&nbsp;");
if (moduleEntries.loggedin == 1) {
$("#loggedinuser").html("&nbsp;" + moduleEntries.user);
var li='<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>';
var li='<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>';
$.each(moduleEntries.menu, function (i, module) {
var name = module.name;
var link = module.link;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long