OrderSprinter 2.0.6
This commit is contained in:
parent
b790972266
commit
a3cc126cab
|
@ -9,8 +9,8 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" href="css/gueststyle.css?v=2.0.5" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.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.6" />
|
||||
<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" />
|
||||
<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 class="ui-grid-a">
|
||||
<div class="ui-block-a"> OrderSprinter</div>
|
||||
<div class="ui-block-b grid_right" id="versioninfo">2.0.5 </div>
|
||||
<div class="ui-block-b grid_right" id="versioninfo">2.0.6 </div>
|
||||
</div><!-- /grid-a -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -114,10 +114,10 @@ if (isset($_POST['code'])) {
|
|||
} else {
|
||||
echo "<html>";
|
||||
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 "<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 "<br><input type=submit value='Installation starten' class=installbtn />";
|
||||
echo "</form></div></html>";
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -22,11 +22,12 @@ tabprefix="os_"
|
|||
remoteaccesscode="please_change"
|
||||
|
||||
# OrderSprinter-Version
|
||||
version="2_0_5"
|
||||
version="2_0_6"
|
||||
|
||||
# Warnhinweis an den Anwender mit der Möglichkeit des Abbruchs
|
||||
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 "System verwenden, allerdings kann es dabei zu Datenverlust kommen:"
|
||||
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
|
||||
|
||||
# Konfigurationswerte
|
||||
PHPVERSION=$(ls /etc/php)
|
||||
echo "Anpassen einiger Konfigurationswerte"
|
||||
sed -i -e "s/memory_limit.*/memory_limit = $avail/" /etc/php/7.4/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/post_max_size.*/post_max_size = 10000M/" /etc/php/7.4/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/memory_limit.*/memory_limit = $avail/" /etc/php/${PHPVERSION}/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/${PHPVERSION}/apache2/php.ini
|
||||
sed -i -e "s/upload_max_filesize.*/upload_max_filesize = 10000M/" /etc/php/${PHPVERSION}/apache2/php.ini
|
||||
service apache2 reload
|
||||
sleep 3s
|
||||
|
||||
|
@ -194,7 +196,7 @@ then
|
|||
cp -R /tmp/ordersprinter/tseconnector /usr/local/bin
|
||||
|
||||
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
|
||||
|
||||
printf "[Unit]\n" > /etc/systemd/system/tseconnector.service
|
||||
|
|
|
@ -85,7 +85,7 @@ class Installer {
|
|||
}
|
||||
Database::dropTables($pdo);
|
||||
Database::createEmptyTables($pdo, $prefix);
|
||||
Database::setVersion($pdo,$prefix,"2.0.5");
|
||||
Database::setVersion($pdo,$prefix,"2.0.6");
|
||||
Database::setAccessPassword($pdo,$prefix,$adminpass);
|
||||
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
|
||||
return array("status" => "OK","msg" => "Installation successful");
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="kitchenbar.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="kitchenbar.js?v=2.0.6"></script>
|
||||
<style>
|
||||
|
||||
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,14 +1,14 @@
|
|||
LOGO
|
||||
# Bondaten Kopf:
|
||||
{TAB::10}
|
||||
{table:links:Tisch}{id:rechts:ID:hoch}
|
||||
{table:links:Tisch}{billuid:rechts:ID:hoch}
|
||||
{TAB:}
|
||||
{billdate:rechts}
|
||||
{username:links:Es bediente Sie}
|
||||
{payment:links:Zahlungsweg}
|
||||
|
||||
# Es folgt die Ausgabe aller Produkte:
|
||||
{TAB:3:1::6:6}
|
||||
{TAB:3:1::7:8}
|
||||
{-:rechts:Anz:}{-:: }{-:links:Beschreibung}{-:rechts:Brutto}{-:rechts:Total}
|
||||
{LINIE:=}
|
||||
START:products
|
||||
|
@ -16,7 +16,7 @@ START:products
|
|||
END:products
|
||||
|
||||
# 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}
|
||||
{LINIE}
|
||||
START:taxes
|
||||
|
@ -31,5 +31,15 @@ END:taxes
|
|||
{qrcode:100}
|
||||
{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}
|
||||
{uid:links:UID}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -23,8 +23,8 @@
|
|||
<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-i18n.min.js"></script>
|
||||
<script src="utilities.js?v=2.0.5"></script>
|
||||
<script src="elements/customers.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="elements/customers.js?v=2.0.6"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.6">
|
||||
|
||||
<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.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="elements/dash.js"></script>
|
||||
<script src="php/3rdparty/Chart.bundle.min.js"></script>
|
||||
|
|
|
@ -163,7 +163,7 @@ function Groundplan() {
|
|||
$("#createtableqrcodesbtn").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
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();
|
||||
|
|
|
@ -30,7 +30,7 @@ function TSE() {
|
|||
e.preventDefault();
|
||||
var data = instance.getTseParams();
|
||||
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) {
|
||||
|
@ -43,8 +43,9 @@ function TSE() {
|
|||
if (!answer) {
|
||||
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 dataToTransfer = {
|
||||
pass: tseData.pass,
|
||||
|
@ -74,18 +75,17 @@ function TSE() {
|
|||
var data = instance.getTseParams();
|
||||
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) {
|
||||
if (answer.status != "OK") {
|
||||
var txt = $(this.outputelem).val();
|
||||
$(this.outputelem).val(txt + "\n\nERROR: " + answer.msg);
|
||||
this.tseAnswerToOutputTextArea = function(answer) {
|
||||
var existingText = $(this.outputelem).val();
|
||||
if (answer.status == "OK") {
|
||||
$(this.outputelem).val(existingText + "\n\nResult: " + answer.msg);
|
||||
} else {
|
||||
var txt = $(this.outputelem).val();
|
||||
$(this.outputelem).val(txt + "\n\nAnswer: " + answer.msg);
|
||||
$(this.outputelem).val(existingText + "\n\nERROR: " + answer.msg);
|
||||
}
|
||||
};
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="kitchenbar.js"></script>
|
||||
<style>
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.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.6">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<meta name="author" content="Stefan Pichel">
|
||||
<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/numfield.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.6">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle-brightenergy.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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -140,7 +140,7 @@ function displayLoginOrLogoutMask(jsonContent) {
|
|||
// user needs to log in!
|
||||
$("#passwordfield").val("");
|
||||
$("#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") {
|
||||
useInstallation();
|
||||
} 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">
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<form method="post">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<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="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 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 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.",
|
||||
"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>
|
||||
<td> </td>
|
||||
<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>
|
||||
</td>
|
||||
<td> </td>
|
||||
|
|
|
@ -199,7 +199,7 @@ $dblines = "defined('MYSQL_DB') || define ( 'MYSQL_DB', '$db' );";
|
|||
$dbloglines = "defined('LOG') || define ( 'LOG', false );";
|
||||
$prefixlines = "defined('TAB_PREFIX') || define ('TAB_PREFIX', '$prefix');";
|
||||
$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);
|
||||
try {
|
||||
file_put_contents("../php/config1.php", $configText);
|
||||
|
@ -513,7 +513,7 @@ return;
|
|||
}
|
||||
|
||||
set_time_limit(60*30);
|
||||
$installerVersion = "2.0.5";
|
||||
$installerVersion = "2.0.6";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="kitchenbar.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="kitchenbar.js?v=2.0.6"></script>
|
||||
<style>
|
||||
|
||||
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -14,12 +14,12 @@
|
|||
<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="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
|
||||
<script src="utilities.js?v=2.0.5"></script>
|
||||
<script src="elements/tablemap.js?v=2.0.5"></script>
|
||||
<script src="elements/roommap.js?v=2.0.5"></script>
|
||||
<script src="elements/groundplan.js?v=2.0.5"></script>
|
||||
<script src="elements/tse.js?v=2.0.5"></script>
|
||||
<script src="elements/closing.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="elements/tablemap.js?v=2.0.6"></script>
|
||||
<script src="elements/roommap.js?v=2.0.6"></script>
|
||||
<script src="elements/groundplan.js?v=2.0.6"></script>
|
||||
<script src="elements/tse.js?v=2.0.6"></script>
|
||||
<script src="elements/closing.js?v=2.0.6"></script>
|
||||
|
||||
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
|
||||
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
|
||||
|
@ -1712,7 +1712,7 @@ function initRestoreFileUpload() {
|
|||
} else {
|
||||
alert("Import war erfolgreich.");
|
||||
setTimeout(function(){
|
||||
document.location.href = "index.html?v=2.0.5";
|
||||
document.location.href = "index.html?v=2.0.6";
|
||||
},250);
|
||||
}
|
||||
},
|
||||
|
@ -2108,37 +2108,37 @@ function bindConfig() {
|
|||
$("#samplerectemplate").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
|
@ -2266,38 +2266,38 @@ function binding() {
|
|||
$("#backup_btn").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
e.stopImmediatePropagation();
|
||||
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) {
|
||||
|
@ -2495,7 +2495,7 @@ function updateOneSingleFile() {
|
|||
setTimeout(function(){
|
||||
$("#sliderarea").hide();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -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 txt = '<h3>' + headertxt + '</h3><p />';
|
||||
var prods = job.products;
|
||||
|
@ -3623,10 +3623,10 @@ function renderSingleWorkReceipt(job,allowreprint,allowdelete) {
|
|||
}
|
||||
});
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
@ -3637,7 +3637,7 @@ function renderPrintedWorkReceipts(jobs) {
|
|||
var aJob = jobs[i];
|
||||
txt += '<p />';
|
||||
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>';
|
||||
}
|
||||
return txt;
|
||||
|
@ -3651,7 +3651,7 @@ function createSpooledPrintJobButton(id,text) {
|
|||
function createSpooledPrintWorkJobButton(aJob) {
|
||||
var txt = '<p />';
|
||||
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>';
|
||||
return txt;
|
||||
}
|
||||
|
@ -3703,7 +3703,7 @@ function bindSpooledPrintJob() {
|
|||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var data = {
|
||||
workid: this.id.split("_")[1]
|
||||
id: this.id.split("_")[1]
|
||||
};
|
||||
doAjax("GET","php/contenthandler.php?module=printqueue&command=reprintworkreceipt",data,handleReprint,null);
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -474,12 +474,13 @@ class Admin {
|
|||
$tasksForMe = Tasks::areThereTasksForMe($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));
|
||||
$notActive = json_encode(array("status" => "OK", "msg" => 0, "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" => $binaryTseStatus));
|
||||
|
||||
if (is_null($pdo)) {
|
||||
echo $notActive;
|
||||
|
@ -1556,7 +1557,7 @@ class Admin {
|
|||
$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 ($_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 {
|
||||
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_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.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.6"); }
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=2.0.6"); }
|
||||
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_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=2.0.5"); }
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?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.5"); }
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=2.0.5");
|
||||
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.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.6"); }
|
||||
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.6"); }
|
||||
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.6"); }
|
||||
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.6"); }
|
||||
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.6"); }
|
||||
$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.6"); }
|
||||
|
||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=2.0.5");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?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.6");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
|
|
@ -48,6 +48,9 @@ class Bill {
|
|||
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 $TSE_FORMAT_QR_TEXT = 1;
|
||||
private static $TSE_FORMAT_ASSOC_ARRAY = 2;
|
||||
|
||||
function __construct() {
|
||||
$this->dbutils = new DbUtils();
|
||||
require_once 'translations.php';
|
||||
|
@ -274,8 +277,8 @@ class Bill {
|
|||
}
|
||||
|
||||
private static function signValueByTseAndUpdateBill($pdo,$billid,$valueToSign) {
|
||||
$status = TSE::sendNormalBillToTSE($pdo, $valueToSign);
|
||||
if ($status["status"] != "OK") {
|
||||
$tseAnswer = TSE::sendNormalBillToTSE($pdo, $valueToSign);
|
||||
if ($tseAnswer["status"] != "OK") {
|
||||
return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden."));
|
||||
} else {
|
||||
$logtime = 0;
|
||||
|
@ -285,17 +288,15 @@ class Bill {
|
|||
$sigalgRef = null;
|
||||
$sigcounter = 0;
|
||||
|
||||
if ($status["usetse"] == DbUtils::$TSE_OK) {
|
||||
$msgAsString = $status["msg"];
|
||||
$tseLog = json_decode($msgAsString, true);
|
||||
$logtime = $tseLog["logtime"];
|
||||
$trans = $tseLog["trans"];
|
||||
$sigcounter = $tseLog["sigcounter"];
|
||||
$tseSignature = $tseLog["signature"];
|
||||
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["sigalg"]);
|
||||
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["publickey"]);
|
||||
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["serialno"]);
|
||||
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["certificate"]);
|
||||
if ($tseAnswer["usetse"] == DbUtils::$TSE_OK) {
|
||||
$logtime = $tseAnswer["logtime"];
|
||||
$trans = $tseAnswer["trans"];
|
||||
$sigcounter = $tseAnswer["sigcounter"];
|
||||
$tseSignature = $tseAnswer["signature"];
|
||||
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["sigalg"]);
|
||||
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["publickey"]);
|
||||
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["serialno"]);
|
||||
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseAnswer["certificate"]);
|
||||
}
|
||||
|
||||
$opid = Operations::createOperation(
|
||||
|
@ -311,7 +312,7 @@ class Bill {
|
|||
$serialNoRef,
|
||||
$certificateRef,
|
||||
$sigcounter,
|
||||
$status["usetse"]);
|
||||
$tseAnswer["usetse"]);
|
||||
|
||||
$sql = "UPDATE %bill% SET opid=?,logtime=? WHERE id=?";
|
||||
CommonUtils::execSql($pdo, $sql, array($opid,$logtime, $billid));
|
||||
|
@ -376,7 +377,7 @@ class Bill {
|
|||
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 );
|
||||
$thedate = $thetimedate_arr[0];
|
||||
$datearr = explode ( '-', $thedate );
|
||||
|
@ -396,6 +397,7 @@ class Bill {
|
|||
|
||||
$billoverallinfo = array(
|
||||
"id" => $billid,
|
||||
"billuid" => $billuid,
|
||||
"billdate" => $thetimedate,
|
||||
"billday" => $day,
|
||||
"billmonth" => $month,
|
||||
|
@ -426,6 +428,22 @@ class Bill {
|
|||
"template" => $masterData["template"],
|
||||
"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;
|
||||
}
|
||||
|
||||
|
@ -457,7 +475,8 @@ class Bill {
|
|||
$brutto = $result[0]['brutto'];
|
||||
$netto = $brutto;
|
||||
$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['cashtype'] = $result[0]['cashtype'];
|
||||
|
||||
|
@ -489,15 +508,15 @@ class Bill {
|
|||
$tableid = $row->tableid;
|
||||
if ($qrow->countid == 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 {
|
||||
$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 {
|
||||
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 {
|
||||
$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));
|
||||
|
@ -527,6 +546,8 @@ class Bill {
|
|||
$host = $row->host;
|
||||
}
|
||||
|
||||
$tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
|
||||
|
||||
$thetimedate = $row->billdate;
|
||||
$printextrasOfReceipt = $row->printextras;
|
||||
$billuid = $row->billuid;
|
||||
|
@ -539,7 +560,7 @@ class Bill {
|
|||
$overallBrutto = str_replace(".",$decpoint,$row->brutto);
|
||||
$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
|
||||
if (is_null($row->guestinfo)) {
|
||||
|
@ -551,12 +572,7 @@ class Bill {
|
|||
|
||||
// rem* PAYMENT INFO
|
||||
$col = "name";
|
||||
$language = $masterData["billlanguage"];
|
||||
if ($language == 1) {
|
||||
$col = "name_en";
|
||||
} else if ($language == 2) {
|
||||
$col = "name_esp";
|
||||
}
|
||||
|
||||
$paymentid = $row->paymentid;
|
||||
$sql = "SELECT $col FROM %payment% as name WHERE id=?";
|
||||
$paymentname = CommonUtils::getRowSqlObject($pdo, $sql, array($paymentid));
|
||||
|
@ -766,6 +782,7 @@ class Bill {
|
|||
echo json_encode(array("billoverallinfo" => array()));
|
||||
return;
|
||||
} else {
|
||||
$tseInfo = self::getTseInfoOfBill($pdo, $billid, self::$TSE_FORMAT_ASSOC_ARRAY);
|
||||
if (is_null($row->host)) {
|
||||
$host = 0; // default
|
||||
} else {
|
||||
|
@ -779,7 +796,10 @@ class Bill {
|
|||
$printExtras = true;
|
||||
}
|
||||
$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 (is_null($row->guestinfo)) {
|
||||
|
@ -864,13 +884,18 @@ class Bill {
|
|||
return $out;
|
||||
}
|
||||
|
||||
private static function getTseInfoOfBill($pdo,$billuid) {
|
||||
private static function getTseInfoOfBill($pdo,$billid,$tseFormat) {
|
||||
date_default_timezone_set(DbUtils::getTimeZone());
|
||||
|
||||
$sql = "SELECT id FROM %bill% WHERE billuid=? AND (status is null or status <> 'c')";
|
||||
$res = CommonUtils::fetchSqlAll($pdo, $sql, array($billuid));
|
||||
$billid = $res[0]["id"];
|
||||
$sql = "SELECT opid FROM %bill% WHERE id=?";
|
||||
$res = CommonUtils::fetchSqlAll($pdo, $sql, array($billid));
|
||||
$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";
|
||||
$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";
|
||||
|
@ -879,7 +904,7 @@ class Bill {
|
|||
$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";
|
||||
|
||||
$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 .= " WHERE B.id=?";
|
||||
|
||||
|
@ -888,15 +913,19 @@ class Bill {
|
|||
return "";
|
||||
}
|
||||
if (!isset($billProperties[0]["tsesignature"])) {
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
if ($billProperties[0]["tsestatus"] != 1) {
|
||||
return null;
|
||||
}
|
||||
$tseSignature = $billProperties[0]["tsesignature"];
|
||||
if (is_null($tseSignature) || ($tseSignature == "")) {
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
$qrCodeVersion = "V0";
|
||||
$serialNoOfPOS = CommonUtils::getConfigValue($pdo, 'sn', "ORD1");
|
||||
$tseserialno = $billProperties[0]["serialno"];
|
||||
$processType = "Kassenbeleg-V1";
|
||||
$processData = $billProperties[0]["signtxt"];
|
||||
$transNumber = $billProperties[0]["trans"];
|
||||
|
@ -913,6 +942,7 @@ class Bill {
|
|||
$startlogtime = self::getFirstLogTimeOfBill($pdo, $billid);
|
||||
}
|
||||
|
||||
if ($tseFormat == self::$TSE_FORMAT_QR_TEXT) {
|
||||
$tseInfo = array(
|
||||
$qrCodeVersion,
|
||||
$serialNoOfPOS,
|
||||
|
@ -929,6 +959,21 @@ class Bill {
|
|||
);
|
||||
|
||||
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) {
|
||||
|
@ -941,9 +986,9 @@ class Bill {
|
|||
return $startlogtime;
|
||||
}
|
||||
|
||||
public static function outputBillQrCode($billuid) {
|
||||
public static function outputBillQrCode($billid) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$tseInfo = self::getTseInfoOfBill($pdo, $billuid);
|
||||
$tseInfo = self::getTseInfoOfBill($pdo, $billid,self::$TSE_FORMAT_QR_TEXT);
|
||||
if (!is_null($tseInfo) && ($tseInfo != "")) {
|
||||
QRcode::png($tseInfo);
|
||||
} else {
|
||||
|
@ -972,7 +1017,8 @@ class Bill {
|
|||
$netto = $r["netto"];
|
||||
|
||||
$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"] = '';
|
||||
|
||||
$billtranslations = $this->createBillTranslations($language);
|
||||
|
@ -1074,8 +1120,7 @@ class Bill {
|
|||
$row =$stmt->fetchObject();
|
||||
}
|
||||
$sql = "UPDATE %bill% SET prevbrutto=?,prevnetto=? WHERE id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($row->brutto + $row->prevbrutto,$row->netto + $row->prevnetto,$lastId));
|
||||
CommonUtils::execSql($pdo, $sql, array($row->brutto + $row->prevbrutto,$row->netto + $row->prevnetto,$lastId));
|
||||
|
||||
$moneyTwoDigits = number_format($money, 2, '.', '');
|
||||
if (($cashtype == self::$CASHTYPE_Privateinlage["value"]) || ($cashtype == self::$CASHTYPE_Privatentnahme["value"])) {
|
||||
|
|
|
@ -30,7 +30,12 @@ return;
|
|||
|
||||
// user has manager rights
|
||||
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') {
|
||||
if (isset($_POST['remoteaccesscode'])) {
|
||||
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) {
|
||||
$status = TSE::sendFreeContentToTSE($pdo, $valueToSign);
|
||||
if ($status["status"] != "OK") {
|
||||
$tseanswer = TSE::sendFreeContentToTSE($pdo, $valueToSign);
|
||||
if ($tseanswer["status"] != "OK") {
|
||||
return(array("status" => "ERROR","msg" => "TSE-Signierung fehlgeschlagen. Vorgang konnte nicht ausgeführt werden."));
|
||||
} else {
|
||||
$logtime = 0;
|
||||
|
@ -1223,20 +1228,15 @@ $pubkeyRef = null;
|
|||
$sigalgRef = null;
|
||||
$sigcounter = 0;
|
||||
|
||||
if ($status["usetse"] == DbUtils::$TSE_OK) {
|
||||
$msgAsString = $status["msg"];
|
||||
$tseLog = json_decode($msgAsString, true);
|
||||
$logtime = $tseLog["logtime"];
|
||||
$trans = $tseLog["trans"];
|
||||
$sigcounter = $tseLog["sigcounter"];
|
||||
$tseSignature = $tseLog["signature"];
|
||||
$publicKey = $tseLog["publickey"];
|
||||
$tseCertificate = $tseLog["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"]);
|
||||
if ($tseanswer["usetse"] == DbUtils::$TSE_OK) {
|
||||
$logtime = $tseanswer["logtime"];
|
||||
$trans = $tseanswer["trans"];
|
||||
$sigcounter = $tseanswer["sigcounter"];
|
||||
$tseSignature = $tseanswer["signature"];
|
||||
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["sigalg"]);
|
||||
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["publickey"]);
|
||||
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["serialno"]);
|
||||
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseanswer["certificate"]);
|
||||
}
|
||||
|
||||
$opid = Operations::createOperation(
|
||||
|
@ -1252,7 +1252,7 @@ $sigalgRef,
|
|||
$serialNoRef,
|
||||
$certificateRef,
|
||||
$sigcounter,
|
||||
$status["usetse"]);
|
||||
$tseanswer["usetse"]);
|
||||
|
||||
$sql = "UPDATE %closing% SET opid=? WHERE id=?";
|
||||
CommonUtils::execSql($pdo, $sql, array($opid, $closingid));
|
||||
|
|
|
@ -655,10 +655,14 @@ class CommonUtils {
|
|||
$settingResult = CommonUtils::fetchSqlAll($pdo, $sql, array($theParamName,$thedatetime,$minDate));
|
||||
if ($theParamName == $templatename) {
|
||||
$out['template'] = $settingResult[0]["setting"];
|
||||
} else {
|
||||
if (count($settingResult) == 0) {
|
||||
$out[$theParamName] = null;
|
||||
} else {
|
||||
$out[$theParamName] = $settingResult[0]["setting"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
|
|
@ -892,7 +892,7 @@ class Customers {
|
|||
$txt = "<head>";
|
||||
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
|
||||
$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>";
|
||||
return $txt;
|
||||
}
|
||||
|
|
|
@ -58,6 +58,8 @@ class DbUtils {
|
|||
try {
|
||||
$pdo = new PDO($dsn, $user, $password);
|
||||
$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) {
|
||||
if ($doEchoError) {
|
||||
|
|
|
@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
|
|||
if (strlen($status) > 150) {
|
||||
$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);
|
||||
} else {
|
||||
|
@ -50,6 +50,6 @@ $opts = array(
|
|||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$ret = file_get_contents($url, false, $context);
|
||||
$ret = @file_get_contents($url, false, $context);
|
||||
|
||||
echo $ret;
|
||||
|
|
|
@ -128,13 +128,18 @@ class Guestsync {
|
|||
$permission = self::checkPermission($pdo, $tableid, $tablecode, $prodid, $dailycode);
|
||||
|
||||
if ($permission) {
|
||||
self::addToQueue($pdo,$date,$prodid,$tableid);
|
||||
$success = self::addToQueue($pdo,$date,$prodid,$tableid);
|
||||
if (!$success) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
echo $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) {
|
||||
|
@ -304,10 +309,14 @@ class Guestsync {
|
|||
$printjob = 1;
|
||||
}
|
||||
$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) {
|
||||
QueueContent::setFlagForCooking($pdo,$prodid);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@ require_once ('bill.php');
|
|||
require_once ('closing.php');
|
||||
require_once ('admin.php');
|
||||
|
||||
defined('LAST_REC_TEMPLATE') || define ( 'LAST_REC_TEMPLATE','0' );
|
||||
defined('NEED_PASS') || define ( 'NEED_PASS',true );
|
||||
|
||||
class PrintQueue {
|
||||
var $dbutils;
|
||||
var $userrights;
|
||||
|
@ -125,7 +128,7 @@ class PrintQueue {
|
|||
} else if ($command == 'deleteSpooledPrintJob') {
|
||||
$this->deleteSpooledPrintJob($_POST['id']);
|
||||
} else if ($command == 'reprintworkreceipt') {
|
||||
$this->reprintworkreceipt($_GET["workid"]);
|
||||
$this->reprintworkreceipt($_GET["id"]);
|
||||
} else {
|
||||
echo "Kommando nicht erkannt!";
|
||||
}
|
||||
|
@ -279,7 +282,8 @@ class PrintQueue {
|
|||
$printedWorkReceips = CommonUtils::fetchSqlAll($pdo, $sql);
|
||||
$printedWorkReceiptsInJson = array();
|
||||
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));
|
||||
|
@ -349,31 +353,13 @@ class PrintQueue {
|
|||
}
|
||||
}
|
||||
|
||||
function reprintworkreceipt($workid) {
|
||||
function reprintworkreceipt($printjobid) {
|
||||
if ($this->checkForUserRightManagerAdmin()) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
|
||||
if (is_null($workid)) {
|
||||
echo json_encode(array("status" => "ERROR","msg" => "Keine gültige ID angegeben!"));
|
||||
return;
|
||||
}
|
||||
|
||||
$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"]));
|
||||
CommonUtils::execSql($pdo, $sql, array(null,$printjobid));
|
||||
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) {
|
||||
$aBill = $bill->getBillWithIdAsTicket($pdo, $r["content"]);
|
||||
$template = $aBill["template"];
|
||||
|
||||
if (LAST_REC_TEMPLATE == 1) {
|
||||
$template = CommonUtils::getConfigValue($pdo, "rectemplate", $template);
|
||||
}
|
||||
|
||||
$osversion = $aBill["version"];
|
||||
$printer = $r["printer"];
|
||||
$label = DbUtils::$OSLABEL . "-" . DbUtils::$OSVERSLABEL;
|
||||
|
@ -834,7 +825,7 @@ class PrintQueue {
|
|||
private function getNextTicketJobs($md5pass,$printersizes,$fl) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
if ($isCorrect) {
|
||||
if ($isCorrect || !(NEED_PASS)) {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getTickets: fl=$fl");
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -221,9 +221,9 @@ class QueueContent {
|
|||
$unit = CommonUtils::caseOfSqlUnitSelection($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 {
|
||||
$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 .= "Q.toremove='0' AND ";
|
||||
|
@ -246,7 +246,7 @@ class QueueContent {
|
|||
|
||||
$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 .= "WHERE (readytime IS NULL AND ";
|
||||
$sql .= "Q.toremove='0' AND ";
|
||||
|
@ -532,7 +532,7 @@ class QueueContent {
|
|||
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));
|
||||
foreach($idArr as $id) {
|
||||
$stmt->execute(array($id));
|
||||
|
@ -675,9 +675,9 @@ class QueueContent {
|
|||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$unit = CommonUtils::caseOfSqlUnitSelection($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 {
|
||||
$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 .= "delivertime IS NULL AND ";
|
||||
|
@ -752,7 +752,7 @@ class QueueContent {
|
|||
|
||||
private function appendProdsForBarKitchenAndAutoDelivery($pdo,$kind,$resultarray) {
|
||||
$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 .= "LEFT JOIN %bill% b ON Q.billid=b.id ";
|
||||
|
||||
|
@ -1144,7 +1144,6 @@ class QueueContent {
|
|||
$doPrint = 1;
|
||||
}
|
||||
|
||||
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
|
||||
|
@ -1249,7 +1248,6 @@ class QueueContent {
|
|||
default:
|
||||
$configItem = "taxaustrianormal";
|
||||
}
|
||||
$tax = CommonUtils::getExistingConfigValue($pdo, $configItem);
|
||||
} else {
|
||||
$taxaustrianumber = null;
|
||||
}
|
||||
|
@ -1419,16 +1417,14 @@ class QueueContent {
|
|||
$serialNoRef = null;
|
||||
|
||||
if ($sentToTseResult["usetse"] == DbUtils::$TSE_OK) {
|
||||
$msgAsString = $sentToTseResult["msg"];
|
||||
$tseLog = json_decode($msgAsString, true);
|
||||
$logtime = $tseLog["logtime"];
|
||||
$trans = $tseLog["trans"];
|
||||
$sigcounter = $tseLog["sigcounter"];
|
||||
$tseSignature = $tseLog["signature"];
|
||||
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["sigalg"]);
|
||||
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["publickey"]);
|
||||
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["serialno"]);
|
||||
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $tseLog["certificate"]);
|
||||
$logtime = $sentToTseResult["logtime"];
|
||||
$trans = $sentToTseResult["trans"];
|
||||
$sigcounter = $sentToTseResult["sigcounter"];
|
||||
$tseSignature = $sentToTseResult["signature"];
|
||||
$sigalgRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["sigalg"]);
|
||||
$pubkeyRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["publickey"]);
|
||||
$serialNoRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["serialno"]);
|
||||
$certificateRef = CommonUtils::referenceValueInTseValuesTable($pdo, $sentToTseResult["certificate"]);
|
||||
}
|
||||
|
||||
$opid = Operations::createOperation(
|
||||
|
@ -1491,21 +1487,20 @@ class QueueContent {
|
|||
|
||||
date_default_timezone_set(DbUtils::getTimeZone());
|
||||
|
||||
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
|
||||
$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(?,?,?,?)";
|
||||
CommonUtils::execSql($pdo, $sql, array($ordertime,null,$theTableid,T_ORDER));
|
||||
$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;
|
||||
$theOption = '';
|
||||
$theChangedPrice = "NO";
|
||||
|
@ -1514,7 +1509,7 @@ class QueueContent {
|
|||
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
|
||||
if ($row == null) {
|
||||
echo "Fehler: Preise nicht vorhanden"; // error
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_null($row->amount)) {
|
||||
|
@ -1571,7 +1566,9 @@ class QueueContent {
|
|||
}
|
||||
$signStatus = self::signAtTSE($pdo, $tseEntries, array($queueid),false);
|
||||
if ($signStatus["status"] != "OK") {
|
||||
error_log("Signing guest order at TSE impossible. Ignore guest order");
|
||||
$pdo->rollBack();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1580,6 +1577,7 @@ class QueueContent {
|
|||
}
|
||||
|
||||
$pdo->commit();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1895,7 +1893,7 @@ class QueueContent {
|
|||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$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
|
||||
INNER JOIN %products% ON Q.productid = %products%.id
|
||||
INNER JOIN %pricelevel% ON Q.pricelevel = %pricelevel%.id
|
||||
|
@ -2289,7 +2287,6 @@ class QueueContent {
|
|||
CommonUtils::callPlugin($pdo, "createBill", "before");
|
||||
|
||||
if (!$calledInternally) {
|
||||
$pdo->exec('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
|
||||
$pdo->beginTransaction();
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ class Reservation {
|
|||
$txt = "<html><head>";
|
||||
$txt .= "<title>Reservierungsübersicht</title>";
|
||||
$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 .= "<body>";
|
||||
$txt .= "<h1>Reservierungsübersicht für $day.$month.$year</h1><p>";
|
||||
|
|
|
@ -638,7 +638,7 @@ class Roomtables {
|
|||
$txt = "<html><head>";
|
||||
$txt .= "<title>Tisch QR-Codes für die Gastbestellung</title>";
|
||||
$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 .= "<body>";
|
||||
$txt .= "<h1>Tisch QR-Codes für die Gastbestellung</h1><p>";
|
||||
|
|
|
@ -627,7 +627,7 @@ class Dsfinvk {
|
|||
$sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O ";
|
||||
$sql .= " INNER JOIN %queue% Q ON Q.opidok=O.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 .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse ";
|
||||
$sql .= " AND Q.toremove='0' ";
|
||||
|
@ -636,7 +636,7 @@ class Dsfinvk {
|
|||
$sql .= "SELECT " . implode(",",$sqlQueuetxt) . " from %operations% O ";
|
||||
$sql .= " INNER JOIN %queue% Q ON Q.opidcancel=O.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 .= " WHERE O.handledintable='$queueTableStore' AND O.tseerror <> $noTse ";
|
||||
$sql .= " AND Q.toremove='1' ";
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<?php
|
||||
|
||||
defined('LAYOUTER_HTML_MODE') || define ( 'LAYOUTER_HTML_MODE','0' );
|
||||
class ColProperty {
|
||||
public static $LEFT = 0;
|
||||
public static $RIGHT = 1;
|
||||
public static $CENTER = 2;
|
||||
public static $COMPLETE = 3;
|
||||
|
||||
public static $NORMAL = 0;
|
||||
public static $HIGH = 1;
|
||||
|
@ -68,6 +70,21 @@ class ColProperty {
|
|||
$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;
|
||||
if ($contentLength > $this->length) {
|
||||
$text = substr($text, 0, $this->length / $factor);
|
||||
|
@ -193,7 +210,7 @@ class TemplateTable {
|
|||
}
|
||||
}
|
||||
$roomToDistribute = $this->totalSpace - $colsTotalLength;
|
||||
$eachCol = intval($roomToDistribute / $colsWithUnSpecifiedLength);
|
||||
$eachCol = intval($roomToDistribute / max($colsWithUnSpecifiedLength,1));
|
||||
|
||||
$assignedCols = 0;
|
||||
foreach($this->cols as $aCol) {
|
||||
|
@ -261,8 +278,12 @@ class Layouter {
|
|||
$lines = explode("\n", $template);
|
||||
self::loop($lines,$data);
|
||||
|
||||
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) {
|
||||
|
||||
|
@ -280,7 +301,7 @@ class Layouter {
|
|||
if ($t != "") {
|
||||
$pos = stripos($t,'if:');
|
||||
if ($pos !== false) {
|
||||
if (($pos >= 0) && ($pos <= 5)) {
|
||||
if (($pos >= 0) && ($pos <= 7)) {
|
||||
$ifParts = explode(':',$t);
|
||||
$itemToCheck = $ifParts[1];
|
||||
$valueToCheck = $ifParts[2];
|
||||
|
@ -294,7 +315,7 @@ class Layouter {
|
|||
}
|
||||
$pos = stripos($t,'fi:');
|
||||
if ($pos !== false) {
|
||||
if (($pos >= 0) && ($pos <= 5)) {
|
||||
if (($pos >= 0) && ($pos <= 7)) {
|
||||
$endifParts = explode(':',$t);
|
||||
$itemToCheck = $endifParts[1];
|
||||
if ($itemToCheck == $skippinguntil) {
|
||||
|
@ -322,9 +343,9 @@ class Layouter {
|
|||
continue;
|
||||
}
|
||||
|
||||
$pos = stripos($t,'start');
|
||||
$pos = strpos($t,'START');
|
||||
if ($pos !== false) {
|
||||
if (($pos >= 0) && ($pos <= 5)) {
|
||||
if (($pos >= 0) && ($pos <= 7)) {
|
||||
$loopDeclParts = explode(':',$t);
|
||||
$marker = trim($loopDeclParts[1]);
|
||||
$loopLines = self::collectLinesOfLoop($lines,$linenumber+1,$marker);
|
||||
|
@ -400,7 +421,7 @@ class Layouter {
|
|||
private static function evalElem($elemContent, $dataline) {
|
||||
if (self::startsWith($elemContent, "TAB")){
|
||||
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")) {
|
||||
$vals = self::getCommaSeparatedValuesOfElem($elemContent);
|
||||
return array("bytes" => $vals,"html" => "", "linehascontent" => false,"typeofentry" => "bytes");
|
||||
|
@ -430,8 +451,8 @@ class Layouter {
|
|||
if (count($qrparts) > 1) {
|
||||
$scale = $qrparts[1];
|
||||
}
|
||||
$billuid = $dataline["id"];
|
||||
return array("bytes" => "2,$billuid,$scale","html" => "php/contenthandler.php?module=bill&command=billqrcode&billid=$billuid", "linehascontent" => true,"typeofentry" => "img");
|
||||
$billid = $dataline["id"];
|
||||
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")) {
|
||||
$parts = explode(':', $elemContent);
|
||||
$scale = 100;
|
||||
|
@ -496,13 +517,15 @@ class Layouter {
|
|||
$side = ColProperty::$RIGHT;
|
||||
} else if (($just == "mittig") || ($just == "center")) {
|
||||
$side = ColProperty::$CENTER;
|
||||
} else if (($just == "komplett") || ($just == "complete")) {
|
||||
$side = ColProperty::$COMPLETE;
|
||||
}
|
||||
}
|
||||
$label = "";
|
||||
$useColonAfterLabel = true;
|
||||
if (count($parts) > 2) {
|
||||
$label = $parts[2];
|
||||
if ($label[strlen[$label]-1] == " ") {
|
||||
if (($label != "") && ($label[strlen($label)-1] == " ")) {
|
||||
$useColonAfterLabel = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,23 @@ class Operations {
|
|||
// the signtxt is only for debug purposes. So cut it and show that it was cut
|
||||
$signtxt = substr($signtxt, 0, 117) . "...";
|
||||
}
|
||||
|
||||
// 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();
|
||||
return $opid;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class OsQrcode {
|
|||
readfile(__DIR__. '/../../img/oops.png');
|
||||
return;
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,8 @@ class Tse {
|
|||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
switch ($command) {
|
||||
case 'tsecmd':
|
||||
self::tsecmd($pdo,null);
|
||||
$jsonAnswer = self::tsecmd($pdo,null);
|
||||
echo json_encode($jsonAnswer);
|
||||
break;
|
||||
default:
|
||||
echo json_encode(array("status" => "ERROR", "msg" => "Command not supported"));
|
||||
|
@ -59,14 +60,12 @@ class Tse {
|
|||
);
|
||||
}
|
||||
private static function tsecmd($pdo,$request) {
|
||||
$calledInternally = true;
|
||||
if (is_null($request)) {
|
||||
if (!isset($_POST['request'])) {
|
||||
echo json_encode(array("status" => "ERROR","msg" => "No TSE request transmitted"));
|
||||
return;
|
||||
}
|
||||
$request = $_POST['request'];
|
||||
$calledInternally = false;
|
||||
}
|
||||
|
||||
$tseparams = self::getTseParams($pdo);
|
||||
|
@ -81,14 +80,8 @@ class Tse {
|
|||
|
||||
$data = json_encode($transferdata);
|
||||
$transferdataBase64 = base64_encode($data);
|
||||
//$transferdataBase64 = CommonUtils::base64_encode_url($data);
|
||||
|
||||
$tseanswer = self::sendToTSEConnector($tseparams['url'] . "/admin", $transferdataBase64,560);
|
||||
if ($calledInternally) {
|
||||
return $tseanswer;
|
||||
} else {
|
||||
echo json_encode($tseanswer);
|
||||
}
|
||||
return self::sendToTSEConnector($tseparams['url'] . "/admin", $transferdataBase64,560);
|
||||
}
|
||||
|
||||
private static function sendToTSEConnector($tseurl, $data,$timeout) {
|
||||
|
@ -109,13 +102,16 @@ class Tse {
|
|||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$ret = file_get_contents($tseurl, false, $context);
|
||||
|
||||
if (!$ret) {
|
||||
return array("status" => "ERROR","msg" => "Communication with TSEConnector not successful!");
|
||||
try {
|
||||
$ret = @file_get_contents($tseurl, false, $context);
|
||||
} catch (Exception $ex) {
|
||||
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) {
|
||||
|
@ -146,25 +142,12 @@ class Tse {
|
|||
$tseanswer = self::sendToTSEConnector($tseurl . "/sign", $transferdataBase64,560);
|
||||
if ($tseanswer["status"] == "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 {
|
||||
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
|
||||
}
|
||||
return $tseanswer;
|
||||
}
|
||||
|
||||
public static function sendNormalBillToTSE($pdo,$billValueToSign) {
|
||||
return self::sendValueToTseForSigning($pdo, $billValueToSign, "signnormalbill");
|
||||
}
|
||||
|
@ -179,23 +162,36 @@ class Tse {
|
|||
$useTse = CommonUtils::getConfigValue($pdo, 'usetse', 0);
|
||||
$tseurl = CommonUtils::getConfigValue($pdo, 'tseurl', "");
|
||||
if (($useTse == 0) || ($tseurl == "")) {
|
||||
return 1;
|
||||
return array("status" => "OK");
|
||||
} else {
|
||||
$tseanswer = self::sendToTSEConnector($tseurl . "/info?cmd=ping", "", 200);
|
||||
$tseparams = self::getTseParams($pdo);
|
||||
|
||||
$transferdata = array(
|
||||
"pass" => $tseparams['pass'],
|
||||
"pin" => $tseparams['pin'],
|
||||
"clientid" => $tseparams['clientid'],
|
||||
"cmd" => "check"
|
||||
);
|
||||
|
||||
$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") {
|
||||
$answer = $tseanswer["msg"];
|
||||
if ($answer == "WAITING") {
|
||||
self::tsecmd($pdo,"selftest");
|
||||
return 1;
|
||||
$tseanswer["usetse"] = DbUtils::$TSE_OK;
|
||||
} else {
|
||||
return 1;
|
||||
$tseanswer["usetse"] = DbUtils::$TSE_RUNTIME_ERROR;
|
||||
}
|
||||
return $tseanswer;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static function getClientIP()
|
||||
{
|
||||
|
|
|
@ -1569,6 +1569,19 @@ class Version {
|
|||
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(
|
||||
"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.2" => array("upd_2002_2003","2.0.3"),
|
||||
"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) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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.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" />
|
||||
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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" />
|
||||
<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="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">
|
||||
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
|
||||
</head>
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/3rdparty/orderstyle/jquery.mobile.icons.min.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.mobile-1.4.0.min.js"></script>
|
||||
<script src="utilities.js?v=2.0.5"></script>
|
||||
<script src="elements/product.js?v=2.0.5"></script>
|
||||
<script src="elements/extra.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<script src="elements/product.js?v=2.0.6"></script>
|
||||
<script src="elements/extra.js?v=2.0.6"></script>
|
||||
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
|
||||
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
|
||||
</head>
|
||||
|
@ -93,7 +93,7 @@ var PROD_EXTRA_COL_PRICE = ["Preis","Price","Precio"];
|
|||
var PROD_EXTRA_COL_MAXAMOUNT = ["Max. Anzahl","Max. amount","Max #"];
|
||||
|
||||
// this is the maximal price that a product may cost
|
||||
var MAX_PRICE = 999.99;
|
||||
var MAX_PRICE = 9999.99;
|
||||
|
||||
var decpoint = ".";
|
||||
var austria = 0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/tablepanel.css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/3rdparty/orderstyle/jquery.mobile.icons.min.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.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>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -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 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 += tseinfo;
|
||||
|
||||
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>";
|
||||
|
||||
|
@ -79,27 +81,40 @@ function generateProdPart(decPoint,entryListForReceipt) {
|
|||
/**
|
||||
* 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 overallinfo = billcontent.billoverallinfo;
|
||||
var billid = billentry.id;
|
||||
var billuid = billentry.billuid;
|
||||
|
||||
var overallinfo = billentry.billcontent.billoverallinfo;
|
||||
var companyInfo = overallinfo.companyinfo;
|
||||
var sn = overallinfo.sn;
|
||||
var uid = overallinfo.uid;
|
||||
var version = overallinfo.version;
|
||||
var systemid = overallinfo.systemid;
|
||||
var prods = billcontent.products;
|
||||
var prods = billentry.billcontent.products;
|
||||
|
||||
var username = overallinfo.username;
|
||||
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 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;
|
||||
if (overallinfo.host == 1) {
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/3rdparty/orderstyle/jquery.mobile.icons.min.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.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>
|
||||
</head>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
<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_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.",
|
||||
|
@ -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_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_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.",
|
||||
"This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs and guest bills.",
|
||||
"Esta table contiene todos las cajas incluyendo todas los tipos the pagamientos"];
|
||||
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 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.",
|
||||
"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_YESTERDAY = ["Gestern","Yesterday","Ayer"];
|
||||
var REP_HOUR = ["Uhrzeit","Time","Hora"];
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=2.0.5">
|
||||
<link rel="stylesheet" type="text/css" href="css/osdatepicker.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.6">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.mobile-1.4.5.min.js"></script>
|
||||
<script src="elements/tablemap.js"></script>
|
||||
<script src="elements/reservation.js?v=2.0.5"></script>
|
||||
<script src="elements/osdatepicker.js?v=2.0.5"></script>
|
||||
<script src="elements/reservation.js?v=2.0.6"></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" />
|
||||
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
||||
|
@ -627,7 +627,7 @@ function bindCancelButtn() {
|
|||
var year = date.getFullYear();
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<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.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>
|
||||
|
||||
<body>
|
||||
|
@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razó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 nextpage = "paydesk.html?version=2.0.5";
|
||||
var nextpage = "paydesk.html?version=2.0.6";
|
||||
|
||||
var lang;
|
||||
|
||||
|
@ -84,10 +84,10 @@ function setLanguage(language) {
|
|||
|
||||
if (nextPage == "p") {
|
||||
$("#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 {
|
||||
$("#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'>";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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" />
|
||||
<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="utilities.js?v=2.0.5"></script>
|
||||
<script src="utilities.js?v=2.0.6"></script>
|
||||
<style>
|
||||
|
||||
#tableWithPreparedProds,#tableWithDeliveredEntries,#headertableToCook
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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.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" />
|
||||
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/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.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" />
|
||||
<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
Loading…
Reference in New Issue