OrderSprinter 1.1.3
This commit is contained in:
parent
cc038395f0
commit
e4869a39c8
Binary file not shown.
Binary file not shown.
|
@ -558,4 +558,15 @@ table.prodtable .prodpriceC {
|
|||
width:100%;
|
||||
background-color: LightCyan;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.usersums {
|
||||
border: solid black 3px;
|
||||
background-color: rgb(255, 232, 188);
|
||||
}
|
||||
.usersums td {
|
||||
border: solid black 1px;
|
||||
padding: 3px;
|
||||
text-align:right;
|
||||
vertical-align:bottom;
|
||||
}
|
|
@ -679,7 +679,7 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.1.2</button>
|
||||
<button id="updatebtn">Update -> 1.1.3</button>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
|
@ -589,6 +589,10 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1102_1103($prefix) {
|
||||
return $this->setVersion($prefix, '1.1.3');
|
||||
}
|
||||
|
||||
function setVersion($prefix,$theVersion) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
|
@ -660,7 +664,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.1.2')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.3')");
|
||||
$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')");
|
||||
|
@ -1058,6 +1062,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if ($version == "1.0.14") {
|
||||
$ret &= $admin->updateUserTable1014_1015();
|
||||
$ret &= $admin->updateUserTable1015_1016();
|
||||
|
@ -1087,6 +1092,7 @@ $ret &= $admin->updateUserTable1041_1042($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if ($version == "1.0.15") {
|
||||
$ret &= $admin->updateUserTable1015_1016();
|
||||
$ret &= $admin->updateUserTable1016_1017();
|
||||
|
@ -1116,6 +1122,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if ($version == "1.0.16") {
|
||||
$ret &= $admin->updateUserTable1016_1017();
|
||||
$ret &= $admin->updateUserTable1017_1018();
|
||||
|
@ -1144,6 +1151,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.17") || ($version == "1.0.18")) {
|
||||
$ret &= $admin->updateUserTable1018_1019();
|
||||
$ret &= $admin->updateUserTable1019_1020();
|
||||
|
@ -1171,6 +1179,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if ($version == "1.0.19") {
|
||||
$ret &= $admin->updateUserTable1019_1020();
|
||||
$ret &= $admin->updateUserTable1022_1023($_POST['prefix']);
|
||||
|
@ -1197,6 +1206,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.20") || ($version == "1.0.21")) {
|
||||
// nothing to do... :) (but maybe user has pressed though)
|
||||
} else if (($version == "1.0.22")) {
|
||||
|
@ -1224,6 +1234,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.23")) {
|
||||
$ret &= $admin->updateUserTable1023_1024($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1024_1025($_POST['prefix']);
|
||||
|
@ -1248,6 +1259,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.24")) {
|
||||
$ret &= $admin->updateUserTable1024_1025($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1025_1026($_POST['prefix']);
|
||||
|
@ -1271,6 +1283,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.25")) {
|
||||
$ret &= $admin->updateUserTable1025_1026($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1026_1027($_POST['prefix']);
|
||||
|
@ -1293,6 +1306,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.26")) {
|
||||
$ret &= $admin->updateUserTable1026_1027($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1027_1028($_POST['prefix']);
|
||||
|
@ -1314,6 +1328,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.27")) {
|
||||
$ret &= $admin->updateUserTable1027_1028($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1028_1029($_POST['prefix']);
|
||||
|
@ -1334,6 +1349,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.28")) {
|
||||
$ret &= $admin->updateUserTable1028_1029($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1029_1030($_POST['prefix']);
|
||||
|
@ -1353,6 +1369,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.29")) {
|
||||
$ret &= $admin->updateUserTable1029_1030($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1030_1031($_POST['prefix']);
|
||||
|
@ -1371,6 +1388,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.30")) {
|
||||
$ret &= $admin->updateUserTable1030_1031($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1031_1032($_POST['prefix']);
|
||||
|
@ -1388,6 +1406,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.31")) {
|
||||
$ret &= $admin->updateUserTable1031_1032($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1032_1033($_POST['prefix']);
|
||||
|
@ -1404,6 +1423,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.32")) {
|
||||
$ret &= $admin->updateUserTable1032_1033($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1033_1034($_POST['prefix']);
|
||||
|
@ -1419,6 +1439,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.33")) {
|
||||
$ret &= $admin->updateUserTable1033_1034($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1034_1035($_POST['prefix']);
|
||||
|
@ -1433,6 +1454,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.34")) {
|
||||
$ret &= $admin->updateUserTable1034_1035($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1035_1036($_POST['prefix']);
|
||||
|
@ -1446,6 +1468,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.35")) {
|
||||
$ret &= $admin->updateUserTable1035_1036($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1036_1037($_POST['prefix']);
|
||||
|
@ -1458,6 +1481,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.36")) {
|
||||
$ret &= $admin->updateUserTable1036_1037($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1037_1038($_POST['prefix']);
|
||||
|
@ -1469,6 +1493,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.37")) {
|
||||
$ret &= $admin->updateUserTable1037_1038($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1038_1039($_POST['prefix']);
|
||||
|
@ -1479,6 +1504,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.38")) {
|
||||
$ret &= $admin->updateUserTable1038_1039($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1039_1040($_POST['prefix']);
|
||||
|
@ -1488,6 +1514,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.39")) {
|
||||
$ret &= $admin->updateUserTable1039_1040($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1040_1041($_POST['prefix']);
|
||||
|
@ -1496,6 +1523,7 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.40")) {
|
||||
$ret &= $admin->updateUserTable1040_1041($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1041_1042($_POST['prefix']);
|
||||
|
@ -1503,26 +1531,34 @@ $ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
|||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.41")) {
|
||||
$ret &= $admin->updateUserTable1041_1042($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.42")) {
|
||||
$ret &= $admin->updateUserTable1042_1043($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.0.43")) {
|
||||
$ret &= $admin->updateUserTable1043_1100($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.1.0")) {
|
||||
$ret &= $admin->updateUserTable1100_1101($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.1.1")) {
|
||||
$ret &= $admin->updateUserTable1101_1102($_POST['prefix']);
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else if (($version == "1.1.2")) {
|
||||
$ret &= $admin->updateUserTable1102_1103($_POST['prefix']);
|
||||
} else {
|
||||
echo json_encode("Quellversion nicht unterstützt");
|
||||
return;
|
||||
|
|
|
@ -227,6 +227,11 @@ var MAN_ROOM_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"];
|
|||
var MAN_ROOM_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"];
|
||||
var MAN_ROOM_PRINTER_TXT = ["Arbeitsdrucker","Work printer","Imprimadora de trabajo"];
|
||||
|
||||
var MAN_USERNAME = ["Benutzer","User","Usario"];
|
||||
var MAN_BILLSUMALL = ["Gesamtbrutto","Total (brutto)","Todo (brutto)"];
|
||||
var MAN_BILLSUMBAR = ["In bar","Cash only","Todo de contado"];
|
||||
var MAN_BILLSUMCASH = ["Ein-/Auslagen","Cash inserts","Entradas"];
|
||||
|
||||
var MAN_SIZE_NORMAL = ["normal","normal","normal"];
|
||||
var MAN_SIZE_BIG = ["groß","big","grande"];
|
||||
|
||||
|
@ -1171,11 +1176,12 @@ function displayReceivedClosings(closingresult) {
|
|||
var remark = aClosing.remark;
|
||||
var totalsum = aClosing.totalsum;
|
||||
var cashsum = aClosing.cashsum;
|
||||
var usersums = aClosing.usersums;
|
||||
|
||||
if (remark != "") {
|
||||
closingParts += createClosingPart(id + ": " + closingDate + ": " + remark,id,totalsum,cashsum);
|
||||
closingParts += createClosingPart(id + ": " + closingDate + ": " + remark,id,totalsum,cashsum,usersums);
|
||||
} else {
|
||||
closingParts += createClosingPart(id + ": " + closingDate,id,totalsum,cashsum);
|
||||
closingParts += createClosingPart(id + ": " + closingDate,id,totalsum,cashsum,usersums);
|
||||
}
|
||||
});
|
||||
$("#partofclosings").html(closingParts);
|
||||
|
@ -1481,15 +1487,33 @@ function invokeCmd(theCommand) {
|
|||
}
|
||||
|
||||
|
||||
function createClosingPart (aText,id,totalsum,cashsum) {
|
||||
function createClosingPart (aText,id,totalsum,cashsum,usersums) {
|
||||
var decpoint = $("#admin-page").data("decpoint");
|
||||
var currency = $("#admin-page").data("currency");
|
||||
var closingPart = '<div data-role="collapsible" data-theme="e" data-content-theme="d">';
|
||||
closingPart += '<h3>' + aText + '</h3>';
|
||||
|
||||
if (usersums.length > 0) {
|
||||
var decpoint = $("#admin-page").data("decpoint");
|
||||
closingPart += '<br><table class="usersums">';
|
||||
closingPart += '<tr><th>' + MAN_USERNAME[lang] + '<th>' + MAN_BILLSUMALL[lang] + '<th>' + MAN_BILLSUMBAR[lang] + '<th>' + MAN_BILLSUMCASH[lang] + '</tr>';
|
||||
|
||||
for (var i=0;i<usersums.length;i++) {
|
||||
var aUserSum = usersums[i];
|
||||
closingPart += '<tr><td>' + aUserSum.username;
|
||||
closingPart += '<td>' + aUserSum.billsumall.replace(".", decpoint);
|
||||
closingPart += '<td>' + aUserSum.sumonlybar.replace(".", decpoint);
|
||||
closingPart += '<td>' + aUserSum.sumcash.replace(".", decpoint);
|
||||
closingPart += '</tr>';
|
||||
}
|
||||
closingPart += '</table><br>';
|
||||
}
|
||||
|
||||
closingPart += '<i>' + MAN_CLOSING_INCOME[lang] + ' (' + currency + '):</i> <b>' + (parseFloat(Math.round(totalsum * 100) / 100).toFixed(2)).replace(".", decpoint) + "</b><br>";
|
||||
closingPart += '<i>' + MAN_CLOSING_INCOME_CASH[lang] + ' (' + currency + '):</i> <b>' + (parseFloat(Math.round(cashsum * 100) / 100).toFixed(2)).replace(".", decpoint) + "</b><br>";
|
||||
closingPart += '<p>' + MAN_CLOSING_DET_TXT[lang] + '</p>';
|
||||
|
||||
|
||||
closingPart += '<p>';
|
||||
closingPart += '<button type="submit" data-theme="f" class="csvExportButton" data-icon="check" id="csvexport_' + id + '">' + MAN_CSV_EXP_RECEIPTS[lang] + '</button>';
|
||||
closingPart += '<button type="submit" data-theme="f" class="csvExportAllButton" data-icon="check" id="csvallexport_' + id + '">' + MAN_CSV_EXP_ALL[lang] + '</button>';
|
||||
|
|
|
@ -1091,7 +1091,7 @@ class Admin {
|
|||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
// CAUTION: change version also in config.txt!!!
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.2",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.3",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
|
|
@ -220,12 +220,31 @@ mysqli_free_result( $dbresult );
|
|||
return $sum;
|
||||
}
|
||||
|
||||
private function getUserGroupedSumOfClosing($pdo,$closingid) {
|
||||
$sql = "SELECT userid,username,";
|
||||
|
||||
$sql .= "ROUND(sum(brutto),2) as billsumall,";
|
||||
|
||||
$sql .= "ROUND(sum(if(paymentid='1',brutto,'0.00')),2) as sumonlybar,";
|
||||
|
||||
$sql .= "ROUND(sum(if(status = 'c',brutto,'0.00')),2) as sumcash ";
|
||||
|
||||
$sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid=? GROUP BY userid";
|
||||
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($closingid));
|
||||
$result = $stmt->fetchAll();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get all closings that are requested:
|
||||
* if month and year is null or empty ==> last 30 closings
|
||||
* otherwise query by date
|
||||
*/
|
||||
private function getClosings($month, $year) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$monthText=$month;
|
||||
if ($month < 10) {
|
||||
$monthText = "0" . $month;
|
||||
|
@ -246,7 +265,8 @@ $closingDate = $zeile['closingdate'];
|
|||
$remark = $zeile['remark'];
|
||||
$totalSum = $this->getSumOfBillsWithClosingId($theId, false);
|
||||
$cashSum = $this->getSumOfBillsWithClosingId($theId, true);
|
||||
$closingEntry = array("id" => $theId, "closingDate" => $closingDate, "remark" => $remark, "totalsum" => $totalSum, "cashsum" => $cashSum);
|
||||
$userSums = $this->getUserGroupedSumOfClosing($pdo, $theId);
|
||||
$closingEntry = array("id" => $theId, "closingDate" => $closingDate, "remark" => $remark, "totalsum" => $totalSum, "cashsum" => $cashSum, "usersums" => $userSums);
|
||||
$resultarray[] = $closingEntry;
|
||||
}
|
||||
mysqli_free_result( $dbresult );
|
||||
|
|
|
@ -164,6 +164,8 @@ class Reports {
|
|||
|
||||
$retRatings = $this->getRatings($pdo,$allDates['last30days'],$allDates['lastMonthComplete'], $allDates['currentTimeStr']);
|
||||
|
||||
$usersums = $this->getUserSums($pdo);
|
||||
|
||||
$pdo->commit();
|
||||
|
||||
$retArray = array("today" => $retArrayToday,
|
||||
|
@ -173,7 +175,8 @@ class Reports {
|
|||
"prodsums" => $retArrayProds,
|
||||
"lastmonthname" => $allDates['lastMonthName'],
|
||||
"thismonthname" => $allDates['thisMonthName'],
|
||||
"ratings" => $retRatings
|
||||
"ratings" => $retRatings,
|
||||
"usersums" => $usersums
|
||||
);
|
||||
|
||||
return $retArray;
|
||||
|
@ -370,5 +373,30 @@ class Reports {
|
|||
|
||||
return array("statistics" => $reports,"remarks" =>$result);
|
||||
}
|
||||
|
||||
function getUserSums($pdo) {
|
||||
$sql = "SELECT userid,username as iter,";
|
||||
|
||||
$sql .= "ROUND(sum(brutto),2) as sum,";
|
||||
|
||||
$sql .= "ROUND(sum(if(paymentid='1',brutto,'0.00')),2) as sumonlybar,";
|
||||
|
||||
$sql .= "ROUND(sum(if(status = 'c',brutto,'0.00')),2) as sumcash ";
|
||||
|
||||
$sql .= "FROM %bill%,%user% WHERE userid=%user%.id AND closingid is null GROUP BY userid";
|
||||
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
|
||||
$sumMax = 0.0;
|
||||
foreach ($result as $a) {
|
||||
if ($a["sum"] > $sumMax) {
|
||||
$sumMax = $a["sum"];
|
||||
}
|
||||
}
|
||||
|
||||
return array("max" => $sumMax, "content" => $result);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -22,6 +22,11 @@
|
|||
|
||||
<script>
|
||||
|
||||
var REP_USERSUM = ["Kassenbestände ","Open paydesks", "Cajas" ];
|
||||
var REP_USER = ["Benutzer","User","Usario"];
|
||||
var REP_USER_TXT = ["Dise Übersicht umfasst den derzeitigen Brutto-Kassenbestand pro Kasse inkl. aller Zahlungswege und Ein-/Auslagen.",
|
||||
"This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs.",
|
||||
"Esta table contiene todos las cajas incluyendo todas los tipos the pagamientos"];
|
||||
var REP_TODAY = ["Heute","Today","Hoy"];
|
||||
var REP_YESTERDAY = ["Gestern","Yesterday","Ayer"];
|
||||
var REP_HOUR = ["Uhrzeit","Time","Hora"];
|
||||
|
@ -92,7 +97,11 @@ function setLanguage(language) {
|
|||
|
||||
var htmlRatings = fillRatingsPart(jsonText.ratings,REP_DAY[lang],10,10,40,40);
|
||||
|
||||
$("#content").html(htmlToday + htmlYesterday + htmlThisMonth + htmlLastMonth + htmlProds + htmlRatings);
|
||||
var htmlUserSumsPart = fillOnePart(REP_USERSUM[lang],jsonText.usersums,REP_USER[lang],
|
||||
REP_USER_TXT[lang],
|
||||
"center",15,10,75);
|
||||
|
||||
$("#content").html(htmlToday + htmlYesterday + htmlThisMonth + htmlLastMonth + htmlProds + htmlRatings + htmlUserSumsPart);
|
||||
$("#content").trigger("create");
|
||||
}
|
||||
|
||||
|
@ -155,6 +164,7 @@ function setLanguage(language) {
|
|||
// fill content
|
||||
$.each(contentValues, function (i, aStatValue) {
|
||||
var hourOrDay = aStatValue.iter;
|
||||
|
||||
var sum = aStatValue.sum;
|
||||
content += aTableLine(hourOrDay,sum.toString().replace(".",decpoint),sum/maxValue*98.0,iterAlignment,
|
||||
width1,width2,width3);
|
||||
|
|
Loading…
Reference in New Issue