OrderSprinter 1.5.4

This commit is contained in:
Geno 2020-11-19 23:11:42 +01:00
parent b5825ea919
commit 38e47d93c1
34 changed files with 201 additions and 163 deletions

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.3" /> <link rel="stylesheet" href="css/gueststyle.css?v=1.5.4" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.3" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.4" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
@ -105,7 +105,7 @@
<div data-role="footer" data-theme="b" id="thefooter1"> <div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a"> <div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div> <div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.3&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">1.5.4&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

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

View File

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

Binary file not shown.

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.3"></script> <script src="utilities.js?v=1.5.4"></script>
<script src="kitchenbar.js?v=1.5.3"></script> <script src="kitchenbar.js?v=1.5.4"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

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

File diff suppressed because one or more lines are too long

View File

@ -308,7 +308,10 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,unit,display,da
$("#prodpriceA_input_" + this.id).val(this.priceA.toString().replace(".",decpoint)); $("#prodpriceA_input_" + this.id).val(this.priceA.toString().replace(".",decpoint));
$("#prodpriceB_input_" + this.id).val(this.priceB.toString().replace(".",decpoint)); $("#prodpriceB_input_" + this.id).val(this.priceB.toString().replace(".",decpoint));
$("#prodpriceC_input_" + this.id).val(this.priceC.toString().replace(".",decpoint)); $("#prodpriceC_input_" + this.id).val(this.priceC.toString().replace(".",decpoint));
$("#produnit_input_" + this.id).val(this.unit);
$("#unitcont_" + this.id).html(this.createUnitField("produnit_input_" + this.id));
$("#displaycont_" + this.id).html(this.createDisplayField("proddisplay_input_" + this.id));
$("#proddisplay_input_" + this.id).val(this.display); $("#proddisplay_input_" + this.id).val(this.display);
if ((this.days == '0123456') || (this.days == null) || (this.days == 'null')) { if ((this.days == '0123456') || (this.days == null) || (this.days == 'null')) {
$("#proddays_input_" + this.id).val(''); $("#proddays_input_" + this.id).val('');
@ -318,11 +321,15 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,unit,display,da
if (this.tax != "null") { if (this.tax != "null") {
$("#prodtax_input_" + this.id).val(this.tax.toString().replace(".",decpoint)); $("#prodtax_input_" + this.id).val(this.tax.toString().replace(".",decpoint));
} } else {
$("#prodtax_input_" + this.id).val('');
}
if (this.amount != "null") { if (this.amount != "null") {
$("#prodamount_input_" + this.id).val(this.amount.toString().replace(".",decpoint)); $("#prodamount_input_" + this.id).val(this.amount.toString().replace(".",decpoint));
} } else {
$("#prodamount_input_" + this.id).val('');
}
$("#availcont_" + this.id).html(this.createMobileAvail("prodavail_" + this.id,PROD_AVAILABLE[lang])); $("#availcont_" + this.id).html(this.createMobileAvail("prodavail_" + this.id,PROD_AVAILABLE[lang]));
$("#favcont_" + this.id).html(this.createMobileFavorite("prodfav_" + this.id,PROD_FAVORITE[lang])); $("#favcont_" + this.id).html(this.createMobileFavorite("prodfav_" + this.id,PROD_FAVORITE[lang]));

View File

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

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.4">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -229,7 +229,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") { if (is_installed == "Yes") {
useInstallation(); useInstallation();
} else { } else {
setTimeout(function(){document.location.href = "install.html?v=1.5.3"},500); setTimeout(function(){document.location.href = "install.html?v=1.5.4"},500);
} }
} }

View File

