OrderSprinter 1.4.1

This commit is contained in:
Geno 2020-11-19 23:10:09 +01:00
parent 73883ee35b
commit e2ffab3466
31 changed files with 144 additions and 93 deletions

View File

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

View File

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

View File

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

Binary file not shown.

View File

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

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -334,7 +334,7 @@ function getBillWithId(id) {
for (var i=0;i<bills.length;i++) { for (var i=0;i<bills.length;i++) {
if (bills[i].id == id) { if (bills[i].id == id) {
entry = bills[i]; entry = bills[i];
break break;
} }
} }

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.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.0"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.1">
<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" />
@ -215,7 +215,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") { if (is_installed == "Yes") {
useInstallation(); useInstallation();
} else { } else {
setTimeout(function(){document.location.href = "install.html?v=1.4.0"},500); setTimeout(function(){document.location.href = "install.html?v=1.4.1"},500);
} }
} }

View File

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

View File

@ -2621,7 +2621,7 @@ $stmt->execute(array(null));
$sql = "OPTIMIZE TABLE %user%"; $sql = "OPTIMIZE TABLE %user%";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array(null)); $stmt->execute();
} }
$this->updateVersion($pdo, '1.3.23'); $this->updateVersion($pdo, '1.3.23');
@ -2760,6 +2760,38 @@ return false;
} }
} }
function updateUserTable1400_1401($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.4.0") {
$ret = $this->updateUserTable1326_1400($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.3.26 to 1.4.0 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$sql = "ALTER TABLE %bill% MODIFY netto DECIMAL (17,6) NULL";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$this->updateNettoValuesOfBill($pdo);
$sql = "OPTIMIZE TABLE %bill%";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute();
$this->updateVersion($pdo, '1.4.1');
return true;
} catch (PDOException $e) {
echo "Error in v1.4.0 to 1.4.1: $e";
return false;
}
}
function insertIntRow($pdo,$table,$rowToInsert,$afterRow) { function insertIntRow($pdo,$table,$rowToInsert,$afterRow) {
$this->insertTypeRow($pdo, $table, $rowToInsert, $afterRow, 'INT(1) NULL'); $this->insertTypeRow($pdo, $table, $rowToInsert, $afterRow, 'INT(1) NULL');
} }
@ -2840,6 +2872,19 @@ $rect .= "s: zu storn. Arb.bon: ;q:v\n";
return $rect; return $rect;
} }
function updateNettoValuesOfBill($pdo) {
$sql = "SELECT %bill%.id as billid,IF(status='s',-1,1)*ROUND(SUM(price/(1 + %queue%.tax/100.0)),6) as netto FROM %queue%,%billproducts%,%bill% WHERE %billproducts%.billid=%bill%.id AND %billproducts%.queueid=%queue%.id AND (status is null OR status=? OR status=?) GROUP by billid";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('x','s'));
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
$sql = "UPDATE %bill% SET netto=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
foreach($result as $r) {
$stmt->execute(array($r["netto"],$r["billid"]));
}
}
function createTables($decpoint,$billlanguage,$currency,$timezone) function createTables($decpoint,$billlanguage,$currency,$timezone)
{ {
$pdo = $this->pdo; $pdo = $this->pdo;
@ -2922,7 +2967,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.4.0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.4.1')");
$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')");
@ -3369,7 +3414,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.4.0"; $installerVersion = "1.4.1";
$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']);
@ -3400,7 +3445,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"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.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.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","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20","1.3.21","1.3.22","1.3.23","1.3.24","1.3.25","1.3.26" "1.3.13","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20","1.3.21","1.3.22","1.3.23","1.3.24","1.3.25","1.3.26","1.4.0"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -3408,7 +3453,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1326_1400($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1400_1401($_POST['prefix'], $version, $_POST['db']);
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.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -382,7 +382,7 @@ var MAN_PRINT_INSTANCE = ["Druckerinstanz","Printer instance","Impresora"];
var MAN_RECEIPT_TXT = ["Kasse","Receipts","Recibos"]; var MAN_RECEIPT_TXT = ["Kasse","Receipts","Recibos"];
var MAN_DRINKS_REC_TXT = ["Getränke","Drinks","Bebidas"]; var MAN_DRINKS_REC_TXT = ["Getränke","Drinks","Bebidas"];
var MAN_FOOD_REC_TXT = ["Speisen","Food","Comidas"]; 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_PRINSTANCE_HINT = ["Die Zuordnungen wirken erst ab Printserverversion 1.3.14 oder höher!","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_DASHSLOT1 = ["Dashboard Slot 1","Dashboard Slot 1","Dashboard Slot 1"];
var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"]; 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 MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"];
@ -1227,7 +1227,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.4.0"; document.location.href = "index.html?v=1.4.1";
},250); },250);
} }
}, },
@ -1764,9 +1764,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis(); var millis=getMillis();
setTimeout(function(){ setTimeout(function(){
document.location.href = "install.html?v=1.4.0&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.4.1&mode=onlyupdate&n=" + millis;
},250); },250);
document.location.href = "install.html?v=1.4.0&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.4.1&mode=onlyupdate&n=" + millis;
} }
function handleUpdateReplace(answer) { function handleUpdateReplace(answer) {
@ -3920,4 +3920,4 @@ $(document).on("pageinit", "#admin-page", function () {
</body> </body>
</html> </html>

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.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -1245,7 +1245,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.4.0"); echo json_encode($view . "?v=1.4.1");
} }
} }
@ -1452,27 +1452,27 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.0"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.1"); };
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.0"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.1"); };
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.0"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.1"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.0"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.1"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.0"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.1"); };
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.0"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.1"); };
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.0"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.1"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.0"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.1"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.0"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.1"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.0"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.1"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.0"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.1"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.0"); }; if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.1"); };
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.0"); }; if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.1"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.0"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.1"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.0"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.1");
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.0"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.1");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.0"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.1");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1480,7 +1480,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage"); $waiterMessage = $this->getMessage(null, "waitermessage");
} }
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.4.0", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.4.1",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,
@ -2119,8 +2119,9 @@ class Admin {
$roleid = $_POST['roleid']; $roleid = $_POST['roleid'];
$is_admin_role = self::isRoleAdmin($pdo, $roleid); $is_admin_role = self::isRoleAdmin($pdo, $roleid);
$isRoleOfUserAdmin = self::isRoleOfUserAdmin($pdo, $theUserId);
if (!$this->isCurrentUserAdmin() && $is_admin_role) { if (!$this->isCurrentUserAdmin() && ($is_admin_role || $isRoleOfUserAdmin)) {
echo json_encode("noadmin"); echo json_encode("noadmin");
} else { } else {
$sql = "UPDATE %user% SET roleid=? WHERE id=?"; $sql = "UPDATE %user% SET roleid=? WHERE id=?";

View File

@ -207,15 +207,15 @@ class Bill {
$tableid = $row->tableid; $tableid = $row->tableid;
if ($qrow->countid == 0) { if ($qrow->countid == 0) {
if ($tableid == 0) { if ($tableid == 0) {
$sql = "SELECT DISTINCT billdate,brutto,netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user% WHERE %bill%.id=? AND userid=%user%.id AND tableid='0' "; $sql = "SELECT DISTINCT billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user% WHERE %bill%.id=? AND userid=%user%.id AND tableid='0' ";
} else { } else {
$sql = "SELECT DISTINCT billdate,brutto,netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%resttables% WHERE %bill%.id=? AND userid=%user%.id AND tableid=%resttables%.id "; $sql = "SELECT DISTINCT billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%resttables% WHERE %bill%.id=? AND userid=%user%.id AND tableid=%resttables%.id ";
} }
} else { } else {
if ($tableid == 0) { if ($tableid == 0) {
$sql = "SELECT DISTINCT billdate,brutto,netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid='0' AND paidtime is not null "; $sql = "SELECT DISTINCT billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid='0' AND paidtime is not null ";
} else { } else {
$sql = "SELECT DISTINCT billdate,brutto,netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%resttables%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid=%resttables%.id AND paidtime is not null "; $sql = "SELECT DISTINCT billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,host,IFNULL(%bill%.status,'') as status,guestinfo,paymentid FROM %bill%,%user%,%resttables%,%queue% WHERE %bill%.id=? AND %bill%.id=%queue%.billid AND userid=%user%.id AND tableid=%resttables%.id AND paidtime is not null ";
} }
} }
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -566,7 +566,7 @@ class Bill {
if (!is_null($maxbillid)) { if (!is_null($maxbillid)) {
$nextbillid = intval($maxbillid) + 1; $nextbillid = intval($maxbillid) + 1;
$sql = "SELECT brutto,netto,prevbrutto,prevnetto FROM %bill% WHERE id=?"; $sql = "SELECT brutto,ROUND(netto,2) as netto,prevbrutto,prevnetto FROM %bill% WHERE id=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array(intval($maxbillid))); $row = CommonUtils::getRowSqlObject($pdo, $sql, array(intval($maxbillid)));
$newprevbrutto = $row->prevbrutto ; $newprevbrutto = $row->prevbrutto ;
$newprevnetto = $row->prevnetto; $newprevnetto = $row->prevnetto;
@ -979,6 +979,7 @@ class Bill {
$this->t['Date'][$l], $this->t['Date'][$l],
$this->t['Brutto'][$l] ."($currency)", $this->t['Brutto'][$l] ."($currency)",
$this->t['Netto'][$l] . "($currency)", $this->t['Netto'][$l] . "($currency)",
$this->t['Tablename'][$l],
$this->t['State'][$l], $this->t['State'][$l],
$this->t['Ref'][$l], $this->t['Ref'][$l],
$this->t['host'][$l], $this->t['host'][$l],
@ -1005,7 +1006,7 @@ class Bill {
$payment_col = $payment_lang[$l]; $payment_col = $payment_lang[$l];
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "SELECT DISTINCT %bill%.id,%bill%.signature,billdate,brutto,netto,IF(tax is not null, tax, '0.00') as tax,status,closingdate,remark,%bill%.host,%bill%.closingid,%payment%.$payment_col as payway,userid,ref,username,IF(%bill%.reason is not null,reason,'') as reason FROM %bill%,%closing%,%payment%,%user% "; $sql = "SELECT DISTINCT %bill%.id,IF(tableid > '0',(SELECT tableno FROM %resttables% WHERE id=tableid),'') as tablename,%bill%.signature,billdate,brutto,ROUND(netto,2) as netto,IF(tax is not null, tax, '0.00') as tax,status,closingdate,remark,%bill%.host,%bill%.closingid,%payment%.$payment_col as payway,userid,ref,username,IF(%bill%.reason is not null,reason,'') as reason FROM %bill%,%closing%,%payment%,%user% ";
$sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id "; $sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id ";
$sql .= " AND %bill%.paymentid=%payment%.id "; $sql .= " AND %bill%.paymentid=%payment%.id ";
if ($onlyClosingId == null) { if ($onlyClosingId == null) {
@ -1027,6 +1028,7 @@ class Bill {
$dbresult = $stmt->fetchAll(); $dbresult = $stmt->fetchAll();
foreach($dbresult as $zeile) { foreach($dbresult as $zeile) {
$billid = $zeile['id']; $billid = $zeile['id'];
$tablename = $zeile['tablename'];
$billdate = $zeile['billdate']; $billdate = $zeile['billdate'];
$brutto_orig = $zeile['brutto']; $brutto_orig = $zeile['brutto'];
@ -1068,9 +1070,9 @@ class Bill {
} }
if ($onlyClosingId == null) { if ($onlyClosingId == null) {
$line = array($billid , $billdate, $brutto, $netto, $status, $ref, $host, $reason, $userid,$username , $closingid, $closingdate, $paymentname, $remark); $line = array($billid , $billdate, $brutto, $netto, $tablename, $status, $ref, $host, $reason, $userid,$username , $closingid, $closingdate, $paymentname, $remark);
} else { } else {
$line = array($billid , $billdate, $brutto, $netto, $status, $ref, $host, $reason, $userid,$username , $paymentname); $line = array($billid , $billdate, $brutto, $netto, $tablename, $status, $ref, $host, $reason, $userid,$username , $paymentname);
} }
$allcells[] = $line; $allcells[] = $line;
} }
@ -1121,5 +1123,4 @@ class Bill {
$objPHPExcel->disconnectWorksheets(); $objPHPExcel->disconnectWorksheets();
unset($objPHPExcel); unset($objPHPExcel);
} }
} }
?>

View File

@ -532,7 +532,7 @@ $count = count($result);
if ($count == 0) { if ($count == 0) {
return ""; return "";
} else { } else {
$msg = "Umsätze aufgeschlüsselt nach Benutzer und Steuersatz:\n\n"; $msg = "Umsätze aufgeschlüsselt nach Benutzer und Steuersatz (ohne Ein-/Auslagen):\n\n";
$msg .= "Benutzer;Steuersatz;Umsatz (Brutto)\n"; $msg .= "Benutzer;Steuersatz;Umsatz (Brutto)\n";
foreach($result as $res) { foreach($result as $res) {
// sumprice | thetax | username // sumprice | thetax | username
@ -542,8 +542,8 @@ $msg .= $res['username'] . ";$tax;$sumprice\n";
} }
return $msg . "\n"; return $msg . "\n";
} }
} }
private function retrieveClosingFromDb($pdo,$closingid,$doCsvExport,$onlyresultreturn) { private function retrieveClosingFromDb($pdo,$closingid,$doCsvExport,$onlyresultreturn) {
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
@ -566,7 +566,7 @@ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Expires: 0"); header("Expires: 0");
$csv .= $this->t['ID'][$l] . ";" . $this->t['Date'][$l] . ";" . $this->t['Prod'][$l] . ";" . $this->t['Brutto'][$l] . "($currency);"; $csv .= $this->t['ID'][$l] . ";" . $this->t['Date'][$l] . ";" . $this->t['Tablename'][$l] . ";" . $this->t['Prod'][$l] . ";" . $this->t['Brutto'][$l] . "($currency);";
$csv .= $this->t['Netto'][$l] . "($currency);"; $csv .= $this->t['Netto'][$l] . "($currency);";
$csv .= $this->t['Tax'][$l] . ";"; $csv .= $this->t['Tax'][$l] . ";";
$csv .= $this->t['PayWay'][$l] . ";"; $csv .= $this->t['PayWay'][$l] . ";";
@ -587,7 +587,7 @@ $billsum = $row->billsum;
$billcount = $row->billcount; $billcount = $row->billcount;
$signature = $row->signature; $signature = $row->signature;
$sql = "SELECT %bill%.id as id,paymentid,billdate,userid,ref,username,status,brutto,netto,IF(tax is not null, tax, '0.00') as tax FROM %bill%,%user% WHERE closingid=? AND %bill%.userid = %user%.id ORDER BY billdate"; $sql = "SELECT %bill%.id as id,IF(tableid > '0',(SELECT tableno FROM %resttables% WHERE id=tableid),'') as tablename,paymentid,billdate,userid,ref,username,status,brutto,netto,IF(tax is not null, tax, '0.00') as tax FROM %bill%,%user% WHERE closingid=? AND %bill%.userid = %user%.id ORDER BY billdate";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($closingid)); $stmt->execute(array($closingid));
$billIdsAndPaymentsForThatClosing = $stmt->fetchAll(); $billIdsAndPaymentsForThatClosing = $stmt->fetchAll();
@ -620,6 +620,7 @@ $this->returnErrorInconsDB($doCsvExport, $onlyresultreturn);
return; return;
} }
$tablename = $billIdsAndPaymentsForThatClosing[$index]['tablename'];
$billdate = $billIdsAndPaymentsForThatClosing[$index]['billdate']; $billdate = $billIdsAndPaymentsForThatClosing[$index]['billdate'];
$paymentid = $billIdsAndPaymentsForThatClosing[$index]['paymentid']; $paymentid = $billIdsAndPaymentsForThatClosing[$index]['paymentid'];
$userid = $billIdsAndPaymentsForThatClosing[$index]['userid']; $userid = $billIdsAndPaymentsForThatClosing[$index]['userid'];
@ -638,6 +639,7 @@ $netto = number_format($netto, 2, $decpoint, '');
$tax = number_format($tax, 2, $decpoint, ''); $tax = number_format($tax, 2, $decpoint, '');
$retValues[] = array ( $retValues[] = array (
"billid" => $aBillId, "billid" => $aBillId,
"tablename" => '',
"paidtime" => $billdate, "paidtime" => $billdate,
"productname" => $this->t['cashaction'][$l], // Kassenaktion "productname" => $this->t['cashaction'][$l], // Kassenaktion
"price" => $brutto, "price" => $brutto,
@ -649,7 +651,7 @@ $retValues[] = array (
"status" => $statusTxt, "status" => $statusTxt,
"ref" => $ref); "ref" => $ref);
if ($doCsvExport || $onlyresultreturn) { if ($doCsvExport || $onlyresultreturn) {
$csv .= "$aBillId; \"$billdate\" ; \"" . $this->t['cashaction'][$l] . "\" ; \"$brutto\" ; \"$netto\" ; \"$tax\" ; \"$paymentArray[$paymentid]\";$userid; \"$username\"; \"$statusTxt\"; $ref\n"; $csv .= "$aBillId; \"$billdate\" ; \"$tablename\" ; \"" . $this->t['cashaction'][$l] . "\" ; \"$brutto\" ; \"$netto\" ; \"$tax\" ; \"$paymentArray[$paymentid]\";$userid; \"$username\"; \"$statusTxt\"; $ref\n";
} }
} else { } else {
@ -680,6 +682,7 @@ $price = number_format($price, 2, $decpoint, '');
$formattedtax = number_format($tax, 2, $decpoint, ''); $formattedtax = number_format($tax, 2, $decpoint, '');
$retValues[] = array ( $retValues[] = array (
"billid" => $aBillId, "billid" => $aBillId,
"tablename" => $tablename,
"paidtime" => $paidtime, "paidtime" => $paidtime,
"productname" => $productname, "productname" => $productname,
"price" => $price, "price" => $price,
@ -692,7 +695,7 @@ $retValues[] = array (
"ref" => $ref); "ref" => $ref);
$productname = str_replace('"','""',$productname); $productname = str_replace('"','""',$productname);
if ($doCsvExport || $onlyresultreturn) { if ($doCsvExport || $onlyresultreturn) {
$csv .= "$aBillId; \"$paidtime\" ; \"$productname\" ; \"$price\" ; \"$netto\" ; \"$formattedtax\" ; \"$paymentArray[$paymentid]\"; $userid; \"$username\"; \"$statusTxt\"; $ref\n"; $csv .= "$aBillId; \"$paidtime\" ; \"$tablename\" ; \"$productname\" ; \"$price\" ; \"$netto\" ; \"$formattedtax\" ; \"$paymentArray[$paymentid]\"; $userid; \"$username\"; \"$statusTxt\"; $ref\n";
} }
} }
} }
@ -758,7 +761,7 @@ return null;
} }
} }
$sql = "select sum(%bill%.brutto) as sum,sum(%bill%.netto) as netto,%payment%.name,%bill%.status from %bill%,%payment% where "; $sql = "select sum(%bill%.brutto) as sum,round(sum(%bill%.netto),2) as netto,%payment%.name,%bill%.status from %bill%,%payment% where ";
$sql .= "%bill%.closingid=? and "; $sql .= "%bill%.closingid=? and ";
$sql .= "%bill%.paymentid=%payment%.id "; $sql .= "%bill%.paymentid=%payment%.id ";
$sql .= "group by %bill%.tax,%payment%.name,%bill%.status"; $sql .= "group by %bill%.tax,%payment%.name,%bill%.status";
@ -826,6 +829,4 @@ echo json_encode(array("status" => "OK", "msg" => $retVal));
return $retVal; return $retVal;
} }
} }
} }
?>

