OrderSprinter 1.1.30

This commit is contained in:
Geno 2020-11-19 22:58:45 +01:00
parent dd516ba2d3
commit 2cdb1242c5
20 changed files with 77 additions and 43 deletions

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.29">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.30">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.29">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.29">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.30">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.30">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.1.29</button>
<button id="updatebtn">Update -> 1.1.30</button>
</td>
<td>&nbsp;</td>
</tr>

View File

@ -1099,10 +1099,7 @@ return false;
$adminCl = new Admin();
DbUtils::overrulePrefix($prefix);
$rect = "l;\nt:llllllllllllllllllll; f: ; a_ID:rrrrrrrr\n;f: ;d:w\n\ng:v; c:v\n\nk:rrr; s: ; m:v; s: ; n:rrrrrr; o:rrrrrrr\nf:-\n";
$rect .= "START_PRODUCTS\na:rrr; s: ; c:v; s: ; b:rrrrrr; d:rrrrrrr\nEND_PRODUCTS\n\n";
$rect .= "p:rrrrr; q:rrrrrr; r:rrrrrrrr; n:rrrrrrrr\nSTART_TAXES\nt:rrrrr; m:rrrrrr; n:rrrrrrrr; b:rrrrrrrr\nEND_TAXES\n\n";
$rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
$rect = $this->getDefaultCustomRecTemplate();
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
@ -1119,7 +1116,7 @@ function updateUserTable1128_1129($prefix,$version) {
$pdo = $this->pdo;
try {
if ($version != "1.1.28") {
$ret = $this->updateUserTable1126_1127($prefix,$version);
$ret = $this->updateUserTable1127_1128($prefix,$version);
if (!$ret) {
return false;
}
@ -1139,6 +1136,38 @@ return false;
}
}
function updateUserTable1129_1130($prefix,$version) {
$pdo = $this->pdo;
try {
if ($version != "1.1.29") {
$ret = $this->updateUserTable1128_1129($prefix,$version);
if (!$ret) {
return false;
}
}
$adminCl = new Admin();
DbUtils::overrulePrefix($prefix);
// Bugfix - the update chain was ignoring the step to 1.1.27
$sql = "select count(id) as reccount from %config% where name='rectemplate'";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute();
$row = $stmt->fetchObject();
if (intval($row->reccount) == 0) {
$rect = $this->getDefaultCustomRecTemplate();
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('rectemplate',$rect));
}
$this->updateVersion($pdo, '1.1.30');
return true;
} catch (PDOException $e) {
return false;
}
}
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
try {
@ -1157,6 +1186,14 @@ $pdo = $this->pdo;
$this->basedb->signLastBillid($pdo);
}
function getDefaultCustomRecTemplate() {
$rect = "l;\nt:llllllllllllllllllll; f: ; a_ID:rrrrrrrr\n;f: ;d:w\n\ng:v; c:v\n\nk:rrr; s: ; m:v; s: ; n:rrrrrr; o:rrrrrrr\nf:-\n";
$rect .= "START_PRODUCTS\na:rrr; s: ; c:v; s: ; b:rrrrrr; d:rrrrrrr\nEND_PRODUCTS\n\n";
$rect .= "p:rrrrr; q:rrrrrr; r:rrrrrrrr; n:rrrrrrrr\nSTART_TAXES\nt:rrrrr; m:rrrrrr; n:rrrrrrrr; b:rrrrrrrr\nEND_TAXES\n\n";
$rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
return $rect;
}
function createTables($decpoint,$billlanguage,$currency,$timezone)
{
$pdo = $this->pdo;
@ -1191,10 +1228,7 @@ $this->basedb->createExtrasTable($pdo);
$this->basedb->createExtrasprodsTable($pdo);
$this->basedb->createQueueExtrasTable($pdo);
$rect = "l;\nt:llllllllllllllllllll; f: ; a_ID:rrrrrrrr\n;f: ;d:w\n\ng:v; c:v\n\nk:rrr; s: ; m:v; s: ; n:rrrrrr; o:rrrrrrr\nf:-\n";
$rect .= "START_PRODUCTS\na:rrr; s: ; c:v; s: ; b:rrrrrr; d:rrrrrrr\nEND_PRODUCTS\n\n";
$rect .= "p:rrrrr; q:rrrrrr; r:rrrrrrrr; n:rrrrrrrr\nSTART_TAXES\nt:rrrrr; m:rrrrrr; n:rrrrrrrr; b:rrrrrrrr\nEND_TAXES\n\n";
$rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
$rect = $this->getDefaultCustomRecTemplate();
$printpass = md5("123");
@ -1218,7 +1252,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.29')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.30')");
$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')");
@ -1582,7 +1616,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
$installerVersion = "1.1.29";
$installerVersion = "1.1.30";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@ -1611,7 +1645,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.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.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.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"
);
if (!in_array($version, $supportedVersions)) {
@ -1619,7 +1653,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1128_1129($_POST['prefix'], $version);
$ret = $admin->updateUserTable1129_1130($_POST['prefix'], $version);
if(session_id() == '') {
session_start();

View File

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

View File

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

View File

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

View File

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