OrderSprinter 1.3.13

This commit is contained in:
Geno 2020-11-19 23:03:10 +01:00
parent 6da4856b5a
commit 4e70d7756d
26 changed files with 123 additions and 59 deletions

Binary file not shown.

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.3.12"); Database::setVersion($pdo,$prefix,"1.3.13");
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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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

@ -403,7 +403,8 @@ function createProdType(id,name,kind,usekitchen,usesupplydesk,printer) {
var newTypeBtn = '<p><button id="newtype_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_NEW_CAT[lang] + '</button></p>'; var newTypeBtn = '<p><button id="newtype_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_NEW_CAT[lang] + '</button></p>';
var assignBtn = '<p><button id="assignprod_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_ASSIGN[lang] + ' &#10155; </button></p>'; var assignBtn = '<p><button id="assignprod_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_ASSIGN[lang] + ' &#10155; </button></p>';
return newTypeName + newTypeBtn + assignBtn; var sortAlphaBtn = '<p><button id="sortalphaprod_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_SORT_ALPHA[lang] + '</button></p>';
return newTypeName + newTypeBtn + assignBtn + sortAlphaBtn;
}, },
insertValuesIntoMenuList:function() { insertValuesIntoMenuList:function() {
$("#typename_" + this.id).html(PROD_NAME[lang]); $("#typename_" + this.id).html(PROD_NAME[lang]);

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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.12"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.13">
<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" />
@ -206,7 +206,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.3.12"},500); setTimeout(function(){document.location.href = "install.html?v=1.3.13"},500);
} }
} }

View File

@ -725,7 +725,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.3.12</button> <button id="updatebtn">Update -> 1.3.13</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

@ -2153,6 +2153,28 @@ return false;
} }
} }
function updateUserTable1312_1313($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.3.12") {
$ret = $this->updateUserTable1311_1312($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.3.11 to 1.3.12 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$this->updateVersion($pdo, '1.3.13');
return true;
} catch (PDOException $e) {
echo "Error in v1.3.12 to 1.3.13: $e";
return false;
}
}
function setVersion($prefix,$theVersion) { function setVersion($prefix,$theVersion) {
$pdo = $this->pdo; $pdo = $this->pdo;
@ -2279,7 +2301,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.3.12')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.13')");
$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')");
@ -2692,7 +2714,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.3.12"; $installerVersion = "1.3.13";
$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']);
@ -2722,7 +2744,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"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.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.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"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -2730,7 +2752,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1311_1312($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1312_1313($_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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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" />
@ -358,7 +358,7 @@ var MAN_HSCURRENCY = ["HS/3 Währungsangabe","HS/3 Currency","HS/3 Moneda"];
var MAN_DEL_HINT = ["Zum Löschen anklicken","Click to delete","Click para removar"]; var MAN_DEL_HINT = ["Zum Löschen anklicken","Click to delete","Click para removar"];
var MAN_FONTSIZE_HINT = ["Die Schriftgröße hat nur Einfluss, wenn kein eigenes Layout festgelegt wurde.","The font size only effects receipts if they do not use a specified layout.","El valor sólo funciona si no se usa un layout individual."]; var MAN_FONTSIZE_HINT = ["Die Schriftgröße hat nur Einfluss, wenn kein eigenes Layout festgelegt wurde.","The font size only effects receipts if they do not use a specified layout.","El valor sólo funciona si no se usa un layout individual."];
var MAN_INIT_AUSTRIA = ["Erstelle Startbeleg (Österreich)","Create initial receipt (Austria)","Crear tiquet inicial (Austria)"]; var MAN_INIT_AUSTRIA = ["Erstelle Startbeleg (Österreich)","Create initial receipt (Austria)","Crear tiquet inicial (Austria)"];
var MAN_GOLIVE_WAIT_HINT = ["Bitte beachten Sie, dass diese Aktion auf langsamen Servern mehrere Minuten dauern kann. Schließen Sie diesen Dialog und warten Sie auf die Meldung, dass det Vorgang abgeschlossen wurde.","Please be aware that this action may take a while on slow servers. Please close this dialog and wait for the message that the process has completed.","Esta acción puede durar unos minutos. Por favor confirme este dialogo y espere por el mensaje que la acción esta completada."] var MAN_GOLIVE_WAIT_HINT = ["Bitte beachten Sie, dass diese Aktion auf langsamen Servern mehrere Minuten dauern kann. Schließen Sie diesen Dialog und warten Sie auf die Meldung, dass der Vorgang abgeschlossen wurde.","Please be aware that this action may take a while on slow servers. Please close this dialog and wait for the message that the process has completed.","Esta acción puede durar unos minutos. Por favor confirme este dialogo y espere por el mensaje que la acción esta completada."]
var MAN_CLOSING_TIME_LIMIT_ERROR = ["Ein Tagesabschluss wurde nicht erzeugt, weil zwischen zwei Tagesabschlüssen etwas Zeit (mind. 2 Min.) vergehen sollte.","No closure was created because between two clsoings there should be some time (at least 2 minutes).","No conclusión esta creado porque el tiempo entre dos conclusiones debe ser un rato (min, 2 minutos)."]; var MAN_CLOSING_TIME_LIMIT_ERROR = ["Ein Tagesabschluss wurde nicht erzeugt, weil zwischen zwei Tagesabschlüssen etwas Zeit (mind. 2 Min.) vergehen sollte.","No closure was created because between two clsoings there should be some time (at least 2 minutes).","No conclusión esta creado porque el tiempo entre dos conclusiones debe ser un rato (min, 2 minutos)."];
var MAN_DB_PROPERTIES = ["Größe der Datenbanktabellen","Sizes of the data base tables","Tamaño de los tabulas de la base de datos"]; var MAN_DB_PROPERTIES = ["Größe der Datenbanktabellen","Sizes of the data base tables","Tamaño de los tabulas de la base de datos"];
var MAN_DBTABLENAME = ["Tabelle","Table","Tabula"]; var MAN_DBTABLENAME = ["Tabelle","Table","Tabula"];
@ -1592,9 +1592,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis(); var millis=getMillis();
setTimeout(function(){ setTimeout(function(){
document.location.href = "install.html?v=1.3.12&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.3.13&mode=onlyupdate&n=" + millis;
},250); },250);
document.location.href = "install.html?v=1.3.12&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.3.13&mode=onlyupdate&n=" + millis;
} }
function handleUpdateReplace(answer) { function handleUpdateReplace(answer) {

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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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

@ -1088,7 +1088,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.3.12"); echo json_encode($view . "?v=1.3.13");
} }
} }
@ -1290,25 +1290,25 @@ 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.3.12"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.13"); };
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.12"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.13"); };
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.12"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.13"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.12"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.13"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.12"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.13"); };
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.12"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.13"); };
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.12"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.13"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.12"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.13"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.12"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.13"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.12"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.13"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.12"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.13"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.12"); }; if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.13"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.12"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.13"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.12"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.13");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.12"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.13");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1316,7 +1316,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage"); $waiterMessage = $this->getMessage(null, "waitermessage");
} }
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.12", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.13",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,