@ -727,7 +727,7 @@ $(document).ready(function() {
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.5.3</button> <button id="updatebtn">Update -> 1.5.4</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -414,7 +414,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
set_time_limit(60*30); set_time_limit(60*30);
$installerVersion = "1.5.3"; $installerVersion = "1.5.4";
$admin = new InstallAdmin(); $admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.3"></script> <script src="utilities.js?v=1.5.4"></script>
<script src="kitchenbar.js?v=1.5.3"></script> <script src="kitchenbar.js?v=1.5.4"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,10 +13,10 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.3"></script> <script src="utilities.js?v=1.5.4"></script>
<script src="elements/tablemap.js?v=1.5.3"></script> <script src="elements/tablemap.js?v=1.5.4"></script>
<script src="elements/roommap.js?v=1.5.3"></script> <script src="elements/roommap.js?v=1.5.4"></script>
<script src="elements/groundplan.js?v=1.5.3"></script> <script src="elements/groundplan.js?v=1.5.4"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -361,6 +361,7 @@ var MAN_TASK_ALLASSIGN = ["Aufgabenzuweisung an andere Benutzer","Task assignmen
var MAN_TASK_OWNEREMPTY = ["Benutzer für Auffüllen-Aufgabe","User for refill task","Usario de tarea de sustituir productos"]; var MAN_TASK_OWNEREMPTY = ["Benutzer für Auffüllen-Aufgabe","User for refill task","Usario de tarea de sustituir productos"];
var MAN_TASK_IF_EMPTY = ["Aufgabe bei leerem Warenbestand erstellen","Create task before empty inventory","Crear tarea si no ya hay productos"]; var MAN_TASK_IF_EMPTY = ["Aufgabe bei leerem Warenbestand erstellen","Create task before empty inventory","Crear tarea si no ya hay productos"];
var MAN_SHOWTOGO = ["Zeige Außer-Haus-Button","Show To go button","Mostrar boton To-Go"]; var MAN_SHOWTOGO = ["Zeige Außer-Haus-Button","Show To go button","Mostrar boton To-Go"];
var MAN_SHOWPREPINWAITER = ["Zeige Anzahl vorbereiteter Produkte in mobiler Tischansicht an","Show number of prepared products in mobile table view","Mostrar numero de los productos preparados en vista movil de las mesas"];
var MAN_CLOSSHOWCI = ["Betriebsinfo auf Tagesabschlussbon","Print company info on closing receipt","Imprimir info del café en el cerramiento"]; var MAN_CLOSSHOWCI = ["Betriebsinfo auf Tagesabschlussbon","Print company info on closing receipt","Imprimir info del café en el cerramiento"];
var MAN_CLOSSHOWPAYTAXES = ["Individuelle Steuerbeträge pro Zahlungsweg auf Tagesabschluss","Print each tax per payment way on closing","Imprimir cada impuesto por cada camino de pagar en el cerramiento"]; var MAN_CLOSSHOWPAYTAXES = ["Individuelle Steuerbeträge pro Zahlungsweg auf Tagesabschluss","Print each tax per payment way on closing","Imprimir cada impuesto por cada camino de pagar en el cerramiento"];
var MAN_CLOSSHOWPRODS = ["Produktstatistik auf Tagesabschlussbon","Product statistics on closung","Statistica de productos en el cerramiento"]; var MAN_CLOSSHOWPRODS = ["Produktstatistik auf Tagesabschlussbon","Product statistics on closung","Statistica de productos en el cerramiento"];
@ -431,7 +432,7 @@ var MAN_DRINKS_CAT = ["Getränke","Drinks","Bebidas"];
var MAN_CHANGE_ROLE_AREA = ["Rolle und Tischbereich ändern","Change role and area","Cambiar region y role"]; var MAN_CHANGE_ROLE_AREA = ["Rolle und Tischbereich ändern","Change role and area","Cambiar region y role"];
var lang = 0; 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,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,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, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1];
var numberOfClosings = 0; var numberOfClosings = 0;
@ -556,7 +557,8 @@ var generalValuesSettings = [
["taskallassign",MAN_TASK_ALLASSIGN[lang],"s",50], ["taskallassign",MAN_TASK_ALLASSIGN[lang],"s",50],
["taskownerempty",MAN_TASK_OWNEREMPTY[lang],"s",51], ["taskownerempty",MAN_TASK_OWNEREMPTY[lang],"s",51],
["taskifempty",MAN_TASK_IF_EMPTY[lang],"s",52], ["taskifempty",MAN_TASK_IF_EMPTY[lang],"s",52],
["showtogo",MAN_SHOWTOGO[lang],"s",53] ["showtogo",MAN_SHOWTOGO[lang],"s",53],
["showprepinwaiter",MAN_SHOWPREPINWAITER[lang],"s",54]
]; ];
var predef = ""; var predef = "";
@ -829,6 +831,7 @@ function insertGeneralConfigItems(configResult) {
$("#partOfTaskifempty").html(createYesNo("taskifempty",MAN_TASK_IF_EMPTY, values.taskifempty)); $("#partOfTaskifempty").html(createYesNo("taskifempty",MAN_TASK_IF_EMPTY, values.taskifempty));
$("#partOfTaskownerempty").html(createTaskOwnerEmptyPart(values.taskownerempty)); $("#partOfTaskownerempty").html(createTaskOwnerEmptyPart(values.taskownerempty));
$("#partOfShowtogo").html(createYesNo("showtogo",MAN_SHOWTOGO, values.showtogo)); $("#partOfShowtogo").html(createYesNo("showtogo",MAN_SHOWTOGO, values.showtogo));
$("#partOfShowprepinwaiter").html(createYesNo("showprepinwaiter",MAN_SHOWPREPINWAITER, values.showprepinwaiter));
$("#partOfDashslot1").html(createDashslotPart(1,values.dashslot1)); $("#partOfDashslot1").html(createDashslotPart(1,values.dashslot1));
$("#partOfDashslot2").html(createDashslotPart(2,values.dashslot2)); $("#partOfDashslot2").html(createDashslotPart(2,values.dashslot2));
@ -956,6 +959,7 @@ function insertGeneralConfigItems(configResult) {
generalVals[51] = values.taskownerempty; generalVals[51] = values.taskownerempty;
generalVals[52] = values.taskifempty; generalVals[52] = values.taskifempty;
generalVals[53] = values.showtogo; generalVals[53] = values.showtogo;
generalVals[54] = values.showprepinwaiter;
defaulttmp = values.defaulttmp; defaulttmp = values.defaulttmp;
@ -1358,7 +1362,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.5.3"; document.location.href = "index.html?v=1.5.4";
},250); },250);
} }
}, },
@ -1898,9 +1902,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis(); var millis=getMillis();
setTimeout(function(){ setTimeout(function(){
document.location.href = "install.html?v=1.5.3&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.5.4&mode=onlyupdate&n=" + millis;
},250); },250);
document.location.href = "install.html?v=1.5.3&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.5.4&mode=onlyupdate&n=" + millis;
} }
function handleUpdateReplace(answer) { function handleUpdateReplace(answer) {
@ -3720,6 +3724,7 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfBeepOrdered"></div> <div id="partOfBeepOrdered"></div>
<div id="partOfBeepCooked"></div> <div id="partOfBeepCooked"></div>
<div id="partOfShowtogo"></div> <div id="partOfShowtogo"></div>
<div id="partOfShowprepinwaiter"></div>
<div id="partOfDblog"></div> <div id="partOfDblog"></div>
<p>&nbsp; <p>&nbsp;

View File

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

View File

@ -1162,7 +1162,8 @@ class Admin {
array("certificatesn","",false), array("certificatesn","",false),
array("rksvserver","",false), array("rksvserver","",false),
array("webimpressum","",false) array("webimpressum","",false),
array("showprepinwaiter",1,false)
); );
if (is_null($pdo)) { if (is_null($pdo)) {
@ -1356,7 +1357,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.5.3"); echo json_encode($view . "?v=1.5.4");
} }
} }
@ -1571,30 +1572,30 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.3"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.4"); }
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.3"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.4"); }
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.3"); } if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.4"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.3"); } if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.4"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.3"); } if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.4"); }
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.3"); } if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.4"); }
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.3"); } if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.4"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.3"); } if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.4"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.3"); } if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.4"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.3"); } if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.4"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.3"); } if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.4"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.3"); } if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.4"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.3"); } if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.4"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.3"); } if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.4"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.3"); } if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.4"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.3"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.4");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.3"); } if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.4"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.3"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.4");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.3"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.4");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -2146,7 +2147,8 @@ class Admin {
"paydeskid" => array("dbcol" => "paydeskid","checknum" => 0), "paydeskid" => array("dbcol" => "paydeskid","checknum" => 0),
"aeskey" => array("dbcol" => "aeskey","checknum" => 0), "aeskey" => array("dbcol" => "aeskey","checknum" => 0),
"certificatesn" => array("dbcol" => "certificatesn","checksum" => 0), "certificatesn" => array("dbcol" => "certificatesn","checksum" => 0),
"rksvserver" => array("dbcol" => "rksvserver","checksum" => 0) "rksvserver" => array("dbcol" => "rksvserver","checksum" => 0),
"showprepinwaiter" => array("dbcol" => "showprepinwaiter","checksum" => 0)
); );
$problem = false; $problem = false;
foreach ($changedValues as $aChangeSet) { foreach ($changedValues as $aChangeSet) {
@ -3016,7 +3018,7 @@ class Admin {
$typeIsOnlyConfig = true; $typeIsOnlyConfig = true;
self::doSql($pdo, "SET foreign_key_checks = 0;", null); self::doSql($pdo, "SET foreign_key_checks = 0", null);
foreach($dbContent as $table) { foreach($dbContent as $table) {
$tablename = "%" . $table[$tableKey] . "%"; $tablename = "%" . $table[$tableKey] . "%";
@ -3030,12 +3032,6 @@ class Admin {
$typeIsOnlyConfig = false; $typeIsOnlyConfig = false;
} }
if ($table[$tableKey] == "bill") {
$sql = "SET FOREIGN_KEY_CHECKS = 0";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
}
foreach($tablecontent as $row) { foreach($tablecontent as $row) {
$cols = array(); $cols = array();
$vals = array(); $vals = array();
@ -3063,22 +3059,17 @@ class Admin {
$errorMsg = $e->getMessage(); $errorMsg = $e->getMessage();
} }
} }
if ($table[$tableKey] == "bill") {
$sql = "SET FOREIGN_KEY_CHECKS = 1";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
}
} }
if (!$typeIsOnlyConfig) { if (!$typeIsOnlyConfig) {
HistFiller::insertRestoreHistEntry($pdo); HistFiller::insertRestoreHistEntry($pdo);
} }
self::doSql($pdo, "SET foreign_key_checks = 1;", null);
$basedb->signLastBillid($pdo); $basedb->signLastBillid($pdo);
self::doSql($pdo, "SET foreign_key_checks = 1", null);
$pdo->commit(); $pdo->commit();
$this->completeImportProcess($pdo); $this->completeImportProcess($pdo);
@ -3124,7 +3115,7 @@ class Admin {
$typeIsOnlyConfig = true; $typeIsOnlyConfig = true;
self::doSql($pdo, "SET foreign_key_checks = 0;", null); self::doSql($pdo, "SET foreign_key_checks = 0", null);
foreach($jsonFiles as $table) { foreach($jsonFiles as $table) {
if ($table == "version") { if ($table == "version") {
@ -3142,12 +3133,6 @@ class Admin {
$typeIsOnlyConfig = false; $typeIsOnlyConfig = false;
} }
if ($table == "bill") {
$sql = "SET FOREIGN_KEY_CHECKS = 0";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
}
foreach($tablecontent as $row) { foreach($tablecontent as $row) {
$cols = array(); $cols = array();
$vals = array(); $vals = array();
@ -3181,12 +3166,6 @@ class Admin {
$errorMsg = $e->getMessage(); $errorMsg = $e->getMessage();
} }
} }
if ($table == "bill") {
$sql = "SET FOREIGN_KEY_CHECKS = 1";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
}
} }
foreach($jsonFiles as $table) { foreach($jsonFiles as $table) {
@ -3197,7 +3176,7 @@ class Admin {
HistFiller::insertRestoreHistEntry($pdo); HistFiller::insertRestoreHistEntry($pdo);
} }
self::doSql($pdo, "SET foreign_key_checks = 1;", null); self::doSql($pdo, "SET foreign_key_checks = 1", null);
$basedb->signLastBillid($pdo); $basedb->signLastBillid($pdo);

View File

@ -233,6 +233,7 @@ CommonUtils::execSql($pdo, $sql, null);
$sql = "DELETE FROM %queue% WHERE id not in (select distinct queueid FROM %billproducts%) AND billid is null"; $sql = "DELETE FROM %queue% WHERE id not in (select distinct queueid FROM %billproducts%) AND billid is null";
CommonUtils::execSql($pdo, $sql, null); CommonUtils::execSql($pdo, $sql, null);
CommonUtils::execSql($pdo, "OPTIMIZE TABLE %queue%", null);
$sql = "UPDATE %queue% set paidtime=?,delivertime=? WHERE billid is not null AND paidtime is null"; $sql = "UPDATE %queue% set paidtime=?,delivertime=? WHERE billid is not null AND paidtime is null";
CommonUtils::execSql($pdo, $sql, array($closingTime,$closingTime)); CommonUtils::execSql($pdo, $sql, array($closingTime,$closingTime));
@ -242,6 +243,7 @@ CommonUtils::execSql($pdo, $sql, array($closingTime,1));
$sql = "DELETE FROM %printjobs%"; $sql = "DELETE FROM %printjobs%";
CommonUtils::execSql($pdo, $sql, null); CommonUtils::execSql($pdo, $sql, null);
CommonUtils::execSql($pdo, "OPTIMIZE TABLE %printjobs%", null);
$sql = "UPDATE %queue% SET isclosed=?"; $sql = "UPDATE %queue% SET isclosed=?";
CommonUtils::execSql($pdo, $sql, array(1)); CommonUtils::execSql($pdo, $sql, array(1));
@ -250,6 +252,7 @@ $dblogging = CommonUtils::getConfigValue($pdo, 'dblog', 1);
if ($dblogging == 0) { if ($dblogging == 0) {
$sql = "DELETE FROM %log%"; $sql = "DELETE FROM %log%";
CommonUtils::execSql($pdo, $sql, null); CommonUtils::execSql($pdo, $sql, null);
CommonUtils::execSql($pdo, "OPTIMIZE TABLE %log%", null);
} }
workreceipts::resetWorkReceiptId($pdo); workreceipts::resetWorkReceiptId($pdo);

View File

@ -33,6 +33,7 @@ class Customers {
"exportLog" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")), "exportLog" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"getPaymentsForGuest" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")), "getPaymentsForGuest" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"reportbills" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")), "reportbills" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"reportcustomerbills" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"payallguests" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")) "payallguests" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers"))
); );
@ -97,7 +98,7 @@ class Customers {
} }
function handleCommand($command) { function handleCommand($command) {
if ($command == "reportbills") { if (($command == "reportbills") || ($command == "reportcustomerbills")) {
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
@ -112,7 +113,7 @@ class Customers {
} }
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
self::reportbills($pdo); self::$command($pdo);
return; return;
} }
if (!self::checkRights($command)) { if (!self::checkRights($command)) {
@ -770,11 +771,53 @@ class Customers {
return number_format($result[0]["sumbrutto"], 2, $decpoint, ''); return number_format($result[0]["sumbrutto"], 2, $decpoint, '');
} }
} }
private static function reportbills($pdo) {
private static function getReportCoreOfOneCustomer($pdo,$customerid,$lang) {
$decpoint = CommonUtils::getConfigValue($pdo,"decpoint",","); $decpoint = CommonUtils::getConfigValue($pdo,"decpoint",",");
$currency = CommonUtils::getConfigValue($pdo,"currency","Euro"); $currency = CommonUtils::getConfigValue($pdo,"currency","Euro");
$version = CommonUtils::getConfigValue($pdo,"version","");
$sql = "SELECT name FROM %customers% WHERE id=?";
$res = CommonUtils::fetchSqlAll($pdo, $sql, array($customerid));
if (count($res) != 1) {
return "";
}
$customername = $res[0]["name"];
$billsOfGuest = self::getUnpaidBills($pdo, $customerid)["msg"]["bills"];
$billcount = count($billsOfGuest) + 2;
$txt = "<tr>";
$txt .= "<td rowspan='$billcount' class='name'>$customername";
$txt .= "<td class='header'>" . self::$CUS_BILL_ID[$lang] . "<td class='header'>" . self::$CUS_DATE[$lang] . "<td class='header'>" . self::$CUS_BILL_SUM[$lang] . " ($currency)</tr>";
foreach($billsOfGuest as $aBill) {
$txt .= "<tr><td>" . $aBill["id"] . "<td>" . $aBill["billdate"];
$txt .= "<td>" . number_format( $aBill["brutto"], 2, $decpoint, '') . "</tr>";
}
$guestsum = self::getUnpaidSumOfCustomer($pdo, $customerid, $decpoint);
$txt .= "<tr><td colspan=2 class='sum sumheader'>" . self::$CUS_SUM[$lang] . "<td class='sum sumvalue'>$guestsum</tr>";
return $txt;
}
private static function reportcustomerbills($pdo) {
$customerid = $_GET["cusid"];
if(session_id() == '') {
session_start();
}
$lang = $_SESSION['language'];
$txt = "<html>" . self::headerOfHtmlPage($lang) . "<body>";
$txt .= self::getGuestReportTitlePart($lang);
$txt .= "<p><table class='guestreport'>";
$txt .= self::getReportCoreOfOneCustomer($pdo, $customerid, $lang);
$txt .= "</table>";
$txt .= self::getFooter($pdo, $lang);
$txt .= "</body></html>";
echo $txt;
}
private static function reportbills($pdo) {
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
} }
@ -796,26 +839,11 @@ class Customers {
} else { } else {
foreach($allGuestWithUnpaidBills["msg"] as $aGuest) { foreach($allGuestWithUnpaidBills["msg"] as $aGuest) {
$customerid = $aGuest["id"]; $customerid = $aGuest["id"];
$customername = $aGuest["name"]; $txt .= self::getReportCoreOfOneCustomer($pdo, $customerid, $lang);
$billsOfGuest = self::getUnpaidBills($pdo, $customerid)["msg"]["bills"];
$billcount = count($billsOfGuest) + 2;
$txt .= "<tr>";
$txt .= "<td rowspan='$billcount' class='name'>$customername";
$txt .= "<td class='header'>" . self::$CUS_BILL_ID[$lang] . "<td class='header'>" . self::$CUS_DATE[$lang] . "<td class='header'>" . self::$CUS_BILL_SUM[$lang] . " ($currency)</tr>";
foreach($billsOfGuest as $aBill) {
$txt .= "<tr><td>" . $aBill["id"] . "<td>" . $aBill["billdate"];
$txt .= "<td>" . number_format( $aBill["brutto"], 2, $decpoint, '') . "</tr>";
}
$guestsum = self::getUnpaidSumOfCustomer($pdo, $customerid, $decpoint);
$txt .= "<tr><td colspan=2 class='sum sumheader'>" . self::$CUS_SUM[$lang] . "<td class='sum sumvalue'>$guestsum</tr>";
} }
} }
$txt .= "</table>"; $txt .= "</table>";
$txt .= self::getFooter($version, $lang); $txt .= self::getFooter($pdo, $lang);
$txt .= "</body></html>"; $txt .= "</body></html>";
echo $txt; echo $txt;
} }
@ -824,7 +852,7 @@ class Customers {
$txt = "<head>"; $txt = "<head>";
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>"; $txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.3">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.4">';
$txt .= "</head>"; $txt .= "</head>";
return $txt; return $txt;
} }
@ -840,7 +868,8 @@ class Customers {
return $txt; return $txt;
} }
private static function getFooter($version,$lang) { private static function getFooter($pdo,$lang) {
$version = CommonUtils::getConfigValue($pdo,"version","");
$txt = "<div class='footer'>"; $txt = "<div class='footer'>";
$txt .= "<p>OrderSprinter $version"; $txt .= "<p>OrderSprinter $version";
$txt .= "</div>"; $txt .= "</div>";

View File

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

View File

@ -657,12 +657,12 @@ class PrintQueue {
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($theType)); $stmt->execute(array($theType));
} else { } else {
$sql = "SELECT id,content,type FROM %printjobs% WHERE type=? AND printer=? AND removed is null ORDER BY id"; $sql = "SELECT id,content,type FROM %printjobs% WHERE type=? AND removed is null AND printer=? ORDER BY id";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($theType,$printer)); $stmt->execute(array($theType,$printer));
} }
$result = $stmt->fetchAll(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: retrieve " . count($result) . " jobs"); CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: retrieve " . count($result) . " jobs");
$workarray = array(); $workarray = array();

