OrderSprinter 1.1.25

This commit is contained in:
Geno 2020-11-19 22:58:30 +01:00
parent 0ef31f147a
commit 916fe9e76d
25 changed files with 173 additions and 54 deletions

Binary file not shown.

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

@ -7,8 +7,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.24"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.25">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.24"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.25">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

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

View File

@ -1038,6 +1038,18 @@ $ret &= $this->setVersion($prefix, '1.1.24');
return $ret; return $ret;
} }
function updateUserTable1124_1125($prefix,$version) {
$ret = true;
if ($version != "1.1.24") {
$ret = $this->updateUserTable1123_1124($prefix,$version);
if (!$ret) {
return false;
}
}
$ret &= $this->setVersion($prefix, '1.1.25');
return $ret;
}
function setVersion($prefix,$theVersion) { function setVersion($prefix,$theVersion) {
$pdo = $this->pdo; $pdo = $this->pdo;
try { try {
@ -1109,7 +1121,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.24')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.25')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
@ -1470,7 +1482,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.1.24"; $installerVersion = "1.1.25";
$admin = new InstallAdmin(); $admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@ -1499,7 +1511,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39", "1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39",
"1.0.40","1.0.41","1.0.42","1.0.43", "1.0.40","1.0.41","1.0.42","1.0.43",
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17", "1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23" "1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -1507,7 +1519,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1123_1124($_POST['prefix'], $version); $ret = $admin->updateUserTable1124_1125($_POST['prefix'], $version);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();

View File

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

View File

@ -23,7 +23,7 @@ function declareProductBeCookingOrCooked(queueid,action) {
function declareProductBeCookingOrCooked_orig(queueid,action) { function declareProductBeCookingOrCooked_orig(queueid,action) {
var data = { queueid: queueid, var data = { queueid: queueid,
action : action}; action : action};
doAjax("POST","php/contenthandler.php?module=queue&command=declareProductBeCookingOrCooked",data,resultOfProductDeclaration,"could not declare product"); doAjax("POST","php/contenthandler.php?module=queue&command=declareProductBeCookingOrCooked",data,resultOfProductDeclaration,"could not declare product",false);
} }
function resultOfProductDeclaration(jsonText) { function resultOfProductDeclaration(jsonText) {

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.24"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.25">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -241,6 +241,7 @@ var MAN_ROOM_ABBR_TXT = ["Kürzel","Abbr.","Abbr."];
var MAN_USERNAME = ["Benutzer","User","Usario"]; var MAN_USERNAME = ["Benutzer","User","Usario"];
var MAN_BILLSUMALL = ["Gesamtbrutto","Total (brutto)","Todo (brutto)"]; var MAN_BILLSUMALL = ["Gesamtbrutto","Total (brutto)","Todo (brutto)"];
var MAN_BILLSUMNETTO = ["Gesamtnetto","Total (netto)","Todo (netto)"];
var MAN_BILLSUMBAR = ["In bar","Cash only","Todo de contado"]; var MAN_BILLSUMBAR = ["In bar","Cash only","Todo de contado"];
var MAN_BILLSUMCASH = ["Ein-/Auslagen","Cash inserts","Entradas"]; var MAN_BILLSUMCASH = ["Ein-/Auslagen","Cash inserts","Entradas"];
@ -259,6 +260,7 @@ var MAN_AESKEY = ["AES256 Schlüssel","AES256 Key","AES256 LLave"];
var MAN_AESKEY_WRONG_LENGTH = ["Ein AES256-Schlüssel muss in Hex-Darstellung 64 Zeichen haben.","An AES256 key requires to have 64 characters in a hex string.", "Una llave de AES256 tiene que contener 64 characteres en forma hex."]; var MAN_AESKEY_WRONG_LENGTH = ["Ein AES256-Schlüssel muss in Hex-Darstellung 64 Zeichen haben.","An AES256 key requires to have 64 characters in a hex string.", "Una llave de AES256 tiene que contener 64 characteres en forma hex."];
var MAN_AESKEY_NO_HEX = ["Der AES-Schlüssel muss als Hex-Zahl angegeben werden.","The AES key must be specified as hex number","La llava AES tiene que especificado en formato hex."]; var MAN_AESKEY_NO_HEX = ["Der AES-Schlüssel muss als Hex-Zahl angegeben werden.","The AES key must be specified as hex number","La llava AES tiene que especificado en formato hex."];
var MAN_CERTIFICATE_SN = ["Zertifikatsseriennummer", "Certificate Serial No","Certificado ID"]; var MAN_CERTIFICATE_SN = ["Zertifikatsseriennummer", "Certificate Serial No","Certificado ID"];
var MAN_TAX = ["Steuersatz (%)","Tax (%)","Impuesto (%)"];
var lang = 0; var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10]; var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10];
@ -1008,9 +1010,9 @@ function binding() {
} else if (theId == "createdbexportxlsx") { } else if (theId == "createdbexportxlsx") {
window.location.href = "php/contenthandler.php?module=bill&command=exportXlsx&" + dateparams; window.location.href = "php/contenthandler.php?module=bill&command=exportXlsx&" + dateparams;
} else if (theId == "createpdfexport") { } else if (theId == "createpdfexport") {
window.location.href = "php/contenthandler.php?module=bill&command=exportPdfReport&" + dateparams; window.open("php/contenthandler.php?module=bill&command=exportPdfReport&" + dateparams,'_blank');
} else if (theId == "createpdfsummary") { } else if (theId == "createpdfsummary") {
window.location.href = "php/contenthandler.php?module=bill&command=exportPdfSummary&" + dateparams; window.open("php/contenthandler.php?module=bill&command=exportPdfSummary&" + dateparams,'_blank');
} }
}); });
@ -1354,11 +1356,13 @@ function displayReceivedClosings(closingresult) {
var totalsum = aClosing.totalsum; var totalsum = aClosing.totalsum;
var cashsum = aClosing.cashsum; var cashsum = aClosing.cashsum;
var usersums = aClosing.usersums; var usersums = aClosing.usersums;
var taxessums = aClosing.taxessums;
var cashops = aClosing.cashops;
if (remark != "") { if (remark != "") {
closingParts += createClosingPart(id + ": " + closingDate + ": " + remark,id,totalsum,cashsum,usersums); closingParts += createClosingPart(id + ": " + closingDate + ": " + remark,id,totalsum,cashsum,usersums,taxessums,cashops);
} else { } else {
closingParts += createClosingPart(id + ": " + closingDate,id,totalsum,cashsum,usersums); closingParts += createClosingPart(id + ": " + closingDate,id,totalsum,cashsum,usersums,taxessums,cashops);
} }
}); });
$("#partofclosings").html(closingParts); $("#partofclosings").html(closingParts);
@ -1664,14 +1668,15 @@ function invokeCmd(theCommand) {
} }
function createClosingPart (aText,id,totalsum,cashsum,usersums) { function createClosingPart (aText,id,totalsum,cashsum,usersums,taxessums,cashops) {
var decpoint = $("#admin-page").data("decpoint"); var decpoint = $("#admin-page").data("decpoint");
var currency = $("#admin-page").data("currency"); var currency = $("#admin-page").data("currency");
var closingPart = '<div data-role="collapsible" data-theme="e" data-content-theme="d">'; var closingPart = '<div data-role="collapsible" data-theme="e" data-content-theme="d">';
closingPart += '<h3>' + aText + '</h3>'; closingPart += '<h3>' + aText + '</h3>';
if (usersums.length > 0) {
var decpoint = $("#admin-page").data("decpoint"); var decpoint = $("#admin-page").data("decpoint");
if (usersums.length > 0) {
closingPart += '<br><table class="usersums">'; closingPart += '<br><table class="usersums">';
closingPart += '<tr><th>' + MAN_USERNAME[lang] + '<th>' + MAN_BILLSUMALL[lang] + '<th>' + MAN_BILLSUMBAR[lang] + '<th>' + MAN_BILLSUMCASH[lang] + '</tr>'; closingPart += '<tr><th>' + MAN_USERNAME[lang] + '<th>' + MAN_BILLSUMALL[lang] + '<th>' + MAN_BILLSUMBAR[lang] + '<th>' + MAN_BILLSUMCASH[lang] + '</tr>';
@ -1686,6 +1691,24 @@ function createClosingPart (aText,id,totalsum,cashsum,usersums) {
closingPart += '</table><br>'; closingPart += '</table><br>';
} }
if (taxessums.length > 0) {
closingPart += '<br><table class="taxessums">';
closingPart += '<tr><th>' + MAN_TAX[lang] + '<th>' + MAN_BILLSUMNETTO[lang] + ' (' + currency + ')<th>' + MAN_BILLSUMALL[lang] + ' (' + currency + ')</tr>';
for (var i=0;i<taxessums.length;i++) {
var aSum = taxessums[i];
closingPart += '<tr><td>' + aSum.tax;
closingPart += '<td>' + aSum.netto.replace(".", decpoint);
closingPart += '<td>' + aSum.brutto.replace(".", decpoint);
closingPart += '</tr>';
}
if (cashops != null) {
closingPart += '<tr><td>' + MAN_BILLSUMCASH[lang] + '<td colspan=2>' + cashops.replace(".", decpoint) + '</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[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 += '<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>' + MAN_CLOSING_DET_TXT[lang] + '</p>';

File diff suppressed because one or more lines are too long

View File

@ -578,7 +578,6 @@ class PHPExcel_Calculation_Functions {
return 4; return 4;
} elseif(is_array($value)) { } elseif(is_array($value)) {
return 64; return 64;
break;
} elseif(is_string($value)) { } elseif(is_string($value)) {
// Errors // Errors
if ((strlen($value) > 0) && ($value{0} == '#')) { if ((strlen($value) > 0) && ($value{0} == '#')) {

View File

@ -1127,19 +1127,19 @@ class Admin {
$right_rating = $_SESSION['right_rating']; $right_rating = $_SESSION['right_rating'];
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.1.24"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.1.25"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.24"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.25"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.24"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.25"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.24"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.25"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html"); };
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.24"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.25"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.24"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.25"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.24"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.25"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.24"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.25"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.24"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.25"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.24"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.25"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.24"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.25");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.24"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.25");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1148,7 +1148,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage"); $waiterMessage = $this->getMessage(null, "waitermessage");
} }
// CAUTION: change version also in config.txt!!! // CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.24", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.25",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,

View File

@ -238,6 +238,22 @@ $result = $stmt->fetchAll();
return $result; return $result;
} }
private function getTaxesGroupedOfClosing($pdo,$closingid) {
$sql = "SELECT %queue%.tax as tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill%,%closing% ";
$sql .= " WHERE billid=%bill%.id AND %bill%.closingid=%closing%.id AND closingid=? GROUP BY tax";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($closingid));
return ($stmt->fetchAll(PDO::FETCH_OBJ));
}
private function getCashOpsOfClosing($pdo,$closingid) {
$sql = "SELECT SUM(brutto) as cashsum FROM %bill%,%closing% WHERE status=? AND closingid=%closing%.id AND closingid=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('c',$closingid));
$row = $stmt->fetchObject();
return ($row->cashsum);
}
/* /*
* Get all closings that are requested: * Get all closings that are requested:
* if month and year is null or empty ==> last 30 closings * if month and year is null or empty ==> last 30 closings
@ -266,7 +282,9 @@ $remark = $zeile['remark'];
$totalSum = $this->getSumOfBillsWithClosingId($pdo,$theId, false); $totalSum = $this->getSumOfBillsWithClosingId($pdo,$theId, false);
$cashSum = $this->getSumOfBillsWithClosingId($pdo,$theId, true); $cashSum = $this->getSumOfBillsWithClosingId($pdo,$theId, true);
$userSums = $this->getUserGroupedSumOfClosing($pdo, $theId); $userSums = $this->getUserGroupedSumOfClosing($pdo, $theId);
$closingEntry = array("id" => $theId, "closingDate" => $closingDate, "remark" => $remark, "totalsum" => $totalSum, "cashsum" => $cashSum, "usersums" => $userSums); $taxessums = $this->getTaxesGroupedOfClosing($pdo,$theId);
$cashops = $this->getCashOpsOfClosing($pdo,$theId);
$closingEntry = array("id" => $theId, "closingDate" => $closingDate, "remark" => $remark, "totalsum" => $totalSum, "cashsum" => $cashSum, "usersums" => $userSums, "taxessums" => $taxessums,"cashops" => $cashops);
$resultarray[] = $closingEntry; $resultarray[] = $closingEntry;
} }

View File

@ -22,6 +22,9 @@ class PdfExport extends FPDF {
"Overview of closings - detailed sales report possible with csv/Excel export", "Overview of closings - detailed sales report possible with csv/Excel export",
"Conclusiones en este periodo - más informaciones en el csv/Excel-export" "Conclusiones en este periodo - más informaciones en el csv/Excel-export"
); );
private $taxTxt = array("Steuersatz (%)","Tax (%)","Impuesto (%)");
private $taxSumTxt = array("Summierung nach Steuersätzen","Sums grouped by taxes","Sumas por impuesta");
private $cashOpTxt = array("Kassenein-/auslagen","Cash inserts/outputs","contribuciones en efectivo");
private static function osGetMonthName($language,$month) { private static function osGetMonthName($language,$month) {
$months = array("1" => array("Januar","January","Enero"), $months = array("1" => array("Januar","January","Enero"),
@ -75,13 +78,27 @@ class PdfExport extends FPDF {
} }
private function osInsertHeader($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear) { private function osInsertHeader($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear) {
// Image(string file , float x , float y [, float w] [, float h] [, string type] [, mixed link])
$this->Image("utilities/salesheader.png",10,10,190,52,"PNG","http://www.ordersprinter.de"); $this->Image("utilities/salesheader.png",10,10,190,52,"PNG","http://www.ordersprinter.de");
$this->Image("utilities/transparent.png",120,10,190-100,52,"PNG","http://www.ordersprinter.de"); $this->Image("utilities/transparent.png",120,10,190-100,52,"PNG","http://www.ordersprinter.de");
$this->SetFont('Helvetica','B',14);
$companyInfo = utf8_decode(self::getConfigItem($pdo,"companyinfo")); $companyInfo = utf8_decode(self::getConfigItem($pdo,"companyinfo"));
$this->MultiCell(190-10,10,$companyInfo,0,"R",0); if (is_null($companyInfo)) {
return;
}
$companyInfoParts = explode("\n",$companyInfo);
$fontSizes = array(14,14,14,14,14,10,9,9);
$boxSizes = array(10,10,10,10,10,9,7,6);
$maxlines = 8;
if (count($companyInfoParts) > $maxlines) {
array_splice($companyInfoParts,$maxlines);
}
$this->SetFont('Helvetica','B',$fontSizes[count($companyInfoParts)-1]);
$companyInfo = implode("\n",$companyInfoParts);
$this->MultiCell(190-10,$boxSizes[count($companyInfoParts)-1],$companyInfo,0,"R",0);
$this->SetXY(10,70); $this->SetXY(10,70);
} }
@ -121,7 +138,6 @@ class PdfExport extends FPDF {
$allSaleLines = array(); $allSaleLines = array();
$allSaleLines[] = $hline; $allSaleLines[] = $hline;
// first get the billids for that closing
$billIdsForThatClosing = array(); $billIdsForThatClosing = array();
$payment_lang = array("name","name_en","name_esp"); $payment_lang = array("name","name_en","name_esp");
@ -265,6 +281,8 @@ class PdfExport extends FPDF {
$this->setProdsTableHeader(); $this->setProdsTableHeader();
} else if ($this->curtable == "summary") { } else if ($this->curtable == "summary") {
$this->setSummaryTableHeader(); $this->setSummaryTableHeader();
} else if ($this->curtable == "taxes") {
$this->setTaxesTableHeader();
} }
} }
function Footer() function Footer()
@ -380,7 +398,7 @@ class PdfExport extends FPDF {
$closingid = $aClosing["id"]; $closingid = $aClosing["id"];
$date = $this->osDateToGerman($aClosing["datewotime"]) . " " . $aClosing["thetime"]; $date = $this->osDateToGerman($aClosing["datewotime"]) . " " . $aClosing["thetime"];
$sql = "SELECT %queue%.tax,SUM(price) as brutto,SUM(price)/(1 + %queue%.tax/100.0) as netto FROM %queue%,%bill% WHERE billid=%bill%.id AND %bill%.closingid=? GROUP BY %queue%.tax"; $sql = "SELECT %queue%.tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill% WHERE billid=%bill%.id AND %bill%.closingid=? GROUP BY %queue%.tax";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($closingid)); $stmt->execute(array($closingid));
$closingDetails = $stmt->fetchAll(PDO::FETCH_OBJ); $closingDetails = $stmt->fetchAll(PDO::FETCH_OBJ);
@ -395,8 +413,7 @@ class PdfExport extends FPDF {
foreach($closingDetails as $aClosingDetail) { foreach($closingDetails as $aClosingDetail) {
$tax = str_replace(".",$this->decpoint,$aClosingDetail->tax); $tax = str_replace(".",$this->decpoint,$aClosingDetail->tax);
$brutto = str_replace(".",$this->decpoint,$aClosingDetail->brutto); $brutto = str_replace(".",$this->decpoint,$aClosingDetail->brutto);
$netto = number_format($aClosingDetail->netto, 2, $this->decpoint, ''); $netto = str_replace(".",$this->decpoint,$aClosingDetail->netto);
$netto = str_replace(".",$this->decpoint,$netto);
$sumtax = number_format($aClosingDetail->brutto - $aClosingDetail->netto, 2, $this->decpoint, ''); $sumtax = number_format($aClosingDetail->brutto - $aClosingDetail->netto, 2, $this->decpoint, '');
$sumtax = str_replace(".",$this->decpoint,$sumtax); $sumtax = str_replace(".",$this->decpoint,$sumtax);
@ -423,7 +440,7 @@ class PdfExport extends FPDF {
if (!is_null($cashsum) || (abs($cashsum) > 0.01)) { if (!is_null($cashsum) || (abs($cashsum) > 0.01)) {
$cash = str_replace(".",$this->decpoint,$cashsum); $cash = str_replace(".",$this->decpoint,$cashsum);
$this->SetFont('Helvetica','',8); $this->SetFont('Helvetica','',8);
$this->Cell($this->flengths[0],6,"Kassenein-/auslagen",0,0,"R",0); $this->Cell($this->flengths[0],6,$this->cashOpTxt[$this->lang],0,0,"R",0);
$this->Cell($this->flengths[1],6,$cash,0,0,"R",0); $this->Cell($this->flengths[1],6,$cash,0,0,"R",0);
$this->Cell($this->flengths[2],6,"-",0,0,"R",0); $this->Cell($this->flengths[2],6,"-",0,0,"R",0);
@ -442,6 +459,47 @@ class PdfExport extends FPDF {
} }
$this->osWriteSummarySum($pdo,$this->osSumAll[$lang],$allbSum, $allnSum,14, -1); $this->osWriteSummarySum($pdo,$this->osSumAll[$lang],$allbSum, $allnSum,14, -1);
$sql = "SELECT %queue%.tax as tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill%,%closing% ";
$sql .= " WHERE billid=%bill%.id AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ? GROUP BY tax";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($startDate,$endDate));
$taxDetails = $stmt->fetchAll(PDO::FETCH_OBJ);
$this->Ln(10);
$this->SetFont('Helvetica','UB',16);
$this->Cell($this->maxTableLength ,10, utf8_decode($this->taxSumTxt[$lang] . ":"), 0, 1, "L",0);
$this->Ln(5);
$this->setTaxesTableHeader();
$this->curtable = "taxes";
$this->SetFont('Helvetica','',10);
foreach($taxDetails as $aTaxDetail) {
$this->Cell(50,10,str_replace(".",$this->decpoint,$aTaxDetail->tax),1,0,"C");
$this->Cell(50,10,str_replace(".",$this->decpoint,$aTaxDetail->netto),1,0,"C");
$this->Cell(50,10,str_replace(".",$this->decpoint,$aTaxDetail->brutto),1,1,"C");
}
$sql = "SELECT SUM(brutto) as cashsum FROM %bill%,%closing% WHERE status=? AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('c',$startDate,$endDate));
$row = $stmt->fetchObject();
$cashsum = $row->cashsum;
if (!is_null($cashsum) || (abs($cashsum) > 0.01)) {
//$this->Ln(10);
//$this->SetFont('Helvetica','UB',12);
$cashsum = str_replace(".",$this->decpoint,$cashsum);
$this->Cell(50,10,$this->cashOpTxt[$this->lang],1,0,"C",0);
$this->Cell(100,10,$cashsum,1,1,"C",0);
}
$this->curtable = "empty";
} }
private function osDateToGerman($dateStr) { private function osDateToGerman($dateStr) {
@ -541,6 +599,14 @@ class PdfExport extends FPDF {
$this->Ln(); $this->Ln();
} }
private function setTaxesTableHeader() {
$this->SetFont('Helvetica','B',10);
$this->SetFillColor(200,200,200);
$this->Cell(50,10, utf8_decode($this->taxTxt[$this->lang]),1,0,"C",1);
$this->Cell(50,10,"Netto (" . $this->currency . ")",1,0,"C",1);
$this->Cell(50,10,"Brutto (" . $this->currency . ")",1,1,"C",1);
}
private function insertMetaTags($title,$subject) { private function insertMetaTags($title,$subject) {
$this->SetAuthor('OrderSprinter'); $this->SetAuthor('OrderSprinter');
$this->SetCreator('OrderSprinter www.ordersprinter.de'); $this->SetCreator('OrderSprinter www.ordersprinter.de');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -57,12 +57,13 @@ function refreshList(selector) {
} }
} }
function doAjax(getOrPost,url,data,functionToCallIfSuccess,errorMsg) { function doAjax(getOrPost,url,data,functionToCallIfSuccess,errorMsg,doAsync) {
if (typeof doAsync === 'undefined') { doAsync = false; }
$.ajax({ type: getOrPost, $.ajax({ type: getOrPost,
url: url, url: url,
dataType: "json", dataType: "json",
data: data, data: data,
async: false, async: doAsync,
success : function(jsonContent) success : function(jsonContent)
{ {
if (functionToCallIfSuccess != null) { if (functionToCallIfSuccess != null) {

View File

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