OrderSprinter 2.0.6

This commit is contained in:
Geno 2020-11-19 23:15:07 +01:00
parent b790972266
commit a3cc126cab
55 changed files with 503 additions and 378 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=2.0.5" /> <link rel="stylesheet" href="css/gueststyle.css?v=2.0.6" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=2.0.5" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=2.0.6" />
<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>
@ -115,7 +115,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">2.0.5&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">2.0.6&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

@ -114,10 +114,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=2.0.5">'; echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=2.0.6">';
echo "</head>"; echo "</head>";
echo "<body><div class=surround>"; echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 2.0.5</span><br><br>"; echo "<span class=headerline>Installation OrderSprinter-Gastsystem 2.0.6</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

@ -22,11 +22,12 @@ tabprefix="os_"
remoteaccesscode="please_change" remoteaccesscode="please_change"
# OrderSprinter-Version # OrderSprinter-Version
version="2_0_5" version="2_0_6"
# Warnhinweis an den Anwender mit der Möglichkeit des Abbruchs # Warnhinweis an den Anwender mit der Möglichkeit des Abbruchs
echo "Dieses Skript ist für die Ausführung auf einem frisch aufgesetzten" echo "Dieses Skript ist für die Ausführung auf einem frisch aufgesetzten"
echo "Ubuntu-System geschrieben worden." echo "Ubuntu-System 20.04 geschrieben worden. Bei anderen Ubuntu-Versionen"
echo "müssen möglicherweise Pfade im Skript angepasst werden!"
echo "Man kann es auch auf einem bereits in Benutzung befindlichen Ubuntu-" echo "Man kann es auch auf einem bereits in Benutzung befindlichen Ubuntu-"
echo "System verwenden, allerdings kann es dabei zu Datenverlust kommen:" echo "System verwenden, allerdings kann es dabei zu Datenverlust kommen:"
echo "" echo ""
@ -130,11 +131,12 @@ apt-get -qq -y install unzip apache2 libapache2-mod-php php mariadb-server php-m
mysqladmin -u root password $dbadminpassword mysqladmin -u root password $dbadminpassword
# Konfigurationswerte # Konfigurationswerte
PHPVERSION=$(ls /etc/php)
echo "Anpassen einiger Konfigurationswerte" echo "Anpassen einiger Konfigurationswerte"
sed -i -e "s/memory_limit.*/memory_limit = $avail/" /etc/php/7.4/apache2/php.ini sed -i -e "s/memory_limit.*/memory_limit = $avail/" /etc/php/${PHPVERSION}/apache2/php.ini
sed -i -e "s/max_execution_time.*/max_execution_time = 600/" /etc/php/7.4/apache2/php.ini sed -i -e "s/max_execution_time.*/max_execution_time = 600/" /etc/php/${PHPVERSION}/apache2/php.ini
sed -i -e "s/post_max_size.*/post_max_size = 10000M/" /etc/php/7.4/apache2/php.ini sed -i -e "s/post_max_size.*/post_max_size = 10000M/" /etc/php/${PHPVERSION}/apache2/php.ini
sed -i -e "s/upload_max_filesize.*/upload_max_filesize = 10000M/" /etc/php/7.4/apache2/php.ini sed -i -e "s/upload_max_filesize.*/upload_max_filesize = 10000M/" /etc/php/${PHPVERSION}/apache2/php.ini
service apache2 reload service apache2 reload
sleep 3s sleep 3s
@ -194,7 +196,7 @@ then
cp -R /tmp/ordersprinter/tseconnector /usr/local/bin cp -R /tmp/ordersprinter/tseconnector /usr/local/bin
echo "#!/bin/sh" > /usr/local/bin/tseconnector.bat echo "#!/bin/sh" > /usr/local/bin/tseconnector.bat
echo "/usr/bin/java -Djava.library.path=/usr/local/bin/tseconnector/swissbit/nativelibs/linux64 -jar /usr/local/bin/tseconnector/swissbit/tseconnector.jar pass=123 port=8000 supplier=swissbit mountpount=/mnt/SWISSBIT mode=simulate &" >> /usr/local/bin/tseconnector.bat echo "/usr/bin/java -Djava.library.path=/usr/local/bin/tseconnector/swissbit/nativelibs/linux64 -jar /usr/local/bin/tseconnector/swissbit/tseconnector.jar pass=123 port=8000 supplier=swissbit mountpoint=/mnt/SWISSBIT mode=simulate &" >> /usr/local/bin/tseconnector.bat
chmod +x /usr/local/bin/tseconnector.bat chmod +x /usr/local/bin/tseconnector.bat
printf "[Unit]\n" > /etc/systemd/system/tseconnector.service printf "[Unit]\n" > /etc/systemd/system/tseconnector.service
@ -242,4 +244,4 @@ printf "eine weitere Konfiguration erforderlich sein.\n"
printf "Aufruf der OrderSprinter-Applikation im Browser über http://localhost bzw. http://${HOSTNAME}\n" printf "Aufruf der OrderSprinter-Applikation im Browser über http://localhost bzw. http://${HOSTNAME}\n"
printf "Der TSEConnector befindet sich im Simulationsmodus. Für einen Normalbetrieb muss die\n" printf "Der TSEConnector befindet sich im Simulationsmodus. Für einen Normalbetrieb muss die\n"
printf "Befehlszeile in /usr/local/bin/tseconnector.bat abgeändert werden (mode=normal).\n" printf "Befehlszeile in /usr/local/bin/tseconnector.bat abgeändert werden (mode=normal).\n"
printf "Alle eingerichteten Benutzer haben das Passwort 123, ebenso ist der Kassenbon-Stornocode 123.\n" printf "Alle eingerichteten Benutzer haben das Passwort 123, ebenso ist der Kassenbon-Stornocode 123.\n"

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,"2.0.5"); Database::setVersion($pdo,$prefix,"2.0.6");
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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,8 +13,8 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="kitchenbar.js?v=2.0.5"></script> <script src="kitchenbar.js?v=2.0.6"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
LOGO LOGO
# Bondaten Kopf: # Bondaten Kopf:
{TAB::10} {TAB::10}
{table:links:Tisch}{id:rechts:ID:hoch} {table:links:Tisch}{billuid:rechts:ID:hoch}
{TAB:} {TAB:}
{billdate:rechts} {billdate:rechts}
{username:links:Es bediente Sie} {username:links:Es bediente Sie}
{payment:links:Zahlungsweg} {payment:links:Zahlungsweg}
# Es folgt die Ausgabe aller Produkte: # Es folgt die Ausgabe aller Produkte:
{TAB:3:1::6:6} {TAB:3:1::7:8}
{-:rechts:Anz:}{-:: }{-:links:Beschreibung}{-:rechts:Brutto}{-:rechts:Total} {-:rechts:Anz:}{-:: }{-:links:Beschreibung}{-:rechts:Brutto}{-:rechts:Total}
{LINIE:=} {LINIE:=}
START:products START:products
@ -16,7 +16,7 @@ START:products
END:products END:products
# Es folgt die Ausgabe aller verwendeten Steuersätze: # Es folgt die Ausgabe aller verwendeten Steuersätze:
{TAB:7:7:8:8} {TAB:5:7:9:9}
{-:rechts:MwSt%}{-:rechts:MwSt}{-:rechts:Netto}{-:rechts:Brutto} {-:rechts:MwSt%}{-:rechts:MwSt}{-:rechts:Netto}{-:rechts:Brutto}
{LINIE} {LINIE}
START:taxes START:taxes
@ -31,5 +31,15 @@ END:taxes
{qrcode:100} {qrcode:100}
{companyinfo:mittig} {companyinfo:mittig}
IF:tsestatus:1
{startlogtime:links:TSE-Start}
{logtime:links:TSE-Ende}
{transnumber:links:TSE-Trans-Nr}
{sigcounter:links:TSE-Sig-Z}
{tsesignature:komplett:TSE-Signatur}
{tseserialno:komplett:TSE-Seriennr}
FI:tsestatus
#
{systemid:links:Kasse} {systemid:links:Kasse}
{uid:links:UID} {uid:links:UID}

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -23,8 +23,8 @@
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui-i18n.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui-i18n.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="elements/customers.js?v=2.0.5"></script> <script src="elements/customers.js?v=2.0.6"></script>
</head> </head>
<body> <body>

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<link rel="stylesheet" href="css/ospage.css" /> <link rel="stylesheet" href="css/ospage.css" />
@ -17,7 +17,7 @@
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="receiptutils.js"></script> <script src="receiptutils.js"></script>
<script src="elements/dash.js"></script> <script src="elements/dash.js"></script>
<script src="php/3rdparty/Chart.bundle.min.js"></script> <script src="php/3rdparty/Chart.bundle.min.js"></script>

View File

@ -163,7 +163,7 @@ function Groundplan() {
$("#createtableqrcodesbtn").off("click").on("click", function (e) { $("#createtableqrcodesbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.open("php/contenthandler.php?module=roomtables&command=tableqrcodes&v=2.0.5",'_blank'); window.open("php/contenthandler.php?module=roomtables&command=tableqrcodes&v=2.0.6",'_blank');
}); });
this.bindRoomChanges(); this.bindRoomChanges();

View File

@ -30,7 +30,7 @@ function TSE() {
e.preventDefault(); e.preventDefault();
var data = instance.getTseParams(); var data = instance.getTseParams();
data["request"]= "setup"; data["request"]= "setup";
doAjax("POST","php/contenthandler.php?module=tse&command=tsecmd",data,instance.handleTseAnswer.bind(instance),null,true); doAjax("POST","php/contenthandler.php?module=tse&command=tsecmd",data,instance.tseAnswerToOutputTextArea.bind(instance),null,true);
}); });
$("#submittsecmd").off("click").on("click", function (e) { $("#submittsecmd").off("click").on("click", function (e) {
@ -43,8 +43,9 @@ function TSE() {
if (!answer) { if (!answer) {
return; return;
} }
} else if (request == "exportdownload") { }
// like windows.location.href, but with poszt data if (request == "exportdownload") {
// like windows.location.href, but with post data
var tseData = instance.getTseParams(); var tseData = instance.getTseParams();
var dataToTransfer = { var dataToTransfer = {
pass: tseData.pass, pass: tseData.pass,
@ -74,18 +75,17 @@ function TSE() {
var data = instance.getTseParams(); var data = instance.getTseParams();
data["request"]= request; data["request"]= request;
doAjax("POST","php/contenthandler.php?module=tse&command=tsecmd",data,instance.handleTseAnswer.bind(instance),null,true); doAjax("POST","php/contenthandler.php?module=tse&command=tsecmd",data,instance.tseAnswerToOutputTextArea.bind(instance),null,true);
} }
}); });
}; };
this.handleTseAnswer = function(answer) { this.tseAnswerToOutputTextArea = function(answer) {
if (answer.status != "OK") { var existingText = $(this.outputelem).val();
var txt = $(this.outputelem).val(); if (answer.status == "OK") {
$(this.outputelem).val(txt + "\n\nERROR: " + answer.msg); $(this.outputelem).val(existingText + "\n\nResult: " + answer.msg);
} else { } else {
var txt = $(this.outputelem).val(); $(this.outputelem).val(existingText + "\n\nERROR: " + answer.msg);
$(this.outputelem).val(txt + "\n\nAnswer: " + answer.msg);
} }
}; };
} }

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -12,7 +12,7 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="kitchenbar.js"></script> <script src="kitchenbar.js"></script>
<style> <style>

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=2.0.6">
<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" />
@ -18,7 +18,7 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
</head> </head>
<body> <body>

View File