View File

@ -660,7 +660,7 @@ class Products {
function getSingleProdData($pdo,$id) { function getSingleProdData($pdo,$id) {
if (is_numeric($id)) { if (is_numeric($id)) {
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(unit is not null, unit, '0') as unit,IF(days is not null, days, '0123456') as days,IF(tax is not null, tax, 'null') as tax,available,audio,favorite from %products% where id=?"; $sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(unit is not null, unit, '0') as unit,IF(days is not null, days, '0123456') as days,IF(tax is not null, tax, 'null') as tax,available,audio,favorite,IFNULL(amount,'null') as amount,IF(display is not null, display, 'KG') as display from %products% where id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($id)); $stmt->execute(array($id));

View File

@ -32,7 +32,7 @@ class QueueContent {
$cmdArray = array('getJsonAllPreparedProducts', 'getJsonLastDeliveredProducts', 'declareProductBeDelivered', 'declareMultipleProductsDelivered','declareProductNotBeDelivered'); $cmdArray = array('getJsonAllPreparedProducts', 'getJsonLastDeliveredProducts', 'declareProductBeDelivered', 'declareMultipleProductsDelivered','declareProductNotBeDelivered');
if (in_array($command, $cmdArray)) { if (in_array($command, $cmdArray)) {
if (!($this->userrights->hasCurrentUserRight('right_supply'))) { if (!($this->userrights->hasCurrentUserRight('right_supply'))) {
echo "Benutzerrechte nicht ausreichend!"; echo json_encode(array("status" => "ERROR","msg" => "Fehlende Benutzerrechte"));
return false; return false;
} }
} }
@ -1586,6 +1586,9 @@ class QueueContent {
public function getAllPreparedProductsForTableidAsArray($pdo,$tableid) { public function getAllPreparedProductsForTableidAsArray($pdo,$tableid) {
if (!is_null($tableid)) { if (!is_null($tableid)) {
if (!is_numeric($tableid)) {
return array("prods" => array(), "ids" => '');
}
$sql = "SELECT DISTINCT %queue%.id as id,tableno,longname,anoption,readytime "; $sql = "SELECT DISTINCT %queue%.id as id,tableno,longname,anoption,readytime ";
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql .= "FROM %queue%,%products%,%resttables%,%bill% "; $sql .= "FROM %queue%,%products%,%resttables%,%bill% ";
@ -1593,19 +1596,8 @@ class QueueContent {
$sql .= "FROM %queue%,%products%,%resttables% "; $sql .= "FROM %queue%,%products%,%resttables% ";
} }
$sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr=%resttables%.id "; $sql .= "AND %queue%.tablenr=%resttables%.id ";
$sql .= "AND %queue%.isclosed is null ";
$sql .= "AND ordertime is not null ";
$sql .= "AND %resttables%.id=" . $tableid . " "; $sql .= "AND %resttables%.id=" . $tableid . " ";
$sql .= "AND toremove <> '1') ";
if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
$sql .= " ORDER BY tableno";
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,'' as tableno,longname,anoption,readytime "; $sql = "SELECT DISTINCT %queue%.id as id,'' as tableno,longname,anoption,readytime ";
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
@ -1614,29 +1606,24 @@ class QueueContent {
$sql .= "FROM %queue%,%products% "; $sql .= "FROM %queue%,%products% ";
} }
$sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL "; $sql .= "WHERE (readytime IS NOT NULL and delivertime IS NULL ";
$sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.tablenr is null "; $sql .= "AND %queue%.tablenr is null ";
$sql .= "AND ordertime is not null ";
$sql .= "AND %queue%.isclosed is null ";
$sql .= "AND toremove <> '1') ";
if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
$sql = $sql . " ORDER BY tableno";
} }
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $sql .= "AND %queue%.productid=%products%.id ";
$sql .= "AND %queue%.isclosed is null ";
$sql .= "AND ordertime is not null ";
$sql .= "AND toremove <> '1') ";
if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) ";
}
$sql = $sql . " ORDER BY tableno";
$stmt->execute(); $dbresult = CommonUtils::fetchSqlAll($pdo, $sql, null);
$dbresult = $stmt->fetchAll();
$numberOfIcons = count($dbresult);
$arrayOfProdsForTable = array(); $arrayOfProdsForTable = array();
$idsProdsOfTable = ''; // this is a hack! All queueids of a table redundant for "Deliver all" $idsProdsOfTable = array(); // this is a hack! All queueids of a table redundant for "Deliver all"
foreach($dbresult as $zeile) { foreach($dbresult as $zeile) {
$theAction= "deliver";
$longname = $zeile['longname'];
$extras = $this->getExtrasOfQueueItem(null,$zeile['id']); $extras = $this->getExtrasOfQueueItem(null,$zeile['id']);
@ -1647,14 +1634,10 @@ class QueueContent {
"extras" => $extras, "extras" => $extras,
"status" => "ready_to_deliver"); "status" => "ready_to_deliver");
$arrayOfProdsForTable[] = $anProdElem; $arrayOfProdsForTable[] = $anProdElem;
if ($idsProdsOfTable == '') { $idsProdsOfTable[] = $zeile['id'];
$idsProdsOfTable = $idsProdsOfTable . $zeile['id'];
} else {
$idsProdsOfTable = $idsProdsOfTable . ',' . $zeile['id'];
}
} }
return array("prods" => $arrayOfProdsForTable, "ids" => $idsProdsOfTable); return array("prods" => $arrayOfProdsForTable, "ids" => join(',',$idsProdsOfTable));
} }
public function numberOfProductsForTableNotDelivered($pdo,$tableid) { public function numberOfProductsForTableNotDelivered($pdo,$tableid) {
@ -1853,7 +1836,7 @@ class QueueContent {
$lastDeliveredProds[] = $deliveredProd; $lastDeliveredProds[] = $deliveredProd;
} }
} }
echo json_encode($lastDeliveredProds); echo json_encode(array("status" => "OK","msg" => $lastDeliveredProds));
} }