View File

@ -102,7 +102,7 @@ class CommonUtils {
$pdo = $this->dbutils->openDbAndReturnPdo(); $pdo = $this->dbutils->openDbAndReturnPdo();
} }
$sql = "SELECT billdate,brutto,netto,userid,IF(tax is not null, tax, '0.00') as tax,signature,status FROM %bill% WHERE id=?"; $sql = "SELECT billdate,brutto,ROUND(netto,2) as netto,userid,IF(tax is not null, tax, '0.00') as tax,signature,status FROM %bill% WHERE id=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($id)); $stmt->execute(array($id));
$row = $stmt->fetchObject(); $row = $stmt->fetchObject();

View File

@ -15,8 +15,8 @@ if (isset($_POST["cmd"])) {
if (strlen($cmd) > 150) { if (strlen($cmd) > 150) {
$cmd = substr($cmd, 0,149); $cmd = substr($cmd, 0,149);
} }
if (strlen($xhr) > 700) { if (strlen($xhr) > 900) {
$xhr = substr($xhr, 0,699); $xhr = substr($xhr, 0,899);
} }
if (strlen($fct) > 100) { if (strlen($fct) > 100) {
$fct = substr($fct, 0,99); $fct = substr($fct, 0,99);
@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) { if (strlen($status) > 150) {
$status = substr($status, 0,149); $status = substr($status, 0,149);
} }
$version = "1.4.0"; $version = "1.4.1";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion); $arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else { } else {

View File

@ -1730,7 +1730,7 @@ class QueueContent {
* Create bill * Create bill
* Return a bill id * Return a bill id
*/ */
function declarePaidCreateBillReturnBillId($pdo,$ids,$tableid,$paymentId,$declareready,$host,$calledInternally = false,$reservationid,$guestinfo,$intguestid) { function declarePaidCreateBillReturnBillId($pdo,$ids,$tableid,$paymentId,$declareready,$host,$calledInternally = false,$reservationid='',$guestinfo='',$intguestid='') {
if ($intguestid == '') { if ($intguestid == '') {
$intguestid = null; $intguestid = null;
@ -1792,7 +1792,7 @@ class QueueContent {
$row =$stmt->fetchObject(); $row =$stmt->fetchObject();
if ($row != null) { if ($row != null) {
$billid = intval($row->id)+1; $billid = intval($row->id)+1;
$sql = "SELECT brutto,netto,prevbrutto,prevnetto FROM %bill% WHERE id=?"; $sql = "SELECT brutto,ROUND(netto,2) as netto,prevbrutto,prevnetto FROM %bill% WHERE id=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($row->id)); $row = CommonUtils::getRowSqlObject($pdo, $sql, array($row->id));
$newprevbrutto = $row->prevbrutto + $row->brutto; $newprevbrutto = $row->prevbrutto + $row->brutto;
$newprevnetto = $row->prevnetto + $row->netto; $newprevnetto = $row->prevnetto + $row->netto;
@ -1822,7 +1822,7 @@ class QueueContent {
} }
$idlist = join("','",$ids_array); $idlist = join("','",$ids_array);
$sql = "SELECT SUM(price) as brutto,ROUND(SUM(price/(1 + %queue%.tax/100.0)),2) as netto FROM %queue% WHERE id IN ('$idlist')"; $sql = "SELECT SUM(price) as brutto,ROUND(SUM(price/(1 + %queue%.tax/100.0)),6) as netto FROM %queue% WHERE id IN ('$idlist')";
$row = CommonUtils::getRowSqlObject($pdo, $sql, null); $row = CommonUtils::getRowSqlObject($pdo, $sql, null);
$brutto = $row->brutto; $brutto = $row->brutto;
$netto = $row->netto; $netto = $row->netto;
@ -1877,6 +1877,4 @@ class QueueContent {
} }
return $_SESSION['userid']; return $_SESSION['userid'];
} }
} }
?>

View File

@ -1,6 +1,7 @@
<?php <?php
$this->t = array( $this->t = array(
"ID" => array("Bonid","ID",""), "ID" => array("Bonid","ID",""),
"Tablename" => array("Tisch","Table","Mesa"),
"Date" => array("Zahlungsdatum","Pay date","Fecha de pago"), "Date" => array("Zahlungsdatum","Pay date","Fecha de pago"),
"Prod" => array("Produkt","Product","Producto"), "Prod" => array("Produkt","Product","Producto"),
"Brutto" => array("Bruttopreis","Gross","Bruto"), "Brutto" => array("Bruttopreis","Gross","Bruto"),

View File

@ -478,7 +478,7 @@ class Basedb {
`id` INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY , `id` INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`billdate` DATETIME NOT NULL , `billdate` DATETIME NOT NULL ,
`brutto` " . DECIMALMIDDLE . " NULL, `brutto` " . DECIMALMIDDLE . " NULL,
`netto` " . DECIMALMIDDLE . " NULL, `netto` " . DECIMALMIDDLEEXACT . " NULL,
`prevbrutto` " . DECIMALBIG . " NULL, `prevbrutto` " . DECIMALBIG . " NULL,
`prevnetto` " . DECIMALBIG . " NULL, `prevnetto` " . DECIMALBIG . " NULL,
`tableid` VARCHAR ( 150 ) NOT NULL, `tableid` VARCHAR ( 150 ) NOT NULL,

View File

@ -2,4 +2,5 @@
defined('DECIMALSMALL') || define ( 'DECIMALSMALL','DECIMAL (15,2)' ); defined('DECIMALSMALL') || define ( 'DECIMALSMALL','DECIMAL (15,2)' );
defined('DECIMALMIDDLE') || define ( 'DECIMALMIDDLE','DECIMAL (17,2)' ); defined('DECIMALMIDDLE') || define ( 'DECIMALMIDDLE','DECIMAL (17,2)' );
defined('DECIMALMIDDLEEXACT') || define ( 'DECIMALMIDDLEEXACT','DECIMAL (17,6)' );
defined('DECIMALBIG') || define ( 'DECIMALBIG','DECIMAL (19,2)' ); defined('DECIMALBIG') || define ( 'DECIMALBIG','DECIMAL (19,2)' );

View File

@ -254,11 +254,14 @@ class PdfExport extends FPDF {
for ($i=1;$i<count($salesArr);$i++) { for ($i=1;$i<count($salesArr);$i++) {
$line = $salesArr[$i]; $line = $salesArr[$i];
$bruttosum += str_replace($this->decpoint,".",$line[2]); $bruttosum += str_replace($this->decpoint,".",$line[2]);
$nettosum += str_replace($this->decpoint,".",$line[3]); $nettosum += str_replace($this->decpoint,".",$line[3]);
for ($j=0;$j<count($line);$j++) { for ($j=0;$j<count($line);$j++) {
$aVal = $line[$j]; $aVal = $line[$j];
if ($j == 3) {
$aVal = number_format(floatval(str_replace(',','.',$aVal)),2,$this->decpoint,'');
}
$this->Cell($this->flengths[$j],6,$aVal,"LR",0,"R",$fill); $this->Cell($this->flengths[$j],6,$aVal,"LR",0,"R",$fill);
} }
$this->Ln(); $this->Ln();

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.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -262,7 +262,7 @@ function fillOrderVolume(volume) {
function createBtnSizePart(size,label,labeltxt) { function createBtnSizePart(size,label,labeltxt) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,size) + '>' + PREF_SIZE_SMALL[l] + '</option>'; html += '<option value="0"' + isSelected(0,size) + '>' + PREF_SIZE_SMALL[l] + '</option>';
@ -275,7 +275,7 @@ function createBtnSizePart(size,label,labeltxt) {
function createPreferTMPart(prefervalue,label,labeltxt) { function createPreferTMPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_TM_TEXT[l] + '</option>'; html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_TM_TEXT[l] + '</option>';
@ -290,7 +290,7 @@ function createPreferImgPart(prefervalue,label,labeltxt) {
prefervalue = 0; prefervalue = 0;
} }
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_NO[l] + '</option>'; html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_NO[l] + '</option>';
@ -302,7 +302,7 @@ function createPreferImgPart(prefervalue,label,labeltxt) {
function createPreferKTLPart(prefervalue,label,labeltxt) { function createPreferKTLPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_KTL_KEEP[l] + '</option>'; html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_KTL_KEEP[l] + '</option>';
@ -314,7 +314,7 @@ function createPreferKTLPart(prefervalue,label,labeltxt) {
function createPreferMobileThemePart(prefervalue,label,labeltxt) { function createPreferMobileThemePart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_THEME_COLORFUL[l] + '</option>'; html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_THEME_COLORFUL[l] + '</option>';
@ -326,7 +326,7 @@ function createPreferMobileThemePart(prefervalue,label,labeltxt) {
function createPreferExtrasApplyBtnPosPart(prefervalue,label,labeltxt) { function createPreferExtrasApplyBtnPosPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>'; html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">'; html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTTOM[l] + '</option>'; html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTTOM[l] + '</option>';

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.4.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.1">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

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

View File

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

View File

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

View File

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

View File

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