@ -10,8 +10,8 @@
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="manifest" href="manifest.webmanifest"> <link rel="manifest" href="manifest.webmanifest">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=2.0.6">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle-brightenergy.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle-brightenergy.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" />
@ -19,7 +19,7 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
</head> </head>
<body> <body>
@ -140,7 +140,7 @@ function displayLoginOrLogoutMask(jsonContent) {
// user needs to log in! // user needs to log in!
$("#passwordfield").val(""); $("#passwordfield").val("");
$("#logoutarea").hide(); $("#logoutarea").hide();
setTimeout(function(){document.location.href = "index.html?v=2.0.5";},250); setTimeout(function(){document.location.href = "index.html?v=2.0.6";},250);
} }
} }
@ -240,7 +240,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=2.0.5";},500); setTimeout(function(){document.location.href = "install.html?v=2.0.6";},500);
} }
} }
@ -312,11 +312,11 @@ $(document).on("pageinit", "#index-page", function () {
<div data-role="content"> <div data-role="content">
<p><div id="toplogolocation" style="text-align: center;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=2.0.5&style=always" style="max-height:150px;"/></div> <p><div id="toplogolocation" style="text-align: center;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=2.0.6&style=always" style="max-height:150px;"/></div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="loginmask"> <div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="loginmask">
<H2>Anmelden</H2> <H2>Anmelden</H2>
<p><div id="middlelogolocation" style="text-align: left;padding-left: 80px;padding-right:80px;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=2.0.5&style=always" style="max-height:150px;"/></div> <p><div id="middlelogolocation" style="text-align: left;padding-left: 80px;padding-right:80px;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=2.0.6&style=always" style="max-height:150px;"/></div>
<div class="loginarea"> <div class="loginarea">
<form method="post"> <form method="post">

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<title>Setup</title> <title>Setup</title>
<link rel="stylesheet" type="text/css" href="css/installstyle.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/installstyle.css?v=2.0.6">
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="utilities.js"></script> <script src="utilities.js"></script>
@ -48,7 +48,7 @@ var WORKING = ["Arbeitet...","Working...","Trabajando..."];
var DB_SETTING_WRONG = ["Datenbank-Angaben falsch","Data base values wrong","Datos de la base de datos falsos"]; var DB_SETTING_WRONG = ["Datenbank-Angaben falsch","Data base values wrong","Datos de la base de datos falsos"];
var ERROR = ["Installation/Update nicht erfolgreich: ", "Install/Update not performed: ", "Problema con el update/instal: "]; var ERROR = ["Installation/Update nicht erfolgreich: ", "Install/Update not performed: ", "Problema con el update/instal: "];
var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please remove install directory. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. Esta recomendado removar el fichero 'install'. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."]; var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please remove install directory. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. Esta recomendado removar el fichero 'install'. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."];
var AUTO_UPDATE_OK = ["Update erfolgreich! Bitte vergessen Sie nicht, auch den Printserver zu updaten, wenn Sie dessen neuen Funktionen nutzen möchten. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please do not forget to update the printservers if you want to use its new features. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. No olvide el printserver si quiere usa sus funciones nuevas. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."]; var AUTO_UPDATE_OK = ["Update erfolgreich! Bitte vergessen Sie nicht, auch den Printserver zu updaten, wenn Sie von einer Version 1.x auf 2.x aktualisiert haben. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please do not forget to update the printservers if you have updated from version 1.x to 2.x. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. No olvide el printserver si quiere usa sus funciones nuevas. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."];
var SAMPLE_HEADLINE = ["Sie können die Datenbank mit Beispieldaten füllen. Diese können später beliebig wieder in der Administrations- und Artikelansicht verändert werden.", var SAMPLE_HEADLINE = ["Sie können die Datenbank mit Beispieldaten füllen. Diese können später beliebig wieder in der Administrations- und Artikelansicht verändert werden.",
"You can fill the data base with sample data. The content can later be changed in the manager and product view.", "You can fill the data base with sample data. The content can later be changed in the manager and product view.",
@ -970,7 +970,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn" class="updatebtn">Update -> 2.0.5</button> <button id="updatebtn" class="updatebtn">Update -> 2.0.6</button>
<span id="updateinprogresstxt" style="display:none;"><img id="installprogressindicator" src="php/3rdparty/images/ajax-loader.gif" alt="Progress indication" /> Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;"><img id="installprogressindicator" src="php/3rdparty/images/ajax-loader.gif" alt="Progress indication" /> Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -199,7 +199,7 @@ $dblines = "defined('MYSQL_DB') || define ( 'MYSQL_DB', '$db' );";
$dbloglines = "defined('LOG') || define ( 'LOG', false );"; $dbloglines = "defined('LOG') || define ( 'LOG', false );";
$prefixlines = "defined('TAB_PREFIX') || define ('TAB_PREFIX', '$prefix');"; $prefixlines = "defined('TAB_PREFIX') || define ('TAB_PREFIX', '$prefix');";
$installstatusline = "defined('INSTALLSTATUS') || define ('INSTALLSTATUS', 'installed');"; $installstatusline = "defined('INSTALLSTATUS') || define ('INSTALLSTATUS', 'installed');";
$configText = "$errorlevel\n$hostlines\n$userlines\n$dbpasslines\n$dblines\n$dbloglines\n$prefixlines\n$installstatusline\n?>"; $configText = "$errorlevel\n$hostlines\n$userlines\n$dbpasslines\n$dblines\n$dbloglines\n$prefixlines\n$installstatusline";
file_put_contents("../php/config.php", $configText); file_put_contents("../php/config.php", $configText);
try { try {
file_put_contents("../php/config1.php", $configText); file_put_contents("../php/config1.php", $configText);
@ -513,7 +513,7 @@ return;
} }
set_time_limit(60*30); set_time_limit(60*30);
$installerVersion = "2.0.5"; $installerVersion = "2.0.6";
$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']);

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,8 +13,8 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="kitchenbar.js?v=2.0.5"></script> <script src="kitchenbar.js?v=2.0.6"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -14,12 +14,12 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<!-- <script src="https://code.jquery.com/jquery-1.11.3.js"></script> --> <!-- <script src="https://code.jquery.com/jquery-1.11.3.js"></script> -->
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="elements/tablemap.js?v=2.0.5"></script> <script src="elements/tablemap.js?v=2.0.6"></script>
<script src="elements/roommap.js?v=2.0.5"></script> <script src="elements/roommap.js?v=2.0.6"></script>
<script src="elements/groundplan.js?v=2.0.5"></script> <script src="elements/groundplan.js?v=2.0.6"></script>
<script src="elements/tse.js?v=2.0.5"></script> <script src="elements/tse.js?v=2.0.6"></script>
<script src="elements/closing.js?v=2.0.5"></script> <script src="elements/closing.js?v=2.0.6"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -1712,7 +1712,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=2.0.5"; document.location.href = "index.html?v=2.0.6";
},250); },250);
} }
}, },
@ -2108,37 +2108,37 @@ function bindConfig() {
$("#samplerectemplate").off("click").on("click", function (e) { $("#samplerectemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getrectemplate&v=2.0.5",null,handleGetRecTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getrectemplate&v=2.0.6",null,handleGetRecTemplate,null);
}); });
$("#sampleclstemplate").off("click").on("click", function (e) { $("#sampleclstemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getclstemplate&v=2.0.5",null,handleGetClsTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getclstemplate&v=2.0.6",null,handleGetClsTemplate,null);
}); });
$("#samplecashtemplate").off("click").on("click", function (e) { $("#samplecashtemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getcashtemplate&v=2.0.5",null,handleGetCashTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getcashtemplate&v=2.0.6",null,handleGetCashTemplate,null);
}); });
$("#samplefoodworktemplate").off("click").on("click", function (e) { $("#samplefoodworktemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getfoodworktemplate&v=2.0.5",null,handleGetFoodTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getfoodworktemplate&v=2.0.6",null,handleGetFoodTemplate,null);
}); });
$("#sampledrinkworktemplate").off("click").on("click", function (e) { $("#sampledrinkworktemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getdrinkworktemplate&v=2.0.5",null,handleGetDrinkTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getdrinkworktemplate&v=2.0.6",null,handleGetDrinkTemplate,null);
}); });
$("#samplecanceltemplate").off("click").on("click", function (e) { $("#samplecanceltemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getcanceltemplate&v=2.0.5",null,handleGetCancelTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getcanceltemplate&v=2.0.6",null,handleGetCancelTemplate,null);
}); });
$("#samplepickuptemplate").off("click").on("click", function (e) { $("#samplepickuptemplate").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=getpickuptemplate&v=2.0.5",null,handleGetPickupTemplate,null); doAjax("GET","php/contenthandler.php?module=admin&command=getpickuptemplate&v=2.0.6",null,handleGetPickupTemplate,null);
}); });
$("#changeConfig").off("click").on("click", function (e) { $("#changeConfig").off("click").on("click", function (e) {
@ -2266,38 +2266,38 @@ function binding() {
$("#backup_btn").off("click").on("click", function (e) { $("#backup_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=configuration&v=2.0.5"; window.location.href = "php/contenthandler.php?module=admin&command=backup&type=configuration&v=2.0.6";
}); });
$("#backup_btnall").off("click").on("click", function (e) { $("#backup_btnall").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=all&v=2.0.5"; window.location.href = "php/contenthandler.php?module=admin&command=backup&type=all&v=2.0.6";
}); });
$("#backup_btnalllogs").off("click").on("click", function (e) { $("#backup_btnalllogs").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=alllogs&v=2.0.5"; window.location.href = "php/contenthandler.php?module=admin&command=backup&type=alllogs&v=2.0.6";
}); });
$("#backup_btnftpall").off("click").on("click", function (e) { $("#backup_btnftpall").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
showProgressPopup(); showProgressPopup();
doAjax("GET","php/contenthandler.php?module=admin&command=ftpbackup&type=all&v=2.0.5",null,handleFtpResult,null); doAjax("GET","php/contenthandler.php?module=admin&command=ftpbackup&type=all&v=2.0.6",null,handleFtpResult,null);
}); });
$("#backup_debugdata").off("click").on("click", function (e) { $("#backup_debugdata").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.open("php/contenthandler.php?module=admin&command=backup&type=debugdata&v=2.0.5",'_blank'); window.open("php/contenthandler.php?module=admin&command=backup&type=debugdata&v=2.0.6",'_blank');
}); });
$("#backupguests_btn").off("click").on("click", function (e) { $("#backupguests_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=confandguests&v=2.0.5"; window.location.href = "php/contenthandler.php?module=admin&command=backup&type=confandguests&v=2.0.6";
}); });
$("#golive").off("click").on("click", function (e) { $("#golive").off("click").on("click", function (e) {
@ -2495,7 +2495,7 @@ function updateOneSingleFile() {
setTimeout(function(){ setTimeout(function(){
$("#sliderarea").hide(); $("#sliderarea").hide();
var millis=getMillis(); var millis=getMillis();
document.location.href = "install.html?v=2.0.5&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=2.0.6&mode=onlyupdate&n=" + millis;
},250); },250);
} }
} }
@ -3608,7 +3608,7 @@ function handleGoLive(answer) {
} }
function renderSingleWorkReceipt(job,allowreprint,allowdelete) { function renderSingleWorkReceipt(printjobid,job,allowreprint,allowdelete) {
var headertxt = job.workid + " - " + job.time + " - " + job.table; var headertxt = job.workid + " - " + job.time + " - " + job.table;
var txt = '<h3>' + headertxt + '</h3><p />'; var txt = '<h3>' + headertxt + '</h3><p />';
var prods = job.products; var prods = job.products;
@ -3623,10 +3623,10 @@ function renderSingleWorkReceipt(job,allowreprint,allowdelete) {
} }
}); });
if (allowreprint) { if (allowreprint) {
txt += '<button class="reprintworkreceiptbtn" type="submit" data-theme="f" data-icon="check" id="reprintworkreceiptbtn_' + job.workid + '">' + MAN_PRINTVERB[lang] + '</button>'; txt += '<button class="reprintworkreceiptbtn" type="submit" data-theme="f" data-icon="check" id="reprintworkreceiptbtn_' + printjobid + '">' + MAN_PRINTVERB[lang] + '</button>';
} }
if (allowdelete) { if (allowdelete) {
txt += '<button type="submit" data-theme="d" class="spooledprintjob" data-icon="delete" id="spooledJob_' + job.workid + '">' + MAN_DELETE[lang] + '</button>'; txt += '<button type="submit" data-theme="d" class="spooledprintjob" data-icon="delete" id="spooledJob_' + printjobid + '">' + MAN_DELETE[lang] + '</button>';
} }
return txt; return txt;
} }
@ -3637,7 +3637,7 @@ function renderPrintedWorkReceipts(jobs) {
var aJob = jobs[i]; var aJob = jobs[i];
txt += '<p />'; txt += '<p />';
txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >'; txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >';
txt += renderSingleWorkReceipt(aJob,true,false); txt += renderSingleWorkReceipt(aJob.id,aJob.content,true,false);
txt += '</div>'; txt += '</div>';
} }
return txt; return txt;
@ -3651,7 +3651,7 @@ function createSpooledPrintJobButton(id,text) {
function createSpooledPrintWorkJobButton(aJob) { function createSpooledPrintWorkJobButton(aJob) {
var txt = '<p />'; var txt = '<p />';
txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >'; txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >';
txt += renderSingleWorkReceipt(aJob.content,false,true); txt += renderSingleWorkReceipt(aJob.id,aJob.content,false,true);
txt += '</div>'; txt += '</div>';
return txt; return txt;
} }
@ -3703,7 +3703,7 @@ function bindSpooledPrintJob() {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
var data = { var data = {
workid: this.id.split("_")[1] id: this.id.split("_")[1]
}; };
doAjax("GET","php/contenthandler.php?module=printqueue&command=reprintworkreceipt",data,handleReprint,null); doAjax("GET","php/contenthandler.php?module=printqueue&command=reprintworkreceipt",data,handleReprint,null);
}); });

