OrderSprinter 1.3.14
This commit is contained in:
parent
4e70d7756d
commit
e3176780d4
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"instance" : 1,
|
||||
"vendorid" : "4348",
|
||||
"productid" : "5584",
|
||||
"printersize" : 32,
|
||||
|
@ -6,13 +7,6 @@
|
|||
"baseurl":"http://localhost",
|
||||
"baseusername" : "",
|
||||
"basepass" : "",
|
||||
"printreceipts" : 1,
|
||||
"forreceiptprinters" : "1,2,3,4,5,6",
|
||||
"printclosings" : 1,
|
||||
"printfoodtickets1" : 1,
|
||||
"printdrinktickets1" : 1,
|
||||
"printfoodtickets2" : 1,
|
||||
"printdrinktickets2" : 1,
|
||||
"escinits" : [ 27, 64, 27, 116, 0 ],
|
||||
"escposts" : [ 29, 86, 66, 10, 27, 64],
|
||||
"useeveryprintdevice" : 1,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -85,7 +85,7 @@ class Installer {
|
|||
}
|
||||
Database::dropTables($pdo);
|
||||
Database::createEmptyTables($pdo, $prefix);
|
||||
Database::setVersion($pdo,$prefix,"1.3.13");
|
||||
Database::setVersion($pdo,$prefix,"1.3.14");
|
||||
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.
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
html{overflow-y:scroll}.ospage{font-family:Helvetica,Arial,Verdana,sans-serif;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.header{background:black}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}#loggedinuser{text-align:left;width:50%}#versioninfo{text-align:right;color:white;width:50%}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.waitermsg{order:5}.footer{order:6}}.input100{width:100%;height:50px;font-weight:bold;text-align:center}.input90{width:89%;height:50px;font-weight:bold;text-align:center}.input50{width:49%;height:50px;font-weight:bold;text-align:center}.area10{width:9%;height:50px;text-align:center}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.inputblue[type="text"]{background-color:#8ee5ee}.inputblue[type="submit"]{background-color:#8ee5ee}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.commentitem:last-child{border-bottom:0}.commentitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.commentitem:last-child{border-bottom:0}#loggedinuser{color:black}.buttonarea{box-shadow:10px 10px 5px #888}
|
||||
html{overflow-y:scroll}.ospage{font-family:Helvetica,Arial,Verdana,sans-serif;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.tableospage{width:100%;height:40px;background-color:black;color:white;text-align:center;vertical-align:middle;display:inline-table}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.tablemain{text-align:left;background:cornflowerblue;vertical-align:top;width:65%}#rightsidearea{vertical-align:top;background:violet;color:black;width:15%}.header{background:black;font-weight:bold;display:inline-table;vertical-align:middle;padding:10px}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}.tablefooter{padding:10px;background-color:black;vertical-align:middle;display:inline-table;width:100%;height:15px}.tabledashheader{padding:10px;background-color:black;vertical-align:middle;display:inline-table;width:100%;height:15px;text-align:center}.dashheader{color:white;text-align:center;font-weight:bold}#loggedinuser{float:left;color:white;background-color:black}#versioninfo{color:white;float:right;background-color:black}.floatright{float:right}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.tableaside1{background:moccasin;color:black;width:20%;vertical-align:top}.tablepanelheader{width:100%;height:40px;color:white;background-color:black;text-align:center;vertical-align:middle}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.waitermsg{order:5}.footer{order:6}}.input100{width:100%;height:50px;font-weight:bold;text-align:center}.input90{width:89%;height:50px;font-weight:bold;text-align:center}.input50{width:49%;height:50px;font-weight:bold;text-align:center}.area10{width:9%;height:50px;text-align:center}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.inputblue[type="text"]{background-color:#8ee5ee}.inputblue[type="submit"]{background-color:#8ee5ee}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.commentitem:last-child{border-bottom:0}.commentitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.commentitem:last-child{border-bottom:0}.buttonarea{box-shadow:10px 10px 5px #888}
|
|
@ -0,0 +1,230 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Ansicht Dashboard</title>
|
||||
<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={VERSION}">
|
||||
|
||||
<link rel="stylesheet" href="css/ospage.css" />
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/jqueryui1-12-0/jquery-ui.min.css" />
|
||||
<script src="php/3rdparty/jquery-2.2.4.min.js"></script>
|
||||
<script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script>
|
||||
|
||||
<script src="utilities.js"></script>
|
||||
<script src="receiptutils.js"></script>
|
||||
<script src="elements/dash.js"></script>
|
||||
<script src="php/3rdparty/Chart.bundle.min.js"></script>
|
||||
|
||||
<script>
|
||||
// insert waiterdesk elements here
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
.rounddiv {
|
||||
border-radius: 25px;
|
||||
border: 5px solid #73AD21;
|
||||
padding: 20px;
|
||||
background-color: #111111;
|
||||
}
|
||||
|
||||
.rounddiv h1 {
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
background-color: gray;
|
||||
border-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<script>
|
||||
var lang = 0;
|
||||
var decpoint = ",";
|
||||
var currency = "EUR";
|
||||
|
||||
var mainmenu = [];
|
||||
var version = "";
|
||||
var loggedinUser = "";
|
||||
|
||||
var dashslot1 = 1;
|
||||
var dashslot2 = 2;
|
||||
var dashslot3 = 3;
|
||||
|
||||
$(document).ready(function () {
|
||||
getGeneralConfigItems();
|
||||
doAjax("GET", "php/contenthandler.php?module=admin&command=getJsonMenuItemsAndVersion", null, saveMenuInfo, null, true);
|
||||
});
|
||||
|
||||
function getGeneralConfigItems() {
|
||||
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGeneralConfigItems, "Fehler Konfigurationsdaten");
|
||||
intervalGetPrinterStatus(5);
|
||||
intervalGetDashReports(10);
|
||||
}
|
||||
|
||||
function insertGeneralConfigItems(configResult) {
|
||||
if (configResult.status == "OK") {
|
||||
var values = configResult.msg;
|
||||
|
||||
decpoint = values.decpoint;
|
||||
currency = values.currency;
|
||||
lang = values.userlanguage;
|
||||
|
||||
dashslot1 = values.dashslot1;
|
||||
dashslot2 = values.dashslot2;
|
||||
dashslot3 = values.dashslot3;
|
||||
|
||||
} else {
|
||||
$("#contentpart").hide();
|
||||
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
|
||||
}
|
||||
}
|
||||
|
||||
function saveMenuInfo(menuAndVersion) {
|
||||
if (menuAndVersion.loggedin == 1) {
|
||||
loggedinUser = menuAndVersion.user;
|
||||
$("#loggedinuser").html(" " + loggedinUser);
|
||||
|
||||
$("#versioninfo").html(menuAndVersion.version);
|
||||
version = menuAndVersion.version;
|
||||
|
||||
$.each(menuAndVersion.menu, function (i, module) {
|
||||
var name = module.name;
|
||||
var link = module.link;
|
||||
|
||||
mainmenu[mainmenu.length] = { name: name, link: link };
|
||||
});
|
||||
|
||||
$("#mainmenubtn").show();
|
||||
} else {
|
||||
$("#mainmenubtn").hide();
|
||||
}
|
||||
bindMainMenuButton();
|
||||
}
|
||||
|
||||
function bindMainMenuButton() {
|
||||
$("#mainmenudlg").dialog(
|
||||
{autoOpen: false,
|
||||
modal: true,
|
||||
height: 400,
|
||||
width: 200,
|
||||
position:{my:"right top",at:"right top", of:"body"},
|
||||
buttons: {
|
||||
Abbrechen: function() {$(this).dialog("close"); }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#mainmenubtn").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
var txt = "<div><ul class='mainmenuchoice'>";
|
||||
for (var i = 0; i < mainmenu.length; i++) {
|
||||
txt += "<li id='mainmenu_" + i + "' class='mainmenuitem' >" + toHtml(mainmenu[i].name) + "</li>";
|
||||
}
|
||||
txt += "</ul></div>";
|
||||
$("#mainmenudlg").html(txt);
|
||||
|
||||
var height = 280 + mainmenu.length * 40;
|
||||
|
||||
$("#mainmenudlg").dialog(
|
||||
{autoOpen: false,
|
||||
modal: true,
|
||||
height: height,
|
||||
width: 200,
|
||||
position:{my:"right top",at:"right top", of:"body"},
|
||||
buttons: {
|
||||
Abbrechen: function() {$(this).dialog("close"); }
|
||||
}
|
||||
});
|
||||
|
||||
$("#mainmenudlg").dialog("open");
|
||||
|
||||
$(".mainmenuitem").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var selectedmenuindex = parseInt(this.id.split('_')[1]);
|
||||
var url = mainmenu[selectedmenuindex].link;
|
||||
$("#mainmenudlg").dialog("close");
|
||||
setTimeout(function(){document.location.href = url},250);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function intervalGetDashReports(seconds) {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=getdashreports",null,insertDashReports,null,true);
|
||||
var fetchTimer = setInterval(function() {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=getdashreports",null,insertDashReports,null,true);
|
||||
}, seconds * 1000);
|
||||
}
|
||||
|
||||
function insertDashReports(answer) {
|
||||
if (answer.status != "OK") {
|
||||
alert("Fehler bei der Abfrage: " + answer.msg);
|
||||
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
|
||||
} else {
|
||||
var dash = new Dash();
|
||||
createDashSlot(dash,"#slot1div",dashslot1,answer.msg.stat);
|
||||
createDashSlot(dash,"#slot2div",dashslot2,answer.msg.stat);
|
||||
createDashSlot(dash,"#slot3div",dashslot3,answer.msg.stat);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function createDashSlot(dash,slotId,diagramNumber,stat) {
|
||||
if (diagramNumber == 0) {
|
||||
// REM* nothing
|
||||
$(slotId).hide();
|
||||
return;
|
||||
}
|
||||
$(slotId).show();
|
||||
if (diagramNumber == 1) {
|
||||
dash.createUserCash(slotId,stat.usersums, currency);
|
||||
} else if (diagramNumber == 2) {
|
||||
dash.createTablesReport(slotId,stat.tables, currency);
|
||||
} else if (diagramNumber == 3) {
|
||||
dash.createProdCountReport(slotId,stat.prodscount, currency);
|
||||
} else if (diagramNumber == 4) {
|
||||
dash.createProdSumReport(slotId,stat.prodssum, currency);
|
||||
} else if (diagramNumber == 5) {
|
||||
dash.createMonthReport(slotId,stat.thismonth, currency);
|
||||
} else if (diagramNumber == 6) {
|
||||
dash.createDayReport(slotId,stat.today, currency);
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="tabledashheader" style="table-inbox">
|
||||
<span class="dashheader">Dashboard <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></span>
|
||||
<span class="floatright"><input id="mainmenubtn" class="inputwhite" type="submit" value="Hauptmenü" /></span>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><div id="slot1div" class="rounddiv"><h1></h1><canvas id="slot1" width="550" height="550"></canvas></div>
|
||||
<td><div id="slot2div" class="rounddiv"><h1></h1><canvas id="slot2" width="550" height="550"></canvas></div>
|
||||
<td><div id="slot3div" class="rounddiv"><h1></h1><canvas id="slot3" width="550" height="550"></canvas></div>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div> <!-- main -->
|
||||
|
||||
<div class="tablefooter">
|
||||
<span id="loggedinuser"></span>
|
||||
<span id="versioninfo"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mainmenudlg" title="Hauptmenü">Hauptmenü</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,147 @@
|
|||
function Dash() {
|
||||
|
||||
this.backColors = [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
];
|
||||
|
||||
this.borderColors = [
|
||||
'rgba(255,99,132,1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)',
|
||||
'rgba(75, 192, 192, 1)',
|
||||
'rgba(153, 102, 255, 1)',
|
||||
'rgba(255, 159, 64, 1)'
|
||||
];
|
||||
|
||||
this.createColsArray = function(inputColors,count) {
|
||||
var cols = [];
|
||||
for (var i=0;i<count;i++) {
|
||||
cols[cols.length] = inputColors[i % inputColors.length];
|
||||
}
|
||||
return cols;
|
||||
};
|
||||
|
||||
this.createTablesReport = function(slotid,tables,currency) {
|
||||
var tablestotal = tables.tablestotal;
|
||||
var opentables = tables.opentables;
|
||||
var emptyTables = tablestotal - opentables;
|
||||
var sum = tables.sum;
|
||||
|
||||
$(slotid + " h1").html('Leere/abgerechnete Tische','Offene Tische');
|
||||
|
||||
var canvas = $(slotid + " canvas");
|
||||
|
||||
var backCols = this.createColsArray(this.backColors,2);
|
||||
|
||||
Chart.defaults.global.defaultFontColor = '#aaa';
|
||||
Chart.defaults.global.defaultColor = '#aaa';
|
||||
|
||||
var myChart = new Chart(canvas, {
|
||||
type: 'pie',
|
||||
|
||||
data: {
|
||||
labels: ['Leere/abgerechnete Tische','Offene Tische'],
|
||||
datasets: [{
|
||||
backgroundColor: backCols,
|
||||
data: [emptyTables,opentables],
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
animation: false,
|
||||
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
fontColor: 'rgb(200, 200, 200)'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.createMonthReport = function(slotid,monthdata,currency) {
|
||||
$(slotid + " h1").html('Monatseinnahme (' + currency + ")");
|
||||
this.createDashReport(slotid,monthdata.content,'Monatseinnahme (' + currency + ")","iter","sum",'line');
|
||||
};
|
||||
|
||||
this.createDayReport = function(slotid,monthdata,currency) {
|
||||
$(slotid + " h1").html('Tagesseinnahmen (' + currency + ")");
|
||||
this.createDashReport(slotid,monthdata.content,'Tageseinnahmen (' + currency + ")","iter","sum",'line');
|
||||
};
|
||||
|
||||
this.createUserCash = function(slotid,usersums,currency) {
|
||||
$(slotid + " h1").html('Kellnereinnahmen (' + currency + ")","iter","sum",'bar');
|
||||
this.createDashReport(slotid,usersums.content,'Einnahmen (' + currency + ")","iter","sum",'bar');
|
||||
};
|
||||
|
||||
this.createProdCountReport = function(slotid,prodcount,currency) {
|
||||
$(slotid + " h1").html('Anzahl verkaufte Produkte','longname','value','bar');
|
||||
this.createDashReport(slotid,prodcount,'Anzahl verkaufte Produkte','longname','value','bar');
|
||||
};
|
||||
|
||||
this.createProdSumReport = function(slotid,prodcount,currency) {
|
||||
$(slotid + " h1").html('Umsatz verkaufte Produkte (' + currency + ')','longname','value','bar');
|
||||
this.createDashReport(slotid,prodcount,'Umsatz verkaufte Produkte (' + currency + ')','longname','value','bar');
|
||||
};
|
||||
|
||||
this.createDashReport = function(slotid,prodcount,label,nameLabel,valueLabel,chartType) {
|
||||
|
||||
var values = [];
|
||||
var names = [];
|
||||
for (var i=0;i<prodcount.length;i++) {
|
||||
var anEntry = prodcount[i];
|
||||
values[values.length] = anEntry[valueLabel];
|
||||
names[names.length] = anEntry[nameLabel];
|
||||
};
|
||||
|
||||
// longname, prodcount
|
||||
var canvas = $(slotid + " canvas");
|
||||
var backCols = this.createColsArray(this.backColors,prodcount.length);
|
||||
var borderCols = this.createColsArray(this.borderColors,prodcount.length);
|
||||
|
||||
Chart.defaults.global.defaultFontColor = '#aaa';
|
||||
Chart.defaults.global.defaultColor = '#aaa';
|
||||
|
||||
var myChart = new Chart(canvas, {
|
||||
type: chartType,
|
||||
|
||||
data: {
|
||||
labels: names,
|
||||
datasets: [{
|
||||
label: label,
|
||||
data: values,
|
||||
backgroundColor: backCols,
|
||||
borderColor: borderCols,
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero:true,
|
||||
fontColor: "#CCC", // this here
|
||||
}
|
||||
}],
|
||||
xAxes:[{
|
||||
gridLines:{
|
||||
color:"rgba(255,255,255,0.5)",
|
||||
zeroLineColor:"rgba(255,255,255,0.5)"
|
||||
},
|
||||
}],
|
||||
},
|
||||
|
||||
animation: false,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -325,7 +325,7 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,unit,days,tax,t
|
|||
function createInputField(idForNameOfField,idForInputField,nameOfInputField) {
|
||||
var txt = '<p><div data-role="fieldcontain">'
|
||||
+ '<label for="' + idForInputField + '"><span id="' + idForNameOfField + '"></span></label>'
|
||||
+ '<input type="text" name="' + nameOfInputField + '" id="' + idForInputField + '" /></div></p>';
|
||||
+ '<input type="text" name="' + nameOfInputField + '" id="' + idForInputField + '" style="background:white;" /></div></p>';
|
||||
return txt;
|
||||
}
|
||||
|
||||
|
@ -386,14 +386,23 @@ function createProdType(id,name,kind,usekitchen,usesupplydesk,printer) {
|
|||
|
||||
|
||||
createUpperMenuTypeStructure: function() {
|
||||
|
||||
var txt = '<h3>' + this.name + '</h3><p>'
|
||||
|
||||
+ '<button id="toggleprodtype_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_TYPEPROPS[lang] + '</button>'
|
||||
|
||||
+ '<div id="typepropertiespart_' + this.id + '" style="display:none;" >'
|
||||
+ "<div id=dtypekind_" + this.id + " ></div>"
|
||||
+ "<div id=dtypeuk_" + this.id + " ></div>"
|
||||
+ "<div id=dtypeus_" + this.id + " ></div>"
|
||||
+ "<div id=dtypeprinter_" + this.id + " ></div>"
|
||||
|
||||
+ createInputField("typename_" + this.id,"typename_input_" + this.id,"typename_input_" + this.id)
|
||||
|
||||
+ createResetApplyArea("typeapply_" + this.id,"typecancel_" + this.id,"typedel_" + this.id)
|
||||
|
||||
+ '</div>'
|
||||
|
||||
+ '</p>';
|
||||
return txt;
|
||||
},
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -206,7 +206,7 @@ function handleResultOfInstallCheck(is_installed) {
|
|||
if (is_installed == "Yes") {
|
||||
useInstallation();
|
||||
} else {
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.13"},500);
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.14"},500);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.3.13</button>
|
||||
<button id="updatebtn">Update -> 1.3.14</button>
|
||||
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
|
|
|
@ -1171,12 +1171,12 @@ return false;
|
|||
}
|
||||
|
||||
private function execSql($pdo,$sql) {
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
private function execSqlWithParam($pdo,$sql,$param) {
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute($param);
|
||||
}
|
||||
|
||||
|
@ -1850,12 +1850,8 @@ $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
|||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
if (count($result) == 0) {
|
||||
$sql = "ALTER TABLE %customers% ADD hello VARCHAR(100) NULL AFTER www";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$sql = "ALTER TABLE %customers% ADD regards VARCHAR(100) NULL AFTER hello";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$this->execSql($pdo, "ALTER TABLE %customers% ADD hello VARCHAR(100) NULL AFTER www");
|
||||
$this->execSql($pdo, "ALTER TABLE %customers% ADD regards VARCHAR(100) NULL AFTER hello");
|
||||
$this->execSql($pdo, "OPTIMIZE TABLE %customers%");
|
||||
}
|
||||
|
||||
|
@ -1947,9 +1943,7 @@ return false;
|
|||
|
||||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array('updateurl','http://www.ordersprinter.de/update'));
|
||||
$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('updateurl','http://www.ordersprinter.de/update'));
|
||||
|
||||
$this->updateVersion($pdo, '1.3.7');
|
||||
return true;
|
||||
|
@ -2009,24 +2003,15 @@ return false;
|
|||
|
||||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$sql = "ALTER TABLE %products% ADD unit INT(2) NULL AFTER priceC";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$sql = "ALTER TABLE %histprod% ADD unit INT(2) NULL AFTER priceC";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$this->execSql($pdo, "ALTER TABLE %products% ADD unit INT(2) NULL AFTER priceC");
|
||||
$this->execSql($pdo, "ALTER TABLE %histprod% ADD unit INT(2) NULL AFTER priceC");
|
||||
|
||||
$this->updateVersion($pdo, '1.3.9');
|
||||
$sql = "ALTER TABLE %products% ADD days VARCHAR(20) NULL AFTER unit";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$sql = "ALTER TABLE %histprod% ADD days VARCHAR(20) NULL AFTER unit";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
|
||||
$sql = "ALTER TABLE %user% ADD failedlogins VARCHAR(20) NULL AFTER extrasapplybtnpos";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$this->execSql($pdo, "ALTER TABLE %products% ADD days VARCHAR(20) NULL AFTER unit");
|
||||
$this->execSql($pdo, "ALTER TABLE %histprod% ADD days VARCHAR(20) NULL AFTER unit");
|
||||
|
||||
$this->execSql($pdo, "ALTER TABLE %user% ADD failedlogins VARCHAR(20) NULL AFTER extrasapplybtnpos");
|
||||
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
|
@ -2079,9 +2064,7 @@ $stmt->execute(array('showpayment7','0'));
|
|||
$stmt->execute(array('showpayment8','0'));
|
||||
}
|
||||
|
||||
$sql = "ALTER TABLE %extras% ADD sorting INT(2) NULL AFTER price";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$this->execSql($pdo, "ALTER TABLE %extras% ADD sorting INT(2) NULL AFTER price");
|
||||
|
||||
$sql = "SELECT id FROM %extras% WHERE removed is null";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
|
@ -2175,6 +2158,63 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1313_1314($prefix, $version, $dbname) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
if ($version != "1.3.13") {
|
||||
$ret = $this->updateUserTable1312_1313($prefix, $version, $dbname);
|
||||
if (!$ret) {
|
||||
echo "Version update v1.3.12 to 1.3.13 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('k1prinstance','1'));
|
||||
$stmt->execute(array('k2prinstance','1'));
|
||||
$stmt->execute(array('k3prinstance','1'));
|
||||
$stmt->execute(array('k4prinstance','1'));
|
||||
$stmt->execute(array('k5prinstance','1'));
|
||||
$stmt->execute(array('k6prinstance','1'));
|
||||
$stmt->execute(array('d1prinstance','1'));
|
||||
$stmt->execute(array('d2prinstance','1'));
|
||||
$stmt->execute(array('f1prinstance','1'));
|
||||
$stmt->execute(array('f2prinstance','1'));
|
||||
|
||||
$stmt->execute(array('dashslot1','1'));
|
||||
$stmt->execute(array('dashslot2','2'));
|
||||
$stmt->execute(array('dashslot3','3'));
|
||||
|
||||
$sql = "SHOW COLUMNS FROM %user% LIKE 'right_dash'";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
if (count($result) == 0) {
|
||||
$this->execSql($pdo, "ALTER TABLE %user% ADD right_dash INT(2) NULL AFTER right_closing");
|
||||
$this->execSql($pdo, "ALTER TABLE %histuser% ADD right_dash INT(2) NULL AFTER right_closing");
|
||||
|
||||
$this->execSqlWithParam($pdo, "UPDATE %user% SET right_dash=?", array(0));
|
||||
$this->execSqlWithParam($pdo, "UPDATE %histuser% SET right_dash=?", array(0));
|
||||
|
||||
$this->execSqlWithParam($pdo, "UPDATE %user% SET right_dash=? WHERE right_manager=? OR is_admin=?", array(1,1,1));
|
||||
$this->execSqlWithParam($pdo, "UPDATE %histuser% SET right_dash=? WHERE right_manager=? OR is_admin=?", array(1,1,1));
|
||||
|
||||
$this->execSql($pdo, "OPTIMIZE TABLE %user%");
|
||||
$this->execSql($pdo, "OPTIMIZE TABLE %histuser%");
|
||||
}
|
||||
|
||||
$this->updateVersion($pdo, '1.3.14');
|
||||
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
echo "Error in v1.3.13 to 1.3.14: $e";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setVersion($prefix,$theVersion) {
|
||||
$pdo = $this->pdo;
|
||||
|
@ -2301,7 +2341,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.13')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.14')");
|
||||
$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')");
|
||||
|
@ -2365,6 +2405,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
|||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'showpayment7', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'showpayment8', '1')");
|
||||
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'dashslot1', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'dashslot2', '2')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'dashslot3', '3')");
|
||||
|
||||
$hosttext = self::genSampleHostText();
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'hosttext', '$hosttext')");
|
||||
|
||||
|
@ -2373,6 +2417,17 @@ date_default_timezone_set($timezone);
|
|||
$installDate = date('Y-m-d H:i:s');
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'installdate', '$installDate')");
|
||||
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k1prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k2prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k3prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k4prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k5prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'k6prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'd1prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'd2prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'f1prinstance', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'f2prinstance', '1')");
|
||||
|
||||
$this->readConfigTableAndSendToHist($pdo);
|
||||
return;
|
||||
}
|
||||
|
@ -2445,24 +2500,24 @@ $stmt_insert_hist->execute(array($currentTime, $action, $refIdForHist));
|
|||
|
||||
function insertUser($username,$adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,
|
||||
$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_customers,
|
||||
$right_manager,$right_closing,$right_reservation,$right_rating,$lang,$prefertablemap) {
|
||||
$right_manager,$right_closing,$right_dash,$right_reservation,$right_rating,$lang,$prefertablemap) {
|
||||
$md5adminpass = md5($adminpass);
|
||||
$pdo = $this->pdo;
|
||||
|
||||
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_customers`,`right_manager`,`right_closing`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1','1')";
|
||||
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_customers`,`right_manager`,`right_closing`,`right_dash`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1','1')";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($userInsertSql));
|
||||
|
||||
$stmt->execute(array($username,$md5adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_customers,$right_manager,$right_closing,$right_reservation,$right_rating,$lang,$prefertablemap,0));
|
||||
$stmt->execute(array($username,$md5adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_customers,$right_manager,$right_closing,$right_dash,$right_reservation,$right_rating,$lang,$prefertablemap,0));
|
||||
|
||||
$newUserIdForHist = $pdo->lastInsertId();
|
||||
|
||||
// now insert into hist
|
||||
$sql_insert_histuser = "INSERT INTO %histuser% (`id` , `userid`, `username` ,
|
||||
`is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,
|
||||
`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_customers`,`right_manager`,`right_closing`,`right_reservation`,`right_rating`,`active`) VALUES (
|
||||
NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_customers`,`right_manager`,`right_closing`,`right_dash`,`right_reservation`,`right_rating`,`active`) VALUES (
|
||||
NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
$stmt_insert_histuser = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql_insert_histuser));
|
||||
$stmt_insert_histuser->execute(array($newUserIdForHist,$username,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_customers,$right_manager,$right_closing,$right_reservation,$right_rating,1));
|
||||
$stmt_insert_histuser->execute(array($newUserIdForHist,$username,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_customers,$right_manager,$right_closing,$right_dash,$right_reservation,$right_rating,1));
|
||||
$newRefIdForHist = $pdo->lastInsertId();
|
||||
$this->insertIntoHist($pdo, '3', $newRefIdForHist);
|
||||
}
|
||||
|
@ -2621,15 +2676,15 @@ $stmt->execute(array(6,76,22));
|
|||
}
|
||||
|
||||
if ($workflow == 2) {
|
||||
$this->insertUser( $waiterTxt[$lang], $adminpass,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,$lang,1);
|
||||
$this->insertUser( $waiterTxt[$lang], $adminpass,0,1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,$lang,1);
|
||||
if ($level == 3) {
|
||||
$this->insertUser( $bossTxt[$lang], $adminpass,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,$lang,1);
|
||||
$this->insertUser( $bossTxt[$lang], $adminpass,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,$lang,1);
|
||||
}
|
||||
} else {
|
||||
$this->insertUser( $waiterTxt[$lang], $adminpass,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,$lang,1);
|
||||
$this->insertUser( $waiterTxt[$lang], $adminpass,0,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,$lang,1);
|
||||
if ($level == 3) {
|
||||
$this->insertUser( $cookTxt[$lang], $adminpass,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,$lang,1);
|
||||
$this->insertUser( $bossTxt[$lang], $adminpass,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,$lang,1);
|
||||
$this->insertUser( $cookTxt[$lang], $adminpass,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,$lang,1);
|
||||
$this->insertUser( $bossTxt[$lang], $adminpass,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,$lang,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2684,7 +2739,7 @@ if (!$ok) {
|
|||
echo json_encode("Fehler: Ist OpenSSL richtig installiert?");
|
||||
return;
|
||||
}
|
||||
$admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,0,1,1,0,0,$_POST['lang'],1);
|
||||
$admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,0,1,1,1,0,0,$_POST['lang'],1);
|
||||
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
|
||||
|
||||
if(session_id() == '') {
|
||||
|
@ -2714,7 +2769,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
}
|
||||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
$installerVersion = "1.3.13";
|
||||
$installerVersion = "1.3.14";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
@ -2744,7 +2799,8 @@ $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.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12"
|
||||
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12",
|
||||
"1.3.13"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -2752,7 +2808,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1312_1313($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1313_1314($_POST['prefix'], $version, $_POST['db']);
|
||||
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -67,6 +67,7 @@ var MAN_CHANGEPRICE = ["Preisänderung während Bestellung","Change price during
|
|||
var MAN_CUSTOMERS = ["Gäste","Guests","Clientes"];
|
||||
var MAN_MANAGER = ["Verwaltung","Administration","Administración"];
|
||||
var MAN_CLOSINGRIGHT = ["Tageserfassung","Closing","Cerrar día"];
|
||||
var MAN_DASHRIGHT = ["Dashboard","Dashboard","Dashboard"];
|
||||
var MAN_USER_NAME = ["Benutzername","User name","Nombre de usario"];
|
||||
var MAN_USER_PASS = ["Passwort","Password","Contraseña"];
|
||||
var MAN_YES = ["Ja","Yes","Si"];
|
||||
|
@ -363,9 +364,18 @@ var MAN_CLOSING_TIME_LIMIT_ERROR = ["Ein Tagesabschluss wurde nicht erzeugt, wei
|
|||
var MAN_DB_PROPERTIES = ["Größe der Datenbanktabellen","Sizes of the data base tables","Tamaño de los tabulas de la base de datos"];
|
||||
var MAN_DBTABLENAME = ["Tabelle","Table","Tabula"];
|
||||
var MAN_DBTABLESIZE = ["Größe (KB)","Size (KB)","Tamaño (KB)"];
|
||||
var MAN_PRINT_INSTANCE_ASS_HEADER = ["Druckerinstanzen","Printer instances","Impresoras"];
|
||||
var MAN_PRINT_INSTANCE = ["Druckerinstanz","Printer instance","Impresora"];
|
||||
var MAN_RECEIPT_TXT = ["Kasse","Receipts","Recibos"];
|
||||
var MAN_DRINKS_REC_TXT = ["Getränke","Drinks","Bebidas"];
|
||||
var MAN_FOOD_REC_TXT = ["Speisen","Food","Comidas"];
|
||||
var MAN_PRINSTANCE_HINT = ["Die Zuordnungen wirken nur bei Printserverversionen ab 1.3.14!","The assignments only work with print server versions 1.3.14 and higher!","Esta configuración sólo funciona con printservers de una version 1.3.14 o despues!"];
|
||||
var MAN_DASHSLOT1 = ["Dashboard Slot 1","Dashboard Slot 1","Dashboard Slot 1"];
|
||||
var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"];
|
||||
var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"];
|
||||
|
||||
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];
|
||||
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];
|
||||
|
||||
var numberOfClosings = 0;
|
||||
|
||||
|
@ -373,6 +383,7 @@ var unpaidTables = "";
|
|||
var version = '';
|
||||
var newerversionavailable = 0;
|
||||
var adminIsLoggedIn = false;
|
||||
var managerIsLoggedIn = false;
|
||||
|
||||
var generalValuesSettings = [
|
||||
["usstval","MwSt","i",2,"Mehrwertsteuer ist kein Zahlenwert"],
|
||||
|
@ -455,7 +466,10 @@ var generalValuesSettings = [
|
|||
|
||||
["memorylimit",MAN_MEMORYLIMIT[lang],"i",0,""],
|
||||
["updateurl",MAN_UPDATEURL[lang],"i",0,""],
|
||||
["hs3refresh",MAN_HS3REFRESH[lang],"i",0,""]
|
||||
["hs3refresh",MAN_HS3REFRESH[lang],"i",0,""],
|
||||
["dashslot1",MAN_DASHSLOT1[lang],"s",35],
|
||||
["dashslot2",MAN_DASHSLOT2[lang],"s",36],
|
||||
["dashslot3",MAN_DASHSLOT3[lang],"s",37]
|
||||
];
|
||||
|
||||
var predef = "";
|
||||
|
@ -597,6 +611,17 @@ function setLanguage(l) {
|
|||
$("#workfontsizehint").html(MAN_FONTSIZE_HINT[l]);
|
||||
|
||||
$("#updateprogresslabel").html(MAN_UPD_PROGRESS[l] + ": ");
|
||||
|
||||
$("#printerinstancesheader").html(MAN_PRINT_INSTANCE_ASS_HEADER[l]);
|
||||
$("#printerinstancetxt").html(MAN_PRINT_INSTANCE[l]);
|
||||
|
||||
$(".pia_k_txt").html(MAN_RECEIPT_TXT[l]);
|
||||
$(".pia_f_txt").html(MAN_FOOD_REC_TXT[l]);
|
||||
$(".pia_d_txt").html(MAN_DRINKS_REC_TXT[l]);
|
||||
$(".pia_c_txt").html(MAN_PRINT_ON_CLOSINGS[l]);
|
||||
|
||||
$("#applyPrinterInstances").html(MAN_APPLY[l]);
|
||||
$("#printerInstanceHint").html(MAN_PRINSTANCE_HINT[l]);
|
||||
}
|
||||
|
||||
function createMonthSelection(label) {
|
||||
|
@ -623,11 +648,13 @@ function showPanelsDueToUserStatus(jsonAnswer) {
|
|||
adminIsLoggedIn = true;
|
||||
}
|
||||
if (jsonAnswer == "manager" || (jsonAnswer == 'admin')) {
|
||||
managerIsLoggedIn = true;
|
||||
$("#userpart").show();
|
||||
$("#configpart").show();
|
||||
$("#printerqueue").show();
|
||||
$("#dataexport").show();
|
||||
$("#printserverdownloadpart").show();
|
||||
$("#printerinstances").show();
|
||||
}
|
||||
|
||||
if(jsonAnswer == "No") {
|
||||
|
@ -693,6 +720,9 @@ function insertGeneralConfigItems(configResult) {
|
|||
$("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig));
|
||||
$("#partOfAddRecPrinter").html(createAddRecPrinterPart(values.addreceipttoprinter));
|
||||
$("#partOfWorkflowConfig").html(createWorkflowConfigPart(values.workflowconfig));
|
||||
$("#partOfDashslot1").html(createDashslotPart(1,values.dashslot1));
|
||||
$("#partOfDashslot2").html(createDashslotPart(2,values.dashslot2));
|
||||
$("#partOfDashslot3").html(createDashslotPart(3,values.dashslot3));
|
||||
$("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt));
|
||||
$("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch));
|
||||
$("#partOfGroupWorkItems").html(createGroupWorkItemsPart(values.groupworkitems));
|
||||
|
@ -781,6 +811,10 @@ function insertGeneralConfigItems(configResult) {
|
|||
generalVals[33] = values.showpayment7;
|
||||
generalVals[34] = values.showpayment8;
|
||||
|
||||
generalVals[35] = values.dashslot1;
|
||||
generalVals[36] = values.dashslot2;
|
||||
generalVals[37] = values.dashslot3;
|
||||
|
||||
$("#smtphost").val(values.smtphost);
|
||||
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
|
||||
$("#smtpuser").val(values.smtpuser);
|
||||
|
@ -966,6 +1000,30 @@ function createYesNo(label,nameOnGui,theValue) {
|
|||
return html;
|
||||
}
|
||||
|
||||
function createDashslotPart(number,value) {
|
||||
var label = MAN_DASHSLOT1;
|
||||
if (number == 2) {
|
||||
label = MAN_DASHSLOT2;
|
||||
} else if (number == 3) {
|
||||
label = MAN_DASHSLOT3;
|
||||
}
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="dashslot' + number + '">' + label[lang] + ':</label>';
|
||||
html += '<select name="dashslot' + number + '" id="dashslot' + number + '" data-theme="e">';
|
||||
|
||||
html += '<option value="0" ' + (value == 0 ? 'selected' : '') + '>-</option>';
|
||||
html += '<option value="1" ' + (value == 1 ? 'selected' : '') + '>Kellnereinnahmen</option>';
|
||||
html += '<option value="2" ' + (value == 2 ? 'selected' : '') + '>Offene/abgerechnete Tische</option>';
|
||||
html += '<option value="3" ' + (value == 3 ? 'selected' : '') + '>Produktverkäufe</option>';
|
||||
html += '<option value="4" ' + (value == 4 ? 'selected' : '') + '>Produkteinnahmen</option>';
|
||||
html += '<option value="5" ' + (value == 5 ? 'selected' : '') + '>Monatseinnahme</option>';
|
||||
html += '<option value="6" ' + (value == 6 ? 'selected' : '') + '>Tageseinnahmen</option>';
|
||||
|
||||
html += '</select></div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function createWorkflowConfigPart(workflow) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="workflowconfig">' + MAN_WORKFLOW[lang] + ':</label>';
|
||||
|
@ -1592,9 +1650,9 @@ function handleUpdateCheckResult(answer) {
|
|||
|
||||
var millis=getMillis();
|
||||
setTimeout(function(){
|
||||
document.location.href = "install.html?v=1.3.13&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.3.14&mode=onlyupdate&n=" + millis;
|
||||
},250);
|
||||
document.location.href = "install.html?v=1.3.13&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.3.14&mode=onlyupdate&n=" + millis;
|
||||
}
|
||||
|
||||
function handleUpdateReplace(answer) {
|
||||
|
@ -1613,6 +1671,111 @@ function handleUpdateReplace(answer) {
|
|||
$("#updateslider").slider("refresh");
|
||||
}
|
||||
|
||||
function getPrinterInstance() {
|
||||
var data = {
|
||||
n: getMillis()
|
||||
};
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=getprinterinstances",data,insertPrinterInstance,null,true);
|
||||
}
|
||||
|
||||
function insertPrinterInstance(answer) {
|
||||
if (answer.status == "OK") {
|
||||
setPrinterInstance("pia_k1",answer.msg.k1);
|
||||
setPrinterInstance("pia_k2",answer.msg.k2);
|
||||
setPrinterInstance("pia_k3",answer.msg.k3);
|
||||
setPrinterInstance("pia_k4",answer.msg.k4);
|
||||
setPrinterInstance("pia_k5",answer.msg.k5);
|
||||
setPrinterInstance("pia_k6",answer.msg.k6);
|
||||
|
||||
setPrinterInstance("pia_f1",answer.msg.f1);
|
||||
setPrinterInstance("pia_f2",answer.msg.f2);
|
||||
|
||||
setPrinterInstance("pia_d1",answer.msg.d1);
|
||||
setPrinterInstance("pia_d2",answer.msg.d2);
|
||||
|
||||
renderPrinterInstancesTable();
|
||||
|
||||
bindPrinterInstanceClick();
|
||||
}
|
||||
}
|
||||
|
||||
function setPrinterInstance(tabCellId,value) {
|
||||
$("#" + tabCellId).data("instance",value);
|
||||
}
|
||||
|
||||
function bindPrinterInstanceClick() {
|
||||
$(".prinstancerow td").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var col = $(this).parent().children().index($(this));
|
||||
// REM col0 is only name of row, 1-10 are the real instances numbeer
|
||||
if (col > 0) {
|
||||
var parts = this.id.split("_");
|
||||
var cellRowId = "#pia_" + parts[1];
|
||||
$(cellRowId).data("instance",col);
|
||||
}
|
||||
renderPrinterInstancesTable();
|
||||
});
|
||||
|
||||
$("#applyPrinterInstances").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
var k1 = $("#pia_k1").data("instance");
|
||||
var k2 = $("#pia_k2").data("instance");
|
||||
var k3 = $("#pia_k3").data("instance");
|
||||
var k4 = $("#pia_k4").data("instance");
|
||||
var k5 = $("#pia_k5").data("instance");
|
||||
var k6 = $("#pia_k6").data("instance");
|
||||
|
||||
var f1 = $("#pia_f1").data("instance");
|
||||
var f2 = $("#pia_f2").data("instance");
|
||||
|
||||
var d1 = $("#pia_d1").data("instance");
|
||||
var d2 = $("#pia_d2").data("instance");
|
||||
|
||||
var data = {
|
||||
k1: k1,
|
||||
k2: k2,
|
||||
k3: k3,
|
||||
k4: k4,
|
||||
k5: k5,
|
||||
k6: k6,
|
||||
|
||||
f1: f1,
|
||||
f2: f2,
|
||||
|
||||
d1: d1,
|
||||
d2: d2
|
||||
};
|
||||
|
||||
doAjax("POST","php/contenthandler.php?module=admin&command=setprinterinstances",data,handleResultOfDbAction,null,true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function renderPrinterInstancesTable() {
|
||||
renderPrinterInstanceRow("k",6);
|
||||
renderPrinterInstanceRow("f",2);
|
||||
renderPrinterInstanceRow("d",2);
|
||||
}
|
||||
|
||||
function renderPrinterInstanceRow(type,typeCount) {
|
||||
for (var typeNo = 1;typeNo<=typeCount;typeNo++) {
|
||||
var cellRowId = "#pia_" + type + typeNo;
|
||||
var prinstance = $(cellRowId).data("instance");
|
||||
|
||||
for (var InstanceNo = 1;InstanceNo<=10;InstanceNo++) {
|
||||
if (InstanceNo == prinstance) {
|
||||
$(cellRowId + "_" + InstanceNo).html("<img src=img/ok.png />");
|
||||
} else {
|
||||
$(cellRowId + "_" + InstanceNo).html("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function bindSelectionsWithActions() {
|
||||
$("#austria").off("change").on("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
|
@ -1633,6 +1796,30 @@ function bindSelectionsWithActions() {
|
|||
$("#configpart").trigger("create");
|
||||
bindSelectionsWithActions();
|
||||
});
|
||||
$("#dashslot1").off("change").on("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var newworkflowSel = $("#dashslot1").find(":selected").val();
|
||||
$("#partOfDashslot1").html(createDashslotPart(1,newworkflowSel));
|
||||
$("#configpart").trigger("create");
|
||||
bindSelectionsWithActions();
|
||||
});
|
||||
$("#dashslot2").off("change").on("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var newworkflowSel = $("#dashslot2").find(":selected").val();
|
||||
$("#partOfDashslot2").html(createDashslotPart(2,newworkflowSel));
|
||||
$("#configpart").trigger("create");
|
||||
bindSelectionsWithActions();
|
||||
});
|
||||
$("#dashslot3").off("change").on("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var newworkflowSel = $("#dashslot3").find(":selected").val();
|
||||
$("#partOfDashslot3").html(createDashslotPart(3,newworkflowSel));
|
||||
$("#configpart").trigger("create");
|
||||
bindSelectionsWithActions();
|
||||
});
|
||||
$("#payprinttype").off("change").on("change", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
@ -2007,7 +2194,7 @@ function createLabelWithOption(aLabel,displayedName,hasTheRight) {
|
|||
* the username and the rights that the user has to work in the
|
||||
* various modules.
|
||||
*/
|
||||
function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rCustomers,rClosing, rManager,forNewUser) {
|
||||
function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rCustomers,rClosing, rDash, rManager,forNewUser) {
|
||||
var collapsiblePart = '<div data-role="collapsible" id="' + id + '"';
|
||||
if (forNewUser) {
|
||||
collapsiblePart += ' data-theme="d" data-content-theme="d">';
|
||||
|
@ -2034,6 +2221,7 @@ function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSuppl
|
|||
collapsiblePart += createLabelWithOption("changeprice",MAN_CHANGEPRICE[lang],rChangeprice);
|
||||
collapsiblePart += createLabelWithOption("customers",MAN_CUSTOMERS[lang],rCustomers);
|
||||
collapsiblePart += createLabelWithOption("closingright",MAN_CLOSINGRIGHT[lang],rClosing);
|
||||
collapsiblePart += createLabelWithOption("dash",MAN_DASHRIGHT[lang],rDash);
|
||||
collapsiblePart += createLabelWithOption("manager",MAN_MANAGER[lang],rManager);
|
||||
|
||||
if (forNewUser) {
|
||||
|
@ -2072,6 +2260,7 @@ function fillUserListIntoGui(userinfo) {
|
|||
aUser.right_changeprice == 1,
|
||||
aUser.right_customers == 1,
|
||||
aUser.right_closing == 1,
|
||||
aUser.right_dash == 1,
|
||||
aUser.right_manager == 1,
|
||||
false
|
||||
);
|
||||
|
@ -2080,7 +2269,7 @@ function fillUserListIntoGui(userinfo) {
|
|||
userPart += createCollapsibeOfUser(
|
||||
"userid_newuser",
|
||||
MAN_NEW_USER[lang],
|
||||
false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true);
|
||||
false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true);
|
||||
$("#userlist").html(userPart);
|
||||
$('#userpart').trigger('create');
|
||||
|
||||
|
@ -2101,51 +2290,51 @@ function askAndFillUserList() {
|
|||
doAjax("GET","php/contenthandler.php?module=admin&command=getUserList",null, fillUserListIntoGui,"no user data received",true);
|
||||
}
|
||||
|
||||
function collectUserInfo(userInfoContainer,colIndexForDecision) {
|
||||
var userData = [
|
||||
["username", "#userlabel_username", true,false],
|
||||
["password", "#userlabel_password", true,false],
|
||||
["isAdmin", "#userlabel_admin", true,true],
|
||||
["rWaiter", "#userlabel_waiter", true,true],
|
||||
["rKitchen", "#userlabel_kitchen", true,true],
|
||||
["rBar", "#userlabel_bar", true,true],
|
||||
["rSupply", "#userlabel_supplydesk", true,true],
|
||||
["rPayDesk", "#userlabel_paydesk", true,true],
|
||||
["rStat", "#userlabel_stat", true,true],
|
||||
["rBill", "#userlabel_bill", true,true],
|
||||
["rProducts", "#userlabel_products", true,true],
|
||||
["rReservation","#userlabel_reservation", true,true],
|
||||
["rRating", "#userlabel_rating", true,true],
|
||||
["rChangeprice","#userlabel_changeprice", true,true],
|
||||
["rCustomers", "#userlabel_customers", true,true],
|
||||
["rManager", "#userlabel_manager", true,true],
|
||||
["rClosing", "#userlabel_closingright", true,true],
|
||||
["rDash", "#userlabel_dash", true,true]
|
||||
];
|
||||
|
||||
var data = {};
|
||||
for (var i=0;i<userData.length;i++) {
|
||||
var anEntry = userData[i];
|
||||
if (anEntry[colIndexForDecision]) {
|
||||
data[anEntry[0]] = userInfoContainer.find(anEntry[1]).val();
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function dynamicUserBinding() {
|
||||
$("#CreateNewUser").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var newUserInfoContainer = $(this).closest(".ui-collapsible");
|
||||
var username = newUserInfoContainer.find("#userlabel_username").val();
|
||||
var password = newUserInfoContainer.find("#userlabel_password").val();
|
||||
var isAdmin = newUserInfoContainer.find("#userlabel_admin").val();
|
||||
var rWaiter = newUserInfoContainer.find("#userlabel_waiter").val();
|
||||
var rKitchen = newUserInfoContainer.find("#userlabel_kitchen").val();
|
||||
var rBar = newUserInfoContainer.find("#userlabel_bar").val();
|
||||
var rSupply = newUserInfoContainer.find("#userlabel_supplydesk").val();
|
||||
var rPayDesk = newUserInfoContainer.find("#userlabel_paydesk").val();
|
||||
var rStat = newUserInfoContainer.find("#userlabel_stat").val();
|
||||
var rBill = newUserInfoContainer.find("#userlabel_bill").val();
|
||||
var rProducts = newUserInfoContainer.find("#userlabel_products").val();
|
||||
var rReservation = newUserInfoContainer.find("#userlabel_reservation").val();
|
||||
var rRating = newUserInfoContainer.find("#userlabel_rating").val();
|
||||
var rChangeprice = newUserInfoContainer.find("#userlabel_changeprice").val();
|
||||
var rCustomers = newUserInfoContainer.find("#userlabel_customers").val();
|
||||
var rManager = newUserInfoContainer.find("#userlabel_manager").val();
|
||||
var rClosing = newUserInfoContainer.find("#userlabel_closingright").val();
|
||||
|
||||
if ((username.length == 0) || (password.length == 0)) {
|
||||
var newUserInfoContainer = $(this).closest(".ui-collapsible");
|
||||
|
||||
var data = collectUserInfo(newUserInfoContainer,2);
|
||||
|
||||
if ((data["username"].length == 0) || (data["password"].length == 0)) {
|
||||
alert ("Benutzername oder Passwort sind nicht gesetzt");
|
||||
} else {
|
||||
var data = {
|
||||
username: username,
|
||||
password: password,
|
||||
isAdmin: isAdmin,
|
||||
rWaiter: rWaiter,
|
||||
rKitchen: rKitchen,
|
||||
rBar: rBar,
|
||||
rSupply: rSupply,
|
||||
rPayDesk: rPayDesk,
|
||||
rStat: rStat,
|
||||
rBill: rBill,
|
||||
rProducts: rProducts,
|
||||
rReservation: rReservation,
|
||||
rRating: rRating,
|
||||
rChangeprice : rChangeprice,
|
||||
rCustomers: rCustomers,
|
||||
rManager: rManager,
|
||||
rClosing: rClosing
|
||||
};
|
||||
doAjax("POST","php/contenthandler.php?module=admin&command=createNewUser",data,doCreateNewUser,"Anlegen neuer Benutzer");
|
||||
}
|
||||
});
|
||||
|
@ -2156,40 +2345,8 @@ function dynamicUserBinding() {
|
|||
var userid = $(this).data("userid");
|
||||
|
||||
var userInfoContainer = $(this).closest(".ui-collapsible");
|
||||
var isAdmin = userInfoContainer.find("#userlabel_admin").val();
|
||||
var rWaiter = userInfoContainer.find("#userlabel_waiter").val();
|
||||
var rKitchen = userInfoContainer.find("#userlabel_kitchen").val();
|
||||
var rBar = userInfoContainer.find("#userlabel_bar").val();
|
||||
var rSupply = userInfoContainer.find("#userlabel_supplydesk").val();
|
||||
var rPayDesk = userInfoContainer.find("#userlabel_paydesk").val();
|
||||
var rStat = userInfoContainer.find("#userlabel_stat").val();
|
||||
var rBill = userInfoContainer.find("#userlabel_bill").val();
|
||||
var rProducts = userInfoContainer.find("#userlabel_products").val();
|
||||
var rReservation = userInfoContainer.find("#userlabel_reservation").val();
|
||||
var rRating = userInfoContainer.find("#userlabel_rating").val();
|
||||
var rChangeprice = userInfoContainer.find("#userlabel_changeprice").val();
|
||||
var rCustomers = userInfoContainer.find("#userlabel_customers").val();
|
||||
var rManager = userInfoContainer.find("#userlabel_manager").val();
|
||||
var rClosing = userInfoContainer.find("#userlabel_closingright").val();
|
||||
|
||||
var data = {
|
||||
userid: userid,
|
||||
isAdmin: isAdmin,
|
||||
rWaiter: rWaiter,
|
||||
rKitchen: rKitchen,
|
||||
rBar: rBar,
|
||||
rSupply: rSupply,
|
||||
rPayDesk: rPayDesk,
|
||||
rStat: rStat,
|
||||
rBill: rBill,
|
||||
rProducts: rProducts,
|
||||
rReservation: rReservation,
|
||||
rRating: rRating,
|
||||
rChangeprice: rChangeprice,
|
||||
rCustomers: rCustomers,
|
||||
rManager: rManager,
|
||||
rClosing: rClosing
|
||||
};
|
||||
var data = collectUserInfo(userInfoContainer,3);
|
||||
data["userid"] = userid;
|
||||
doAjax("POST","php/contenthandler.php?module=admin&command=updateUser",data,askAndFillUserListNoData,"Benutzerdaten");
|
||||
});
|
||||
|
||||
|
@ -2692,10 +2849,14 @@ function continueInitialization() {
|
|||
|
||||
$("#userfile").val('');
|
||||
|
||||
if (adminIsLoggedIn || managerIsLoggedIn) {
|
||||
getSpooledPrintJobs();
|
||||
|
||||
getVersionInfoForUpdate();
|
||||
|
||||
getPrinterInstance();
|
||||
}
|
||||
|
||||
binding();
|
||||
}
|
||||
|
||||
|
@ -2976,6 +3137,10 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<input type="text" value="" data-mini="true" placeholder="Bezeichnung" id="discountname3" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div id="partOfDashslot1"></div>
|
||||
<div id="partOfDashslot2"></div>
|
||||
<div id="partOfDashslot3"></div>
|
||||
|
||||
<div id="partOfHotelInterface"></div>
|
||||
<div id="hs3area">
|
||||
<div data-role="fieldcontain">
|
||||
|
@ -3107,6 +3272,33 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
</form>
|
||||
</div> <!-- Konfiguration -->
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint" id="printerinstances" style="display:none;">
|
||||
<h3><span id="printerinstancesheader">Druckerinstanzzuordnung</span></h3>
|
||||
<p><div id=printerinstancesarea>
|
||||
<table id="printerinstancestable" class="gridtable">
|
||||
<tr><th> <th colspan="10" id="printerinstancetxt">Instanz</tr>
|
||||
<tr><th> <th>1<th>2<th>3<th>4<th>5<th>6<th>7<th>8<th>9<th>10</tr>
|
||||
|
||||
<tr id="pia_k1" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 1<td id="pia_k1_1"><td id="pia_k1_2"><td id="pia_k1_3"><td id="pia_k1_4"><td id="pia_k1_5"><td id="pia_k1_6"><td id="pia_k1_7"><td id="pia_k1_8"><td id="pia_k1_9"><td id="pia_k1_10"></tr>
|
||||
<tr id="pia_k2" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 2<td id="pia_k2_1"><td id="pia_k2_2"><td id="pia_k2_3"><td id="pia_k2_4"><td id="pia_k2_5"><td id="pia_k2_6"><td id="pia_k2_7"><td id="pia_k2_8"><td id="pia_k2_9"><td id="pia_k2_10"></tr>
|
||||
<tr id="pia_k3" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 3<td id="pia_k3_1"><td id="pia_k3_2"><td id="pia_k3_3"><td id="pia_k3_4"><td id="pia_k3_5"><td id="pia_k3_6"><td id="pia_k3_7"><td id="pia_k3_8"><td id="pia_k3_9"><td id="pia_k3_10"></tr>
|
||||
<tr id="pia_k4" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 4<td id="pia_k4_1"><td id="pia_k4_2"><td id="pia_k4_3"><td id="pia_k4_4"><td id="pia_k4_5"><td id="pia_k4_6"><td id="pia_k4_7"><td id="pia_k4_8"><td id="pia_k4_9"><td id="pia_k4_10"></tr>
|
||||
<tr id="pia_k5" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 5<td id="pia_k5_1"><td id="pia_k5_2"><td id="pia_k5_3"><td id="pia_k5_4"><td id="pia_k5_5"><td id="pia_k5_6"><td id="pia_k5_7"><td id="pia_k5_8"><td id="pia_k5_9"><td id="pia_k5_10"></tr>
|
||||
<tr id="pia_k6" class="prinstancerow"><td class="rowname"><span class="pia_k_txt">Kasse</span> 6<td id="pia_k6_1"><td id="pia_k6_2"><td id="pia_k6_3"><td id="pia_k6_4"><td id="pia_k6_5"><td id="pia_k6_6"><td id="pia_k6_7"><td id="pia_k6_8"><td id="pia_k6_9"><td id="pia_k6_10"></tr>
|
||||
|
||||
<tr id="pia_f1" class="prinstancerow"><td class="rowname"><span class="pia_f_txt">Speise</span> 1<td id="pia_f1_1"><td id="pia_f1_2"><td id="pia_f1_3"><td id="pia_f1_4"><td id="pia_f1_5"><td id="pia_f1_6"><td id="pia_f1_7"><td id="pia_f1_8"><td id="pia_f1_9"><td id="pia_f1_10"></tr>
|
||||
<tr id="pia_f2" class="prinstancerow"><td class="rowname"><span class="pia_f_txt">Speise</span> 2<td id="pia_f2_1"><td id="pia_f2_2"><td id="pia_f2_3"><td id="pia_f2_4"><td id="pia_f2_5"><td id="pia_f2_6"><td id="pia_f2_7"><td id="pia_f2_8"><td id="pia_f2_9"><td id="pia_f2_10"></tr>
|
||||
<tr id="pia_d1" class="prinstancerow"><td class="rowname"><span class="pia_d_txt">Getränke</span> 1<td id="pia_d1_1"><td id="pia_d1_2"><td id="pia_d1_3"><td id="pia_d1_4"><td id="pia_d1_5"><td id="pia_d1_6"><td id="pia_d1_7"><td id="pia_d1_8"><td id="pia_d1_9"><td id="pia_d1_10"></tr>
|
||||
<tr id="pia_d2" class="prinstancerow"><td class="rowname"><span class="pia_d_txt">Getränke</span> 2<td id="pia_d2_1"><td id="pia_d2_2"><td id="pia_d2_3"><td id="pia_d2_4"><td id="pia_d2_5"><td id="pia_d2_6"><td id="pia_d2_7"><td id="pia_d2_8"><td id="pia_d2_9"><td id="pia_d2_10"></tr>
|
||||
|
||||
</table>
|
||||
<span id="printerInstanceHint" id=printandqueuehint style="padding-left: 50px;padding-right: 50px;">Hinweis: Printserver ab 1.3.14</span>
|
||||
|
||||
<button type="submit" data-theme="f" data-icon="check" id="applyPrinterInstances">Anwenden</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint" id="printerqueue" style="display:none;">
|
||||
<h3><span id="printjobsheader">Druckerwarteschlangen</span></h3>
|
||||
<p><div id=printjobsarea>Daten</div>
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,10 @@
|
|||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2017 Nick Downie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -80,7 +80,12 @@ class Admin {
|
|||
|
||||
"isPrinterServerActive" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getWaiterMessage" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getmobilecss" => array("loggedin" => 0, "isadmin" => 0, "rights" => null)
|
||||
"getmobilecss" => array("loggedin" => 0, "isadmin" => 0, "rights" => null),
|
||||
|
||||
"getprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||
"setprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||
|
||||
"getdashreports" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("dash"))
|
||||
);
|
||||
|
||||
|
||||
|
@ -123,6 +128,10 @@ class Admin {
|
|||
if (($_SESSION['is_admin'] == 1) || ($_SESSION['right_manager'] == 1)) {
|
||||
return true;
|
||||
}
|
||||
} else if ($aRight == 'dash') {
|
||||
if ($_SESSION['right_dash'] == 1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_NOT_AUTHOTRIZED, "msg" => ERROR_NOT_AUTHOTRIZED_MSG));
|
||||
|
@ -286,6 +295,12 @@ class Admin {
|
|||
$this->getWaiterMessage();
|
||||
} else if ($command == 'getDbStat') {
|
||||
$this->getDbStat();
|
||||
} else if ($command == 'getprinterinstances') {
|
||||
$this->getPrinterInstances();
|
||||
} else if ($command == 'setprinterinstances') {
|
||||
$this->setprinterinstances($_POST["k1"],$_POST["k2"],$_POST["k3"],$_POST["k4"],$_POST["k5"],$_POST["k6"],$_POST["f1"],$_POST["f2"],$_POST["d1"],$_POST["d2"]);
|
||||
} else if ($command == 'getdashreports') {
|
||||
$this->getdashreports();
|
||||
}
|
||||
else {
|
||||
echo "Command not supported.";
|
||||
|
@ -464,7 +479,7 @@ class Admin {
|
|||
$zeile['right_bar'],$zeile['right_supply'],$zeile['right_paydesk'],
|
||||
$zeile['right_statistics'],$zeile['right_bill'],$zeile['right_products'],
|
||||
$zeile['right_reservation'],$zeile['right_changeprice'],$zeile['right_customers'],$zeile['right_manager'],
|
||||
$zeile['right_closing']);
|
||||
$zeile['right_closing'],$zeile['right_dash']);
|
||||
$right_rating = $zeile['right_rating'];
|
||||
|
||||
if (self::isOnlyRatingUser($rights,$right_rating, 1)) {
|
||||
|
@ -484,6 +499,7 @@ class Admin {
|
|||
$_SESSION['right_customers'] = false;
|
||||
$_SESSION['right_manager'] = false;
|
||||
$_SESSION['right_closing'] = false;
|
||||
$_SESSION['right_dash'] = false;
|
||||
$_SESSION['keeptypelevel'] = false;
|
||||
} else {
|
||||
$_SESSION['is_admin'] = ($zeile['is_admin'] == 1 ? true : false);
|
||||
|
@ -507,13 +523,15 @@ class Admin {
|
|||
$_SESSION['right_customers'] = ($zeile['right_customers'] == 1 ? true : false);
|
||||
$_SESSION['right_manager'] = ($zeile['right_manager'] == 1 ? true : false);
|
||||
$_SESSION['right_closing'] = ($zeile['right_closing'] == 1 ? true : false);
|
||||
$_SESSION['right_dash'] = ($zeile['right_dash'] == 1 ? true : false);
|
||||
$_SESSION['keeptypelevel'] = ($zeile['keeptypelevel'] == 1 ? true : false);
|
||||
}
|
||||
|
||||
$this->userrights->setSession($_SESSION['is_admin'], $_SESSION['right_waiter'], $_SESSION['right_kitchen'],
|
||||
$_SESSION['right_bar'], $_SESSION['right_supply'], $_SESSION['right_paydesk'], $_SESSION['right_statistics'],
|
||||
$_SESSION['right_bill'], $_SESSION['right_products'], $_SESSION['right_reservation'], $_SESSION['right_rating'],
|
||||
$_SESSION['right_changeprice'], $_SESSION['right_customers'],$_SESSION['right_manager'], $_SESSION['right_closing']);
|
||||
$_SESSION['right_changeprice'], $_SESSION['right_customers'],$_SESSION['right_manager'], $_SESSION['right_closing'],
|
||||
$_SESSION['right_dash']);
|
||||
|
||||
$assoc = array ("0" => "roombtnsize","1" => "tablebtnsize","2" => "prodbtnsize");
|
||||
|
||||
|
@ -911,6 +929,9 @@ class Admin {
|
|||
$reservationnote = CommonUtils::getConfigValue($pdo,"reservationnote",null);
|
||||
$paymentconfig = CommonUtils::getConfigValue($pdo,"paymentconfig",0);
|
||||
$workflowconfig = CommonUtils::getConfigValue($pdo,"workflowconfig",0);
|
||||
$dashslot1 = CommonUtils::getConfigValue($pdo,"dashslot1",1);
|
||||
$dashslot2 = CommonUtils::getConfigValue($pdo,"dashslot2",2);
|
||||
$dashslot3 = CommonUtils::getConfigValue($pdo,"dashslot3",3);
|
||||
$addreceipttoprinter = CommonUtils::getConfigValue($pdo,"addreceipttoprinter","");
|
||||
$printandqueuejobs = CommonUtils::getConfigValue($pdo,"printandqueuejobs",0);
|
||||
$cashenabled = CommonUtils::getConfigValue($pdo,"cashenabled",1);
|
||||
|
@ -997,7 +1018,8 @@ class Admin {
|
|||
"showpayment5" => $showpayment5,
|
||||
"showpayment6" => $showpayment6,
|
||||
"showpayment7" => $showpayment7,
|
||||
"showpayment8" => $showpayment8
|
||||
"showpayment8" => $showpayment8,
|
||||
"dashslot1" => $dashslot1,"dashslot2" => $dashslot2,"dashslot3" => $dashslot3
|
||||
);
|
||||
|
||||
|
||||
|
@ -1023,7 +1045,8 @@ class Admin {
|
|||
$rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'],
|
||||
$_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'],
|
||||
$_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'],
|
||||
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],$_SESSION['right_manager'],$_SESSION['right_closing']);
|
||||
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],
|
||||
$_SESSION['right_manager'],$_SESSION['right_closing'],$_SESSION['right_dash']);
|
||||
$right_rating = $_SESSION['right_rating'];
|
||||
|
||||
if (self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||
|
@ -1069,7 +1092,8 @@ class Admin {
|
|||
"reservation.html" => 'right_reservation',
|
||||
"rating.html" => 'right_rating',
|
||||
"customers.html" => 'right_customers',
|
||||
"waiterdesktop.php" => 'right_waiter'
|
||||
"waiterdesktop.php" => 'right_waiter',
|
||||
"dash.php" => 'right_dash'
|
||||
);
|
||||
|
||||
$valid = false;
|
||||
|
@ -1088,7 +1112,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.3.13");
|
||||
echo json_encode($view . "?v=1.3.14");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1279,36 +1303,38 @@ class Admin {
|
|||
$stattxt = array("Statistik","Statistics","Estadisticas");
|
||||
$ratingtxt = array("Bewertung","Rating","Valoración");
|
||||
$customerstxt = array("Gäste","Guests","Clientes");
|
||||
$dashtxt = array("Dashboard","Dashboard","Dashboard");
|
||||
$logout = array("Abmelden","Log out","Adios");
|
||||
|
||||
$rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'],
|
||||
$_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'],
|
||||
$_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'],
|
||||
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],
|
||||
$_SESSION['right_manager'],$_SESSION['right_closing']);
|
||||
$_SESSION['right_manager'],$_SESSION['right_closing'],$_SESSION['right_dash']);
|
||||
$right_rating = $_SESSION['right_rating'];
|
||||
|
||||
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.13"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.14"); };
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.13"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.14"); };
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.14"); };
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.14"); };
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.13"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.13"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.13");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.13");
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.14"); };
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.14"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.14"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.14");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.14");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1316,7 +1342,7 @@ class Admin {
|
|||
|
||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.13",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.14",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1325,6 +1351,69 @@ class Admin {
|
|||
return($mainMenuAndVersion);
|
||||
}
|
||||
|
||||
private function getPrinterInstances() {
|
||||
try {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$k1 = CommonUtils::getConfigValue($pdo, 'k1prinstance', 1);
|
||||
$k2 = CommonUtils::getConfigValue($pdo, 'k2prinstance', 1);
|
||||
$k3 = CommonUtils::getConfigValue($pdo, 'k3prinstance', 1);
|
||||
$k4 = CommonUtils::getConfigValue($pdo, 'k4prinstance', 1);
|
||||
$k5 = CommonUtils::getConfigValue($pdo, 'k5prinstance', 1);
|
||||
$k6 = CommonUtils::getConfigValue($pdo, 'k6prinstance', 1);
|
||||
$f1 = CommonUtils::getConfigValue($pdo, 'f1prinstance', 1);
|
||||
$f2 = CommonUtils::getConfigValue($pdo, 'f2prinstance', 1);
|
||||
$d1 = CommonUtils::getConfigValue($pdo, 'd1prinstance', 1);
|
||||
$d2 = CommonUtils::getConfigValue($pdo, 'd2prinstance', 1);
|
||||
|
||||
$ret = array("k1" => $k1,"k2" => $k2,"k3" => $k3, "k4" => $k4,"k5" => $k5,"k6" => $k6,"d1" => $d1,"d2" => $d2,"f1" => $f1,"f2" => $f2);
|
||||
echo json_encode(array("status" => "OK","msg" => $ret));
|
||||
|
||||
} catch (Exception $ex) {
|
||||
echo json_encode(array("status" => "ERROR","msg" => "Error: $e"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private function setprinterinstances($k1,$k2,$k3,$k4,$k5,$k6,$f1,$f2,$d1,$d2) {
|
||||
try {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$sql = "UPDATE %config% SET setting=? WHERE name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($k1,"k1prinstance"));
|
||||
$stmt->execute(array($k2,"k2prinstance"));
|
||||
$stmt->execute(array($k3,"k3prinstance"));
|
||||
$stmt->execute(array($k4,"k4prinstance"));
|
||||
$stmt->execute(array($k5,"k5prinstance"));
|
||||
$stmt->execute(array($k6,"k6prinstance"));
|
||||
|
||||
$stmt->execute(array($f1,"f1prinstance"));
|
||||
$stmt->execute(array($f2,"f2prinstance"));
|
||||
|
||||
$stmt->execute(array($d1,"d1prinstance"));
|
||||
$stmt->execute(array($d2,"d2prinstance"));
|
||||
|
||||
echo json_encode(array("status" => "OK"));
|
||||
|
||||
} catch (Exception $ex) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function getdashreports() {
|
||||
try {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
|
||||
$reports = new Reports();
|
||||
$stat = $reports->getStatsCore($pdo,true);
|
||||
|
||||
echo json_encode(array("status" => "OK","msg" => array("stat" => $stat)));
|
||||
|
||||
} catch (Exception $ex) {
|
||||
echo json_encode(array("status" => "ERROR","msg" => "Error: " . $ex->getMessage()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private function getDbStat() {
|
||||
try {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
|
@ -1608,6 +1697,9 @@ class Admin {
|
|||
"digiprintwork" => array("dbcol" => "digiprintwork","checknum" => 0),
|
||||
"groupworkitems" => array("dbcol" => "groupworkitems","checknum" => 0),
|
||||
"workflowconfig" => array("dbcol" => "workflowconfig","checknum" => 0),
|
||||
"dashslot1" => array("dbcol" => "dashslot1","checknum" => 0),
|
||||
"dashslot2" => array("dbcol" => "dashslot2","checknum" => 0),
|
||||
"dashslot3" => array("dbcol" => "dashslot3","checknum" => 0),
|
||||
"receiptfontsize" => array("dbcol" => "receiptfontsize","checknum" => 0),
|
||||
"billlanguage" => array("dbcol" => "billlanguage","checknum" => 0),
|
||||
"hotelinterface" => array("dbcol" => "hotelinterface","checknum" => 0),
|
||||
|
@ -2027,11 +2119,11 @@ class Admin {
|
|||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$this->writeCsvHeader("datenexport-benutzer.csv");
|
||||
|
||||
echo("Eintragsid; Datum ; Benutzerid; Benutzername; Adminrechte; Kellnerrechte;Kuechenrechte; Barrechte; Bereitstellungsrechte; Kassenrechte; Reportrechte; Kassenbonrechte; Angebotsrechte; Beurteilungsrechte; Preisänderungsrechte; Gästerechte; Tageserfassungsrecht; Managerrechte; Aktiviert\n");
|
||||
echo("Eintragsid; Datum ; Benutzerid; Benutzername; Adminrechte; Kellnerrechte;Kuechenrechte; Barrechte; Bereitstellungsrechte; Kassenrechte; Reportrechte; Kassenbonrechte; Angebotsrechte; Beurteilungsrechte; Preisänderungsrechte; Gästerechte; Tageserfassungsrecht; Dashboardrechte; Managerrechte; Aktiviert\n");
|
||||
|
||||
$sql = "SELECT DISTINCT %hist%.id as id,date,";
|
||||
$sql .= "userid,username,is_admin,right_waiter,right_kitchen,right_bar,right_supply,";
|
||||
$sql .= "right_paydesk,right_statistics,right_bill,right_products,right_rating,right_changeprice,right_customers,right_closing,right_manager,active,";
|
||||
$sql .= "right_paydesk,right_statistics,right_bill,right_products,right_rating,right_changeprice,right_customers,right_closing,right_dash,right_manager,active,";
|
||||
$sql .= "description ";
|
||||
$sql .= " FROM %hist%, %histuser%, %histactions% ";
|
||||
$sql .= " WHERE (refid=%histuser%.id) ";
|
||||
|
@ -2061,12 +2153,13 @@ class Admin {
|
|||
$val15 = ($zeile['right_changeprice'] == '1' ? "Ja" : "Nein");
|
||||
$val16 = ($zeile['right_customers'] == '1' ? "Ja" : "Nein");
|
||||
$val17 = ($zeile['right_closing'] == '1' ? "Ja" : "Nein");
|
||||
$val18 = ($zeile['right_manager'] == '1' ? "Ja" : "Nein");
|
||||
$val19 = ($zeile['active'] == '1' ? "Ja" : "Nein");
|
||||
$val20 = $zeile['description'];
|
||||
$val18 = ($zeile['right_dash'] == '1' ? "Ja" : "Nein");
|
||||
$val19 = ($zeile['right_manager'] == '1' ? "Ja" : "Nein");
|
||||
$val20 = ($zeile['active'] == '1' ? "Ja" : "Nein");
|
||||
$val21 = $zeile['description'];
|
||||
|
||||
echo "$val1; $val2; $val3; $val4; $val5; $val6; $val7; $val8; $val9; $val10;";
|
||||
echo "$val11;$val12;$val13;$val14;$val15;$val16;$val17;$val18;$val19;$val20\n";
|
||||
echo "$val11;$val12;$val13;$val14;$val15;$val16;$val17;$val18;$val19;$val20; $val21\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ class DbUtils {
|
|||
array("col" => 'right_customers', "hist" => 1, "new" => 'rCustomers', "update" => 'rCustomers'),
|
||||
array("col" => 'right_manager', "hist" => 1, "new" => 'rManager', "update" => 'rManager'),
|
||||
array("col" => 'right_closing', "hist" => 1, "new" => 'rClosing', "update" => 'rClosing'),
|
||||
array("col" => 'right_dash', "hist" => 1, "new" => 'rDash', "update" => 'rDash'),
|
||||
array("col" => 'active', "hist" => 1, "new" => null ,"default" => 1, "update" => null),
|
||||
array("col" => 'lastmodule', "hist" => 0, "new" => null ,"default" => null, "update" => null),
|
||||
array("col" => 'ordervolume', "hist" => 0, "new" => null ,"default" => null, "update" => null),
|
||||
|
|
|
@ -10,6 +10,7 @@ class PrintQueue {
|
|||
var $dbutils;
|
||||
var $userrights;
|
||||
var $admin;
|
||||
var $instance = null;
|
||||
|
||||
function __construct() {
|
||||
$this->dbutils = new DbUtils();
|
||||
|
@ -22,6 +23,10 @@ class PrintQueue {
|
|||
if (isset($_GET['fl'])) {
|
||||
$fl = $_GET['fl'];
|
||||
}
|
||||
if (isset($_GET['instance'])) {
|
||||
$this->instance = $_GET['instance'];
|
||||
}
|
||||
|
||||
// these command are only allowed for user with waiter rights
|
||||
if ($command == 'getNextReceiptPrintJobs') {
|
||||
if(isset($_GET['printers'])) {
|
||||
|
@ -78,6 +83,19 @@ class PrintQueue {
|
|||
}
|
||||
}
|
||||
|
||||
private function checkForPrinterInstance($pdo,$rectype) {
|
||||
if (!is_null($this->instance)) {
|
||||
$assignedInstance = CommonUtils::getConfigValue($pdo, $rectype . "prinstance", 1);
|
||||
if ($this->instance == $assignedInstance) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private function saveLastPrintServerAccess($pdo) {
|
||||
date_default_timezone_set(DbUtils::getTimeZone());
|
||||
$date = new DateTime();
|
||||
|
@ -421,6 +439,12 @@ class PrintQueue {
|
|||
$closid = $aClos["content"];
|
||||
$printer = $aClos["printer"];
|
||||
|
||||
if (!is_null($this->instance)) {
|
||||
if (!$this->checkForPrinterInstance($pdo, "k" . $printer)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$theClosing = $closing->getClosingSummaryWoSign($closid, $pdo, false,$fl);
|
||||
$aClosing = array("id" => $jobid,"closing" => $theClosing, "printer" => $printer);
|
||||
$closingarray[] = $aClosing;
|
||||
|
@ -455,6 +479,7 @@ class PrintQueue {
|
|||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
if ($isCorrect) {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getReceipts: p=$printers, fl=$fl");
|
||||
|
||||
ob_start();
|
||||
$printersArr = explode ( ',', $printers );
|
||||
|
||||
|
@ -486,6 +511,11 @@ class PrintQueue {
|
|||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextReceiptPrintJobs: collect bill with id=$aBillId for printer=$printer");
|
||||
|
||||
if (in_array($printer, $printersArr)) {
|
||||
|
||||
if (!$this->checkForPrinterInstance($pdo, "k" . $printer)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_null($fl)) {
|
||||
$receiptJob = array("id" => $printJobId,"bill" => $bill->getBillWithId($pdo,$aBillId,$language,$printer));
|
||||
} else if ($fl >= 9) {
|
||||
|
@ -524,6 +554,16 @@ class PrintQueue {
|
|||
|
||||
if ($isCorrect) {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: type = $theType, printer = $printer, fl= $fl");
|
||||
|
||||
$checkType = "f";
|
||||
if ($theType == 2) {
|
||||
$checkType = "d";
|
||||
}
|
||||
if (!$this->checkForPrinterInstance($pdo, $checkType . $printer)) {
|
||||
echo json_encode(array());
|
||||
return;
|
||||
}
|
||||
|
||||
$this->saveLastPrintServerAccess($pdo);
|
||||
|
||||
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
|
||||
|
|
|
@ -55,7 +55,7 @@ class RemoteAccess {
|
|||
|
||||
static public function getReport($admin,$pdo) {
|
||||
$reports = new Reports();
|
||||
echo json_encode($reports->getStatsCore());
|
||||
echo json_encode($reports->getStatsCore($pdo));
|
||||
}
|
||||
|
||||
static public function sendLoginMessage($admin,$pdo,$msg) {
|
||||
|
|
|
@ -25,7 +25,9 @@ class Reports {
|
|||
$this->queue = new QueueContent();
|
||||
$this->commonUtils = new CommonUtils();
|
||||
$this->userrights = new Userrights();
|
||||
}
|
||||
|
||||
public function createSqlPhrases() {
|
||||
self::$sql_service_good = "select COUNT(service) as count FROM %ratings% WHERE service='1' AND date between ? AND ?";
|
||||
self::$sql_service_ok = "select COUNT(service) as count FROM %ratings% WHERE service='2' AND date between ? AND ?";
|
||||
self::$sql_service_bad = "select COUNT(service) as count FROM %ratings% WHERE service='3' AND date between ? AND ?";
|
||||
|
@ -61,14 +63,18 @@ class Reports {
|
|||
}
|
||||
|
||||
private function getStats() {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$this->createSqlPhrases();
|
||||
|
||||
$alldates = self::getDates();
|
||||
|
||||
$this->getReports($alldates);
|
||||
$this->getReports($pdo,$alldates);
|
||||
}
|
||||
|
||||
public function getStatsCore() {
|
||||
public function getStatsCore($pdo,$forDash = false) {
|
||||
$this->createSqlPhrases();
|
||||
$alldates = self::getDates();
|
||||
return($this->getReportsCore($alldates));
|
||||
return($this->getReportsCore($pdo,$alldates,$forDash));
|
||||
}
|
||||
|
||||
static private function getDates() {
|
||||
|
@ -140,13 +146,12 @@ class Reports {
|
|||
return ($mons[intval($monthNo)]);
|
||||
}
|
||||
|
||||
private function getReports ($allDates) {
|
||||
$reports = $this->getReportsCore($allDates);
|
||||
private function getReports ($pdo,$allDates) {
|
||||
$reports = $this->getReportsCore($pdo,$allDates);
|
||||
echo json_encode($reports);
|
||||
}
|
||||
|
||||
private function getReportsCore($allDates) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
private function getReportsCore($pdo,$allDates,$forDash = false) {
|
||||
$pdo->beginTransaction();
|
||||
|
||||
// bills of today independently of closing
|
||||
|
@ -179,6 +184,12 @@ class Reports {
|
|||
"usersums" => $usersums
|
||||
);
|
||||
|
||||
if ($forDash) {
|
||||
$retArray["tables"] = self::getOpenTables($pdo);
|
||||
$retArray["prodscount"] = self::getMaxSoldProductsCount($pdo);
|
||||
$retArray["prodssum"] = self::getMaxSoldProductsSum($pdo);
|
||||
}
|
||||
|
||||
return $retArray;
|
||||
}
|
||||
|
||||
|
@ -403,5 +414,71 @@ class Reports {
|
|||
|
||||
return array("max" => $sumMax, "content" => $result);
|
||||
}
|
||||
|
||||
|
||||
public static function getOpenTables($pdo) {
|
||||
$sql = "SELECT id,roomname FROM %room% WHERE removed is null";
|
||||
$rooms = CommonUtils::fetchSqlAll($pdo, $sql,null);
|
||||
|
||||
$tableCountTotal = 0;
|
||||
$tableCountOpen = 0;
|
||||
$sum = 0.0;
|
||||
foreach($rooms as $aRoom) {
|
||||
$roomId = $aRoom["id"];
|
||||
|
||||
$sql = "SELECT count(id) as countid FROM %resttables% WHERE %resttables%.roomid=?";
|
||||
$howManyTables = CommonUtils::getRowSqlObject($pdo, $sql, array($roomId));
|
||||
$tableCountTotal += $howManyTables->countid;
|
||||
|
||||
$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% ";
|
||||
$sql .= " LEFT OUTER JOIN %queue% ON %queue%.tablenr=%resttables%.id WHERE %resttables%.removed is null AND ";
|
||||
$sql .= " %resttables%.roomid=? GROUP BY %resttables%.id";
|
||||
|
||||
$tables = CommonUtils::fetchSqlAll($pdo, $sql, array($roomId));
|
||||
|
||||
|
||||
foreach($tables as $aTable) {
|
||||
$sum += $aTable["pricesum"];
|
||||
|
||||
if ($aTable["pricesum"] != '0.00') {
|
||||
$tableCountOpen++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return array("tablestotal" => $tableCountTotal,"opentables" => $tableCountOpen,"sum" => $sum);
|
||||
}
|
||||
|
||||
public static function getMaxSoldProductsCount($pdo) {
|
||||
|
||||
$sql = "SELECT longname,productid,count(productid) as value from %queue%,%bill%,%products% ";
|
||||
$sql .= "WHERE %queue%.productid=%products%.id ";
|
||||
$sql .= "AND productid=%products%.id ";
|
||||
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
|
||||
$sql .= "AND DATE(billdate) = CURDATE() ";
|
||||
$sql .= "AND %bill%.status is null ";
|
||||
$sql .= "GROUP BY longname,productid ";
|
||||
$sql .= "ORDER BY value DESC ";
|
||||
$sql .= "LIMIT 10";
|
||||
|
||||
$result = CommonUtils::fetchSqlAll($pdo, $sql, null);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function getMaxSoldProductsSum($pdo) {
|
||||
|
||||
$sql = "SELECT longname,productid,sum(price) as value from %queue%,%bill%,%products% ";
|
||||
$sql .= "WHERE %queue%.productid=%products%.id ";
|
||||
$sql .= "AND productid=%products%.id ";
|
||||
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
|
||||
$sql .= "AND DATE(billdate) = CURDATE() ";
|
||||
$sql .= "AND %bill%.status is null ";
|
||||
$sql .= "GROUP BY longname,productid ";
|
||||
$sql .= "ORDER BY value DESC ";
|
||||
$sql .= "LIMIT 10";
|
||||
|
||||
$result = CommonUtils::fetchSqlAll($pdo, $sql, null);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1 +1 @@
|
|||
/sbin/shutdown -hP -t 10 now
|
||||
/sbin/shutdown -h now
|
||||
|
|
|
@ -117,7 +117,7 @@ class Updater {
|
|||
$infoFileLines = $infoFile["msg"];
|
||||
|
||||
if (count($infoFileLines) > 1) {
|
||||
$checkIfNewerVersion = self::isV2Newer('1.3.13',trim($infoFileLines[0]));
|
||||
$checkIfNewerVersion = self::isV2Newer('1.3.14',trim($infoFileLines[0]));
|
||||
return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0));
|
||||
} else {
|
||||
return array("status" => "ERROR","msg" => "Info file not valid","url" => $url);
|
||||
|
|
|
@ -201,6 +201,7 @@ class Basedb {
|
|||
`right_products` INT (1) NOT NULL,
|
||||
`right_manager` INT (1) NOT NULL,
|
||||
`right_closing` INT (1) NOT NULL,
|
||||
`right_dash` INT (1) NOT NULL,
|
||||
`right_reservation` INT (1) NOT NULL,
|
||||
`right_rating` INT (1) NOT NULL,
|
||||
`right_changeprice` INT (1) NOT NULL,
|
||||
|
@ -655,6 +656,7 @@ class Basedb {
|
|||
`right_products` INT (1) NOT NULL,
|
||||
`right_manager` INT (1) NOT NULL,
|
||||
`right_closing` INT (1) NOT NULL,
|
||||
`right_dash` INT (1) NOT NULL,
|
||||
`right_reservation` INT (1) NOT NULL,
|
||||
`right_rating` INT (1) NOT NULL,
|
||||
`right_changeprice` INT (1) NOT NULL,
|
||||
|
|
|
@ -18,14 +18,15 @@ define ( 'R_MAN', 2048);
|
|||
define ( 'R_CP', 4096);
|
||||
define ( 'R_CL', 8192);
|
||||
define ( 'R_CUS', 16384);
|
||||
define ( 'R_DASH', 32768);
|
||||
|
||||
|
||||
class Userrights {
|
||||
|
||||
function setSession($isAdm,$rWait,$rKit,$rBar,$rSupply,$rPay,$rStat,$rBill,$rProd,$rRes,$rRat,$rChangePrice,$rCustomers,$rMan,$rClos) {
|
||||
function setSession($isAdm,$rWait,$rKit,$rBar,$rSupply,$rPay,$rStat,$rBill,$rProd,$rRes,$rRat,$rChangePrice,$rCustomers,$rMan,$rClos,$rDash) {
|
||||
$ret = R_ADM * ($isAdm ? 1:0) | R_WAI * ($rWait ? 1:0) | R_KIT * ($rKit ? 1:0) | R_BAR * ($rBar ? 1:0) | R_SUP * ($rSupply ? 1:0) | R_PAY * ($rPay ? 1:0);
|
||||
$ret |= R_STA * ($rStat ? 1:0) | R_BIL * ($rBill ? 1:0) | R_PRO * ($rProd ? 1:0) | R_RES * ($rRes ? 1:0) | R_RAT * ($rRat ? 1:0) |
|
||||
R_CP * ($rChangePrice ? 1:0) | R_CUS * ($rCustomers ? 1:0) | R_MAN * (($rMan ? 1:0) | R_CL * (($rClos ? 1:0)));
|
||||
R_CP * ($rChangePrice ? 1:0) | R_CUS * ($rCustomers ? 1:0) | R_MAN * (($rMan ? 1:0) | R_CL * (($rClos ? 1:0)) | R_DASH * ($rDash ? 1:0));
|
||||
$_SESSION['allrights'] = $ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -71,6 +71,9 @@ var PROD_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"];
|
|||
var PROD_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"];
|
||||
var PROD_PLACEHOLDER_NEW_PRODTYPE = ["Name der neuen Kategorie", "Name of the new category","Nombre de la categoría nueva"];
|
||||
var PROD_APPLIED = ["Aktion wurde durchgeführt.","Action was performed.","Acción completa."];
|
||||
var PROD_TYPEPROPS = ["Kategorieeigenschaften ein-/ausblenden","Show/hide properties of type","Mostrar o ocultar characterística de typo"];
|
||||
var PROD_CATS_LIST = ["Unterkategorien","Sub Categories","Categorias contenidas"];
|
||||
var PROD_PRODUCTS_LIST = ["Produkte","Products","Productos"];
|
||||
|
||||
// this is the maximal price that a product may cost
|
||||
var MAX_PRICE = 999.99;
|
||||
|
@ -150,6 +153,7 @@ function setLanguage(language) {
|
|||
p_currenttypeid = null;
|
||||
}
|
||||
|
||||
var cats = "";
|
||||
var it = content.containedTypes;
|
||||
if (it != null) {
|
||||
|
||||
|
@ -158,10 +162,16 @@ function setLanguage(language) {
|
|||
var aType = it[i];
|
||||
var name = aType.name;
|
||||
var id = aType.id;
|
||||
txt += '<button id="gotoprodtype_' + id + '" type="submit" data-theme="e" class="oscmd">' + name + ' ⇒</button>';
|
||||
cats += '<button id="gotoprodtype_' + id + '" type="submit" data-theme="e" class="oscmd">' + name + ' ⇒</button>';
|
||||
}
|
||||
}
|
||||
|
||||
if (cats != "") {
|
||||
txt += PROD_CATS_LIST[lang] + ":<br>" + cats;
|
||||
}
|
||||
|
||||
var prodsListPrinted = false;
|
||||
|
||||
var pt = content.containedProds;
|
||||
if (pt != null) {
|
||||
var i=0;
|
||||
|
@ -177,6 +187,11 @@ function setLanguage(language) {
|
|||
}
|
||||
var aProduct = newProduct(prod.id,prod.longname,prod.shortname,prod.priceA,prod.priceB,prod.priceC,unit,days,prod.tax,prod.taxaustria,prod.amount,prod.available,prod.audio,prod.favorite);
|
||||
prodleafs[prodleafs.length] = aProduct;
|
||||
|
||||
if (!prodsListPrinted) {
|
||||
prodsListPrinted = true;
|
||||
txt += PROD_PRODUCTS_LIST[lang] + ":<br>";
|
||||
}
|
||||
txt += aProduct.createListStructureLine(audiofiles);
|
||||
}
|
||||
if (ct != null) {
|
||||
|
@ -265,6 +280,8 @@ function setLanguage(language) {
|
|||
sortAlpha(objid);
|
||||
} else if (cmd == 'prodextrainput') {
|
||||
doAjax("GET","php/contenthandler.php?module=products&command=getAssignedExtrasOfProd&prodid=" + objid,null,handleAssignedExtras,"Zugewiesene Optionen");
|
||||
} else if (cmd == 'toggleprodtype') {
|
||||
toggleProdType(objid);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -393,6 +410,17 @@ function setLanguage(language) {
|
|||
actionOnProd(url,prodid,null,false);
|
||||
}
|
||||
|
||||
function toggleProdType(typeid) {
|
||||
var currentDisplayState = $("#toggleprodtype_" + typeid).data("display");
|
||||
if ((currentDisplayState == undefined) || (currentDisplayState == 0)) {
|
||||
$("#toggleprodtype_" + typeid).data("display",1);
|
||||
$("#typepropertiespart_" + typeid).show();
|
||||
} else {
|
||||
$("#toggleprodtype_" + typeid).data("display",0);
|
||||
$("#typepropertiespart_" + typeid).hide();
|
||||
}
|
||||
}
|
||||
|
||||
function parsePricesAndProperties(prodid) {
|
||||
var longname = $("#prodlong_input_" + prodid).val();
|
||||
var shortname = $("#prodshort_input_" + prodid).val();
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<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.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.14">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
<aside class="aside aside1" id="tablepanel">
|
||||
<div class="tablepanel" >
|
||||
<header id="location" class="tablepanelheader">Raum: Raum xyz</header>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td id="tablepanel" class="tableaside1">
|
||||
<div id="location" class="tablepanelheader">Raum: Raum xyz</div>
|
||||
<div id="roompanel" class="roompanel"></div>
|
||||
|
||||
<div id="tablepanelcontent" class="tablepanelcontent"></div>
|
||||
|
@ -12,11 +12,8 @@
|
|||
</div>
|
||||
|
||||
<div id="receiptpanel" style="display:none;"></div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<article class="main">
|
||||
|
||||
<td id="main" class="tablemain">
|
||||
<div id="groupchain" class="grouppanel"></div>
|
||||
|
||||
<div id="groupchoice" class="grouppanel"></div>
|
||||
|
@ -40,9 +37,7 @@
|
|||
<input id="remark" class="input100 inputwhite" type="text" placeholder="Produktbemerkung" />
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
<aside class="aside aside2">
|
||||
<td id="rightsidearea" >
|
||||
<div class="buttonarea">
|
||||
<input id="mainmenubtn" class="input100 inputwhite"type="submit" value="Hauptmenü" />
|
||||
<input id="paydeskbtn" class="input100 inputwhite"type="submit" value="Kasse" style="display:none;"/><br>
|
||||
|
@ -57,9 +52,12 @@
|
|||
</div>
|
||||
|
||||
<div id="neworders" class="ordereditem-container"></div>
|
||||
</tr>
|
||||
|
||||
</aside>
|
||||
|
||||
<tr><td colspan=3>
|
||||
<div id="ordered" class="ordereditem-sentcontainer"></div>
|
||||
|
||||
<div id="waitermessagearea" class="waitermsg" style="display:none;">Waiter Message</div>
|
||||
</tr>
|
||||
|
||||
</table>
|
Loading…
Reference in New Issue