diff --git a/gastsystem/index.php b/gastsystem/index.php
index 32c369e..2fc70d6 100644
--- a/gastsystem/index.php
+++ b/gastsystem/index.php
@@ -9,8 +9,8 @@
-
-
+
+
@@ -98,7 +98,7 @@
diff --git a/gastsystem/install.php b/gastsystem/install.php
index 5269116..0122c7a 100644
--- a/gastsystem/install.php
+++ b/gastsystem/install.php
@@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
} else {
echo "";
echo "Installation Gastsystem";
- echo '';
+ echo '';
echo "";
echo "";
- echo "
";
+ echo "
";
echo "
";
diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe
index c528a5e..3d985ef 100644
Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ
diff --git a/spider/install/installer.php b/spider/install/installer.php
index 6a4dca8..4180302 100644
--- a/spider/install/installer.php
+++ b/spider/install/installer.php
@@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
- Database::setVersion($pdo,$prefix,"1.4.0");
+ Database::setVersion($pdo,$prefix,"1.4.1");
Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
return array("status" => "OK","msg" => "Installation successful");
diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe
index c528a5e..3d985ef 100644
Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ
diff --git a/webapp/bar.html b/webapp/bar.html
index cb8a0cb..62386c4 100644
--- a/webapp/bar.html
+++ b/webapp/bar.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/bill.html b/webapp/bill.html
index d5614fc..9c88ca8 100644
--- a/webapp/bill.html
+++ b/webapp/bill.html
@@ -5,7 +5,7 @@
-
+
@@ -334,7 +334,7 @@ function getBillWithId(id) {
for (var i=0;i
-
+
diff --git a/webapp/index.html b/webapp/index.html
index f2e111b..50bc4e5 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -9,8 +9,8 @@
-
-
+
+
@@ -215,7 +215,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") {
useInstallation();
} 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);
}
}
diff --git a/webapp/install.html b/webapp/install.html
index 26e595a..954be77 100644
--- a/webapp/install.html
+++ b/webapp/install.html
@@ -727,7 +727,7 @@ $(document).ready(function() {
|
-
+
Update... bitte warten.
|
|
diff --git a/webapp/install/installer.php b/webapp/install/installer.php
index 79b7652..78daf8c 100644
--- a/webapp/install/installer.php
+++ b/webapp/install/installer.php
@@ -2621,7 +2621,7 @@ $stmt->execute(array(null));
$sql = "OPTIMIZE TABLE %user%";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
-$stmt->execute(array(null));
+$stmt->execute();
}
$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) {
$this->insertTypeRow($pdo, $table, $rowToInsert, $afterRow, 'INT(1) NULL');
}
@@ -2840,6 +2872,19 @@ $rect .= "s: zu storn. Arb.bon: ;q:v\n";
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)
{
$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 , '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.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 , 'remoteaccesscode', null)");
$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);
} else if ($command == 'update') {
-$installerVersion = "1.4.0";
+$installerVersion = "1.4.1";
$admin = new InstallAdmin();
$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.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.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)) {
@@ -3408,7 +3453,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
-$ret = $admin->updateUserTable1326_1400($_POST['prefix'], $version, $_POST['db']);
+$ret = $admin->updateUserTable1400_1401($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();
diff --git a/webapp/kitchen.html b/webapp/kitchen.html
index 62b5d2f..af96e5b 100644
--- a/webapp/kitchen.html
+++ b/webapp/kitchen.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/manager.html b/webapp/manager.html
index 09f62cd..cc694f3 100644
--- a/webapp/manager.html
+++ b/webapp/manager.html
@@ -5,7 +5,7 @@
-
+
@@ -382,7 +382,7 @@ var MAN_PRINT_INSTANCE = ["Druckerinstanz","Printer instance","Impresora"];
var MAN_RECEIPT_TXT = ["Kasse","Receipts","Recibos"];
var MAN_DRINKS_REC_TXT = ["Getränke","Drinks","Bebidas"];
var MAN_FOOD_REC_TXT = ["Speisen","Food","Comidas"];
-var MAN_PRINSTANCE_HINT = ["Die Zuordnungen wirken nur bei Printserverversionen ab 1.3.14!","The assignments only work with print server versions 1.3.14 and higher!","Esta configuración sólo funciona con printservers de una version 1.3.14 o despues!"];
+var MAN_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_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"];
var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"];
@@ -1227,7 +1227,7 @@ function initRestoreFileUpload() {
} else {
alert("Import war erfolgreich.");
setTimeout(function(){
- document.location.href = "index.html?v=1.4.0";
+ document.location.href = "index.html?v=1.4.1";
},250);
}
},
@@ -1764,9 +1764,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis();
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);
- 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) {
@@ -3920,4 +3920,4 @@ $(document).on("pageinit", "#admin-page", function () {
-