View File

@ -223,6 +223,7 @@ class Roomtables {
$arrayOfRooms = array(); $arrayOfRooms = array();
$showprepinwaiter = CommonUtils::getConfigValue($pdo, 'showprepinwaiter', 1);
foreach($dbresult as $zeile) { foreach($dbresult as $zeile) {
$roomid = $zeile['id']; $roomid = $zeile['id'];
@ -253,7 +254,10 @@ class Roomtables {
foreach ($tablesArray as $tableEntry) { foreach ($tablesArray as $tableEntry) {
$arrayOfProdsAndIdsOfATable = $queue->getAllPreparedProductsForTableidAsArray($pdo,$tableEntry->id); $arrayOfProdsAndIdsOfATable = array("prods" => array(), "ids" => '');
if ($showprepinwaiter == 1) {
$arrayOfProdsAndIdsOfATable = $queue->getAllPreparedProductsForTableidAsArray($pdo,$tableEntry->id);
}
$arrayOfProdsOfATable = $arrayOfProdsAndIdsOfATable['prods']; $arrayOfProdsOfATable = $arrayOfProdsAndIdsOfATable['prods'];
$numberOfProductsTotalToServe = $queue->numberOfProductsForTableNotDelivered($pdo,$tableEntry->id); $numberOfProductsTotalToServe = $queue->numberOfProductsForTableNotDelivered($pdo,$tableEntry->id);
$numberOfReadyProducts = count($arrayOfProdsOfATable); $numberOfReadyProducts = count($arrayOfProdsOfATable);
@ -272,7 +276,10 @@ class Roomtables {
$priceTakeAway = $this->getUnpaidSumOfTakeAway($pdo); $priceTakeAway = $this->getUnpaidSumOfTakeAway($pdo);
$arrayOfProdsAndIdsOfATable = $queue->getAllPreparedProductsForTableidAsArray($pdo,null); $arrayOfProdsAndIdsOfATable = array("prods" => array(), "ids" => '');
if ($showprepinwaiter == 1) {
$arrayOfProdsAndIdsOfATable = $queue->getAllPreparedProductsForTableidAsArray($pdo,null);
}
$arrayOfProdsOfATable = $arrayOfProdsAndIdsOfATable['prods']; $arrayOfProdsOfATable = $arrayOfProdsAndIdsOfATable['prods'];
$numberOfProductsTotalToServe = $queue->numberOfProductsForTableNotDelivered($pdo,null); $numberOfProductsTotalToServe = $queue->numberOfProductsForTableNotDelivered($pdo,null);
$numberOfReadyProducts = count($arrayOfProdsOfATable); $numberOfReadyProducts = count($arrayOfProdsOfATable);

View File

@ -941,6 +941,19 @@ class Version {
return array(false,$e); return array(false,$e);
} }
} }
public static function upd_1503_1504($pdo, $prefix, $dbname) {
try {
$sql = "ALTER TABLE %printjobs% ADD INDEX tprintjobs (type,removed,printer)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
self::insertOrUpdateConfigItem($pdo, 'showprepinwaiter', '1');
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"), "1.3.1" => array("upd_1301_1302","1.3.2"),
@ -991,7 +1004,8 @@ class Version {
"1.4.18" => array("upd_1418_1500","1.5.0"), "1.4.18" => array("upd_1418_1500","1.5.0"),
"1.5.0" => array("upd_1500_1501","1.5.1"), "1.5.0" => array("upd_1500_1501","1.5.1"),
"1.5.1" => array("upd_1501_1502","1.5.2"), "1.5.1" => array("upd_1501_1502","1.5.2"),
"1.5.2" => array("upd_1502_1503","1.5.3") "1.5.2" => array("upd_1502_1503","1.5.3"),
"1.5.3" => array("upd_1503_1504","1.5.4")
); );
// RE;* also for install process no check is required // RE;* also for install process no check is required

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -193,6 +193,10 @@ function beep() {
} }
function fillTableWithPreparedProds(answer) { function fillTableWithPreparedProds(answer) {
if (!answer.hasOwnProperty('newproductstoserve')) {
setTimeout(function(){document.location.href = "index.html"},250);
return;
}
var aList = ''; var aList = '';
var newproductstoserve = answer.newproductstoserve; var newproductstoserve = answer.newproductstoserve;
@ -232,7 +236,14 @@ function fillTableWithPreparedProds(answer) {
}); });
} }
function filltableWithDeliveredEntries(cookedEntries) { function filltableWithDeliveredEntries(answer) {
if (answer.status != "OK") {
setTimeout(function(){document.location.href = "index.html"},250);
return;
}
var cookedEntries = answer.msg;
var theList = '<ul data-role="listview" id="deliveredProdsList" data-divider-theme="a" data-inset="true">'; var theList = '<ul data-role="listview" id="deliveredProdsList" data-divider-theme="a" data-inset="true">';
theList += '<li data-role="list-divider" data-theme="b" data-role="heading" data-icon="check">' + S_PROVIDED[lang] + '</li>'; theList += '<li data-role="list-divider" data-theme="b" data-role="heading" data-icon="check">' + S_PROVIDED[lang] + '</li>';
$.each(cookedEntries, function (i, queueentry) { $.each(cookedEntries, function (i, queueentry) {

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.3"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.4">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.3"></script> <script src="utilities.js?v=1.5.4"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

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

View File

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