OrderSprinter 1.5.23

This commit is contained in:
Geno 2020-11-19 23:12:32 +01:00
parent 5eb3e702ed
commit 86c9d4cafd
37 changed files with 581 additions and 244 deletions

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.22" /> <link rel="stylesheet" href="css/gueststyle.css?v=1.5.23" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.22" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.23" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
@ -105,7 +105,7 @@
<div data-role="footer" data-theme="b" id="thefooter1"> <div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a"> <div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div> <div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.22&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">1.5.23&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
} else { } else {
echo "<html>"; echo "<html>";
echo "<head><title>Installation Gastsystem</title>"; echo "<head><title>Installation Gastsystem</title>";
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.22">'; echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.23">';
echo "</head>"; echo "</head>";
echo "<body><div class=surround>"; echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.22</span><br><br>"; echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.23</span><br><br>";
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />"; echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />";
echo "<br><input type=submit value='Installation starten' class=installbtn />"; echo "<br><input type=submit value='Installation starten' class=installbtn />";
echo "</form></div></html>"; echo "</form></div></html>";

Binary file not shown.

View File

@ -85,7 +85,7 @@ class Installer {
} }
Database::dropTables($pdo); Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix); Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.5.22"); Database::setVersion($pdo,$prefix,"1.5.23");
Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
return array("status" => "OK","msg" => "Installation successful"); return array("status" => "OK","msg" => "Installation successful");

Binary file not shown.

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.22"></script> <script src="utilities.js?v=1.5.23"></script>
<script src="kitchenbar.js?v=1.5.22"></script> <script src="kitchenbar.js?v=1.5.23"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.23">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -231,7 +231,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") { if (is_installed == "Yes") {
useInstallation(); useInstallation();
} else { } else {
setTimeout(function(){document.location.href = "install.html?v=1.5.22"},500); setTimeout(function(){document.location.href = "install.html?v=1.5.23"},500);
} }
} }

View File