View File

@ -36,7 +36,7 @@ class Products {
function handleCommand($command) { function handleCommand($command) {
$cmdArray = array('showDbProducts', 'getMenuLevelUp', 'applySingleProdData', 'createExtra', 'applyExtra', 'upExtra', 'delExtra','sortup','sortdown', 'delproduct', 'reassign', 'applyType', 'delType', 'getSingleProdData', 'getSingleTypeData', 'getPriceLevelInfo','setPriceLevelInfo', 'createProduct','createProdType','addGeneralComment','changeGeneralComment','delGeneralComment','upGeneralComment','downGeneralComment'); $cmdArray = array('showDbProducts', 'getMenuLevelUp', 'applySingleProdData', 'createExtra', 'applyExtra', 'upExtra', 'delExtra','sortup','sortdown', 'delproduct', 'reassign', 'applyType', 'delType', 'getSingleProdData', 'getSingleTypeData', 'getPriceLevelInfo','setPriceLevelInfo', 'createProduct','createProdType','addGeneralComment','changeGeneralComment','delGeneralComment','upGeneralComment','downGeneralComment','sortProdAlpha');
if (in_array($command, $cmdArray)) { if (in_array($command, $cmdArray)) {
if (!($this->userrights->hasCurrentUserRight('right_products'))) { if (!($this->userrights->hasCurrentUserRight('right_products'))) {
if ($command == 'createProdType') { if ($command == 'createProdType') {
@ -139,6 +139,8 @@ class Products {
if ($this->isCmdAllowed(R_WAI | R_PRO)) { if ($this->isCmdAllowed(R_WAI | R_PRO)) {
$this->getAssignedExtrasOfProd($_GET['prodid']); $this->getAssignedExtrasOfProd($_GET['prodid']);
} }
} else if ($command == 'sortProdAlpha') {
$this->sortProdAlpha($_POST['refid']);
} else { } else {
echo "Command not supported."; echo "Command not supported.";
} }
@ -1062,6 +1064,22 @@ class Products {
} }
} }
function sortProdAlpha($typeid) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$pdo->beginTransaction();
$sql = "SELECT id,longname FROM %products% WHERE category=? AND removed is null ORDER BY longname";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($typeid));
$sort = 1;
$sql = "UPDATE %products% SET sorting=? WHERE id=?";
foreach ($result as $prodentry) {
$prodid = $prodentry["id"];
CommonUtils::execSql($pdo, $sql, array($sort,$prodid));
$sort++;
}
$pdo->commit();
echo json_encode(array("status" => "OK"));
}
function createProdType($id,$prodTypeName) { function createProdType($id,$prodTypeName) {
if (!is_numeric($id)) { if (!is_numeric($id)) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_GENERAL_ID_TYPE, "msg" => ERROR_GENERAL_ID_TYPE_MSG)); echo json_encode(array("status" => "ERROR", "code" => ERROR_GENERAL_ID_TYPE, "msg" => ERROR_GENERAL_ID_TYPE_MSG));

View File

@ -22,7 +22,7 @@ class RemoteAccess {
$res = Roomtables::getUnpaidTablesCore($pdo, $room['id']); $res = Roomtables::getUnpaidTablesCore($pdo, $room['id']);
$noOfOpenTables += count($res); $noOfOpenTables += count($res);
foreach ($res as $table) { foreach ($res as $table) {
$priceOfOpenTables += $table["sum"]; $priceOfOpenTables += $table["pricesum"];
} }
} }
echo json_encode(array("status" => OK, "opentables" => $noOfOpenTables, "sum" => $priceOfOpenTables)); echo json_encode(array("status" => OK, "opentables" => $noOfOpenTables, "sum" => $priceOfOpenTables));

View File

@ -117,7 +117,7 @@ class Updater {
$infoFileLines = $infoFile["msg"]; $infoFileLines = $infoFile["msg"];
if (count($infoFileLines) > 1) { if (count($infoFileLines) > 1) {
$checkIfNewerVersion = self::isV2Newer('1.3.12',trim($infoFileLines[0])); $checkIfNewerVersion = self::isV2Newer('1.3.13',trim($infoFileLines[0]));
return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0)); return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0));
} else { } else {
return array("status" => "ERROR","msg" => "Info file not valid","url" => $url); return array("status" => "ERROR","msg" => "Info file not valid","url" => $url);

View File

@ -185,10 +185,7 @@ class ProductEntry {
$this->taxaustria = 0; $this->taxaustria = 0;
$this->amount = ""; $this->amount = "";
if (count($propertyparts) > 1) { if ((count($propertyparts) > 1) && (trim($propertyparts[1]) != "")) {
if (trim($propertyparts[1]) == "") {
return;
}
$exts = explode(";",$propertyparts[1]); $exts = explode(";",$propertyparts[1]);
foreach($exts as $anExtProp) { foreach($exts as $anExtProp) {
$parts = explode(":",$anExtProp); $parts = explode(":",$anExtProp);

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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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" />
@ -52,6 +52,7 @@ var PROD_PASS_SUPPLY = ["Durchlaufe Bereitstellung","Pass supplydesk","Pasar pun
var PROD_NO_PASS_SUPPLY = ["Bereitstellung nicht durchlaufen","Do not pass supplydesk","No pasar punto >preparado<"]; var PROD_NO_PASS_SUPPLY = ["Bereitstellung nicht durchlaufen","Do not pass supplydesk","No pasar punto >preparado<"];
var PROD_NEW_CAT = ["Neue Kategorie","New category","Nueva categoría"]; var PROD_NEW_CAT = ["Neue Kategorie","New category","Nueva categoría"];
var PROD_ASSIGN = ["Produkt zuweisen","Assign product","Asignar producto"]; var PROD_ASSIGN = ["Produkt zuweisen","Assign product","Asignar producto"];
var PROD_SORT_ALPHA = ["Produkte alphabetisch sortieren","Sort products alphabetical","Especie productos alfabéticamente"];
var PROD_TITLE = ["Angebot","Products","Productos"]; var PROD_TITLE = ["Angebot","Products","Productos"];
var PROD_ENTER_CAT_NAME = ["Name der neuen Produktkategorie eingeben!","Enter name of new category!","Ningún nombre de la categoría nueva insertado!"]; var PROD_ENTER_CAT_NAME = ["Name der neuen Produktkategorie eingeben!","Enter name of new category!","Ningún nombre de la categoría nueva insertado!"];
var PROD_WRONG_FORMAT = ["Falsches Zahlenformat oder fehlender Eintrag!","Wrong number format or missing entry!","Formato falso o ningún dato!"]; var PROD_WRONG_FORMAT = ["Falsches Zahlenformat oder fehlender Eintrag!","Wrong number format or missing entry!","Formato falso o ningún dato!"];
@ -69,6 +70,7 @@ var PROD_PRINTER = ["Drucker","Printer","Imrpimadora"];
var PROD_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"]; var PROD_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"];
var PROD_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"]; var PROD_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"];
var PROD_PLACEHOLDER_NEW_PRODTYPE = ["Name der neuen Kategorie", "Name of the new category","Nombre de la categoría nueva"]; var PROD_PLACEHOLDER_NEW_PRODTYPE = ["Name der neuen Kategorie", "Name of the new category","Nombre de la categoría nueva"];
var PROD_APPLIED = ["Aktion wurde durchgeführt.","Action was performed.","Acción completa."];
// this is the maximal price that a product may cost // this is the maximal price that a product may cost
var MAX_PRICE = 999.99; var MAX_PRICE = 999.99;
@ -259,6 +261,8 @@ function setLanguage(language) {
gotoprodtype(objid); gotoprodtype(objid);
} else if (cmd == 'goupimg') { } else if (cmd == 'goupimg') {
goupprodtype(); goupprodtype();
} else if (cmd == 'sortalphaprod') {
sortAlpha(objid);
} else if (cmd == 'prodextrainput') { } else if (cmd == 'prodextrainput') {
doAjax("GET","php/contenthandler.php?module=products&command=getAssignedExtrasOfProd&prodid=" + objid,null,handleAssignedExtras,"Zugewiesene Optionen"); doAjax("GET","php/contenthandler.php?module=products&command=getAssignedExtrasOfProd&prodid=" + objid,null,handleAssignedExtras,"Zugewiesene Optionen");
} }
@ -332,6 +336,14 @@ function setLanguage(language) {
}); });
} }
function sortAlpha(typeid) {
var data = {
refid: typeid
};
doAjax("POST","php/contenthandler.php?module=products&command=sortProdAlpha",data,reloadPageWithTimeout,"Sortierung ist fehlgeschlagen");
}
function goupprodtype() { function goupprodtype() {
doAjax("GET","php/contenthandler.php?module=products&command=getMenuLevelUp&ref=" + p_currenttypeid,null,saveMenu,"keine Produkthierarchyinformation bekommen"); doAjax("GET","php/contenthandler.php?module=products&command=getMenuLevelUp&ref=" + p_currenttypeid,null,saveMenu,"keine Produkthierarchyinformation bekommen");
} }
@ -378,7 +390,7 @@ function setLanguage(language) {
var url = "php/contenthandler.php?module=products&command=getSingleProdData&id=" + prodid; var url = "php/contenthandler.php?module=products&command=getSingleProdData&id=" + prodid;
$("#assextralist_" + prodid).html(""); $("#assextralist_" + prodid).html("");
$("#assextralist_" + prodid).trigger("create"); $("#assextralist_" + prodid).trigger("create");
actionOnProd(url,prodid,null); actionOnProd(url,prodid,null,false);
} }
function parsePricesAndProperties(prodid) { function parsePricesAndProperties(prodid) {
@ -519,7 +531,7 @@ function setLanguage(language) {
assignextrastotype: isAssignAllExtrasChecked assignextrastotype: isAssignAllExtrasChecked
}; };
actionOnProd("php/contenthandler.php?module=products&command=applySingleProdData",prodid,data); actionOnProd("php/contenthandler.php?module=products&command=applySingleProdData",prodid,data,true);
if (isAssignAllExtrasChecked == 1) { if (isAssignAllExtrasChecked == 1) {
$(".assextralist").html(""); $(".assextralist").html("");
@ -530,7 +542,14 @@ function setLanguage(language) {
} }
} }
function actionOnProd(url,prodid,postdata) { function actionOnProd(url,prodid,postdata,confirmation) {
if (confirmation) {
if (postdata == null) {
doAjax("GET", url, null, refreshProductAndConfirm, "Fehler Produktdaten");
} else {
doAjax("POST", url, postdata, refreshProductAndConfirm, "Fehler Produktdaten");
}
} else {
if (postdata == null) { if (postdata == null) {
doAjax("GET", url, null, refreshProduct, "Fehler Produktdaten"); doAjax("GET", url, null, refreshProduct, "Fehler Produktdaten");
} else { } else {
@ -538,6 +557,13 @@ function setLanguage(language) {
} }
} }
}
function refreshProductAndConfirm(prodData) {
alert(PROD_APPLIED[lang]);
refreshProduct(prodData);
}
function refreshProduct(prodData) { function refreshProduct(prodData) {
var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.unit,prodData.days,prodData.tax,prodData.taxaustria,prodData.amount,prodData.available,prodData.audio,prodData.favorite); var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.unit,prodData.days,prodData.tax,prodData.taxaustria,prodData.amount,prodData.available,prodData.audio,prodData.favorite);
aProduct.insertValuesIntoMenuList(); aProduct.insertValuesIntoMenuList();

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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<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.3.12"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.13">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.12"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.13">
<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" />