File diff suppressed because one or more lines are too long

View File

@ -474,12 +474,13 @@ class Admin {
$tasksForMe = Tasks::areThereTasksForMe($pdo); $tasksForMe = Tasks::areThereTasksForMe($pdo);
$tsestatus = TSE::checkTseServerAccesible($pdo); $tsestatus = TSE::checkTseServerAccesible($pdo);
if ($tsestatus == 1) { $binaryTseStatus = 0;
if ($tsestatus["status"] == "OK") {
$binaryTseStatus = 1;
} }
$active = json_encode(array("status" => "OK", "msg" => 1, "tasksforme" => $tasksForMe, "tsestatus" => $tsestatus)); $active = json_encode(array("status" => "OK", "msg" => 1, "tasksforme" => $tasksForMe, "tsestatus" => $binaryTseStatus));
$notActive = json_encode(array("status" => "OK", "msg" => 0, "tasksforme" => $tasksForMe, "tsestatus" => $tsestatus)); $notActive = json_encode(array("status" => "OK", "msg" => 0, "tasksforme" => $tasksForMe, "tsestatus" => $binaryTseStatus));
if (is_null($pdo)) { if (is_null($pdo)) {
echo $notActive; echo $notActive;
@ -1556,7 +1557,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=2.0.5"); echo json_encode($view . "?v=2.0.6");
} }
} }
@ -1771,31 +1772,31 @@ 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=2.0.5"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=2.0.6"); }
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=2.0.5"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=2.0.6"); }
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=2.0.5"); } if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=2.0.6"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=2.0.5"); } if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=2.0.6"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=2.0.5"); } if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=2.0.6"); }
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=2.0.5"); } if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=2.0.6"); }
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=2.0.5"); } if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=2.0.6"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=2.0.5"); } if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=2.0.6"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=2.0.5"); } if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=2.0.6"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=2.0.5"); } if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=2.0.6"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=2.0.5"); } if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=2.0.6"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=2.0.5"); } if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=2.0.6"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=2.0.5"); } if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=2.0.6"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=2.0.5"); } if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=2.0.6"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=2.0.5"); } if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=2.0.6"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=2.0.5"); } if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=2.0.6"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=2.0.5"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=2.0.6");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=2.0.5"); } if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=2.0.6"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=2.0.5"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=2.0.6");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=2.0.5"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=2.0.6");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");

View File