@ -753,6 +753,7 @@ $(document).ready(function() {
protokolliert überdies die Uhrzeit, die IP-Nummer und den Browsertyp (User Agent) des anfragenden Rechners. protokolliert überdies die Uhrzeit, die IP-Nummer und den Browsertyp (User Agent) des anfragenden Rechners.
<li>Email-Benachrichtigungen: Tageserfassungen können an festgelegte und frei eingebbare E-Mail-Adressen verschickt werden. Im Gastmodul können Reservierungsbestätigungen an Gäste gemailt werden. Über das Feedbackformular können Anwender Nachrichten an den Anbieter verschicken und dabei den Umfang der Datenübermittlung festlegen. Der E-Mail-Dienst funktioniert nur, wenn die E-Mail-Konfiguration in der Verwaltungsansicht eingegeben wurde (Ausnahme: das Feedbackformular übermittelt die Nachrichten über http). <li>Email-Benachrichtigungen: Tageserfassungen können an festgelegte und frei eingebbare E-Mail-Adressen verschickt werden. Im Gastmodul können Reservierungsbestätigungen an Gäste gemailt werden. Über das Feedbackformular können Anwender Nachrichten an den Anbieter verschicken und dabei den Umfang der Datenübermittlung festlegen. Der E-Mail-Dienst funktioniert nur, wenn die E-Mail-Konfiguration in der Verwaltungsansicht eingegeben wurde (Ausnahme: das Feedbackformular übermittelt die Nachrichten über http).
<li>Automatische Erstellung einer Kundenwebseite, die sich aus der konfigurierten Speisekarte ergibt. <li>Automatische Erstellung einer Kundenwebseite, die sich aus der konfigurierten Speisekarte ergibt.
<li>Verwaltung aus der Ferne über die Komponente "OrderSprinter Spider"
<li>Falls ein Fehler auf der Serverseite passiert, wird ein Debugreport an www.ordersprinter.de übermittelt. Dieses dient nur der Verbesserung der Software. Folgende Informationen werden übermittelt: <li>Falls ein Fehler auf der Serverseite passiert, wird ein Debugreport an www.ordersprinter.de übermittelt. Dieses dient nur der Verbesserung der Software. Folgende Informationen werden übermittelt:
<ul> <ul>
<li>Die IP-Adresse der Instanz: Nur so kann ich auseinanderhalten, ob gesendete Fehler unabhängig voneinander aufgetreten sind, oder in Verbindung zueinander stehen. <li>Die IP-Adresse der Instanz: Nur so kann ich auseinanderhalten, ob gesendete Fehler unabhängig voneinander aufgetreten sind, oder in Verbindung zueinander stehen.
@ -771,6 +772,7 @@ $(document).ready(function() {
<li>Semi-automatic software updates: While working in the administration view, OrderSprinter checks by different triggers (e.g. page view, closing creation, configuration change) whether there is a newer version of the software than the installed one. If this is the case, a user with administration rights can update the version on the server by a simple button click within the administration view. As part of the version check, the server sends its own version and the installation date to the OrderSprinter page www.ordersprinter.de. The web server also logs the time, the IP number and the browser type (user agent) of the requesting computer. <li>Semi-automatic software updates: While working in the administration view, OrderSprinter checks by different triggers (e.g. page view, closing creation, configuration change) whether there is a newer version of the software than the installed one. If this is the case, a user with administration rights can update the version on the server by a simple button click within the administration view. As part of the version check, the server sends its own version and the installation date to the OrderSprinter page www.ordersprinter.de. The web server also logs the time, the IP number and the browser type (user agent) of the requesting computer.
<li>Email notifications: Daily reports can be sent to pre-selected and freely definable e-mail addresses. In the guest module reservation confirmations can be emailed to guests. The feedback form allows users to send messages to the provider and determine the scope of data transmission. The e-mail service only works if the e-mail configuration has been entered in the administration view (exception: the feedback form transmits the messages via http). <li>Email notifications: Daily reports can be sent to pre-selected and freely definable e-mail addresses. In the guest module reservation confirmations can be emailed to guests. The feedback form allows users to send messages to the provider and determine the scope of data transmission. The e-mail service only works if the e-mail configuration has been entered in the administration view (exception: the feedback form transmits the messages via http).
<li>Automatic creation of a customer website, which results from the configured menu. <li>Automatic creation of a customer website, which results from the configured menu.
<li>Managing from remote site with "OrderSprinter Spider"
<li>If an error occurs on the server side, a debug report is sent to www.ordersprinter.de. This serves only to improve the software. The following information will be provided: <li>If an error occurs on the server side, a debug report is sent to www.ordersprinter.de. This serves only to improve the software. The following information will be provided:
<ul> <ul>
<li>The IP address of the instance: Only in this way can I tell whether sent errors occurred independently of each other or are connected to each other. <li>The IP address of the instance: Only in this way can I tell whether sent errors occurred independently of each other or are connected to each other.
@ -789,6 +791,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<li>Actualizaciones semiautomáticas del software: Mientras se trabaja en la vista de administración, OrderSprinter comprueba mediante diferentes disparadores (por ejemplo, la vista de página, la creación de la programación diaria, el cambio de configuración) si existe una versión más reciente del software que la instalada. Si este es el caso, un usuario con derechos de administración puede actualizar la versión en el servidor con un simple clic de botón dentro de la vista de administración. Como parte de la comprobación de la versión, el servidor envía su propia versión y la fecha de instalación a la página de OrderSprinter www.ordersprinter.de. El servidor web también registra la hora, el número IP y el tipo de navegador (User Agent) del ordenador solicitante. <li>Actualizaciones semiautomáticas del software: Mientras se trabaja en la vista de administración, OrderSprinter comprueba mediante diferentes disparadores (por ejemplo, la vista de página, la creación de la programación diaria, el cambio de configuración) si existe una versión más reciente del software que la instalada. Si este es el caso, un usuario con derechos de administración puede actualizar la versión en el servidor con un simple clic de botón dentro de la vista de administración. Como parte de la comprobación de la versión, el servidor envía su propia versión y la fecha de instalación a la página de OrderSprinter www.ordersprinter.de. El servidor web también registra la hora, el número IP y el tipo de navegador (User Agent) del ordenador solicitante.
<li>Notificaciones por correo electrónico: Los informes diarios se pueden enviar a direcciones de correo electrónico definidas y libremente definibles. En el módulo de huéspedes las confirmaciones de reserva pueden ser enviadas por correo electrónico a los huéspedes. El formulario de feedback permite a los usuarios enviar mensajes al proveedor y determinar el alcance de la transmisión de datos. El servicio de correo electrónico sólo funciona si la configuración de correo electrónico se ha introducido en la vista de administración (excepción: el formulario de feedback transmite los mensajes a través de http). <li>Notificaciones por correo electrónico: Los informes diarios se pueden enviar a direcciones de correo electrónico definidas y libremente definibles. En el módulo de huéspedes las confirmaciones de reserva pueden ser enviadas por correo electrónico a los huéspedes. El formulario de feedback permite a los usuarios enviar mensajes al proveedor y determinar el alcance de la transmisión de datos. El servicio de correo electrónico sólo funciona si la configuración de correo electrónico se ha introducido en la vista de administración (excepción: el formulario de feedback transmite los mensajes a través de http).
<li>Creación automática de un sitio web para el cliente, que resulta del menú configurado. <li>Creación automática de un sitio web para el cliente, que resulta del menú configurado.
<li>Administración por "OrderSprinter Spider" a distancia.
<li>Si se produce un error en el lado del servidor, se envía un informe de depuración a www.ordersprinter.de. Esto sólo sirve para mejorar el software. Se proporcionará la siguiente información: <li>Si se produce un error en el lado del servidor, se envía un informe de depuración a www.ordersprinter.de. Esto sólo sirve para mejorar el software. Se proporcionará la siguiente información:
<ul> <ul>
<li>La dirección IP de la instancia: Sólo de esta manera puedo saber si los errores enviados se produjeron independientemente uno del otro o si están conectados entre sí. <li>La dirección IP de la instancia: Sólo de esta manera puedo saber si los errores enviados se produjeron independientemente uno del otro o si están conectados entre sí.
@ -909,7 +912,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.5.22</button> <button id="updatebtn">Update -> 1.5.23</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -389,7 +389,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
set_time_limit(60*30); set_time_limit(60*30);
$installerVersion = "1.5.22"; $installerVersion = "1.5.23";
$admin = new InstallAdmin(); $admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.22"></script> <script src="utilities.js?v=1.5.23"></script>
<script src="kitchenbar.js?v=1.5.22"></script> <script src="kitchenbar.js?v=1.5.23"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,10 +13,10 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" /> <link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.22"></script> <script src="utilities.js?v=1.5.23"></script>
<script src="elements/tablemap.js?v=1.5.22"></script> <script src="elements/tablemap.js?v=1.5.23"></script>
<script src="elements/roommap.js?v=1.5.22"></script> <script src="elements/roommap.js?v=1.5.23"></script>
<script src="elements/groundplan.js?v=1.5.22"></script> <script src="elements/groundplan.js?v=1.5.23"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -138,8 +138,8 @@ var MAN_CHANGE = ["Speichern","Save Changes","guardar cambios"];
var MAN_CONFIG_CHANGED = ["Konfiguration geändert","Configuration saved","Configuración modificado"]; var MAN_CONFIG_CHANGED = ["Konfiguration geändert","Configuration saved","Configuración modificado"];
var MAN_CONFIG_CHANGE_ERROR = ["Falsches Zahlenformat oder Serverproblem","Error","Error"]; var MAN_CONFIG_CHANGE_ERROR = ["Falsches Zahlenformat oder Serverproblem","Error","Error"];
var MAN_DATEXPDETTXT = ["Hier können Sie eine csv-Datei erzeugen lassen, die <ul><li>alle abgerechneten und in Tagesabschlüssen enthaltenen Bonabrechungen im unten auswählbaren Zeitraum beinhaltet.</li><li>alle Stammdaten (Produkte) und deren Änderungen seit der Installation aufführt.</li></ul>", var MAN_DATEXPDETTXT = ["Hier können Sie Berichte erstellen lassen, die <ul><li>alle abgerechneten und in Tagesabschlüssen enthaltenen Bonabrechungen im unten auswählbaren Zeitraum beinhaltet.</li><li>alle Stammdaten (Produkte) und deren Änderungen seit der Installation aufführt.</li><li>und vieles mehr</li></ul>",
"In this control field you can create a csv file with <ul><li>all receipts transactions of the specified period that are part of a closing.</li><li>all product data and their changes in history since the installation.</li></ul>", "In this control field you can create varios reports with e.g.<ul><li>all receipts transactions of the specified period that are part of a closing.</li><li>all product data and their changes in history since the installation.</li><li>and much more</li></ul>",
"En esta parte se puede crear un fichero con <ul><li>todos los tiques en un período que estan ya cerrados.</li><li>todos los productos y sus modificaciones desde la instalación."]; "En esta parte se puede crear un fichero con <ul><li>todos los tiques en un período que estan ya cerrados.</li><li>todos los productos y sus modificaciones desde la instalación."];
var MAN_ROOM_LABEL = ["Räume","Rooms","Espacios"]; var MAN_ROOM_LABEL = ["Räume","Rooms","Espacios"];
var MAN_TABLE_LABEL = ["Tische","Tables","Mesas"]; var MAN_TABLE_LABEL = ["Tische","Tables","Mesas"];
@ -458,6 +458,15 @@ var MAN_DAYNAMES = [
["Samstag","Saturday","Sábado"], ["Samstag","Saturday","Sábado"],
["Sonntag","Sunday","Domingo"] ["Sonntag","Sunday","Domingo"]
]; ];
var MAN_DAYNAMES_START_SUNDAY = [
["Sonntag","Sunday","Domingo"],
["Montag","Monday","Lunes"],
["Dienstag","Tuesday","Martes"],
["Mittwoch","Wednesday","Miércoles"],
["Donnerstag","Thursday","Jueves"],
["Freitag","Friday","Viernes"],
["Samstag","Saturday","Sábado"]
];
var MAN_CATEGORY = ["Kategorie","Category","Categoria"]; var MAN_CATEGORY = ["Kategorie","Category","Categoria"];
var MAN_FOOD_CAT = ["Speisen","Food","Comidas"]; var MAN_FOOD_CAT = ["Speisen","Food","Comidas"];
var MAN_DRINKS_CAT = ["Getränke","Drinks","Bebidas"]; var MAN_DRINKS_CAT = ["Getränke","Drinks","Bebidas"];
@ -477,6 +486,15 @@ var MAN_SHOWPICKHELP = ["Zeige Hilfebereich","Show help area","Mostrar area de a
var MAN_NO_NEW_UPD_VERSION = ["Update nicht möglich (Version auf dem Server ist unbekannt oder nicht neuer). Installierte Version: ","Update not possible (version on server unknown or not newer). Installed version: ","Actualización no posible (versión en servidor desconocida o no más nueva). Versión instalada: "]; var MAN_NO_NEW_UPD_VERSION = ["Update nicht möglich (Version auf dem Server ist unbekannt oder nicht neuer). Installierte Version: ","Update not possible (version on server unknown or not newer). Installed version: ","Actualización no posible (versión en servidor desconocida o no más nueva). Versión instalada: "];
var MAN_UPDATE_BTN_CLICK = ["Das Update startet und kann einige Minuten dauern. Bitte bestätigen diese Meldung und warten Sie, bis dass ein Hinweistext über den Abschluss des Updates informiert.","The update will start and may take a few minutes. Please confirm this message and wait until a message informs you that the update is complete.","La actualización se iniciará y puede tardar unos minutos. Confirme este mensaje y espere a que un mensaje le informe de que la actualización ha finalizado."]; var MAN_UPDATE_BTN_CLICK = ["Das Update startet und kann einige Minuten dauern. Bitte bestätigen diese Meldung und warten Sie, bis dass ein Hinweistext über den Abschluss des Updates informiert.","The update will start and may take a few minutes. Please confirm this message and wait until a message informs you that the update is complete.","La actualización se iniciará y puede tardar unos minutos. Confirme este mensaje y espere a que un mensaje le informe de que la actualización ha finalizado."];
var MAN_PLEASE_WAIT = ["Die Erstellung von Umsatzreports kann mehrere Minuten dauern. Bitte haben Sie nach dem Anklicken eines Umsatzexportbuttons etwas Geduld.","The creation of sales reports may take several minutes. Please be patient after clicking on a report button.","La creación de informes de ventas puede tardar varios minutos. Por favor, tenga paciencia después de hacer clic en un botón de ventas."]; var MAN_PLEASE_WAIT = ["Die Erstellung von Umsatzreports kann mehrere Minuten dauern. Bitte haben Sie nach dem Anklicken eines Umsatzexportbuttons etwas Geduld.","The creation of sales reports may take several minutes. Please be patient after clicking on a report button.","La creación de informes de ventas puede tardar varios minutos. Por favor, tenga paciencia después de hacer clic en un botón de ventas."];
var MAN_NO_VALUE = ["Kein Eintrag vorhanden","No entry available","No hay ningun data"];
var MAN_INVALID_CLOS_PERIOD = ["IDs der ersten oder letzten Tageserfassung nicht festgelegt","ID of the first or last closing not set","ID de la primera o última cerrada no fijado"];
var MAN_PDFREPORTS = ["PDF-Berichte","PDF Reports","PDF Reports"];
var MAN_CONFIGREPORTS = ["Export der Kassenprogrammierung","Export of POS programming","Export Historia"];
var MAN_RUN_DATA = ["Andere Verlaufsdaten","Other runtime data","Otra data"];
var MAN_START_END_HINT = ["Start- und Enddatum dienen zur zeitlichen Eingrenzung der csv/Excel-Umsatzexports und Zeiterfassungsberichte und auch zur Vorauswahl der Tageserfassungen für die PDF-Berichte.","The start and end dates are used for limitation of the csv/Excel sales reports and the work time reports, as well as for preselection of the closings for the pdf reports.","La mes y año sirven para limitar unos exportes y para prellenar la seleccion de cerradas para los PDF exports."];
var MAN_1ST_CLOSING = ["Erste Tageserfassung","First closing","Cerrada primera"];
var MAN_LAST_CLOSING = ["Letzte Tageserfassung","Last closing","Cerrada última"];
var MAN_PDF_REPORT_HINT = ["Erste und letzte Tageserfassung des Reports nach Eingrenzung des Datumsbereich (oben) auswählen:","Choose first and last closing after limit the time frame (above):","Seleccione la cerrada primera y última después de delimitar el intervalo de fechas (arriba):"];
var lang = 0; var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1,2,0, 0,0,1]; var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1,2,0, 0,0,1];
@ -825,6 +843,13 @@ function setLanguage(l) {
$("#guestjobprinthint").html(MAN_GUEST_JOB_PRINT_HINT[l]); $("#guestjobprinthint").html(MAN_GUEST_JOB_PRINT_HINT[l]);
$("#csvexportallhint").html(MAN_PLEASE_WAIT[l]); $("#csvexportallhint").html(MAN_PLEASE_WAIT[l]);
$("#pdfexporthinthint").html(MAN_PLEASE_WAIT[l]);
$("#pdfsectiondivheader").html(MAN_PDFREPORTS[l]);
$("#exportconfigreportsdivheader").html(MAN_CONFIGREPORTS[l]);
$("#otherrundatadivheader").html(MAN_RUN_DATA[l]);
$("#datesstartendhint").html(MAN_START_END_HINT[l]);
$("#pdfreporthint").html(MAN_PDF_REPORT_HINT[l]);
} }
function createMonthSelection(label) { function createMonthSelection(label) {
@ -1566,7 +1591,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.5.22"; document.location.href = "index.html?v=1.5.23";
},250); },250);
} }
}, },
@ -1758,7 +1783,89 @@ function bindingRolesPart() {
}); });
} }
function updateStartClosingForSales() {
var data = {
month: $("#select-month-export-start").find(":selected").val(),
year: $("#select-year-export-start").find(":selected").val()
};
getClosingsOfMonthYearStart(data);
}
function updateEndClosingForSales() {
var data = {
month: $("#select-month-export-end").find(":selected").val(),
year: $("#select-year-export-end").find(":selected").val()
}
getClosingsOfMonthYearEnd(data);
}
function getClosingsOfMonthYearStart(data) {
doAjax("GET","php/contenthandler.php?module=closing&command=getClosingsListOfMonthYear",data, fillClosingSelBoxStart,null,true);
}
function getClosingsOfMonthYearEnd(data) {
doAjax("GET","php/contenthandler.php?module=closing&command=getClosingsListOfMonthYear",data, fillClosingSelBoxEnd,null,true);
}
function getDayName(dayOfWeek) {
return MAN_DAYNAMES_START_SUNDAY[dayOfWeek][lang];
}
function fillClosingSelBoxStart(answer) {
fillClosingSelBox(answer,"closselstart","#closselstartdiv",MAN_1ST_CLOSING[lang],false);
}
function fillClosingSelBoxEnd(answer) {
fillClosingSelBox(answer,"closselend","#closselenddiv",MAN_LAST_CLOSING[lang],true);
}
function fillClosingSelBox(answer,selid,divid,labeltxt,lastEntryPreset) {
if (answer.status != "OK") {
return;
}
var txt = '<div class="ui-field-contain"><label for="' + selid + '">' + labeltxt + ':</label>';
txt += "<select id='" + selid + "' data-theme='e'>";
var closings = answer.msg;
if (closings.length == 0) {
txt += "<option value='-1'>" + MAN_NO_VALUE[lang] + "</option>";
} else {
var i=0;
var entryToSelect = 0;
if (lastEntryPreset) {
entryToSelect = closings.length - 1;
}
closings.forEach(function(aClosing) {
var selectTxt = "";
if (i == entryToSelect) {
selectTxt = " selected ";
}
txt += "<option value='" + aClosing.id + "' " + selectTxt + ">" + aClosing.id + ": " + getDayName(aClosing.dayofweek) + " " + aClosing.closdate;
if (aClosing.remark != "") {
txt += " (" + toHtml(aClosing.remark) + ")";
}
txt += "</option>";
i++;
});
}
txt += "</select>";
$(divid).html(txt);
$(divid).trigger("create");
}
function updateStartAndEndClosingSelectionForSalesReport() {
updateStartClosingForSales();
updateEndClosingForSales();
}
function bindingExports() { function bindingExports() {
$("#select-month-export-start").change(function() {
updateStartClosingForSales();
});
$("#select-year-export-start").change(function() {
updateStartClosingForSales();
});
$("#select-month-export-end").change(function() {
updateEndClosingForSales();
});
$("#select-year-export-end").change(function() {
updateEndClosingForSales();
});
$(".exportbtn").off("click").on("click", function (e) { $(".exportbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
@ -1775,7 +1882,17 @@ function bindingExports() {
dateparams += "endMonth=" + selectedMonthEnd + "&"; dateparams += "endMonth=" + selectedMonthEnd + "&";
dateparams += "endYear=" + selectedYearEnd; dateparams += "endYear=" + selectedYearEnd;
var closidperiod = getClosingsPeriod();
var theId = this.id; var theId = this.id;
if ((theId == "createpdfexport") || (theId == "createpdfsummary")) {
if (!closidperiod.status) {
alert(MAN_INVALID_CLOS_PERIOD[lang]);
return;
}
}
var closperiod = closidperiod.period;
if (theId == "createprodexport") { if (theId == "createprodexport") {
window.location.href = "php/contenthandler.php?module=products&command=exportCsv"; window.location.href = "php/contenthandler.php?module=products&command=exportCsv";
} else if (theId == "createuserexport") { } else if (theId == "createuserexport") {
@ -1787,9 +1904,9 @@ function bindingExports() {
} else if (theId == "createdbexportxlsx") { } else if (theId == "createdbexportxlsx") {
window.location.href = "php/contenthandler.php?module=bill&command=exportAllExcel&" + dateparams; window.location.href = "php/contenthandler.php?module=bill&command=exportAllExcel&" + dateparams;
} else if (theId == "createpdfexport") { } else if (theId == "createpdfexport") {
window.open("php/contenthandler.php?module=bill&command=exportPdfReport&" + dateparams,'_blank'); window.open("php/contenthandler.php?module=bill&command=exportPdfReportClosPeriod&" + closperiod,'_blank');
} else if (theId == "createpdfsummary") { } else if (theId == "createpdfsummary") {
window.open("php/contenthandler.php?module=bill&command=exportPdfSummary&" + dateparams,'_blank'); window.open("php/contenthandler.php?module=bill&command=exportPdfSummaryClosPeriod&" + closperiod,'_blank');
} else if (theId == "createlogexport") { } else if (theId == "createlogexport") {
window.open("php/contenthandler.php?module=admin&command=exportLog",'_blank'); window.open("php/contenthandler.php?module=admin&command=exportLog",'_blank');
} else if (theId == "createtimesexport") { } else if (theId == "createtimesexport") {
@ -1799,6 +1916,17 @@ function bindingExports() {
} }
function getClosingsPeriod() {
var closidstart = $("#closselstart").val();
var closidend = $("#closselend").val();
if ((closidstart < 0) || (closidend < 0)) {
return {status: false, period: ""};
} else {
var closperiod = "closidstart=" + closidstart + "&closidend=" + closidend;
return {status: true, period: closperiod};
}
}
function bindingMenu() { function bindingMenu() {
$("#readspeisekarte").off("click").on("click", function (e) { $("#readspeisekarte").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
@ -2134,7 +2262,7 @@ function updateOneSingleFile() {
setTimeout(function(){ setTimeout(function(){
$("#sliderarea").hide(); $("#sliderarea").hide();
var millis=getMillis(); var millis=getMillis();
document.location.href = "install.html?v=1.5.22&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.5.23&mode=onlyupdate&n=" + millis;
},250); },250);
} }
} }
@ -3275,6 +3403,8 @@ function setMonthYearSelection() {
$("#select-month-export-end").selectmenu("refresh", true); $("#select-month-export-end").selectmenu("refresh", true);
$("#select-year-export-end").selectmenu("refresh", true); $("#select-year-export-end").selectmenu("refresh", true);
updateStartAndEndClosingSelectionForSalesReport();
} }
@ -3547,18 +3677,30 @@ $(document).on("pageinit", "#admin-page", function () {
</div> </div>
</div> </div>
<div class="ui-grid-a" class="noprint"> <i id="datesstartendhint" style="padding-left: 50px;padding-right: 50px;">Hinweis Start-Ende-Datum</i>
<div class="ui-grid-a noprint">
<div class="ui-block-a"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexport">Export Umsätze CSV</button></div> <div class="ui-block-a"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexport">Export Umsätze CSV</button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexportxlsx">... Excel</button></div> <div class="ui-block-b"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexportxlsx">... Excel</button></div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
<i id="csvexportallhint" style="padding-left: 50px;padding-right: 50px;">Bitte warten nach Klick</i> <i id="csvexportallhint" style="padding-left: 50px;padding-right: 50px;">Bitte warten nach Klick</i>
<hr />
<div id="pdfsectiondivheader" class="headertext">Berichte</div>
<p><i id="pdfreporthint" style="padding-left: 50px;padding-right: 50px;">Bitte zuvor Datumsbereich auswählen</i>
<div id="closselstartdiv"></div>
<div id="closselenddiv"></div>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfexport">PDF-Umsatzbericht</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfexport">PDF-Umsatzbericht</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfsummary">PDF-Zusammenfassung</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfsummary">PDF-Zusammenfassung</button>
<i id="pdfexporthinthint" style="padding-left: 50px;padding-right: 50px;">Bitte warten nach Klick</i>
<hr />
<div id="exportconfigreportsdivheader" class="headertext">Export Programmierung</div>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createprodexport">Export Produktdaten</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createprodexport">Export Produktdaten</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createuserexport">Export Benutzerdaten</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createuserexport">Export Benutzerdaten</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createconfigexport">Export Konfiguration</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createconfigexport">Export Konfiguration</button>
<div id="otherrundatadivheader" class="headertext">Verlaufsdaten</div>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createtimesexport">Export Zeiterfassung</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createtimesexport">Export Zeiterfassung</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createlogexport">Export Log</button> <button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createlogexport">Export Log</button>
</form> </form>
@ -4298,7 +4440,7 @@ $(document).on("pageinit", "#admin-page", function () {
<form id="tablemapimgform" enctype="multipart/form-data" method="POST" data-ajax="false"> <form id="tablemapimgform" enctype="multipart/form-data" method="POST" data-ajax="false">
<input name="tmimgfile" id="tmimgfile" type="file" /> <input name="tmimgfile" id="tmimgfile" type="file" />
<div class="ui-grid-a" class="noprint"> <div class="ui-grid-a noprint">
<div class="ui-block-a"><button type="submit" data-theme="f" id="tmimgbtn"><span id=tmimgbtntxt>Laden</span></button></div> <div class="ui-block-a"><button type="submit" data-theme="f" id="tmimgbtn"><span id=tmimgbtntxt>Laden</span></button></div>
<div class="ui-block-b grid_right"><button type="submit" data-theme="d" id="tmimgdelbtn"><span id=tmimgdelbtntxt>Löschen</span></button></div> <div class="ui-block-b grid_right"><button type="submit" data-theme="d" id="tmimgdelbtn"><span id=tmimgdelbtntxt>Löschen</span></button></div>
</div><!-- /grid-a --> </div><!-- /grid-a -->

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -1411,7 +1411,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.5.22"); echo json_encode($view . "?v=1.5.23");
} }
} }
@ -1616,6 +1616,11 @@ class Admin {
$dashtxt = array("Dashboard","Dashboard","Dashboard"); $dashtxt = array("Dashboard","Dashboard","Dashboard");
$logout = array("Abmelden","Log out","Adios"); $logout = array("Abmelden","Log out","Adios");
$restmode = CommonUtils::getConfigValue($pdo, "restaurantmode", 0);
if ($restmode == 0) {
$waiterdesktxt = array("Bestellung/Kasse","Orderdesk/Paydesk","Camarero");
}
$rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'], $rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'],
$_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'], $_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'],
$_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'], $_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'],
@ -1627,31 +1632,31 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.22"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.23"); }
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.22"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.23"); }
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.22"); } if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.23"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.22"); } if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.23"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.22"); } if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.23"); }
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.22"); } if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.23"); }
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.22"); } if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.23"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.22"); } if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.23"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.22"); } if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.23"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.22"); } if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.23"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.22"); } if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.23"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.22"); } if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.23"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.22"); } if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.23"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.22"); } if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.23"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.22"); } if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.23"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.22"); } if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.23"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.22"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.23");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.22"); } if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.23"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.22"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.23");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.22"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.23");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -2834,6 +2839,7 @@ class Admin {
$filenames = array(); $filenames = array();
foreach($tables as $table) { foreach($tables as $table) {
set_time_limit(60*60);
$sql = "DESCRIBE `%$table%`"; $sql = "DESCRIBE `%$table%`";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(); $stmt->execute();
@ -3372,6 +3378,7 @@ class Admin {
try { try {
$billprodref_fk = self::getForeignKeyName($pdo, 'billproducts', 'bill', MYSQL_DB); $billprodref_fk = self::getForeignKeyName($pdo, 'billproducts', 'bill', MYSQL_DB);
$queuebillref_fk = self::getForeignKeyName($pdo, 'queue', 'bill', MYSQL_DB); $queuebillref_fk = self::getForeignKeyName($pdo, 'queue', 'bill', MYSQL_DB);
$queueclosingref_fk = self::getForeignKeyName($pdo, 'queue', 'closing', MYSQL_DB);
$billclosingref_fk = self::getForeignKeyName($pdo, 'bill', 'closing', MYSQL_DB); $billclosingref_fk = self::getForeignKeyName($pdo, 'bill', 'closing', MYSQL_DB);
$billbillref_fk = self::getForeignKeyName($pdo, 'bill', 'bill', MYSQL_DB); $billbillref_fk = self::getForeignKeyName($pdo, 'bill', 'bill', MYSQL_DB);
$cuslogbillref_fk = self::getForeignKeyName($pdo, 'customerlog', 'bill', MYSQL_DB); $cuslogbillref_fk = self::getForeignKeyName($pdo, 'customerlog', 'bill', MYSQL_DB);
@ -3437,6 +3444,7 @@ class Admin {
self::doSql($pdo, "alter table %customerlog% drop foreign key $cuslogbillref_fk", null); self::doSql($pdo, "alter table %customerlog% drop foreign key $cuslogbillref_fk", null);
self::doSql($pdo, "alter table %billproducts% drop foreign key $billprodref_fk", null); self::doSql($pdo, "alter table %billproducts% drop foreign key $billprodref_fk", null);
self::doSql($pdo, "alter table %queue% drop foreign key $queuebillref_fk", null); self::doSql($pdo, "alter table %queue% drop foreign key $queuebillref_fk", null);
self::doSql($pdo, "alter table %queue% drop foreign key $queueclosingref_fk", null);
self::doSql($pdo, "ALTER TABLE %bill% DROP id", null); self::doSql($pdo, "ALTER TABLE %bill% DROP id", null);
self::doSql($pdo, "ALTER TABLE %bill% ADD id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST", null); self::doSql($pdo, "ALTER TABLE %bill% ADD id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST", null);
self::doSql($pdo, "ALTER TABLE %bill% ADD CONSTRAINT $billbillref_fk FOREIGN KEY (ref) REFERENCES %bill%(id)", null); self::doSql($pdo, "ALTER TABLE %bill% ADD CONSTRAINT $billbillref_fk FOREIGN KEY (ref) REFERENCES %bill%(id)", null);
@ -3447,6 +3455,7 @@ class Admin {
self::doSql($pdo, "ALTER TABLE %closing% DROP id", null); self::doSql($pdo, "ALTER TABLE %closing% DROP id", null);
self::doSql($pdo, "ALTER TABLE %closing% ADD id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST", null); self::doSql($pdo, "ALTER TABLE %closing% ADD id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST", null);
self::doSql($pdo, "ALTER TABLE %bill% ADD CONSTRAINT $billclosingref_fk FOREIGN KEY (closingid) REFERENCES %closing%(id)", null); self::doSql($pdo, "ALTER TABLE %bill% ADD CONSTRAINT $billclosingref_fk FOREIGN KEY (closingid) REFERENCES %closing%(id)", null);
self::doSql($pdo, "ALTER TABLE %queue% ADD CONSTRAINT $queueclosingref_fk FOREIGN KEY (clsid) REFERENCES %closing%(id)", null);
$basedb = new Basedb(); $basedb = new Basedb();
$basedb->setPrefix(TAB_PREFIX); $basedb->setPrefix(TAB_PREFIX);
@ -3464,6 +3473,11 @@ class Admin {
self::doSql($pdo, "DELETE FROM %vacations%", null); self::doSql($pdo, "DELETE FROM %vacations%", null);
self::doSql($pdo, "DELETE FROM `%groups%`", null); self::doSql($pdo, "DELETE FROM `%groups%`", null);
self::doSql($pdo, "DELETE FROM %customers%", null); self::doSql($pdo, "DELETE FROM %customers%", null);
self::doSql($pdo, "DELETE FROM %work% WHERE item='lastclosing'", null);
self::doSql($pdo, "UPDATE %work% SET value='0' WHERE item='newfoodtocook'", null);
self::doSql($pdo, "UPDATE %work% SET value='0' WHERE item='newdrinktocook'", null);
self::doSql($pdo, "UPDATE %work% SET value='0' WHERE item='indexunclosedqueue'", null);
Workreceipts::resetWorkReceiptId($pdo); Workreceipts::resetWorkReceiptId($pdo);
echo json_encode(array("status" => "OK")); echo json_encode(array("status" => "OK"));

View File

@ -28,58 +28,62 @@ class Bill {
private $P_DESCR = array("Beschreibung","Description","Descripción"); private $P_DESCR = array("Beschreibung","Description","Descripción");
private $P_PRICE = array("Preis","Price","Precio"); private $P_PRICE = array("Preis","Price","Precio");
private static $daynamesStartSunday = array(
array("Sonntag","Sunday","Domingo"),
array("Montag","Monday","Lunes"),
array("Dienstag","Tuesday","Martes"),
array("Mittwoch","Wednesday","Miércoles"),
array("Donnerstag","Thursday","Jueves"),
array("Freitag","Friday","Viernes"),
array("Samstag","Saturday","Sábado")
);
function __construct() { function __construct() {
$this->dbutils = new DbUtils(); $this->dbutils = new DbUtils();
require_once 'translations.php'; require_once 'translations.php';
} }
function handleCommand($command) { function handleCommand($command) {
if ($command == 'exportCsv') { $cmdsThatNeedAdminOrManagerRights = array('exportCsv','exportAllCsv','exportAllExcel','exportXlsx','exportPdfReport','exportPdfReportClosPeriod',
if ($this->hasCurrentUserAdminOrManagerRights()) { 'exportPdfSummary','exportPdfSummaryClosPeriod');
$this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_CSV); if (in_array($command, $cmdsThatNeedAdminOrManagerRights)) {
} else { if (!$this->hasCurrentUserAdminOrManagerRights()) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG)); echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
return;
} }
}
if ($command == 'exportCsv') {
$this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_CSV);
return; return;
} }
if ($command == 'exportAllCsv') { if ($command == 'exportAllCsv') {
if ($this->hasCurrentUserAdminOrManagerRights()) { $this->exportAllCsvOrExcel($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_CSV);
$this->exportAllCsvOrExcel($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_CSV);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
}
return; return;
} }
if ($command == 'exportAllExcel') { if ($command == 'exportAllExcel') {
if ($this->hasCurrentUserAdminOrManagerRights()) { $this->exportAllCsvOrExcel($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_EXCEL);
$this->exportAllCsvOrExcel($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_EXCEL);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
}
return; return;
} }
if ($command == 'exportXlsx') { if ($command == 'exportXlsx') {
if ($this->hasCurrentUserAdminOrManagerRights()) { $this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_EXCEL);
$this->exportCsv($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],DO_EXCEL);
} else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
}
return; return;
} }
if ($command == 'exportPdfReport') { if ($command == 'exportPdfReport') {
if ($this->hasCurrentUserAdminOrManagerRights()) { $this->exportPdfReport($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear'],null,null);
$this->exportPdfReport($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear']); return;
} else { }
echo "Benutzer nicht berechtigt"; if ($command == 'exportPdfReportClosPeriod') {
} $this->exportPdfReport(0,0,0,0,$_GET['closidstart'],$_GET['closidend']);
return; return;
} }
if ($command == 'exportPdfSummary') { if ($command == 'exportPdfSummary') {
if ($this->hasCurrentUserAdminOrManagerRights()) { $this->exportPdfSummary($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear']);
$this->exportPdfSummary($_GET['startMonth'],$_GET['startYear'],$_GET['endMonth'],$_GET['endYear']); return;
} else { }
echo "Benutzer nicht berechtigt";
} if ($command == 'exportPdfSummaryClosPeriod') {
$this->exportPdfSummaryClosPeriod($_GET['closidstart'],$_GET['closidend']);
return; return;
} }
if ($command == 'autoBackupPdfSummary') { if ($command == 'autoBackupPdfSummary') {
@ -167,9 +171,11 @@ class Bill {
if ($this->hasCurrentUserBillRights()) { if ($this->hasCurrentUserBillRights()) {
if ($command == 'getLastBillsWithContent') { if ($command == 'getLastBillsWithContent') {
$this->getLastBillsWithContent($_GET['day'],$_GET['month'],$_GET['year']); $this->getLastBillsWithContent($_GET['day'],$_GET['month'],$_GET['year']);
return;
} else if ($command == 'cancelBill') { } else if ($command == 'cancelBill') {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$this->cancelBill($pdo,$_POST['billid'],$_POST['stornocode'],$_POST['reason'],true,true,true,$_POST['removeproducts']); $this->cancelBill($pdo,$_POST['billid'],$_POST['stornocode'],$_POST['reason'],true,true,true,$_POST['removeproducts']);
return;
} }
} else { } else {
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG)); echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
@ -1083,13 +1089,13 @@ class Bill {
$this->exportPdfSummary(1, $currentYear, $currentMonth, $currentYear); $this->exportPdfSummary(1, $currentYear, $currentMonth, $currentYear);
} }
private function exportPdfReport($startMonth,$startYear,$endMonth,$endYear) { private function exportPdfReport($startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$pdfExport = new PdfExport(); $pdfExport = new PdfExport();
$lang = 0; $lang = 0;
if(isset($_GET["lang"])) { if(isset($_GET["lang"])) {
$lang = $_GET['lang']; $lang = $_GET['lang'];
} }
$pdfExport->exportPdfReport($lang,$startMonth,$startYear,$endMonth,$endYear); $pdfExport->exportPdfReport($lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart,$closidend);
} }
private function exportPdfSummary($startMonth,$startYear,$endMonth,$endYear) { private function exportPdfSummary($startMonth,$startYear,$endMonth,$endYear) {
$pdfExport = new PdfExport(); $pdfExport = new PdfExport();
@ -1100,6 +1106,15 @@ class Bill {
$pdfExport->exportPdfSummary($lang,$startMonth,$startYear,$endMonth,$endYear); $pdfExport->exportPdfSummary($lang,$startMonth,$startYear,$endMonth,$endYear);
} }
private function exportPdfSummaryClosPeriod($closidstart,$closidend) {
$pdfExport = new PdfExport();
$lang = 0;
if(isset($_GET["lang"])) {
$lang = $_GET['lang'];
}
$pdfExport->exportPdfSummaryClosPeriod($lang,$closidstart,$closidend);
}
private function exportAllCsvOrExcel($startMonth,$startYear,$endMonth,$endYear,$exportFormat) { private function exportAllCsvOrExcel($startMonth,$startYear,$endMonth,$endYear,$exportFormat) {
set_time_limit(60*5); set_time_limit(60*5);
if(session_id() == '') { if(session_id() == '') {
@ -1151,6 +1166,7 @@ class Bill {
$firstRow = array( $firstRow = array(
'Bestellzeitpunkt', 'Bestellzeitpunkt',
'Abrechnungszeitpunkt', 'Abrechnungszeitpunkt',
'Tag der Bestellung',
$this->t['ID'][$l], $this->t['ID'][$l],
$this->t['Tablename'][$l], $this->t['Tablename'][$l],
'Produktpreis' . " ($currency)", 'Produktpreis' . " ($currency)",
@ -1169,7 +1185,8 @@ class Bill {
'Abrechnungsbenutzer-ID', 'Abrechnungsbenutzer-ID',
$this->t['ClosId'][$l], $this->t['ClosId'][$l],
$this->t['ClosDate'][$l], $this->t['ClosDate'][$l],
$this->t['ClosRemark'][$l] $this->t['ClosRemark'][$l],
'Tageserfassung'
); );
$lineLength = count($firstRow); $lineLength = count($firstRow);
@ -1180,8 +1197,9 @@ class Bill {
$payment_col = $payment_lang[$l]; $payment_col = $payment_lang[$l];
$sql = " $sql = "
SELECT * FROM (
SELECT B.billdate as billdate,B.id as billid, SELECT B.billdate as billdate,B.id as billid,
ordertime, ordertime,DATE_FORMAT(ordertime,'%w') as orderdayofweek,
IF(tableid > '0',(SELECT tableno FROM %resttables% WHERE id=tableid),'') as tablename, IF(tableid > '0',(SELECT tableno FROM %resttables% WHERE id=tableid),'') as tablename,
price as productprice, price as productprice,
(IF(B.status='s',-1,1) * price) as brutto, (IF(B.status='s',-1,1) * price) as brutto,
@ -1195,15 +1213,15 @@ class Bill {
IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode, IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode,
P.$payment_col as payment, P.$payment_col as payment,
IFNULL(B.reason,'') as reason, IFNULL(B.reason,'') as reason,
U.username,U.id as userid,closingid,C.closingdate as closingdate, IFNULL(C.remark,'') as remark U.username,U.id as userid,closingid,C.closingdate as closingdate, IFNULL(C.remark,'') as remark,
Q.clsid
from %billproducts% BP,%queue% Q,%bill% B,%payment% P,%user% U,%closing% C from %billproducts% BP,%queue% Q,%bill% B,%payment% P,%user% U,%closing% C
WHERE BP.queueid=Q.id AND BP.billid=B.id AND B.closingid is not null AND B.paymentid=P.id WHERE BP.queueid=Q.id AND BP.billid=B.id AND B.closingid is not null AND B.paymentid=P.id
AND U.id=B.userid AND B.closingid=C.id AND U.id=B.userid AND B.closingid=C.id
AND Q.toremove = '0'
AND B.billdate >= ? AND B.billdate <= ? AND B.billdate >= ? AND B.billdate <= ?
UNION ALL UNION ALL
SELECT '' as billdate, '' as billid, SELECT '' as billdate, '' as billid,
ordertime, ordertime,DATE_FORMAT(ordertime,'%w') as orderdayofweek,
IF(tablenr > '0',(SELECT tableno FROM %resttables% WHERE id=tablenr),'') as tablename, IF(tablenr > '0',(SELECT tableno FROM %resttables% WHERE id=tablenr),'') as tablename,
price as productprice, price as productprice,
'0.00' as brutto, '0.00' as brutto,
@ -1218,12 +1236,14 @@ class Bill {
'' as payment, '' as payment,
'' as reason, '' as reason,
'' as username,'' as userid, '' as username,'' as userid,
'' as closingid, '' as closingdate, '' as remark '' as closingid, '' as closingdate, '' as remark,
Q.clsid
FROM %queue% Q FROM %queue% Q
WHERE Q.toremove = '1' WHERE Q.toremove = '1'
AND ordertime >= ? AND ordertime <= ? AND ordertime >= ? AND ordertime <= ?
UNION ALL UNION ALL
SELECT B.billdate as billdate,B.id as billid,B.billdate as ordertime, SELECT B.billdate as billdate,B.id as billid,B.billdate as ordertime,
DATE_FORMAT(B.billdate,'%w') as orderdayofweek,
'' as tablename, '' as tablename,
'' as productprice, '' as productprice,
B.brutto as brutto,B.netto as netto, B.brutto as brutto,B.netto as netto,
@ -1234,11 +1254,11 @@ class Bill {
'Einlage' as productname, 'Einlage' as productname,
'' as productid, '' as productid,
'' as barcode, '' as barcode,
'Barzahlung' as payment, IFNULL(B.reason,'') as reason, U.username, U.id as userid,closingid,C.closingdate as closingdate,IFNULL(C.remark,'') as remark 'Barzahlung' as payment, IFNULL(B.reason,'') as reason, U.username, U.id as userid,closingid,C.closingdate as closingdate,IFNULL(C.remark,'') as remark,
closingid
FROM %bill% B,%user% U,%closing% C WHERE B.status='c' AND B.closingid is not null AND B.userid=U.id AND B.closingid=C.id FROM %bill% B,%user% U,%closing% C WHERE B.status='c' AND B.closingid is not null AND B.userid=U.id AND B.closingid=C.id
AND B.billdate >= ? AND B.billdate <= ? AND B.billdate >= ? AND B.billdate <= ?
ORDER BY ) a ORDER BY ordertime,billid
ordertime,billid
"; ";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($startDate,$endDate,$startDate,$endDate,$startDate,$endDate)); $result = CommonUtils::fetchSqlAll($pdo, $sql, array($startDate,$endDate,$startDate,$endDate,$startDate,$endDate));
@ -1273,6 +1293,7 @@ class Bill {
$line = array( $line = array(
$z['ordertime'], $z['ordertime'],
$z['billdate'], $z['billdate'],
self::$daynamesStartSunday[intval($z['orderdayofweek'])][$l],
$z['billid'],$z['tablename'], $z['billid'],$z['tablename'],
$z['productprice'],$brutto,$netto, $z['productprice'],$brutto,$netto,
$tax, $tax,
@ -1285,7 +1306,7 @@ class Bill {
$z['payment'], $z['payment'],
$z['reason'], $z['reason'],
$z['username'],$z['userid'], $z['username'],$z['userid'],
$z['closingid'],$z['closingdate'],$z['remark']); $z['closingid'],$z['closingdate'],$z['remark'],$z['clsid']);
$allcells[] = $line; $allcells[] = $line;
} }
@ -1311,17 +1332,17 @@ class Bill {
$formatCodeBrutto = "0.00"; $formatCodeBrutto = "0.00";
$formatCodeNetto = "0.0000"; $formatCodeNetto = "0.0000";
for ($i=1;$i<count($allcells);$i++) { for ($i=1;$i<count($allcells);$i++) {
$aVal = $objWorksheet->getCell('E' . ($i+1)) ->getValue();
$objWorksheet->getCell('E' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC);
$objWorksheet->getStyle('E' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeBrutto);
$aVal = $objWorksheet->getCell('F' . ($i+1)) ->getValue(); $aVal = $objWorksheet->getCell('F' . ($i+1)) ->getValue();
$objWorksheet->getCell('F' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC); $objWorksheet->getCell('F' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC);
$objWorksheet->getStyle('F' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeBrutto); $objWorksheet->getStyle('F' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeBrutto);
$aVal = $objWorksheet->getCell('G' . ($i+1)) ->getValue(); $aVal = $objWorksheet->getCell('G' . ($i+1)) ->getValue();
$objWorksheet->getCell('G' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC); $objWorksheet->getCell('G' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC);
$objWorksheet->getStyle('G' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeNetto); $objWorksheet->getStyle('G' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeBrutto);
$aVal = $objWorksheet->getCell('H' . ($i+1)) ->getValue();
$objWorksheet->getCell('H' . ($i+1)) ->setValueExplicit($aVal,PHPExcel_Cell_DataType::TYPE_NUMERIC);
$objWorksheet->getStyle('H' . ($i+1))->getNumberFormat()->setFormatCode($formatCodeNetto);
} }
} }

View File

@ -56,6 +56,8 @@ $this->getClosing($_GET['closingid']);
$this->getClosingSummary($_GET['closingid'],null,true); $this->getClosingSummary($_GET['closingid'],null,true);
} else if ($command == 'htmlreport') { } else if ($command == 'htmlreport') {
$this->htmlreport($_GET["closid"]); $this->htmlreport($_GET["closid"]);
} else if ($command == 'getClosingsListOfMonthYear') {
$this->getClosingsListOfMonthYear($_GET["month"],$_GET["year"]);
} else { } else {
echo "Command not supported."; echo "Command not supported.";
} }
@ -167,9 +169,20 @@ CommonUtils::callPlugin($pdo, "createClosing", "before");
CommonUtils::execSql($pdo, 'DELETE FROM %recordsqueue%', null); CommonUtils::execSql($pdo, 'DELETE FROM %recordsqueue%', null);
CommonUtils::execSql($pdo, 'DELETE FROM %records%', null); CommonUtils::execSql($pdo, 'DELETE FROM %records%', null);
$closingEntrySql = "INSERT INTO `%closing%` (`closingdate`,`remark`,`billcount`,`billsum`,`signature`) VALUES (?,?,?,?,?)"; $sql = "SELECT MAX(id) as maxid FROM %closing%";
CommonUtils::execSql($pdo, $closingEntrySql, array($closingTime,$remark,0,0.0,null)); $maxIdRes = CommonUtils::fetchSqlAll($pdo, $sql);
$newClosingId = $pdo->lastInsertId(); $maxId = 0;
if (!is_null($maxIdRes)) {
$maxIdVal = $maxIdRes[0]["maxid"];
if (!is_null($maxIdVal)) {
$maxId = intval($maxIdVal);
}
}
$newClosingId = $maxIdVal + 1;
$closingEntrySql = "INSERT INTO `%closing%` (`id`,`closingdate`,`remark`,`billcount`,`billsum`,`signature`) VALUES (?,?,?,?,?,?)";
CommonUtils::execSql($pdo, $closingEntrySql, array($newClosingId,$closingTime,$remark,0,0.0,null));
$sql = "SELECT id FROM %bill% WHERE closingid is null AND (tableid >= '0' OR status='c') "; $sql = "SELECT id FROM %bill% WHERE closingid is null AND (tableid >= '0' OR status='c') ";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
@ -224,11 +237,23 @@ $signature = md5($data);
$sql = "UPDATE %closing% SET billcount=?, billsum=?,signature=? WHERE id=?"; $sql = "UPDATE %closing% SET billcount=?, billsum=?,signature=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($billsToTake,$pricesum,$signature,$newClosingId)); CommonUtils::execSql($pdo, $sql, array($billsToTake,$pricesum,$signature,$newClosingId));
$sql = "SELECT value as val FROM %work% WHERE item=?";
$indexunclosedqueue = 0;
$r = CommonUtils::fetchSqlAll($pdo, $sql, array('indexunclosedqueue'));
if (count($r) > 0) {
$rval = $r[0]["val"];
if (!is_null($rval)) {
$indexunclosedqueue = intval($rval);
}
}
$sql = "UPDATE %queue% Q,%work% W SET Q.clsid=? WHERE Q.id > ? AND Q.clsid is null";
CommonUtils::execSql($pdo, $sql, array($newClosingId,$indexunclosedqueue));
$sql = "UPDATE %queue% SET toremove='1' WHERE id not in (select distinct queueid FROM %billproducts%) AND billid is null";
CommonUtils::execSql($pdo, $sql, null); $sql = "UPDATE %queue% SET toremove='1' WHERE billid is null AND clsid=?";
CommonUtils::execSql($pdo, $sql, array($newClosingId));
$sql = "UPDATE %queue% set paidtime=?,delivertime=? WHERE billid is not null AND paidtime is null"; $sql = "UPDATE %queue% set paidtime=?,delivertime=? WHERE billid is not null AND paidtime is null";
CommonUtils::execSql($pdo, $sql, array($closingTime,$closingTime)); CommonUtils::execSql($pdo, $sql, array($closingTime,$closingTime));
@ -355,6 +380,22 @@ $stmt->execute(array($closingid));
return ($stmt->fetchAll(PDO::FETCH_OBJ)); return ($stmt->fetchAll(PDO::FETCH_OBJ));
} }
private function getClosingsListOfMonthYear($month,$year) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
date_default_timezone_set(DbUtils::getTimeZone());
$monthText=$month;
if ($month < 10) {
$monthText = "0" . $month;
}
$lastDayInMonth = date("t", mktime(0, 0, 0, $month, 1, $year));
$dateStart = $year . $monthText . "01";
$dateEnd = $year . $monthText . $lastDayInMonth;
$sql = "SELECT id,IFNULL(remark,'') as remark,DATE_FORMAT(closingdate,'%w') as dayofweek,DATE_FORMAT(closingdate, '%d.%m.%Y %k:%i') as closdate from %closing% WHERE DATE(closingdate) BETWEEN ? AND ? ORDER BY id";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($dateStart,$dateEnd));
echo json_encode(array("status" => "OK", "msg" => $result));
}
/* /*
* Get all closings that are requested: * Get all closings that are requested:
* if month and year is null or empty ==> last 30 closings * if month and year is null or empty ==> last 30 closings
@ -372,10 +413,8 @@ $lastDayInMonth = date("t", mktime(0, 0, 0, $month, 1, $year));
$dateStart = $year . $monthText . "01"; $dateStart = $year . $monthText . "01";
$dateEnd = $year . $monthText . $lastDayInMonth; $dateEnd = $year . $monthText . $lastDayInMonth;
$sql = "SELECT id,closingdate,remark FROM %closing% WHERE DATE(closingdate) BETWEEN ? AND ? ORDER BY closingdate DESC;"; $sql = "SELECT id,closingdate,remark FROM %closing% WHERE DATE(closingdate) BETWEEN ? AND ? ORDER BY closingdate DESC";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $result = CommonUtils::fetchSqlAll($pdo, $sql, array($dateStart,$dateEnd));
$stmt->execute(array($dateStart,$dateEnd));
$result = $stmt->fetchAll();
$resultarray = array(); $resultarray = array();
foreach($result as $zeile) { foreach($result as $zeile) {
@ -801,14 +840,31 @@ return null;
} }
} }
if ($fl < 14) {
$sql = "select sum(%bill%.brutto) as sum,round(sum(%bill%.netto),2) as netto,%payment%.name,%bill%.status from %bill%,%payment% where "; $sql = "select sum(%bill%.brutto) as sum,round(sum(%bill%.netto),2) as netto,%payment%.name,%bill%.status from %bill%,%payment% where ";
$sql .= "%bill%.closingid=? and "; $sql .= "%bill%.closingid=? and ";
$sql .= "%bill%.paymentid=%payment%.id "; $sql .= "%bill%.paymentid=%payment%.id ";
$sql .= "group by %bill%.tax,%payment%.name,%bill%.status"; $sql .= "group by %bill%.tax,%payment%.name,%bill%.status";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $overview = CommonUtils::fetchSqlAll($pdo, $sql, array($closingid));
$stmt->execute(array($closingid)); } else {
$overview = $stmt->fetchAll(PDO::FETCH_ASSOC);
$sql = "SELECT SUM(B.brutto) as sum,round(sum(B.netto),2) as netto,P.name,IF(B.status='x',null,B.status) as status from %bill% B,%payment% P WHERE ";
$sql .= "B.closingid=? AND B.paymentid=P.id AND ";
$sql .= "(B.status <> 's' OR B.status is null) ";
$sql .= "GROUP BY B.tax,P.name,B.status ";
$sql .= "HAVING SUM(B.brutto) is not null ";
$sql .= " UNION ALL ";
$sql .= "SELECT sum(B.brutto) as sum,round(sum(B.netto),2) as netto,'',B.status from %bill% B WHERE ";
$sql .= "B.closingid=? AND B.status='s' ";
$sql .= "HAVING sum(B.brutto) is not null ";
$sql .= " UNION ALL ";
$sql .= "SELECT sum(Q.price) as sum,TRUNCATE(sum(Q.price / (1 + Q.tax * 0.01)),2) as netto,'','d' from %queue% Q WHERE Q.toremove='1' AND Q.clsid=? ";
$sql .= "HAVING sum(Q.price) is not null ";
$overview = CommonUtils::fetchSqlAll($pdo, $sql, array($closingid,$closingid,$closingid));
}
$sql = "select %queue%.tax as t,SUM(%queue%.price) as bruttosum,ROUND(SUM(%queue%.price)/(1 + %queue%.tax/100.0),2) as nettosum "; $sql = "select %queue%.tax as t,SUM(%queue%.price) as bruttosum,ROUND(SUM(%queue%.price)/(1 + %queue%.tax/100.0),2) as nettosum ";
$sql .= " FROM %bill%,%queue% "; $sql .= " FROM %bill%,%queue% ";
@ -824,11 +880,11 @@ foreach($payments as $aPayment) {
$sql = "select %queue%.tax as t,SUM(%queue%.price) as bruttosum,ROUND(SUM(%queue%.price)/(1 + %queue%.tax/100.0),2) as nettosum "; $sql = "select %queue%.tax as t,SUM(%queue%.price) as bruttosum,ROUND(SUM(%queue%.price)/(1 + %queue%.tax/100.0),2) as nettosum ";
$sql .= " FROM %bill%,%queue% "; $sql .= " FROM %bill%,%queue% ";
$sql .= " WHERE %bill%.closingid=? AND %queue%.billid=%bill%.id AND %bill%.paymentid=? GROUP BY t"; $sql .= " WHERE %bill%.closingid=? AND %queue%.billid=%bill%.id AND %bill%.paymentid=? GROUP BY t";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $paymenttaxessum = CommonUtils::fetchSqlAll($pdo, $sql, array($closingid,$aPayment["paymentid"]));
$stmt->execute(array($closingid,$aPayment["paymentid"])); if (count($paymenttaxessum) > 0) {
$paymenttaxessum = $stmt->fetchAll(PDO::FETCH_ASSOC);
$paymenttaxes[] = array("payment" => $aPayment["name"],"paymenttaxessum" => $paymenttaxessum); $paymenttaxes[] = array("payment" => $aPayment["name"],"paymenttaxessum" => $paymenttaxessum);
} }
}
$sql = "select count(%queue%.productname) as count,%queue%.productname,%queue%.price,%queue%.tax as tax,sum(%queue%.price) as sumprice "; $sql = "select count(%queue%.productname) as count,%queue%.productname,%queue%.price,%queue%.tax as tax,sum(%queue%.price) as sumprice ";

0
webapp/php/config.php Normal file → Executable file
View File

View File

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

View File

@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) { if (strlen($status) > 150) {
$status = substr($status, 0,149); $status = substr($status, 0,149);
} }
$version = "1.5.22"; $version = "1.5.23";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion); $arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else { } else {

View File

@ -272,19 +272,28 @@ class Reports {
* array("prodid" => $aProdId,"prodname" => $aProd['prodname'], "sum" => $sumprice); * array("prodid" => $aProdId,"prodname" => $aProd['prodname'], "sum" => $sumprice);
* (...) * (...)
*/ */
public function sumSortedByProducts($pdo,$startDateTime,$endDateTime) { public function sumSortedByProducts($pdo,$startDateTime,$endDateTime,$closidstart=null,$closidend=null) {
// first get all products and with their id and name // first get all products and with their id and name
$sql = "SELECT DISTINCT productid from %queue%,%bill%,%products% "; if (is_null($closidstart)) {
$sql .= "WHERE %queue%.productid=%products%.id "; $sql = "SELECT DISTINCT productid from %queue%,%bill%,%products% ";
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id "; $sql .= "WHERE %queue%.productid=%products%.id ";
$sql .= "AND billdate between ? AND ? "; $sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
$sql .= "AND %bill%.closingid is not null "; $sql .= "AND billdate between ? AND ? ";
$sql .= "AND %bill%.status is null"; $sql .= "AND %bill%.closingid is not null ";
$sql .= "AND %bill%.status is null";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $result = CommonUtils::fetchSqlAll($pdo, $sql, array($startDateTime,$endDateTime));
$stmt->execute(array($startDateTime,$endDateTime)); } else {
$result = $stmt->fetchAll(); $sql = "SELECT DISTINCT productid from %queue% Q,%bill% B,%products% P ";
$sql .= "WHERE Q.productid=P.id ";
$sql .= "AND billid is not null AND Q.billid=B.id ";
$sql .= "AND B.closingid is not null ";
$sql .= "AND B.closingid between ? AND ? ";
$sql .= "AND B.status is null";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($closidstart,$closidend));
}
$prods = array(); $prods = array();
$sql = "SELECT longname FROM %products% WHERE id=?"; $sql = "SELECT longname FROM %products% WHERE id=?";
@ -301,16 +310,29 @@ class Reports {
foreach ($prods as $aProd) { foreach ($prods as $aProd) {
$aProdId = $aProd['prodid']; $aProdId = $aProd['prodid'];
$sql = "SELECT sum(price) as sumprice, count(%queue%.id) as prodcount from %queue%,%bill%,%products% "; if (is_null($closidstart)) {
$sql .= "WHERE %queue%.productid=%products%.id "; $sql = "SELECT sum(price) as sumprice, count(%queue%.id) as prodcount from %queue%,%bill%,%products% ";
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id "; $sql .= "WHERE %queue%.productid=%products%.id ";
$sql .= "AND billdate between ? AND ? "; $sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
$sql .= "AND %bill%.closingid is not null "; $sql .= "AND billdate between ? AND ? ";
$sql .= " AND productid=?"; $sql .= "AND %bill%.closingid is not null ";
$sql .= "AND productid=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($startDateTime,$endDateTime,$aProdId)); $stmt->execute(array($startDateTime,$endDateTime,$aProdId));
$row =$stmt->fetchObject(); $row =$stmt->fetchObject();
} else {
$sql = "SELECT sum(price) as sumprice, count(%queue%.id) as prodcount from %queue%,%bill%,%products% ";
$sql .= "WHERE %queue%.productid=%products%.id ";
$sql .= "AND billid is not null AND %queue%.billid=%bill%.id ";
$sql .= "AND %bill%.closingid is not null ";
$sql .= "AND %bill%.closingid between ? AND ? ";
$sql .= "AND productid=?";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($closidstart,$closidend,$aProdId));
$row =$stmt->fetchObject();
}
if ($row != null) { if ($row != null) {
$sumprice = $row->sumprice; $sumprice = $row->sumprice;

View File

@ -15,6 +15,7 @@ class PdfExport extends FPDF {
private $version; private $version;
private $osSummary = array("Zusammenfassung","Summary","Todo"); private $osSummary = array("Zusammenfassung","Summary","Todo");
private $osClosingsPlural = array("Tageserfassungen","Closings","Cerradas");
private $osSum = array("Summe","Sum","Suma"); private $osSum = array("Summe","Sum","Suma");
private $osSumAll = array("Gesamtsumme","Total Sum","Todos las sumas"); private $osSumAll = array("Gesamtsumme","Total Sum","Todos las sumas");
private $osClosingTxt = array("Tagesabschluss","Closing","Conclusión"); private $osClosingTxt = array("Tagesabschluss","Closing","Conclusión");
@ -45,6 +46,7 @@ class PdfExport extends FPDF {
private static function osGetSaleItemName($l,$item) { private static function osGetSaleItemName($l,$item) {
$t = array( $t = array(
"TEID" => array("Tag.abschl.","Closing","Cerrada"),
"ID" => array("Bonid","ID",""), "ID" => array("Bonid","ID",""),
"Date" => array("Zahlungsdatum","Pay date","Fecha de pago"), "Date" => array("Zahlungsdatum","Pay date","Fecha de pago"),
"Prod" => array("Produkt","Product","Producto"), "Prod" => array("Produkt","Product","Producto"),
@ -119,13 +121,12 @@ class PdfExport extends FPDF {
return($endYear . "-" . $endMonth . "-" . $lastdayOfMonth . " 23:59:59"); return($endYear . "-" . $endMonth . "-" . $lastdayOfMonth . " 23:59:59");
} }
private function osGetSales($pdo,$l,$startMonth,$startYear,$endMonth,$endYear) { private function osGetSales($pdo,$l,$startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$commonUtils = new CommonUtils();
$startDate = $this->calcStartDate($startMonth, $startYear); $startDate = $this->calcStartDate($startMonth, $startYear);
$endDate = $this->calcEndDate($endMonth, $endYear); $endDate = $this->calcEndDate($endMonth, $endYear);
$hline = array( $hline = array(
self::osGetSaleItemName($l,"TEID"),
self::osGetSaleItemName($l,"ID"), self::osGetSaleItemName($l,"ID"),
self::osGetSaleItemName($l,"Date"), self::osGetSaleItemName($l,"Date"),
self::osGetSaleItemName($l,"Brutto"), self::osGetSaleItemName($l,"Brutto"),
@ -138,23 +139,31 @@ class PdfExport extends FPDF {
$allSaleLines = array(); $allSaleLines = array();
$allSaleLines[] = $hline; $allSaleLines[] = $hline;
$billIdsForThatClosing = array();
$payment_lang = array("name","name_en","name_esp"); $payment_lang = array("name","name_en","name_esp");
$payment_col = $payment_lang[$l]; $payment_col = $payment_lang[$l];
$sql = "SELECT DISTINCT %bill%.id,%bill%.signature,billdate,brutto,netto,IF(tax is not null, tax, '0.00') as tax,status,closingdate,remark,%bill%.host,%bill%.closingid,%payment%.$payment_col as payway,userid,ref,username FROM %bill%,%closing%,%payment%,%user% "; if (is_null($closidstart)) {
$sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id "; $sql = "SELECT DISTINCT %bill%.id,%bill%.signature,billdate,brutto,netto,IF(tax is not null, tax, '0.00') as tax,status,closingdate,remark,%bill%.host,%bill%.closingid,%payment%.$payment_col as payway,userid,ref,username FROM %bill%,%closing%,%payment%,%user% ";
$sql .= " AND %bill%.paymentid=%payment%.id "; $sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id ";
$sql .= " AND %bill%.billdate BETWEEN ? AND ? "; $sql .= " AND %bill%.paymentid=%payment%.id ";
$sql .= " AND %bill%.userid = %user%.id "; $sql .= " AND %bill%.billdate BETWEEN ? AND ? ";
$sql .= "ORDER BY billdate"; $sql .= " AND %bill%.userid = %user%.id ";
$sql .= "ORDER BY billdate";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $allsales = CommonUtils::fetchSqlAll($pdo, $sql, array($startDate,$endDate));
$stmt->execute(array($startDate,$endDate)); } else {
$allsales = $stmt->fetchAll(); $sql = "SELECT DISTINCT %bill%.id,%bill%.signature,billdate,brutto,netto,IF(tax is not null, tax, '0.00') as tax,status,closingdate,remark,%bill%.host,%bill%.closingid,%payment%.$payment_col as payway,userid,ref,username FROM %bill%,%closing%,%payment%,%user% ";
$sql .= "WHERE closingid is not null AND %bill%.closingid=%closing%.id ";
$sql .= " AND %bill%.paymentid=%payment%.id ";
$sql .= " AND %bill%.closingid BETWEEN ? AND ? ";
$sql .= " AND %bill%.userid = %user%.id ";
$sql .= "ORDER BY billdate";
$allsales = CommonUtils::fetchSqlAll($pdo, $sql, array($closidstart,$closidend));
}
foreach($allsales as $zeile) { foreach($allsales as $zeile) {
$closid = $zeile['closingid'];
$billid = $zeile['id']; $billid = $zeile['id'];
$billdate = $zeile['billdate']; $billdate = $zeile['billdate'];
@ -194,7 +203,8 @@ class PdfExport extends FPDF {
$billid = "-"; $billid = "-";
} }
$aLine = array($billid, $aLine = array($closid,
$billid,
$billdate, $billdate,
$brutto, $brutto,
$netto, $netto,
@ -224,16 +234,24 @@ class PdfExport extends FPDF {
} }
} }
private function osInsertSales($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear) { private function osInsertSales($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$this->curtable = "sales"; $this->curtable = "sales";
$salesArr = $this->osGetSales($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear); $salesArr = $this->osGetSales($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart,$closidend);
$this->osCalculateColsWidth(array(4,10,5,5,10,4,4)); $this->osCalculateColsWidth(array(4,4,10,5,5,10,4,4));
$salestxt = array("Umsätze ","Sales ","Venta "); $salestxt = array("Umsätze ","Sales ","Venta ");
$headerLine = utf8_decode($salestxt[$lang]);
$headerLine .= self::osGetMonthName($lang, $startMonth) . " $startYear - " . self::osGetMonthName($lang, $endMonth) . " $endYear"; if (!is_null($closidstart)) {
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")"; $headerLine = utf8_decode($this->osClosingsPlural[$lang]);
$headerLine .= " $closidstart - $closidend ";
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")";
} else {
$headerLine = utf8_decode($salestxt[$lang]);
$headerLine .= self::osGetMonthName($lang, $startMonth) . " $startYear - " . self::osGetMonthName($lang, $endMonth) . " $endYear";
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")";
}
$this->SetFont('Helvetica','B',14); $this->SetFont('Helvetica','B',14);
$this->Cell($this->maxTableLength,10,$headerLine,1,1,"C"); $this->Cell($this->maxTableLength,10,$headerLine,1,1,"C");
@ -250,11 +268,11 @@ class PdfExport extends FPDF {
for ($i=1;$i<count($salesArr);$i++) { for ($i=1;$i<count($salesArr);$i++) {
$line = $salesArr[$i]; $line = $salesArr[$i];
$bruttosum += str_replace($this->decpoint,".",$line[2]); $bruttosum += str_replace($this->decpoint,".",$line[3]);
$nettosum += str_replace($this->decpoint,".",$line[3]); $nettosum += str_replace($this->decpoint,".",$line[4]);
for ($j=0;$j<count($line);$j++) { for ($j=0;$j<count($line);$j++) {
$aVal = $line[$j]; $aVal = $line[$j];
if ($j == 3) { if ($j == 4) {
$aVal = number_format(floatval(str_replace(',','.',$aVal)),2,$this->decpoint,''); $aVal = number_format(floatval(str_replace(',','.',$aVal)),2,$this->decpoint,'');
} }
$this->Cell($this->flengths[$j],6,$aVal,"LR",0,"R",$fill); $this->Cell($this->flengths[$j],6,$aVal,"LR",0,"R",$fill);
@ -267,10 +285,10 @@ class PdfExport extends FPDF {
$nettosum = number_format($nettosum, 2, $this->decpoint, ''); $nettosum = number_format($nettosum, 2, $this->decpoint, '');
$this->SetFillColor(200,200,200); $this->SetFillColor(200,200,200);
$this->Cell($this->flengths[0] + $this->flengths[1],10,$this->osGetSaleItemName($lang,"sum"). ": ","LRBT",0,"L",1); $this->Cell($this->flengths[0] + $this->flengths[1] + $this->flengths[2],10,$this->osGetSaleItemName($lang,"sum"). ": ","LRBT",0,"L",1);
$this->Cell($this->flengths[2],10,$bruttosum,"LRBT",0,"R",1); $this->Cell($this->flengths[3],10,$bruttosum,"LRBT",0,"R",1);
$this->Cell($this->flengths[3],10,$nettosum,"LRBT",0,"R",1); $this->Cell($this->flengths[4],10,$nettosum,"LRBT",0,"R",1);
$this->Cell($this->flengths[4] + $this->flengths[5] + $this->flengths[6],10,"","T",0,"R",0); $this->Cell($this->flengths[5] + $this->flengths[6] + $this->flengths[7],10,"","T",0,"R",0);
$this->Ln(); $this->Ln();
return; return;
} }
@ -320,22 +338,34 @@ class PdfExport extends FPDF {
$this->Ln(); $this->Ln();
} }
private function osInsertProdStat($pdo,$startMonth,$startYear,$endMonth,$endYear) { private function osInsertProdStat($pdo,$startMonth,$startYear,$endMonth,$endYear,$closidstart=null,$closidend=null) {
$this->curtable = ""; $this->curtable = "";
$prodtxt = array("Produktstatistik ","Product Report ","Venta de productos "); if (is_null($closidstart)) {
$headerLine = utf8_decode($prodtxt[$this->lang]); $prodtxt = array("Produktstatistik ","Product Report ","Venta de productos ");
$headerLine .= self::osGetMonthName($this->lang, $startMonth) . " $startYear - " . self::osGetMonthName($this->lang, $endMonth) . " $endYear"; $headerLine = utf8_decode($prodtxt[$this->lang]);
$headerLine .= " (in " . $this->currency . ")"; $headerLine .= self::osGetMonthName($this->lang, $startMonth) . " $startYear - " . self::osGetMonthName($this->lang, $endMonth) . " $endYear";
$headerLine .= " (in " . $this->currency . ")";
} else {
$prodtxt = array("Produktstatistik ","Product Report ","Venta de productos ");
$headerLine = utf8_decode($prodtxt[$this->lang]);
$headerLine .= " " . utf8_decode($this->osClosingsPlural[$this->lang]);
$headerLine .= " $closidstart - $closidend ";
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")";
}
$this->SetFont('Helvetica','B',14); $this->SetFont('Helvetica','B',14);
$this->Cell($this->maxTableLength,10,$headerLine,1,1,"C"); $this->Cell($this->maxTableLength,10,$headerLine,1,1,"C");
$reports = new Reports(); $reports = new Reports();
$startDate = $this->calcStartDate($startMonth, $startYear); if (is_null($closidstart)) {
$endDate = $this->calcEndDate($endMonth, $endYear); $startDate = $this->calcStartDate($startMonth, $startYear);
$endDate = $this->calcEndDate($endMonth, $endYear);
$prodStat = $reports->sumSortedByProducts($pdo, $startDate, $endDate); $prodStat = $reports->sumSortedByProducts($pdo, $startDate, $endDate,null,null);
} else {
$prodStat = $reports->sumSortedByProducts($pdo, 0,0,$closidstart,$closidend);
}
$this->setProdsTableHeader(); $this->setProdsTableHeader();
@ -369,7 +399,7 @@ class PdfExport extends FPDF {
$this->Cell(20,10,$sum,0,0,"C",1); $this->Cell(20,10,$sum,0,0,"C",1);
} }
private function daySummary($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear) { private function daySummary($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$day = sprintf("%02s", 1); $day = sprintf("%02s", 1);
$startMonth = sprintf("%02s", $startMonth); $startMonth = sprintf("%02s", $startMonth);
$startYear = sprintf("%04s", $startYear); $startYear = sprintf("%04s", $startYear);
@ -389,10 +419,13 @@ class PdfExport extends FPDF {
$bSum = 0; $bSum = 0;
$nSum = 0; $nSum = 0;
$sql = "SELECT DISTINCT %closing%.id as id, DATE(closingdate) as datewotime,TIME(closingdate) as thetime FROM %closing% WHERE DATE(closingdate) >= ? AND DATE(closingdate) <= ? "; if (is_null($closidstart)) {
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $sql = "SELECT DISTINCT %closing%.id as id, DATE(closingdate) as datewotime,TIME(closingdate) as thetime FROM %closing% WHERE DATE(closingdate) >= ? AND DATE(closingdate) <= ? ";
$stmt->execute(array($startDate,$endDate)); $allClosings = CommonUtils::fetchSqlAll($pdo, $sql, array($startDate,$endDate));
$allClosings = $stmt->fetchAll(); } else {
$sql = "SELECT DISTINCT %closing%.id as id, DATE(closingdate) as datewotime,TIME(closingdate) as thetime FROM %closing% WHERE id >= ? AND id <= ? ";
$allClosings = CommonUtils::fetchSqlAll($pdo, $sql, array($closidstart,$closidend));
}
$entry = false; $entry = false;
foreach ($allClosings as $aClosing) { foreach ($allClosings as $aClosing) {
@ -463,10 +496,17 @@ class PdfExport extends FPDF {
$this->osWriteSummarySum($pdo,$this->osSumAll[$lang],$allbSum, $allnSum,14, -1); $this->osWriteSummarySum($pdo,$this->osSumAll[$lang],$allbSum, $allnSum,14, -1);
$sql = "SELECT %queue%.tax as tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill%,%closing% "; if (is_null($closidstart)) {
$sql .= " WHERE billid=%bill%.id AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ? GROUP BY tax"; $sql = "SELECT %queue%.tax as tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill%,%closing% ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $sql .= " WHERE billid=%bill%.id AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ? GROUP BY tax";
$stmt->execute(array($startDate,$endDate)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($startDate,$endDate));
} else {
$sql = "SELECT %queue%.tax as tax,SUM(price) as brutto,ROUND(SUM(price)/(1 + %queue%.tax/100.0),2) as netto FROM %queue%,%bill%,%closing% ";
$sql .= " WHERE billid=%bill%.id AND closingid=%closing%.id AND %closing%.id >= ? AND %closing%.id <= ? GROUP BY tax";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($closidstart,$closidend));
}
$taxDetails = $stmt->fetchAll(PDO::FETCH_OBJ); $taxDetails = $stmt->fetchAll(PDO::FETCH_OBJ);
@ -486,9 +526,15 @@ class PdfExport extends FPDF {
} }
$sql = "SELECT SUM(brutto) as cashsum FROM %bill%,%closing% WHERE status=? AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ?"; if (is_null($closidstart)) {
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $sql = "SELECT SUM(brutto) as cashsum FROM %bill%,%closing% WHERE status=? AND closingid=%closing%.id AND DATE(closingdate) >= ? AND DATE(closingdate) <= ?";
$stmt->execute(array('c',$startDate,$endDate)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('c',$startDate,$endDate));
} else {
$sql = "SELECT SUM(brutto) as cashsum FROM %bill%,%closing% WHERE status=? AND closingid=%closing%.id AND %closing%.id >= ? AND %closing%.id <= ? ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('c',$closidstart,$closidend));
}
$row = $stmt->fetchObject(); $row = $stmt->fetchObject();
$cashsum = $row->cashsum; $cashsum = $row->cashsum;
@ -544,21 +590,17 @@ class PdfExport extends FPDF {
$this->Cell($this->maxTableLength,1,"","B",1,"C",0); $this->Cell($this->maxTableLength,1,"","B",1,"C",0);
} }
private function addRestoreStat($pdo, $lang, $startMonth, $startYear, $endMonth, $endYear) { private function addRestoreStat($pdo, $lang) {
$this->curtable = ""; $this->curtable = "";
$startDate = $this->calcStartDate($startMonth, $startYear); $sql = "SELECT DATE(date) as day FROM %hist% WHERE action=? ORDER BY date";
$endDate = $this->calcEndDate($endMonth, $endYear); $result = CommonUtils::fetchSqlAll($pdo, $sql, array(10));
if (count($result) == 0) {
$sql = "SELECT COUNT(id) as restores FROM %hist% WHERE action=? AND date between ? AND ?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array(10,$startDate,$endDate));
$row = $stmt->fetchObject();
if ($row->restores == 0) {
return; return;
} }
$this->Ln(); $this->Ln();
$this->Ln(); $this->Ln();
@ -572,10 +614,6 @@ class PdfExport extends FPDF {
$this->SetFillColor(200,200,200); $this->SetFillColor(200,200,200);
$this->Cell($this->maxTableLength,15,$t["Restore"][$lang],1,1,"C",0); $this->Cell($this->maxTableLength,15,$t["Restore"][$lang],1,1,"C",0);
$sql = "SELECT DATE(date) as day FROM %hist% WHERE action=? AND date between ? AND ?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array(10,$startDate,$endDate));
$result = $stmt->fetchAll();
$this->SetFont('Helvetica','',10); $this->SetFont('Helvetica','',10);
$this->SetFillColor(200,200,200); $this->SetFillColor(200,200,200);
@ -619,7 +657,7 @@ class PdfExport extends FPDF {
} }
public function exportPdfReport($lang,$startMonth,$startYear,$endMonth,$endYear) { public function exportPdfReport($lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$this->decpoint = self::getConfigItem($pdo,"decpoint"); $this->decpoint = self::getConfigItem($pdo,"decpoint");
$this->currency = self::getConfigItem($pdo,"currency"); $this->currency = self::getConfigItem($pdo,"currency");
@ -632,19 +670,27 @@ class PdfExport extends FPDF {
$this->AddPage(); $this->AddPage();
$this->SetFont('Helvetica','B',16); $this->SetFont('Helvetica','B',16);
$this->osInsertHeader($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear); $this->osInsertHeader($pdo,$lang,0,0,0,0);
$this->osInsertSales($pdo, $lang, $startMonth, $startYear, $endMonth, $endYear,$closidstart,$closidend);
$this->osInsertSales($pdo, $lang, $startMonth, $startYear, $endMonth, $endYear);
$this->Ln(10); $this->Ln(10);
$this->osInsertProdStat($pdo,$startMonth,$startYear,$endMonth,$endYear); $this->osInsertProdStat($pdo,$startMonth,$startYear,$endMonth,$endYear,$closidstart,$closidend);
$this->addRestoreStat($pdo,$lang, $startMonth, $startYear, $endMonth, $endYear); $this->addRestoreStat($pdo,$lang);
$this->Output(); $this->Output();
} }
public function exportPdfSummary($lang,$startMonth,$startYear,$endMonth,$endYear) { public function exportPdfSummary($lang,$startMonth,$startYear,$endMonth,$endYear) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$this->exportPdfSummaryCore($pdo, $lang, $startMonth, $startYear, $endMonth, $endYear, null,null);
}
public function exportPdfSummaryClosPeriod($lang,$closidstart,$closidend) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$this->exportPdfSummaryCore($pdo, $lang, 0, 0, 0, 0, $closidstart,$closidend);
}
public function exportPdfSummaryCore($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear,$closidstart = null,$closidend = null) {
$this->decpoint = self::getConfigItem($pdo,"decpoint"); $this->decpoint = self::getConfigItem($pdo,"decpoint");
$this->currency = self::getConfigItem($pdo,"currency"); $this->currency = self::getConfigItem($pdo,"currency");
@ -657,10 +703,15 @@ class PdfExport extends FPDF {
$this->AddPage(); $this->AddPage();
$this->SetFont('Helvetica','B',16); $this->SetFont('Helvetica','B',16);
$this->osInsertHeader($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear); if (!is_null($closidstart)) {
$headerLine = $this->osClosingsPlural[$lang] . " $closidstart - $closidend ";
$headerLine = $this->osSummary[$lang] . " " . self::osGetMonthName($lang, $startMonth) . " $startYear - " . self::osGetMonthName($lang, $endMonth) . " $endYear"; $headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")";
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")"; $this->osInsertHeader($pdo,$lang,0,0,0,0);
} else {
$headerLine = $this->osSummary[$lang] . " " . self::osGetMonthName($lang, $startMonth) . " $startYear - " . self::osGetMonthName($lang, $endMonth) . " $endYear";
$headerLine .= " (in " . self::getConfigItem($pdo,"currency") . ")";
$this->osInsertHeader($pdo,$lang,$startMonth,$startYear,$endMonth,$endYear);
}
$this->Cell($this->maxTableLength ,10,$headerLine,0,1,"C",0); $this->Cell($this->maxTableLength ,10,$headerLine,0,1,"C",0);
@ -673,10 +724,9 @@ class PdfExport extends FPDF {
$this->setSummaryTableHeader(); $this->setSummaryTableHeader();
$this->curtable = "summary"; $this->curtable = "summary";
$this->daySummary($pdo,$lang, $startMonth, $startYear, $endMonth, $endYear); $this->daySummary($pdo,$lang, $startMonth, $startYear, $endMonth, $endYear, $closidstart,$closidend);
$this->addRestoreStat($pdo,$lang, $startMonth, $startYear, $endMonth, $endYear); $this->addRestoreStat($pdo,$lang);
$this->Output(); $this->Output();
} }
} }

View File

@ -1169,6 +1169,34 @@ class Version {
} }
} }
public static function upd_1522_1523($pdo, $prefix, $dbname) {
try {
self::execSql($pdo, "ALTER TABLE %queue% ADD clsid INT(1) NULL AFTER isclosed");
self::execSql($pdo, "ALTER TABLE %queue% ADD FOREIGN KEY(clsid) REFERENCES %closing% (id)");
$sql = "SELECT max(id) as maxid FROM %queue%";
$stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix));
$stmt->execute();
$r = $stmt->fetchAll(PDO::FETCH_ASSOC);
$maxid = 0;
if (count($r) > 0) {
$maxid = $r[0]["maxid"];
if (is_null($maxid)) {
$maxid = 0;
}
}
$sql = "INSERT INTO %work% (item,value) VALUES(?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix));
$stmt->execute(array("indexunclosedqueue",$maxid));
self::execSql($pdo, "ALTER TABLE %work% MODIFY value VARCHAR(100) NULL");
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"), "1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1238,7 +1266,8 @@ class Version {
"1.5.18" => array("upd_1518_1519","1.5.19"), "1.5.18" => array("upd_1518_1519","1.5.19"),
"1.5.19" => array("upd_1519_1520","1.5.20"), "1.5.19" => array("upd_1519_1520","1.5.20"),
"1.5.20" => array("upd_1520_1521","1.5.21"), "1.5.20" => array("upd_1520_1521","1.5.21"),
"1.5.21" => array("upd_1521_1522","1.5.22") "1.5.21" => array("upd_1521_1522","1.5.22"),
"1.5.22" => array("upd_1522_1523","1.5.23")
); );
public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) { public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) {

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.22"></script> <script src="utilities.js?v=1.5.23"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -15,8 +15,8 @@
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js"></script> <script src="utilities.js"></script>
<script src="elements/product.js?v=1.5.22"></script> <script src="elements/product.js?v=1.5.23"></script>
<script src="elements/extra.js?v=1.5.22"></script> <script src="elements/extra.js?v=1.5.23"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head> </head>

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="css/ospage.css" /> <link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" /> <link rel="stylesheet" href="css/tablepanel.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

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

View File

@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razón"];
var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"]; var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"];
var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."]; var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."];
var nextpage = "paydesk.html?version=1.5.22"; var nextpage = "paydesk.html?version=1.5.23";
var lang; var lang;
@ -84,10 +84,10 @@ function setLanguage(language) {
if (nextPage == "p") { if (nextPage == "p") {
$("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]); $("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]);
nextpage = "paydesk.html?t=" + tableid + "&version=1.5.22"; nextpage = "paydesk.html?t=" + tableid + "&version=1.5.23";
} else { } else {
$("#nextpagebtntxt").html(SUM_TO_ORDER[lang]); $("#nextpagebtntxt").html(SUM_TO_ORDER[lang]);
nextpage = "waiter.html?version=1.5.22"; nextpage = "waiter.html?version=1.5.23";
} }
var txt = "<table class='viewtable'>"; var txt = "<table class='viewtable'>";

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.22"></script> <script src="utilities.js?v=1.5.23"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

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

View File

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