@ -47,6 +47,9 @@ class Bill {
private static $CASHTYPE_Auszahlung = array("value" => 6,"name" => "Auszahlung"); private static $CASHTYPE_Auszahlung = array("value" => 6,"name" => "Auszahlung");
private static $CASHTYPE_TrinkgeldAN = array("value" => 7,"name" => "Trinkgeld an Arb.nehmer"); private static $CASHTYPE_TrinkgeldAN = array("value" => 7,"name" => "Trinkgeld an Arb.nehmer");
private static $CASHTYPE_TrinkgeldAG = array("value" => 8,"name" => "Trinkgeld an Arb.geber"); private static $CASHTYPE_TrinkgeldAG = array("value" => 8,"name" => "Trinkgeld an Arb.geber");
private static $TSE_FORMAT_QR_TEXT = 1;
private static $TSE_FORMAT_ASSOC_ARRAY = 2;
function __construct() { function __construct() {
$this->dbutils = new DbUtils(); $this->dbutils = new DbUtils();
@ -274,8 +277,8 @@ class Bill {
} }
private static function signValueByTseAndUpdateBill($pdo,$billid,$valueToSign) { private static function signValueByTseAndUpdateBill($pdo,$billid,$valueToSign) {
$status = TSE::sendNormalBillToTSE($pdo, $valueToSign); $tseAnswer = TSE::sendNormalBillToTSE($pdo, $valueToSign);
if ($status["status"] != "OK") { if ($tseAnswer["status"] != "OK") {
return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden.")); return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden."));
} else { } else {
$logtime = 0; $logtime = 0;
@ -285,17 +288,15 @@ class Bill {
$sigalgRef = null; $sigalgRef = null;
$sigcounter = 0; $sigcounter = 0;
if ($status["usetse"] == DbUtils::$TSE_OK) { if ($tseAnswer["usetse"] == DbUtils::$TSE_OK) {
$msgAsString = $status["msg"]; $logtime = $tseAnswer["logtime"];
$tseLog = json_decode($msgAsString, true); $trans = $tseAnswer["trans"];
$logtime = $tseLog["logtime"]; $sigcounter = $tseAnswer["sigcounter"];
$trans = $tseLog["trans"]; $tseSignature = $tseAnswer["signature"];
$sigcounter = $tseLog["sigcounter"]; $sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["sigalg"]);
$tseSignature = $tseLog["signature"]; $pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["publickey"]);
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["sigalg"]); $serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["serialno"]);
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["publickey"]); $certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["certificate"]);
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["serialno"]);
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["certificate"]);
} }
$opid = Operations::createOperation( $opid = Operations::createOperation(
@ -311,7 +312,7 @@ class Bill {
$serialNoRef, $serialNoRef,
$certificateRef, $certificateRef,
$sigcounter, $sigcounter,
$status["usetse"]); $tseAnswer["usetse"]);
$sql = "UPDATE %bill% SET opid=?,logtime=? WHERE id=?"; $sql = "UPDATE %bill% SET opid=?,logtime=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($opid,$logtime, $billid)); CommonUtils::execSql($pdo, $sql, array($opid,$logtime, $billid));
@ -376,7 +377,7 @@ class Bill {
return $ret; return $ret;
} }
private function createBillOverallInfo($billid,$thetimedate,$tablename,$brutto,$netto,$username,$userid,$printer,$host,$masterData) { private function createBillOverallInfo($billid,$billuid,$thetimedate,$tablename,$brutto,$netto,$username,$userid,$printer,$host,$masterData,$tseInfo) {
$thetimedate_arr = explode ( ' ', $thetimedate ); $thetimedate_arr = explode ( ' ', $thetimedate );
$thedate = $thetimedate_arr[0]; $thedate = $thetimedate_arr[0];
$datearr = explode ( '-', $thedate ); $datearr = explode ( '-', $thedate );
@ -396,6 +397,7 @@ class Bill {
$billoverallinfo = array( $billoverallinfo = array(
"id" => $billid, "id" => $billid,
"billuid" => $billuid,
"billdate" => $thetimedate, "billdate" => $thetimedate,
"billday" => $day, "billday" => $day,
"billmonth" => $month, "billmonth" => $month,
@ -426,6 +428,22 @@ class Bill {
"template" => $masterData["template"], "template" => $masterData["template"],
"hospitality" => $hosttext "hospitality" => $hosttext
); );
if (is_null($tseInfo)) {
$billoverallinfo["tsestatus"] = 0;
} else {
$billoverallinfo["tsestatus"] = 1;
$billoverallinfo["tseserialno"] = $tseInfo["tseserialno"];
$billoverallinfo["transnumber"] = $tseInfo["transnumber"];
$billoverallinfo["sigcounter"] = $tseInfo["sigcounter"];
$billoverallinfo["startlogtime"] = $tseInfo["startlogtime"];
$billoverallinfo["logtime"] = $tseInfo["logtime"];
$billoverallinfo["sigalg"] = $tseInfo["sigalg"];
$billoverallinfo["logtimeformat"] = $tseInfo["logtimeformat"];
$billoverallinfo["tsesignature"] = $tseInfo["tsesignature"];
$billoverallinfo["pubkey"] = $tseInfo["pubkey"];
}
return $billoverallinfo; return $billoverallinfo;
} }
@ -457,7 +475,8 @@ class Bill {
$brutto = $result[0]['brutto']; $brutto = $result[0]['brutto'];
$netto = $brutto; $netto = $brutto;
$masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'cashtemplate'); $masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'cashtemplate');
$ticket = $this->createBillOverallInfo($billuid,$thetimedate,'',$brutto,$netto,$username,$userid,'',0,$masterData); $tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
$ticket = $this->createBillOverallInfo($billid,$billuid,$thetimedate,'',$brutto,$netto,$username,$userid,'',0,$masterData,$tseInfo);
$ticket['reason'] = $result[0]['reason']; $ticket['reason'] = $result[0]['reason'];
$ticket['cashtype'] = $result[0]['cashtype']; $ticket['cashtype'] = $result[0]['cashtype'];
@ -489,19 +508,19 @@ 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 IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras FROM %bill%,%user% WHERE %bill%.id=? AND userid=%user%.id AND tableid='0' "; $sql = "SELECT DISTINCT opid,IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras FROM %bill%,%user% WHERE %bill%.id=? AND userid=%user%.id AND tableid='0' ";
} else { } else {
$sql = "SELECT DISTINCT IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras FROM %bill%,%user%,%resttables% WHERE %bill%.id=? AND userid=%user%.id AND tableid=%resttables%.id "; $sql = "SELECT DISTINCT opid,IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras 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 IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras 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 opid,IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,'-' as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras 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 IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras 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 opid,IF(status='c',CONCAT('V-',billuid),billuid) as billuid,billdate,brutto,ROUND(netto,2) as netto,tableno as tablename,username,%user%.id as userid,host,COALESCE(%bill%.status,'') as status,guestinfo,paymentid,printextras 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 ";
} }
} }
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($billid)); $row = CommonUtils::getRowSqlObject($pdo, $sql, array($billid));
$status = $row->status; $status = $row->status;
$sign = ($status == "s" ? "-" : ""); $sign = ($status == "s" ? "-" : "");
@ -527,6 +546,8 @@ class Bill {
$host = $row->host; $host = $row->host;
} }
$tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
$thetimedate = $row->billdate; $thetimedate = $row->billdate;
$printextrasOfReceipt = $row->printextras; $printextrasOfReceipt = $row->printextras;
$billuid = $row->billuid; $billuid = $row->billuid;
@ -539,7 +560,7 @@ class Bill {
$overallBrutto = str_replace(".",$decpoint,$row->brutto); $overallBrutto = str_replace(".",$decpoint,$row->brutto);
$overallNetto = str_replace(".",$decpoint,$row->netto); $overallNetto = str_replace(".",$decpoint,$row->netto);
$billoverallinfo = $this->createBillOverallInfo($billuid,$thetimedate,$tablename,$overallBrutto,$overallNetto,$row->username,$row->userid,0,$host,$masterData); $billoverallinfo = $this->createBillOverallInfo($billid,$billuid,$thetimedate,$tablename,$overallBrutto,$overallNetto,$row->username,$row->userid,0,$host,$masterData,$tseInfo);
// rem* guestinfo // rem* guestinfo
if (is_null($row->guestinfo)) { if (is_null($row->guestinfo)) {
@ -551,12 +572,7 @@ class Bill {
// rem* PAYMENT INFO // rem* PAYMENT INFO
$col = "name"; $col = "name";
$language = $masterData["billlanguage"];
if ($language == 1) {
$col = "name_en";
} else if ($language == 2) {
$col = "name_esp";
}
$paymentid = $row->paymentid; $paymentid = $row->paymentid;
$sql = "SELECT $col FROM %payment% as name WHERE id=?"; $sql = "SELECT $col FROM %payment% as name WHERE id=?";
$paymentname = CommonUtils::getRowSqlObject($pdo, $sql, array($paymentid)); $paymentname = CommonUtils::getRowSqlObject($pdo, $sql, array($paymentid));
@ -766,6 +782,7 @@ class Bill {
echo json_encode(array("billoverallinfo" => array())); echo json_encode(array("billoverallinfo" => array()));
return; return;
} else { } else {
$tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
if (is_null($row->host)) { if (is_null($row->host)) {
$host = 0; // default $host = 0; // default
} else { } else {
@ -779,7 +796,10 @@ class Bill {
$printExtras = true; $printExtras = true;
} }
$masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'rectemplate'); $masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'rectemplate');
$billoverallinfo = $this->createBillOverallInfo($billuid,$thetimedate,$tablename,$row->brutto,$row->netto,$row->username,$row->userid,$printer,$host,$masterData); if (is_null($masterData["companyinfo"])) {
$masterData["companyinfo"] = "";
}
$billoverallinfo = $this->createBillOverallInfo($billid,$billuid,$thetimedate,$tablename,$row->brutto,$row->netto,$row->username,$row->userid,$printer,$host,$masterData,$tseInfo);
if ($includeGuestInfo) { if ($includeGuestInfo) {
if (is_null($row->guestinfo)) { if (is_null($row->guestinfo)) {
@ -864,13 +884,18 @@ class Bill {
return $out; return $out;
} }
private static function getTseInfoOfBill($pdo,$billuid) { private static function getTseInfoOfBill($pdo,$billid,$tseFormat) {
date_default_timezone_set(DbUtils::getTimeZone()); date_default_timezone_set(DbUtils::getTimeZone());
$sql = "SELECT id FROM %bill% WHERE billuid=? AND (status is null or status <> 'c')"; $sql = "SELECT opid FROM %bill% WHERE id=?";
$res = CommonUtils::fetchSqlAll($pdo, $sql, array($billuid)); $res = CommonUtils::fetchSqlAll($pdo, $sql, array($billid));
$billid = $res[0]["id"]; $opid = $res[0]["opid"];
if (is_null($opid)) {
return null;
}
$tsestatus = "(SELECT O.tseerror FROM %operations% O WHERE O.id=B.opid ) as tsestatus";
$tseserialnoSql = "(SELECT T.textvalue FROM %operations% O INNER JOIN %tsevalues% T ON O.serialno=T.id WHERE O.id=B.opid ) as serialno";
$sigalgSql = "(SELECT T.textvalue FROM %operations% O INNER JOIN %tsevalues% T ON O.sigalg=T.id WHERE O.id=B.opid ) as sigalg"; $sigalgSql = "(SELECT T.textvalue FROM %operations% O INNER JOIN %tsevalues% T ON O.sigalg=T.id WHERE O.id=B.opid ) as sigalg";
$pubkeySql = "(SELECT T.textvalue FROM %operations% O INNER JOIN %tsevalues% T ON O.pubkey=T.id WHERE O.id=B.opid ) as pubkey"; $pubkeySql = "(SELECT T.textvalue FROM %operations% O INNER JOIN %tsevalues% T ON O.pubkey=T.id WHERE O.id=B.opid ) as pubkey";
$logtimeSql = "(SELECT O.logtime FROM %operations% O WHERE O.id=B.opid ) as logtime"; $logtimeSql = "(SELECT O.logtime FROM %operations% O WHERE O.id=B.opid ) as logtime";
@ -878,8 +903,8 @@ class Bill {
$transSql = "(SELECT O.trans FROM %operations% O WHERE O.id=B.opid ) as trans"; $transSql = "(SELECT O.trans FROM %operations% O WHERE O.id=B.opid ) as trans";
$sigcounterSql = "(SELECT O.sigcounter FROM %operations% O WHERE O.id=B.opid ) as sigcounter"; $sigcounterSql = "(SELECT O.sigcounter FROM %operations% O WHERE O.id=B.opid ) as sigcounter";
$signtxtSql = "(SELECT O.signtxt FROM %operations% O WHERE O.id=B.opid ) as signtxt"; $signtxtSql = "(SELECT O.signtxt FROM %operations% O WHERE O.id=B.opid ) as signtxt";
$sql = "SELECT status,$tsesignatureSql,$transSql,$sigalgSql,$pubkeySql,$logtimeSql,$sigcounterSql,$signtxtSql "; $sql = "SELECT status,$tsestatus,$tseserialnoSql,$tsesignatureSql,$transSql,$sigalgSql,$pubkeySql,$logtimeSql,$sigcounterSql,$signtxtSql ";
$sql .= " FROM %bill% B "; $sql .= " FROM %bill% B ";
$sql .= " WHERE B.id=?"; $sql .= " WHERE B.id=?";
@ -888,15 +913,19 @@ class Bill {
return ""; return "";
} }
if (!isset($billProperties[0]["tsesignature"])) { if (!isset($billProperties[0]["tsesignature"])) {
return ""; return null;
}
if ($billProperties[0]["tsestatus"] != 1) {
return null;
} }
$tseSignature = $billProperties[0]["tsesignature"]; $tseSignature = $billProperties[0]["tsesignature"];
if (is_null($tseSignature) || ($tseSignature == "")) { if (is_null($tseSignature) || ($tseSignature == "")) {
return ""; return null;
} }
$qrCodeVersion = "V0"; $qrCodeVersion = "V0";
$serialNoOfPOS = CommonUtils::getConfigValue($pdo, 'sn', "ORD1"); $serialNoOfPOS = CommonUtils::getConfigValue($pdo, 'sn', "ORD1");
$tseserialno = $billProperties[0]["serialno"];
$processType = "Kassenbeleg-V1"; $processType = "Kassenbeleg-V1";
$processData = $billProperties[0]["signtxt"]; $processData = $billProperties[0]["signtxt"];
$transNumber = $billProperties[0]["trans"]; $transNumber = $billProperties[0]["trans"];
@ -913,22 +942,38 @@ class Bill {
$startlogtime = self::getFirstLogTimeOfBill($pdo, $billid); $startlogtime = self::getFirstLogTimeOfBill($pdo, $billid);
} }
$tseInfo = array( if ($tseFormat == self::$TSE_FORMAT_QR_TEXT) {
$qrCodeVersion, $tseInfo = array(
$serialNoOfPOS, $qrCodeVersion,
$processType, $serialNoOfPOS,
$processData, $processType,
$transNumber, $processData,
$sigcounter, $transNumber,
$startlogtime, $sigcounter,
$logtime, $startlogtime,
$sigAlg, $logtime,
$logTimeFormat, $sigAlg,
$tseSignature, $logTimeFormat,
$pubkey $tseSignature,
); $pubkey
);
return implode(';',$tseInfo);
return implode(';',$tseInfo);
} else {
$tseInfo = array(
"serialno" => $serialNoOfPOS,
"tseserialno" => $tseserialno,
"transnumber" => $transNumber,
"sigcounter" => $sigcounter,
"startlogtime" => $startlogtime,
"logtime" => $logtime,
"sigalg" => $sigAlg,
"logtimeformat" => $logTimeFormat,
"tsesignature" => $tseSignature,
"pubkey" => $pubkey
);
return $tseInfo;
}
} }
public static function getFirstLogTimeOfBill($pdo,$billid) { public static function getFirstLogTimeOfBill($pdo,$billid) {
@ -941,9 +986,9 @@ class Bill {
return $startlogtime; return $startlogtime;
} }
public static function outputBillQrCode($billuid) { public static function outputBillQrCode($billid) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$tseInfo = self::getTseInfoOfBill($pdo, $billuid); $tseInfo = self::getTseInfoOfBill($pdo, $billid,self::$TSE_FORMAT_QR_TEXT);
if (!is_null($tseInfo) && ($tseInfo != "")) { if (!is_null($tseInfo) && ($tseInfo != "")) {
QRcode::png($tseInfo); QRcode::png($tseInfo);
} else { } else {
@ -972,7 +1017,8 @@ class Bill {
$netto = $r["netto"]; $netto = $r["netto"];
$masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'cashtemplate'); $masterData = self::getBillMasterDataAtBillTime($pdo,$billid,'cashtemplate');
$billoverallinfo = $this->createBillOverallInfo("V-" .$billid,$r["billdate"],' ',$brutto,$netto,$r["username"],$r["userid"],1,0,$masterData); $tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
$billoverallinfo = $this->createBillOverallInfo($billid,"V-" .$billid,$r["billdate"],' ',$brutto,$netto,$r["username"],$r["userid"],1,0,$masterData,$tseInfo);
$billoverallinfo["guestinfo"] = ''; $billoverallinfo["guestinfo"] = '';
$billtranslations = $this->createBillTranslations($language); $billtranslations = $this->createBillTranslations($language);
@ -1074,8 +1120,7 @@ class Bill {
$row =$stmt->fetchObject(); $row =$stmt->fetchObject();
} }
$sql = "UPDATE %bill% SET prevbrutto=?,prevnetto=? WHERE id=?"; $sql = "UPDATE %bill% SET prevbrutto=?,prevnetto=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); CommonUtils::execSql($pdo, $sql, array($row->brutto + $row->prevbrutto,$row->netto + $row->prevnetto,$lastId));
$stmt->execute(array($row->brutto + $row->prevbrutto,$row->netto + $row->prevnetto,$lastId));
$moneyTwoDigits = number_format($money, 2, '.', ''); $moneyTwoDigits = number_format($money, 2, '.', '');
if (($cashtype == self::$CASHTYPE_Privateinlage["value"]) || ($cashtype == self::$CASHTYPE_Privatentnahme["value"])) { if (($cashtype == self::$CASHTYPE_Privateinlage["value"]) || ($cashtype == self::$CASHTYPE_Privatentnahme["value"])) {

View File

@ -30,7 +30,12 @@ return;
// user has manager rights // user has manager rights
if($command == 'createClosing') { if($command == 'createClosing') {
$this->createClosing($_POST['remark'],$_POST['print'],$_POST['counting'],$_POST['coinscount'],$_POST['notescount'],$_POST['counted']); if (isset($_POST['counted'])) {
$counted = $_POST['counted'];
} else {
$counted = null;
}
$this->createClosing($_POST['remark'],$_POST['print'],$_POST['counting'],$_POST['coinscount'],$_POST['notescount'],$counted);
} else if ($command == 'remotecreateclosing') { } else if ($command == 'remotecreateclosing') {
if (isset($_POST['remoteaccesscode'])) { if (isset($_POST['remoteaccesscode'])) {
if (isset($_POST['remark'])) { if (isset($_POST['remark'])) {
@ -1212,8 +1217,8 @@ CommonUtils::execSql($pdo, "UPDATE %closing% SET counted=? WHERE id=?", array($s
} }
private static function signValueByTseAndUpdateClosing($pdo,$closingid,$valueToSign) { private static function signValueByTseAndUpdateClosing($pdo,$closingid,$valueToSign) {
$status = TSE::sendFreeContentToTSE($pdo, $valueToSign); $tseanswer = TSE::sendFreeContentToTSE($pdo, $valueToSign);
if ($status["status"] != "OK") { if ($tseanswer["status"] != "OK") {
return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden.")); return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden."));
} else { } else {
$logtime = 0; $logtime = 0;
@ -1223,20 +1228,15 @@ $pubkeyRef = null;
$sigalgRef = null; $sigalgRef = null;
$sigcounter = 0; $sigcounter = 0;
if ($status["usetse"] == DbUtils::$TSE_OK) { if ($tseanswer["usetse"] == DbUtils::$TSE_OK) {
$msgAsString = $status["msg"]; $logtime = $tseanswer["logtime"];
$tseLog = json_decode($msgAsString, true); $trans = $tseanswer["trans"];
$logtime = $tseLog["logtime"]; $sigcounter = $tseanswer["sigcounter"];
$trans = $tseLog["trans"]; $tseSignature = $tseanswer["signature"];
$sigcounter = $tseLog["sigcounter"]; $sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["sigalg"]);
$tseSignature = $tseLog["signature"]; $pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["publickey"]);
$publicKey = $tseLog["publickey"]; $serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["serialno"]);
$tseCertificate = $tseLog["certificate"]; $certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["certificate"]);
$serialNo = $tseLog["serialno"];
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["sigalg"]);
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["publickey"]);
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["serialno"]);
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["certificate"]);
} }
$opid = Operations::createOperation( $opid = Operations::createOperation(
@ -1252,7 +1252,7 @@ $sigalgRef,
$serialNoRef, $serialNoRef,
$certificateRef, $certificateRef,
$sigcounter, $sigcounter,
$status["usetse"]); $tseanswer["usetse"]);
$sql = "UPDATE %closing% SET opid=? WHERE id=?"; $sql = "UPDATE %closing% SET opid=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($opid, $closingid)); CommonUtils::execSql($pdo, $sql, array($opid, $closingid));

View File

@ -656,7 +656,11 @@ class CommonUtils {
if ($theParamName == $templatename) { if ($theParamName == $templatename) {
$out['template'] = $settingResult[0]["setting"]; $out['template'] = $settingResult[0]["setting"];
} else { } else {
$out[$theParamName] = $settingResult[0]["setting"]; if (count($settingResult) == 0) {
$out[$theParamName] = null;
} else {
$out[$theParamName] = $settingResult[0]["setting"];
}
} }
} }

View File

@ -892,7 +892,7 @@ class Customers {
$txt = "<head>"; $txt = "<head>";
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>"; $txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=2.0.5">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=2.0.6">';
$txt .= "</head>"; $txt .= "</head>";
return $txt; return $txt;
} }

View File

@ -58,6 +58,8 @@ class DbUtils {
try { try {
$pdo = new PDO($dsn, $user, $password); $pdo = new PDO($dsn, $user, $password);
$pdo ->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo ->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SET SESSION sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION'";
CommonUtils::execSql($pdo, $sql, null);
} }
catch (PDOException $e) { catch (PDOException $e) {
if ($doEchoError) { if ($doEchoError) {

View File

@ -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 = "2.0.5"; $version = "2.0.6";
$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 {
@ -50,6 +50,6 @@ $opts = array(
$context = stream_context_create($opts); $context = stream_context_create($opts);
$ret = file_get_contents($url, false, $context); $ret = @file_get_contents($url, false, $context);
echo $ret; echo $ret;

View File

@ -128,13 +128,18 @@ class Guestsync {
$permission = self::checkPermission($pdo, $tableid, $tablecode, $prodid, $dailycode); $permission = self::checkPermission($pdo, $tableid, $tablecode, $prodid, $dailycode);
if ($permission) { if ($permission) {
self::addToQueue($pdo,$date,$prodid,$tableid); $success = self::addToQueue($pdo,$date,$prodid,$tableid);
if (!$success) {
return false;
}
} }
} }
} catch (Exception $ex) { } catch (Exception $ex) {
echo $ex->getMessage(); echo $ex->getMessage();
return false;
} }
} }
return true;
} }
private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) { private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) {
@ -304,10 +309,14 @@ class Guestsync {
$printjob = 1; $printjob = 1;
} }
$queue = new QueueContent(); $queue = new QueueContent();
$queue->addProductListToQueueForGuest($pdo, $date, $tableid, $prodid, $printjob); $success = $queue->addProductListToQueueForGuest($pdo, $date, $tableid, $prodid, $printjob);
if (!$success) {
return false;
}
if ($printjob == 0) { if ($printjob == 0) {
QueueContent::setFlagForCooking($pdo,$prodid); QueueContent::setFlagForCooking($pdo,$prodid);
} }
return true;
} }
} }

View File

@ -7,6 +7,9 @@ require_once ('bill.php');
require_once ('closing.php'); require_once ('closing.php');
require_once ('admin.php'); require_once ('admin.php');
defined('LAST_REC_TEMPLATE') || define ( 'LAST_REC_TEMPLATE','0' );
defined('NEED_PASS') || define ( 'NEED_PASS',true );
class PrintQueue { class PrintQueue {
var $dbutils; var $dbutils;
var $userrights; var $userrights;
@ -125,7 +128,7 @@ class PrintQueue {
} else if ($command == 'deleteSpooledPrintJob') { } else if ($command == 'deleteSpooledPrintJob') {
$this->deleteSpooledPrintJob($_POST['id']); $this->deleteSpooledPrintJob($_POST['id']);
} else if ($command == 'reprintworkreceipt') { } else if ($command == 'reprintworkreceipt') {
$this->reprintworkreceipt($_GET["workid"]); $this->reprintworkreceipt($_GET["id"]);
} else { } else {
echo "Kommando nicht erkannt!"; echo "Kommando nicht erkannt!";
} }
@ -279,7 +282,8 @@ class PrintQueue {
$printedWorkReceips = CommonUtils::fetchSqlAll($pdo, $sql); $printedWorkReceips = CommonUtils::fetchSqlAll($pdo, $sql);
$printedWorkReceiptsInJson = array(); $printedWorkReceiptsInJson = array();
foreach ($printedWorkReceips as $printedWorkReceipt) { foreach ($printedWorkReceips as $printedWorkReceipt) {
$printedWorkReceiptsInJson[] = json_decode($printedWorkReceipt['content']); $printjobentry = array("id" => $printedWorkReceipt['id'],"content" => json_decode($printedWorkReceipt['content']));
$printedWorkReceiptsInJson[] = $printjobentry;
} }
echo json_encode(array("status" => "OK", "msg" => $jobs, "printedworkreceips" => $printedWorkReceiptsInJson)); echo json_encode(array("status" => "OK", "msg" => $jobs, "printedworkreceips" => $printedWorkReceiptsInJson));
@ -349,31 +353,13 @@ class PrintQueue {
} }
} }
function reprintworkreceipt($workid) { function reprintworkreceipt($printjobid) {
if ($this->checkForUserRightManagerAdmin()) { if ($this->checkForUserRightManagerAdmin()) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
if (is_null($workid)) { $sql = "UPDATE %printjobs% SET removed=? WHERE id=?";
echo json_encode(array("status" => "ERROR","msg" => "Keine gültige ID angegeben!")); CommonUtils::execSql($pdo, $sql, array(null,$printjobid));
return; echo json_encode(array("status" => "OK"));
}
$workid = trim($workid);
$sql = "SELECT id,content FROM %printjobs% WHERE type IN (?,?,?,?)";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array(self::$FOOD,self::$DRINK,self::$CANCELFOOD,self::$CANCELDRINK));
foreach ($result as $w) {
$content = json_decode($w["content"],true);
if ($content["workid"] == $workid) {
$sql = "UPDATE %printjobs% SET removed=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array(null,$w["id"]));
echo json_encode(array("status" => "OK"));
return;
}
}
echo json_encode(array("status" => "ERROR","msg" => "Kein Arbeitsbon-Druckjob mit der ID gefunden!"));
} }
} }
@ -743,6 +729,11 @@ class PrintQueue {
foreach ($result as $r) { foreach ($result as $r) {
$aBill = $bill->getBillWithIdAsTicket($pdo, $r["content"]); $aBill = $bill->getBillWithIdAsTicket($pdo, $r["content"]);
$template = $aBill["template"]; $template = $aBill["template"];
if (LAST_REC_TEMPLATE == 1) {
$template = CommonUtils::getConfigValue($pdo, "rectemplate", $template);
}
$osversion = $aBill["version"]; $osversion = $aBill["version"];
$printer = $r["printer"]; $printer = $r["printer"];
$label = DbUtils::$OSLABEL . "-" . DbUtils::$OSVERSLABEL; $label = DbUtils::$OSLABEL . "-" . DbUtils::$OSVERSLABEL;
@ -834,7 +825,7 @@ class PrintQueue {
private function getNextTicketJobs($md5pass,$printersizes,$fl) { private function getNextTicketJobs($md5pass,$printersizes,$fl) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false); $isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
if ($isCorrect) { if ($isCorrect || !(NEED_PASS)) {
CommonUtils::log($pdo,"PRINTQUEUE", "getTickets: fl=$fl"); CommonUtils::log($pdo,"PRINTQUEUE", "getTickets: fl=$fl");
ob_start(); ob_start();
@ -1284,4 +1275,4 @@ class Printersizes {
return $this->defaultSize; return $this->defaultSize;
} }
} }
} }

View File

@ -221,9 +221,9 @@ class QueueContent {
$unit = CommonUtils::caseOfSqlUnitSelection($pdo); $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,%resttables%.id as tableid,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% "; $sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,%resttables%.id as tableid,tablenr,Q.unit,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% ";
} else { } else {
$sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,%resttables%.id as tableid,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,%resttables%.id as tableid,tablenr,Q.unit,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime IS NULL AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= "Q.toremove='0' AND "; $sql .= "Q.toremove='0' AND ";
@ -246,7 +246,7 @@ class QueueContent {
$result1 = $stmt->fetchAll(); $result1 = $stmt->fetchAll();
$sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,'-' as tableid,'-' as tablenr,CONCAT($unit,Q.productname) as longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%queue% Q LEFT OUTER JOIN %bill% b "; $sql = "SELECT DISTINCT Q.id as id,IF(Q.orderuser IS NULL,'1','0') as isguestorder,'-' as tableid,'-' as tablenr,Q.unit,CONCAT($unit,Q.productname) as longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%queue% Q LEFT OUTER JOIN %bill% b ";
$sql .= " ON Q.billid=b.id "; $sql .= " ON Q.billid=b.id ";
$sql .= "WHERE (readytime IS NULL AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= "Q.toremove='0' AND "; $sql .= "Q.toremove='0' AND ";
@ -532,7 +532,7 @@ class QueueContent {
return $retArr; return $retArr;
} }
$sql = "SELECT %queue%.id as id,kind from %prodtype%,%products%,%queue% where %queue%.id=? AND productid=%products%.id AND category=%prodtype%.id"; $sql = "SELECT Q.id as id,kind from %prodtype% T,%products% P,%queue% Q where Q.id=? AND productid=P.id AND category=T.id";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
foreach($idArr as $id) { foreach($idArr as $id) {
$stmt->execute(array($id)); $stmt->execute(array($id));
@ -675,9 +675,9 @@ class QueueContent {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$unit = CommonUtils::caseOfSqlUnitSelection($pdo); $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT Q.id as id,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% "; $sql = "SELECT DISTINCT Q.id as id,tablenr,Q.unit,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% ";
} else { } else {
$sql = "SELECT DISTINCT Q.id as id,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT Q.id as id,tablenr,Q.unit,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime IS NOT NULL AND "; $sql .= "WHERE (readytime IS NOT NULL AND ";
$sql .= "delivertime IS NULL AND "; $sql .= "delivertime IS NULL AND ";
@ -752,7 +752,7 @@ class QueueContent {
private function appendProdsForBarKitchenAndAutoDelivery($pdo,$kind,$resultarray) { private function appendProdsForBarKitchenAndAutoDelivery($pdo,$kind,$resultarray) {
$unit = CommonUtils::caseOfSqlUnitSelection($pdo); $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = "SELECT DISTINCT Q.id as id,tableno as tablename,CONCAT($unit,Q.productname) as longname,delivertime,anoption,p.id as prodid "; $sql = "SELECT DISTINCT Q.id as id,tableno as tablename,Q.unit,CONCAT($unit,Q.productname) as longname,delivertime,anoption,p.id as prodid ";
$sql .= "FROM %queue% Q "; $sql .= "FROM %queue% Q ";
$sql .= "LEFT JOIN %bill% b ON Q.billid=b.id "; $sql .= "LEFT JOIN %bill% b ON Q.billid=b.id ";
@ -1144,7 +1144,6 @@ class QueueContent {
$doPrint = 1; $doPrint = 1;
} }
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
$pdo->beginTransaction(); $pdo->beginTransaction();
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig'); $workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
@ -1249,7 +1248,6 @@ class QueueContent {
default: default:
$configItem = "taxaustrianormal"; $configItem = "taxaustrianormal";
} }
$tax = CommonUtils::getExistingConfigValue($pdo, $configItem);
} else { } else {
$taxaustrianumber = null; $taxaustrianumber = null;
} }
@ -1419,16 +1417,14 @@ class QueueContent {
$serialNoRef = null; $serialNoRef = null;
if ($sentToTseResult["usetse"] == DbUtils::$TSE_OK) { if ($sentToTseResult["usetse"] == DbUtils::$TSE_OK) {
$msgAsString = $sentToTseResult["msg"]; $logtime = $sentToTseResult["logtime"];
$tseLog = json_decode($msgAsString, true); $trans = $sentToTseResult["trans"];
$logtime = $tseLog["logtime"]; $sigcounter = $sentToTseResult["sigcounter"];
$trans = $tseLog["trans"]; $tseSignature = $sentToTseResult["signature"];
$sigcounter = $tseLog["sigcounter"]; $sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["sigalg"]);
$tseSignature = $tseLog["signature"]; $pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["publickey"]);
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["sigalg"]); $serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["serialno"]);
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["publickey"]); $certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["certificate"]);
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["serialno"]);
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["certificate"]);
} }
$opid = Operations::createOperation( $opid = Operations::createOperation(
@ -1491,21 +1487,20 @@ class QueueContent {
date_default_timezone_set(DbUtils::getTimeZone()); date_default_timezone_set(DbUtils::getTimeZone());
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
$pdo->beginTransaction(); $pdo->beginTransaction();
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
$commUtils = new CommonUtils();
$currentPriceLevel = $commUtils->getCurrentPriceLevel($pdo);
$currentPriceLevelId = $currentPriceLevel["id"];
$insertedQueueIds = array();
$sql = "INSERT INTO %records% (date,userid,tableid,action) VALUES(?,?,?,?)"; $sql = "INSERT INTO %records% (date,userid,tableid,action) VALUES(?,?,?,?)";
CommonUtils::execSql($pdo, $sql, array($ordertime,null,$theTableid,T_ORDER)); CommonUtils::execSql($pdo, $sql, array($ordertime,null,$theTableid,T_ORDER));
$recordid = $pdo->lastInsertId(); $recordid = $pdo->lastInsertId();
$tax = CommonUtils::getExistingConfigValue($pdo, 'tax');
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
$currentPriceLevel = $this->commonUtils->getCurrentPriceLevel($pdo);
$currentPriceLevelId = $currentPriceLevel["id"];
$insertedQueueIds = array();
$productid = $prodid; $productid = $prodid;
$theOption = ''; $theOption = '';
$theChangedPrice = "NO"; $theChangedPrice = "NO";
@ -1514,7 +1509,7 @@ class QueueContent {
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid)); $row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
if ($row == null) { if ($row == null) {
echo "Fehler: Preise nicht vorhanden"; // error echo "Fehler: Preise nicht vorhanden"; // error
return; return false;
} }
if (!is_null($row->amount)) { if (!is_null($row->amount)) {
@ -1570,8 +1565,10 @@ class QueueContent {
} }
} }
$signStatus = self::signAtTSE($pdo, $tseEntries, array($queueid),false); $signStatus = self::signAtTSE($pdo, $tseEntries, array($queueid),false);
if ($signStatus["status"] != "OK") { if ($signStatus["status"] != "OK") {
error_log("Signing guest order at TSE impossible. Ignore guest order");
$pdo->rollBack(); $pdo->rollBack();
return false;
} }
} }
@ -1580,6 +1577,7 @@ class QueueContent {
} }
$pdo->commit(); $pdo->commit();
return true;
} }
/* /*
@ -1895,7 +1893,7 @@ class QueueContent {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$unit = CommonUtils::caseOfSqlUnitSelection($pdo); $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = "SELECT Q.id as id,CONCAT($unit,Q.productname) as longname,Q.price as price,Q.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,Q.togo as togo, ordertime,COALESCE(prodimageid,0) as prodimageid,COALESCE(printjobid,0) as printjobid $sql = "SELECT Q.id as id,Q.unit,CONCAT($unit,Q.productname) as longname,Q.price as price,Q.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,Q.togo as togo, ordertime,COALESCE(prodimageid,0) as prodimageid,COALESCE(printjobid,0) as printjobid
FROM %queue% Q FROM %queue% Q
INNER JOIN %products% ON Q.productid = %products%.id INNER JOIN %products% ON Q.productid = %products%.id
INNER JOIN %pricelevel% ON Q.pricelevel = %pricelevel%.id INNER JOIN %pricelevel% ON Q.pricelevel = %pricelevel%.id
@ -2289,7 +2287,6 @@ class QueueContent {
CommonUtils::callPlugin($pdo, "createBill", "before"); CommonUtils::callPlugin($pdo, "createBill", "before");
if (!$calledInternally) { if (!$calledInternally) {
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
$pdo->beginTransaction(); $pdo->beginTransaction();
} }

View File

@ -236,7 +236,7 @@ class Reservation {
$txt = "<html><head>"; $txt = "<html><head>";
$txt .= "<title>Reservierungsübersicht</title>"; $txt .= "<title>Reservierungsübersicht</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=2.0.5">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=2.0.6">';
$txt .= "</head>"; $txt .= "</head>";
$txt .= "<body>"; $txt .= "<body>";
$txt .= "<h1>Reservierungsübersicht für $day.$month.$year</h1><p>"; $txt .= "<h1>Reservierungsübersicht für $day.$month.$year</h1><p>";

View File

@ -638,7 +638,7 @@ class Roomtables {
$txt = "<html><head>"; $txt = "<html><head>";
$txt .= "<title>Tisch QR-Codes für die Gastbestellung</title>"; $txt .= "<title>Tisch QR-Codes für die Gastbestellung</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=2.0.5">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=2.0.6">';
$txt .= "</head>"; $txt .= "</head>";
$txt .= "<body>"; $txt .= "<body>";
$txt .= "<h1>Tisch QR-Codes für die Gastbestellung</h1><p>"; $txt .= "<h1>Tisch QR-Codes für die Gastbestellung</h1><p>";

View File

@ -627,7 +627,7 @@ class Dsfinvk {
$sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O "; $sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O ";
$sql .= " INNER JOIN %queue% Q ON Q.opidok=O.id "; $sql .= " INNER JOIN %queue% Q ON Q.opidok=O.id ";
$sql .= " LEFT JOIN %billproducts% BP ON BP.queueid=Q.id "; $sql .= " LEFT JOIN %billproducts% BP ON BP.queueid=Q.id ";
$sql .= " INNER JOIN %bill% B ON BP.billid=B.id "; $sql .= " LEFT JOIN %bill% B ON BP.billid=B.id ";
$sql .= " LEFT JOIN %closing% C ON B.closingid=C.id "; $sql .= " LEFT JOIN %closing% C ON B.closingid=C.id ";
$sql .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse "; $sql .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse ";
$sql .= " AND Q.toremove='0' "; $sql .= " AND Q.toremove='0' ";
@ -636,7 +636,7 @@ class Dsfinvk {
$sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O "; $sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O ";
$sql .= " INNER JOIN %queue% Q ON Q.opidcancel=O.id "; $sql .= " INNER JOIN %queue% Q ON Q.opidcancel=O.id ";
$sql .= " LEFT JOIN %billproducts% BP ON BP.queueid=Q.id "; $sql .= " LEFT JOIN %billproducts% BP ON BP.queueid=Q.id ";
$sql .= " INNER JOIN %bill% B ON BP.billid=B.id "; $sql .= " LEFT JOIN %bill% B ON BP.billid=B.id ";
$sql .= " LEFT JOIN %closing% C ON B.closingid=C.id "; $sql .= " LEFT JOIN %closing% C ON B.closingid=C.id ";
$sql .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse "; $sql .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse ";
$sql .= " AND Q.toremove='1' "; $sql .= " AND Q.toremove='1' ";

View File

@ -1,9 +1,11 @@
<?php <?php
defined('LAYOUTER_HTML_MODE') || define ( 'LAYOUTER_HTML_MODE','0' );
class ColProperty { class ColProperty {
public static $LEFT = 0; public static $LEFT = 0;
public static $RIGHT = 1; public static $RIGHT = 1;
public static $CENTER = 2; public static $CENTER = 2;
public static $COMPLETE = 3;
public static $NORMAL = 0; public static $NORMAL = 0;
public static $HIGH = 1; public static $HIGH = 1;
@ -67,7 +69,22 @@ class ColProperty {
$contentLength = strlen($textInCp437) * 2; $contentLength = strlen($textInCp437) * 2;
$factor = 2; $factor = 2;
} }
if ($just == ColProperty::$COMPLETE) {
if ($contentLength > $this->length) {
$textLines = array();
$remaingText = $text;
while (strlen($remaingText) > 0) {
$textToSplit = $remaingText;
$maxLength = strlen($textToSplit) * $factor;
$cutLength = min($maxLength,$this->length / $factor);
$textLines[] = substr($textToSplit,0,$cutLength);
$remaingText = substr($textToSplit,$cutLength);
}
$text = implode("\n", $textLines);
}
return $this->textOutDueToFont(0, $text, 0, $varstyle);
}
$textlen = $contentLength; $textlen = $contentLength;
if ($contentLength > $this->length) { if ($contentLength > $this->length) {
$text = substr($text, 0, $this->length / $factor); $text = substr($text, 0, $this->length / $factor);
@ -193,7 +210,7 @@ class TemplateTable {
} }
} }
$roomToDistribute = $this->totalSpace - $colsTotalLength; $roomToDistribute = $this->totalSpace - $colsTotalLength;
$eachCol = intval($roomToDistribute / $colsWithUnSpecifiedLength); $eachCol = intval($roomToDistribute / max($colsWithUnSpecifiedLength,1));
$assignedCols = 0; $assignedCols = 0;
foreach($this->cols as $aCol) { foreach($this->cols as $aCol) {
@ -260,8 +277,12 @@ class Layouter {
$lines = explode("\n", $template); $lines = explode("\n", $template);
self::loop($lines,$data); self::loop($lines,$data);
return array("html" => self::$outHtml, "printer" => self::$outPr); if (LAYOUTER_HTML_MODE == 1) {
return array("html" => self::$outHtml, "printer" => self::$outHtml);
} else {
return array("html" => self::$outHtml, "printer" => self::$outPr);
}
} }
private static function loop($lines, $data) { private static function loop($lines, $data) {
@ -280,7 +301,7 @@ class Layouter {
if ($t != "") { if ($t != "") {
$pos = stripos($t,'if:'); $pos = stripos($t,'if:');
if ($pos !== false) { if ($pos !== false) {
if (($pos >= 0) && ($pos <= 5)) { if (($pos >= 0) && ($pos <= 7)) {
$ifParts = explode(':',$t); $ifParts = explode(':',$t);
$itemToCheck = $ifParts[1]; $itemToCheck = $ifParts[1];
$valueToCheck = $ifParts[2]; $valueToCheck = $ifParts[2];
@ -294,7 +315,7 @@ class Layouter {
} }
$pos = stripos($t,'fi:'); $pos = stripos($t,'fi:');
if ($pos !== false) { if ($pos !== false) {
if (($pos >= 0) && ($pos <= 5)) { if (($pos >= 0) && ($pos <= 7)) {
$endifParts = explode(':',$t); $endifParts = explode(':',$t);
$itemToCheck = $endifParts[1]; $itemToCheck = $endifParts[1];
if ($itemToCheck == $skippinguntil) { if ($itemToCheck == $skippinguntil) {
@ -322,9 +343,9 @@ class Layouter {
continue; continue;
} }
$pos = stripos($t,'start'); $pos = strpos($t,'START');
if ($pos !== false) { if ($pos !== false) {
if (($pos >= 0) && ($pos <= 5)) { if (($pos >= 0) && ($pos <= 7)) {
$loopDeclParts = explode(':',$t); $loopDeclParts = explode(':',$t);
$marker = trim($loopDeclParts[1]); $marker = trim($loopDeclParts[1]);
$loopLines = self::collectLinesOfLoop($lines,$linenumber+1,$marker); $loopLines = self::collectLinesOfLoop($lines,$linenumber+1,$marker);
@ -400,7 +421,7 @@ class Layouter {
private static function evalElem($elemContent, $dataline) { private static function evalElem($elemContent, $dataline) {
if (self::startsWith($elemContent, "TAB")){ if (self::startsWith($elemContent, "TAB")){
self::setTableProperties($elemContent); self::setTableProperties($elemContent);
return array("bytes" => "","html" => "", "linehascontent" => false,"typeofentry" => "bytes"); return array("bytes" => array(),"html" => "", "linehascontent" => false,"typeofentry" => "bytes");
} else if (self::startsWith($elemContent, "RAWD")) { } else if (self::startsWith($elemContent, "RAWD")) {
$vals = self::getCommaSeparatedValuesOfElem($elemContent); $vals = self::getCommaSeparatedValuesOfElem($elemContent);
return array("bytes" => $vals,"html" => "", "linehascontent" => false,"typeofentry" => "bytes"); return array("bytes" => $vals,"html" => "", "linehascontent" => false,"typeofentry" => "bytes");
@ -430,8 +451,8 @@ class Layouter {
if (count($qrparts) > 1) { if (count($qrparts) > 1) {
$scale = $qrparts[1]; $scale = $qrparts[1];
} }
$billuid = $dataline["id"]; $billid = $dataline["id"];
return array("bytes" => "2,$billuid,$scale","html" => "php/contenthandler.php?module=bill&command=billqrcode&billid=$billuid", "linehascontent" => true,"typeofentry" => "img"); return array("bytes" => "2,$billid,$scale","html" => "php/contenthandler.php?module=bill&command=billqrcode&billid=$billid", "linehascontent" => true,"typeofentry" => "img");
} else if (self::startsWith(strtolower ($elemContent), "waiterphoto")) { } else if (self::startsWith(strtolower ($elemContent), "waiterphoto")) {
$parts = explode(':', $elemContent); $parts = explode(':', $elemContent);
$scale = 100; $scale = 100;
@ -496,13 +517,15 @@ class Layouter {
$side = ColProperty::$RIGHT; $side = ColProperty::$RIGHT;
} else if (($just == "mittig") || ($just == "center")) { } else if (($just == "mittig") || ($just == "center")) {
$side = ColProperty::$CENTER; $side = ColProperty::$CENTER;
} else if (($just == "komplett") || ($just == "complete")) {
$side = ColProperty::$COMPLETE;
} }
} }
$label = ""; $label = "";
$useColonAfterLabel = true; $useColonAfterLabel = true;
if (count($parts) > 2) { if (count($parts) > 2) {
$label = $parts[2]; $label = $parts[2];
if ($label[strlen[$label]-1] == " ") { if (($label != "") && ($label[strlen($label)-1] == " ")) {
$useColonAfterLabel = false; $useColonAfterLabel = false;
} }
} }

View File

@ -38,8 +38,23 @@ class Operations {
// the signtxt is only for debug purposes. So cut it and show that it was cut // the signtxt is only for debug purposes. So cut it and show that it was cut
$signtxt = substr($signtxt, 0, 117) . "..."; $signtxt = substr($signtxt, 0, 117) . "...";
} }
$sql = "INSERT INTO %operations% (id,typerange,bonid,processtype,handledintable,logtime,trans,sigcounter,tsesignature,pubkey,sigalg,serialno,certificate,signtxt,tseerror,terminalid) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
CommonUtils::execSql($pdo, $sql, array($maxid+1,$range,$maxbonid+1,$opType,$table,$logtime,$trans, $sigcounter, $tseSignature, $pubkeyRef, $sigalgRef, $serialNoRef,$certificateRef, $signtxt, $tseerror, $terminalEntryId)); // In parallel transactions and with transaction isolatoon level REPEATABLE READ it may be possible that the max id is already set by another transaction.
// Therefore run this in a try catch block just in case of a deadlock and increment the maxid in catch
// In a very very unikely case of race condition still the bonid can be created multiple times, but the unique primary key id is evidence that there is no
// intention in creating an invalid operation. Therefore also this comment is left in this source code!
$attempt = 0;
$ok = false;
while (!$ok) {
try {
$sql = "INSERT INTO %operations% (id,typerange,bonid,processtype,handledintable,logtime,trans,sigcounter,tsesignature,pubkey,sigalg,serialno,certificate,signtxt,tseerror,terminalid) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
CommonUtils::execSql($pdo, $sql, array($maxid+1,$range,$maxbonid+1,$opType,$table,$logtime,$trans, $sigcounter, $tseSignature, $pubkeyRef, $sigalgRef, $serialNoRef,$certificateRef, $signtxt, $tseerror, $terminalEntryId));
$ok = true;
} catch (Exception $ex) {
$maxid++;
$attempt++;
}
}
$opid = $pdo->lastInsertId(); $opid = $pdo->lastInsertId();
return $opid; return $opid;
} }

View File

@ -36,7 +36,7 @@ class OsQrcode {
readfile(__DIR__. '/../../img/oops.png'); readfile(__DIR__. '/../../img/oops.png');
return; return;
} else { } else {
$text = $serverurl . "/nfclogin.php?a=" . $passhash . "_" . $userid . "&v=2.0.5"; $text = $serverurl . "/nfclogin.php?a=" . $passhash . "_" . $userid . "&v=2.0.6";
QRcode::png($text); QRcode::png($text);
} }
} }

View File

@ -16,7 +16,8 @@ class Tse {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
switch ($command) { switch ($command) {
case 'tsecmd': case 'tsecmd':
self::tsecmd($pdo,null); $jsonAnswer = self::tsecmd($pdo,null);
echo json_encode($jsonAnswer);
break; break;
default: default:
echo json_encode(array("status" => "ERROR", "msg" => "Command not supported")); echo json_encode(array("status" => "ERROR", "msg" => "Command not supported"));
@ -59,14 +60,12 @@ class Tse {
); );
} }
private static function tsecmd($pdo,$request) { private static function tsecmd($pdo,$request) {
$calledInternally = true;
if (is_null($request)) { if (is_null($request)) {
if (!isset($_POST['request'])) { if (!isset($_POST['request'])) {
echo json_encode(array("status" => "ERROR","msg" => "No TSE request transmitted")); echo json_encode(array("status" => "ERROR","msg" => "No TSE request transmitted"));
return; return;
} }
$request = $_POST['request']; $request = $_POST['request'];
$calledInternally = false;
} }
$tseparams = self::getTseParams($pdo); $tseparams = self::getTseParams($pdo);
@ -81,14 +80,8 @@ class Tse {
$data = json_encode($transferdata); $data = json_encode($transferdata);
$transferdataBase64 = base64_encode($data); $transferdataBase64 = base64_encode($data);
//$transferdataBase64 = CommonUtils::base64_encode_url($data);
$tseanswer = self::sendToTSEConnector($tseparams['url'] . "/admin", $transferdataBase64,560); return self::sendToTSEConnector($tseparams['url'] . "/admin", $transferdataBase64,560);
if ($calledInternally) {
return $tseanswer;
} else {
echo json_encode($tseanswer);
}
} }
private static function sendToTSEConnector($tseurl, $data,$timeout) { private static function sendToTSEConnector($tseurl, $data,$timeout) {
@ -109,13 +102,16 @@ class Tse {
$context = stream_context_create($opts); $context = stream_context_create($opts);
$ret = file_get_contents($tseurl, false, $context); try {
$ret = @file_get_contents($tseurl, false, $context);
if (!$ret) { } catch (Exception $ex) {
return array("status" => "ERROR","msg" => "Communication with TSEConnector not successful!"); return array("status" => "ERROR","msg" => "No connection with TSEConnector");
} }
return array("status" => "OK","msg" => $ret); if ($ret === false) {
return array("status" => "ERROR","msg" => "No connection with TSEConnector");
}
return json_decode($ret, true);
} }
private static function sendValueToTseForSigning($pdo,$valueToSign,$cmd) { private static function sendValueToTseForSigning($pdo,$valueToSign,$cmd) {
@ -146,25 +142,12 @@ class Tse {
$tseanswer = self::sendToTSEConnector($tseurl . "/sign", $transferdataBase64,560); $tseanswer = self::sendToTSEConnector($tseurl . "/sign", $transferdataBase64,560);
if ($tseanswer["status"] == "OK") { if ($tseanswer["status"] == "OK") {
$tseanswer["usetse"] = DbUtils::$TSE_OK; $tseanswer["usetse"] = DbUtils::$TSE_OK;
if (isset($tseanswer["msg"])) {
$msg = $tseanswer["msg"];
$jsonMsg = json_decode($msg,true);
if (isset($jsonMsg["status"])) {
$stat = $jsonMsg["status"];
if ($stat != "OK") {
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
$tseanswer["status"] = "ERROR";
}
}
} else {
$tseanswer["usetse"] = DbUtils::$TSE_OK;
}
} else { } else {
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR; $tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
} }
return $tseanswer; return $tseanswer;
} }
public static function sendNormalBillToTSE($pdo,$billValueToSign) { public static function sendNormalBillToTSE($pdo,$billValueToSign) {
return self::sendValueToTseForSigning($pdo, $billValueToSign, "signnormalbill"); return self::sendValueToTseForSigning($pdo, $billValueToSign, "signnormalbill");
} }
@ -179,24 +162,37 @@ class Tse {
$useTse = CommonUtils::getConfigValue($pdo, 'usetse', 0); $useTse = CommonUtils::getConfigValue($pdo, 'usetse', 0);
$tseurl = CommonUtils::getConfigValue($pdo, 'tseurl', ""); $tseurl = CommonUtils::getConfigValue($pdo, 'tseurl', "");
if (($useTse == 0) || ($tseurl == "")) { if (($useTse == 0) || ($tseurl == "")) {
return 1; return array("status" => "OK");
} else { } else {
$tseanswer = self::sendToTSEConnector($tseurl . "/info?cmd=ping", "", 200); $tseparams = self::getTseParams($pdo);
if ($tseanswer["status"] == "OK") {
$answer = $tseanswer["msg"]; $transferdata = array(
if ($answer == "WAITING") { "pass" => $tseparams['pass'],
self::tsecmd($pdo,"selftest"); "pin" => $tseparams['pin'],
return 1; "clientid" => $tseparams['clientid'],
} else { "cmd" => "check"
return 1; );
}
$data = json_encode($transferdata);
$transferdataBase64 = base64_encode($data);
try {
$tseanswer = self::sendToTSEConnector($tseurl . "/admin", $transferdataBase64,560);
} catch (Exception $ex) {
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
$tseanswer["status"] = "ERROR";
} }
if ($tseanswer["status"] == "OK") {
$tseanswer["usetse"] = DbUtils::$TSE_OK;
} else {
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
}
return $tseanswer;
} }
return 0;
} }
private static function getClientIP() private static function getClientIP()
{ {
$ipaddress = 'UNKNOWN'; $ipaddress = 'UNKNOWN';

View File

@ -1569,6 +1569,19 @@ class Version {
return array(false,$e); return array(false,$e);
} }
} }
public static function upd_2005_2006($pdo, $prefix, $dbname) {
try {
self::insertOrUpdateConfigItem($pdo, 'updateurl', 'https://www.ordersprinter.de/update');
$rectemplate = self::getDefaultCustomRecTemplate();
self::insertOrUpdateConfigItem($pdo, 'rectemplate', $rectemplate);
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
@ -1667,7 +1680,8 @@ class Version {
"2.0.1" => array("upd_2001_2002","2.0.2"), "2.0.1" => array("upd_2001_2002","2.0.2"),
"2.0.2" => array("upd_2002_2003","2.0.3"), "2.0.2" => array("upd_2002_2003","2.0.3"),
"2.0.3" => array("upd_2003_2004","2.0.4"), "2.0.3" => array("upd_2003_2004","2.0.4"),
"2.0.4" => array("upd_2004_2005","2.0.5") "2.0.4" => array("upd_2004_2005","2.0.5"),
"2.0.5" => array("upd_2005_2006","2.0.6")
); );
public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) { public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) {

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,7 +13,7 @@
<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>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head> </head>

View File

@ -7,16 +7,16 @@
<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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="elements/product.js?v=2.0.5"></script> <script src="elements/product.js?v=2.0.6"></script>
<script src="elements/extra.js?v=2.0.5"></script> <script src="elements/extra.js?v=2.0.6"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head> </head>
@ -93,7 +93,7 @@ var PROD_EXTRA_COL_PRICE = ["Preis","Price","Precio"];
var PROD_EXTRA_COL_MAXAMOUNT = ["Max. Anzahl","Max. amount","Max #"]; var PROD_EXTRA_COL_MAXAMOUNT = ["Max. Anzahl","Max. amount","Max #"];
// 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 = 9999.99;
var decpoint = "."; var decpoint = ".";
var austria = 0; var austria = 0;

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<link rel="stylesheet" href="css/ospage.css" /> <link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" /> <link rel="stylesheet" href="css/tablepanel.css" />
@ -15,7 +15,7 @@
<script src="php/3rdparty/jquery-2.2.4.min.js"></script> <script src="php/3rdparty/jquery-2.2.4.min.js"></script>
<script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script> <script>

View File

@ -7,14 +7,14 @@
<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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
</head> </head>
<body> <body>

View File

@ -12,7 +12,7 @@ var P_PRICE = ["Preis","Price","Precio"];
function createReceiptFooterFromDbTaxes(lang, billid, companyInfo,sum,taxes,decPoint,sn,uid,version,systemid) { function createReceiptFooterFromDbTaxes(lang, billid, companyInfo,sum,taxes,decPoint,sn,uid,version,systemid,tseinfo) {
var priceStyle = 'style="border: solid black 0px;padding: 3px;text-align:right;vertical-align:bottom;"'; var priceStyle = 'style="border: solid black 0px;padding: 3px;text-align:right;vertical-align:bottom;"';
var infoStyle = 'style="text-align:center;vertical-align:bottom;"'; var infoStyle = 'style="text-align:center;vertical-align:bottom;"';
@ -41,6 +41,8 @@ function createReceiptFooterFromDbTaxes(lang, billid, companyInfo,sum,taxes,decP
footer += "<tr><td colspan=6><center><img src='php/contenthandler.php?module=bill&command=billqrcode&billid=" + billid + "' /></center></tr>"; footer += "<tr><td colspan=6><center><img src='php/contenthandler.php?module=bill&command=billqrcode&billid=" + billid + "' /></center></tr>";
footer += tseinfo;
footer += "<tr><td colspan=6>Kassen-ID: " + toHtml(systemid).replace(/(?:\r\n|\r|\n)/g, '<br />') + "</tr>"; footer += "<tr><td colspan=6>Kassen-ID: " + toHtml(systemid).replace(/(?:\r\n|\r|\n)/g, '<br />') + "</tr>";
footer += "<tr><td colspan=6>Bonerstellung mit Version: " + toHtml(version).replace(/(?:\r\n|\r|\n)/g, '<br />') + "</tr>"; footer += "<tr><td colspan=6>Bonerstellung mit Version: " + toHtml(version).replace(/(?:\r\n|\r|\n)/g, '<br />') + "</tr>";
@ -79,27 +81,40 @@ function generateProdPart(decPoint,entryListForReceipt) {
/** /**
* Generate HTML output on base of db content * Generate HTML output on base of db content
*/ */
function generateHtmlBillFromScratch(lang,billid,billcontent,currency,decPoint,hosthtml,guestinfo) { function generateHtmlBillFromScratch(lang,billentry,currency,hosthtml,decPoint) {
var table = '<table id="receiptpart" class="receipttable" border=1 style="table-layout: fixed;">'; var table = '<table id="receiptpart" class="receipttable" border=1 style="table-layout: fixed;">';
var overallinfo = billcontent.billoverallinfo; var billid = billentry.id;
var billuid = billentry.billuid;
var overallinfo = billentry.billcontent.billoverallinfo;
var companyInfo = overallinfo.companyinfo; var companyInfo = overallinfo.companyinfo;
var sn = overallinfo.sn; var sn = overallinfo.sn;
var uid = overallinfo.uid; var uid = overallinfo.uid;
var version = overallinfo.version; var version = overallinfo.version;
var systemid = overallinfo.systemid; var systemid = overallinfo.systemid;
var prods = billcontent.products; var prods = billentry.billcontent.products;
var username = overallinfo.username; var username = overallinfo.username;
var tablename = overallinfo.table; var tablename = overallinfo.table;
var guestinfo = overallinfo.guestinfo;
var header = genCreateReceiptHeader(lang,billid,tablename,username,currency,guestinfo); var header = genCreateReceiptHeader(lang,billuid,tablename,username,currency,guestinfo);
var products = generateProdPartByDbContent(decPoint,prods); var products = generateProdPartByDbContent(decPoint,prods);
var sum = parseFloat(overallinfo.brutto); var sum = parseFloat(overallinfo.brutto);
var footer = createReceiptFooterFromDbTaxes(lang, billid, companyInfo,sum,billcontent.taxes,decPoint,sn,uid,version,systemid); var tseinfo = "";
if (overallinfo.tsestatus == 1) {
tseinfo += "<tr><td colspan=6>TSE-Start: " + overallinfo.startlogtime + "</tr>";
tseinfo += "<tr><td colspan=6>TSE-Ende: " + overallinfo.logtime + "</tr>";
tseinfo += "<tr><td colspan=6>TSE-Trans.-Nr: " + overallinfo.transnumber + "</tr>";
tseinfo += "<tr><td colspan=6>TSE-Sig.-Z.: " + overallinfo.sigcounter + "</tr>";
tseinfo += "<tr><td colspan=6>TSE-Signatur: " + overallinfo.tsesignature + "</tr>";
tseinfo += "<tr><td colspan=6>TSE-Seriennr.: " + overallinfo.tseserialno + "</tr>";
}
var footer = createReceiptFooterFromDbTaxes(lang, billid, companyInfo,sum,billentry.billcontent.taxes,decPoint,sn,uid,version,systemid,tseinfo);
var receipt = table + header + products + footer; var receipt = table + header + products + footer;
if (overallinfo.host == 1) { if (overallinfo.host == 1) {
@ -108,4 +123,4 @@ function generateHtmlBillFromScratch(lang,billid,billcontent,currency,decPoint,h
receipt += "</table>"; receipt += "</table>";
return receipt; return receipt;
} }

View File

@ -7,14 +7,14 @@
<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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<script src="elements/rating.js"></script> <script src="elements/rating.js"></script>
</head> </head>
@ -22,7 +22,7 @@
<script> <script>
var REP_USERSUM = ["Kassenbestände ","Open paydesks", "Cajas" ]; var REP_USERSUM = ["Umsätze ","Sales", "Ventas" ];
var REP_TABLE_REPORTS = ["Tischprotokolle","Table reports","Records of tables","Historia de las mesas"]; var REP_TABLE_REPORTS = ["Tischprotokolle","Table reports","Records of tables","Historia de las mesas"];
var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchungen und Stornierungen für alle Tische seit der letzten Tageserfassung angezeigt.", var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchungen und Stornierungen für alle Tische seit der letzten Tageserfassung angezeigt.",
"This area displays all postings, transfers, and cancellations for all tables since the last closing.", "This area displays all postings, transfers, and cancellations for all tables since the last closing.",
@ -30,9 +30,9 @@ var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchun
var REP_ORDER_REPORTS = ["Aktuelle Bestellungen","Current orders","Ordenes de momento"]; var REP_ORDER_REPORTS = ["Aktuelle Bestellungen","Current orders","Ordenes de momento"];
var REP_ORDER_REPORTS_INFO = ["In diesem Bereich werden alle Bestellungen seit der letzten Tageserfassung aufgeführt. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus als bezahlt betrachtet.","In this area yu can see all orders since the last closing.","En esta area puede ver todas las ordenes desde la última cerrada"]; var REP_ORDER_REPORTS_INFO = ["In diesem Bereich werden alle Bestellungen seit der letzten Tageserfassung aufgeführt. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus als bezahlt betrachtet.","In this area yu can see all orders since the last closing.","En esta area puede ver todas las ordenes desde la última cerrada"];
var REP_USER = ["Benutzer","User","Usario"]; var REP_USER = ["Benutzer","User","Usario"];
var REP_USER_TXT = ["Diese Übersicht umfasst den derzeitigen Brutto-Kassenbestand pro Kasse inkl. aller Zahlungswege und Ein-/Auslagen. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus eingerechnet.", var REP_USER_TXT = ["Diese Übersicht zeigt die Umsätze inkl. aller Zahlungswege und Ein-/Auslagen pro Kellner seit dem letzten Kassenabschluss an. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus eingerechnet.",
"This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs and guest bills.", "This overview shows the turnover including all payment methods and deposits/disbursements per waiter since the last cash balance. Invoices issued to guests are included regardless of their payment status.",
"Esta table contiene todos las cajas incluyendo todas los tipos the pagamientos"]; "Este resumen muestra el volumen de negocios, incluidos todos los métodos de pago y los depósitos/desembolsos por camarero desde el último saldo de caja. Las facturas emitidas a los invitados se incluyen independientemente de su estado de pago."];
var REP_TODAY = ["Heute","Today","Hoy"]; var REP_TODAY = ["Heute","Today","Hoy"];
var REP_YESTERDAY = ["Gestern","Yesterday","Ayer"]; var REP_YESTERDAY = ["Gestern","Yesterday","Ayer"];
var REP_HOUR = ["Uhrzeit","Time","Hora"]; var REP_HOUR = ["Uhrzeit","Time","Hora"];

View File

@ -5,8 +5,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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<link rel="stylesheet" type="text/css" href="css/osdatepicker.css?v=2.0.5"> <link rel="stylesheet" type="text/css" href="css/osdatepicker.css?v=2.0.6">
<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" />
@ -14,10 +14,10 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="elements/tablemap.js"></script> <script src="elements/tablemap.js"></script>
<script src="elements/reservation.js?v=2.0.5"></script> <script src="elements/reservation.js?v=2.0.6"></script>
<script src="elements/osdatepicker.js?v=2.0.5"></script> <script src="elements/osdatepicker.js?v=2.0.6"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
@ -627,7 +627,7 @@ function bindCancelButtn() {
var year = date.getFullYear(); var year = date.getFullYear();
var dateStr = year + "-" + month + "-" + day; var dateStr = year + "-" + month + "-" + day;
setTimeout(function(){document.location.href = "reservation.html?v=2.0.5&date=" + dateStr;},500); setTimeout(function(){document.location.href = "reservation.html?v=2.0.6&date=" + dateStr;},500);
}); });
} }

View File

@ -14,7 +14,7 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
</head> </head>
<body> <body>
@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razón"];
var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"]; var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"];
var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."]; var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."];
var nextpage = "paydesk.html?version=2.0.5"; var nextpage = "paydesk.html?version=2.0.6";
var lang; var lang;
@ -84,10 +84,10 @@ function setLanguage(language) {
if (nextPage == "p") { if (nextPage == "p") {
$("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]); $("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]);
nextpage = "paydesk.html?t=" + tableid + "&version=2.0.5"; nextpage = "paydesk.html?t=" + tableid + "&version=2.0.6";
} else { } else {
$("#nextpagebtntxt").html(SUM_TO_ORDER[lang]); $("#nextpagebtntxt").html(SUM_TO_ORDER[lang]);
nextpage = "waiter.html?version=2.0.5"; nextpage = "waiter.html?version=2.0.6";
} }
var txt = "<table class='viewtable'>"; var txt = "<table class='viewtable'>";

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,7 +13,7 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<style> <style>
#tableWithPreparedProds,#tableWithDeliveredEntries,#headertableToCook #tableWithPreparedProds,#tableWithDeliveredEntries,#headertableToCook

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

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=2.0.5"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
<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" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=2.0.5"></script> <script src="utilities.js?v=2.0.6"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long