OrderSprinter 1.5.7

This commit is contained in:
Geno 2020-11-19 23:11:49 +01:00
parent 72da923ecd
commit eb6b2232a8
36 changed files with 826 additions and 77 deletions

View File

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

View File

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

View File

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

Binary file not shown.

View File

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

View File

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

View File

@ -0,0 +1,92 @@
// Abkürzungen:
#[GRAU]=background-color:#cccccc;
#[BLAU]=background-color:#81F7D8;
#[WEISS]=background-color:#ffffff;
#[B]=font-weight:bold;
#[K]=font-style: italic;
#[ABSTAND]=letter-spacing: 3px;
#[BIG_PADDING]=padding-top: 25px;padding-right: 15px;padding-bottom: 25px;padding-left: 40px;
#[SMALL_PADDING]=padding-top: 10px;padding-right: 15px;padding-bottom: 10px;padding-left: 20px;
#[BREITE150]=width:150px;
#[SCHRIFT]=style='font-family: Helvetica, Arial, Sans-Serif;'
#[RAND]=border-collapse: collapse;border: 1px solid black;
#[BLANK]=border: 0px solid black;
#[PADDING]=padding:10px;
#[RECHTS]=text-align:right;
#[BEREICH]=border-radius:25px;background: #bbbbbb;padding: 10px;border-style: solid;border-color: green;width: 400px;border-spacing: 5px;}
// Ab hier beginnt die eigentliche Vorlage:
//
<h1 style=[SCHRIFT]>Tageserfassung <span style="[ITALICS]">{Id}</span></h1><br>
<table style="[BLANK]">
<tr><td style="[PADDING]">{Logo-gross}<td style="[PADDING]">{Betriebsinfo}</tr>
</table><br>
<table style="[RAND][SCHRIFT]">
<tr><td style='[B][K][RAND][PADDING][GRAU]'>Datum: <td style='[K][RAND][PADDING]'>{Tag}.{Monat}.{Jahr}</tr>
<tr><td style='[B][K][RAND][PADDING][GRAU]'>Kommentar: <td style='[K][RAND][PADDING]'>{Bemerkung}</tr>
<tr><td style='[B][K][RAND][PADDING][GRAU]'>Uhrzeit: <td style='[K][RAND][PADDING]'>{Stunde}:{Minute}:{Sekunde}</tr>
<tr><td style='[B][K][RAND][PADDING][GRAU]'>Anzahl Bons: <td style='[K][RAND][PADDING]'>{Bonanzahl}</tr>
<tr><td style='[B][K][RAND][PADDING][GRAU]'>Summe ({Einheit}): <td style='[K][RAND][PADDING]'>{Bruttosumme}</tr>
</table><br><br>
<table style="[RAND][SCHRIFT]">
<tr><th colspan=4 style='[B][K][RAND][PADDING][BLAU][ABSTAND]'>Übersicht</tr>
<tr><th style='[B][K][RAND][PADDING][GRAU]'>Brutto ({Einheit})
<th style='[B][K][RAND][PADDING][GRAU]'>Netto ({Einheit})
<th style='[B][K][RAND][PADDING][GRAU]'>Vorgang
<th style='[B][K][RAND][PADDING][GRAU]'>Zahlungsweg</tr>
>>ZUSAMMENFASSUNG
<tr><td style='[K][RAND][PADDING][RECHTS]'>{Brutto}
<td style='[K][RAND][PADDING][RECHTS]'>{Netto}
<td style='[K][RAND][PADDING]'>{Vorgang}
<td style='[K][RAND][PADDING]'>{Zahlungsweg}
<<ZUSAMMENFASSUNG
</table><br><br>
<table style="[RAND][SCHRIFT]">
<tr><th colspan=3 style='[B][K][RAND][PADDING][BLAU][ABSTAND]'>Steuersätze</tr>
<tr><th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Steuersatz (%)
<th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Brutto ({Einheit})
<th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Netto ({Einheit})</tr>
>>STEUERN
<tr><td style='[K][RAND][PADDING][BREITE150][RECHTS]'>{Steuer}
<td style='[K][RAND][PADDING][BREITE150][RECHTS]'>{Brutto}
<td style='[K][RAND][PADDING][BREITE150][RECHTS]'>{Netto}</tr>
<<STEUERN
</table><br><br>
<div style="[BEREICH]">
Zahlungswege<br><br>
>>ZAHLUNGSWEGE
<table style="[RAND][SCHRIFT]">
<tr><th colspan=3 style='[B][K][RAND][PADDING][BLAU][ABSTAND]'>{Zahlungsweg}</tr>
<tr><th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Steuersatz (%)
<th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Brutto ({Einheit})
<th style='[B][K][RAND][PADDING][GRAU][BREITE150]'>Netto ({Einheit})</tr>
>>ZAHLUNGSWEG
<tr><td style='[K][RAND][PADDING][WEISS][BREITE150][RECHTS]'>{Steuer}
<td style='[K][RAND][PADDING][WEISS][BREITE150][RECHTS]'>{Brutto}
<td style='[K][RAND][PADDING][WEISS][BREITE150][RECHTS]'>{Netto}</tr>
<<ZAHLUNGSWEG
</table>
<br><br>
<<ZAHLUNGSWEGE
</div>
<br><br>
<table style="[RAND][SCHRIFT]">
<tr><th colspan=5 style='[B][K][RAND][PADDING][BLAU][ABSTAND]'>Produktstatistik</tr>
<tr><th style='[B][K][RAND][PADDING][GRAU]'>Anzahl
<th style='[B][K][RAND][PADDING][GRAU]'>Produktname
<th style='[B][K][RAND][PADDING][GRAU]'>Steuer (%)
<th style='[B][K][RAND][PADDING][GRAU]'>Einzelpreis ({Einheit})
<th style='[B][K][RAND][PADDING][GRAU]'>Gesamtpreis ({Einheit})</tr>
>>PRODUKTE
<tr><td style='[K][RAND][PADDING]'>{Anzahl}
<td style='[K][RAND][PADDING]'>{Produktname}
<td style='[K][RAND][PADDING][RECHTS]'>{Steuer}
<td style='[K][RAND][PADDING][RECHTS]'>{Einzelpreis}
<td style='[K][RAND][PADDING][RECHTS]'>{Gesamtpreis}</tr>
<<PRODUKTE
</table>

View File

@ -31,7 +31,7 @@ Speisen = KBF = 1
Salami = KBF = 1
Pizza Salami klein; 6,00 # Kurzname:klein; Bildnr: 1
Pizza Salami groß; 7,00 # Kurzname:groß; Bildnr: 1
Salata = KBF = 1
Salate = KBF = 1
Blattsalat ; 2,00 # Bildnr:25
Bunter Salat; 3,00 # Bildnr:26
Deftiges = KBF = 1

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.6">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.7">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.6">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.6">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.7">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.7">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -229,7 +229,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") {
useInstallation();
} else {
setTimeout(function(){document.location.href = "install.html?v=1.5.6"},500);
setTimeout(function(){document.location.href = "install.html?v=1.5.7"},500);
}
}

View File

@ -547,6 +547,13 @@ function setSelectedLanguage(e,l) {
function displayTimezones() {
$("#languagesettings").hide();
$("#timezones").show();
if (lang == 0) {
$("#datasec_de").show();
} else if (lang == 1) {
$("#datasec_en").show();
} else if (lang == 2) {
$("#datasec_es").show();
}
}
function getTimeZones() {
@ -625,7 +632,7 @@ $(document).ready(function() {
</head>
<body style="background-color:SaddleBrown ;">
<center><img src=img/bannerwithphone.png width=800px></img></center>
<center><img src=img/bannerwithphone.png style="width:800px;" alt="Banner" /></center>
<div id=languagesettings style="display:none;">
<br>
@ -633,9 +640,9 @@ $(document).ready(function() {
<center>
<table class="viewtable" id=langTable>
<tr><th>Sprache auswählen - Select language - Qué idioma?</tr>
<tr><td class="germanflag"><img class="flags" src=img/germanflag.png width=35px height=23px />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">Deutsch</span></tr>
<tr><td class="ukflag"><img class="flags" src=img/ukflag.png width=35px height=23px />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">English</span></tr>
<tr><td class="spainflag"><img class="flags" src=img/spainflag.png width=35px height=23px />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">Español</span></tr>
<tr><td class="germanflag"><img class="flags" src=img/germanflag.png style="width:35px;height:23px;" />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">Deutsch</span></tr>
<tr><td class="ukflag"><img class="flags" src=img/ukflag.png style="width:35px;height:23px;" />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">English</span></tr>
<tr><td class="spainflag"><img class="flags" src=img/spainflag.png style="width:35px;height:23px;" />&nbsp;&nbsp;&nbsp;<span style="font-size:20px;">Español</span></tr>
</table>
</center>
</div>
@ -655,6 +662,66 @@ $(document).ready(function() {
<div style="font-size:20px;color:white;">
(<span id=ignoretimezonehint>Uninteressant bei reinem Versionsupdate</span>)
</div>
<br>
<div id="datasec_de" style="text-align:left;border: 1px solid #666666;border-radius: 25px;padding: 10px;background-color: #fef79b;display:none;">
<br><b><u>Hinweise zum Datenschutz:</u></b><br>
Der OrderSprinter-Webservice benötigt keine Verbindung zum Internet. Kann der OrderSprinter-Webserver jedoch eine Verbindung zum Internet aufbauen, stehen folgende
Funktionen zur Verfügung:
<ul>
<li>Semi-Automatische Softwareupdates: Während der Arbeit in der Verwaltungsansicht prüft OrderSprinter durch verschiedene Auslöser getriggert (z.B. Seitenaufruf,
Tageserfassungserstellung, Konfigurationsänderung), ob es eine neuere als die installierte Version der Software gibt. Ist dies der Fall, so kann ein
Benutzer mit Administrationsrechten innerhalb der Verwaltungsansicht durch einen einfachen Buttonklick das Versionsupdate auf dem Server vornehmen. Im Rahmen
der Versionsüberprüfung übermittelt der Server die eigene Version und das Installationsdatum an die OrderSprinter-Seite www.ordersprinter.de. Der Webserver
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>Automatische Erstellung einer Kundenwebseite, die sich aus der konfigurierten Speisekarte ergibt.
<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>
<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>Das ausgeführte Kommando auf der Serverseite und das Kommando auf der Client-Seite, welches anschließend nicht mehr zur Ausführung kommen konnte.
<li>Version: Natürlich muss ich auch wissen, in welcher Version der Fehler auftrat.
<li>xhr-responseText: Das ist die http-Antwort des Servers auf Anfragen
<li>Status: Der Status des Webservers
<li>PHP-Version: PHP ist nicht komplett abwärtskompatibel, diese Information hilft bei der Fehlersuche.
</ul>
</ul>
</div>
<div id="datasec_en" style="text-align:left;border: 1px solid #666666;border-radius: 25px;padding: 10px;background-color: #fef79b;display:none;">
<br><b><u>Information on data protection:</u></b><br>
The OrderSprinter web service does not require an Internet connection. However, if the OrderSprinter web server can connect to the Internet, the following functions are available:
<ul>
<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>Automatic creation of a customer website, which results from the configured menu.
<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>
<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 executed command on the server side and the command on the client side, which could not be executed afterwards.
<li>Version: Of course I also need to know in which version the error occurred.
<li>xhr-responseText: This is the http response of the server to requests
<li>Status: The status of the web server
<li>PHP version: PHP is not fully backwards compatible, this information helps in debugging.
</ul>
</ul>
</div>
<div id="datasec_es" style="text-align:left;border: 1px solid #666666;border-radius: 25px;padding: 10px;background-color: #fef79b;display:none;">
<br><b><u>Información sobre protección de datos:</u></b><br>
El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo, si el servidor web de OrderSprinter puede conectarse a Internet, están disponibles las siguientes funciones:
<ul>
<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>Creación automática de un sitio web para el cliente, que resulta del menú configurado.
<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>
<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>El comando ejecutado en el lado del servidor y el comando en el lado del cliente, que no se pudo ejecutar posteriormente.
<li>Versión: Por supuesto, también necesito saber en qué versión se produjo el error.
<li>xhr-respuestaTexto: Esta es la respuesta http del servidor a las peticiones
<li>Estado: El estado del servidor web
<li>Versión PHP: PHP no es totalmente compatible con versiones anteriores, esta información ayuda en la depuración.
</ul>
</ul>
</div>
</div>
<div id=installsettings style="display:none;">
@ -727,7 +794,7 @@ $(document).ready(function() {
<tr id=updateline>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.5.6</button>
<button id="updatebtn">Update -> 1.5.7</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td>
<td>&nbsp;</td>

View File

@ -414,7 +414,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones);
} else if ($command == 'update') {
set_time_limit(60*30);
$installerVersion = "1.5.6";
$installerVersion = "1.5.7";
$admin = new InstallAdmin();
$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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.6">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.7">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.6"></script>
<script src="kitchenbar.js?v=1.5.6"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="kitchenbar.js?v=1.5.7"></script>
<style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.6">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.7">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.6"></script>
<script src="elements/tablemap.js?v=1.5.6"></script>
<script src="elements/roommap.js?v=1.5.6"></script>
<script src="elements/groundplan.js?v=1.5.6"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="elements/tablemap.js?v=1.5.7"></script>
<script src="elements/roommap.js?v=1.5.7"></script>
<script src="elements/groundplan.js?v=1.5.7"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -117,6 +117,7 @@ var MAN_XLSX_EXP_RECEIPTS = ["... Excel","... Excel","... Excel"];
var MAN_CSV_EXP_ALL = ["CSV-Export komplett","CSV export all","Grabar todo en CSV"];
var MAN_PRINT_ALL = ["Drucken Komplettbericht","Print all","Imprimir todo"];
var MAN_PRINT_RECEIPT = ["Drucken Zusammenfassung auf Bon","Print summary on receipt","Imprimir resumen en tique"];
var MAN_CLOS_HTML = ["Tageserfassung über Html-Vorlage","Closing formatted by html template","Resumen en tique por html template"];
var MAN_CSV_EXP_GUEST = ["CSV-Export Gastbezahlprotokoll","CSV Export Guest payments log","CSV Export Pagos del cliente"];
var MAN_OF = [" vom "," of "," de "];
var MAN_PERIOD = ["Zeitraum: ","Period: ","Período: "];
@ -252,6 +253,10 @@ var MAN_DRINKTEMPLATE_HINT = ["Hinweis: Die Anpassung der Bonvorlage ist in der
var MAN_CANCELTEMPLATE_HINT = ["Hinweis: Die Anpassung der Bonvorlage ist in der Anleitung und auf der Produktwebseite beschrieben.",
"Hint: The customization of the receipt template is described in the manual and on the product home page.",
"Nota: La adapción del template esta explicada en la página web y el manual."];
var MAN_CLOSTEMPLATE_HINT = ["Hinweis: Die Vorlage bezieht sich nur auf die html-Darstellung der Tageserfassung, also nicht auf den Bondruck. Die Anpassung ist in der Anleitung beschrieben.",
"Note: The template only refers to the html display of the closing, not to receipt printing. The adjustment is described in the manual.",
"Nota: La plantilla sólo se refiere a la visualización html de la entrada del día, no a la impresión de recibos. El ajuste se describe en el manual."
];
var MAN_NO_ADMIN = ["Um Admin-Rechte zu bearbeiten, muss der Benutzer selbst Adminrechte besitzen.", "Modifying admin rights require that the changing user has also admin rights.", "Necesitas derecho de admin para modificar derecho de admin para otros usarios."];
var MAN_NO_ADMIN_CREATE = ["Nur Admin-Benutzer können andere Admin-Benutzer anlegen",
"Only admin users can create other admin users",
@ -470,6 +475,7 @@ var generalValuesSettings = [
["foodtemplate","Arb.bonvorlage Speisen","i",0],
["drinktemplate","Arb.bonvorlage Getränke","i",0],
["canceltemplate","Storno Arb.bonvorlage","i",0],
["clostemplate","Tageserfassung html-Vorlage","i",0],
["serverUrl","Serveradresse","i",0],
["guesturl","Gastsystem-URL","i",0],
["guestcode","Gastsystem-Zugriffscode","i",0],
@ -703,6 +709,7 @@ function setLanguage(l) {
$("#foodtemplatehint").html(MAN_FOODTEMPLATE_HINT[l]);
$("#drinktemplatehint").html(MAN_DRINKTEMPLATE_HINT[l]);
$("#canceltemplatehint").html(MAN_CANCELTEMPLATE_HINT[l]);
$("#clostemplatehint").html(MAN_CLOSTEMPLATE_HINT[l]);
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
$("#generalsectiontxt").html(MAN_GENSECTION_TXT[l]);
@ -824,6 +831,7 @@ function insertGeneralConfigItems(configResult) {
$("#foodtemplate").val(values.foodtemplate);
$("#drinktemplate").val(values.drinktemplate);
$("#canceltemplate").val(values.canceltemplate);
$("#clostemplate").val(values.clostemplate);
$("#reservationnote").val(values.reservationnote);
@ -1389,7 +1397,7 @@ function initRestoreFileUpload() {
} else {
alert("Import war erfolgreich.");
setTimeout(function(){
document.location.href = "index.html?v=1.5.6";
document.location.href = "index.html?v=1.5.7";
},250);
}
},
@ -1553,6 +1561,13 @@ function bindingClosing() {
}
});
$(".closhtml").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var closingid = this.id.split("_")[1];
window.open("php/contenthandler.php?module=closing&command=htmlreport&closid=" + closingid,'_blank');
});
$("#select-year").change(function() {
getClosingsOfSelectedDate();
});
@ -1936,9 +1951,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis();
setTimeout(function(){
document.location.href = "install.html?v=1.5.6&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.5.7&mode=onlyupdate&n=" + millis;
},250);
document.location.href = "install.html?v=1.5.6&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.5.7&mode=onlyupdate&n=" + millis;
}
function handleUpdateReplace(answer) {
@ -2996,6 +3011,7 @@ function createClosingPart (aText,id,totalsum,cashsum,usersums,taxessums,categor
closingPart += '<button type="submit" data-theme="f" class="printButton" data-icon="check" id="printexport_' + id + '">' + MAN_PRINT_ALL[lang] + '</button>';
closingPart += '<button type="submit" data-theme="f" class="printsummary" data-icon="check" id="printsummary_' + id + '">' + MAN_PRINT_RECEIPT[lang] + '</button>';
closingPart += '<button type="submit" data-theme="f" class="closhtml" data-icon="check" id="closhtml_' + id + '">' + MAN_CLOS_HTML[lang] + '</button>';
closingPart += '<button type="submit" data-theme="f" class="csvExportGuestButton" data-icon="check" id="csvguestexport_' + id + '">' + MAN_CSV_EXP_GUEST[lang] + '</button>';
@ -3469,6 +3485,11 @@ $(document).on("pageinit", "#admin-page", function () {
<textarea cols="40" rows="8" name="canceltemplate" id="canceltemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
<i id=canceltemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain">
<label for="clostemplate">Vorlage html-Tageserfassung:</label>
<textarea cols="40" rows="8" name="clostemplate" id="clostemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
<i id=clostemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain">
<label for="reservationnote">Reservierungstemplate Email:</label>
<textarea cols="40" rows="8" name="reservationnote" id="reservationnote" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
@ -3919,8 +3940,8 @@ $(document).on("pageinit", "#admin-page", function () {
<h3>Kategorien</h3>
<p>Das Gleichheitszeichen dient als Trenner zwischen Namen und weiteren Eigenschaften.
Wird ein <i>K</i> und <i>B</i> mitgegeben, so werden diese Produkte über die Küchen-
und Bereitstellungsansicht geführt. Die Einstellung wird auf die Unterkategorien
Wird ein <i>K</i> und <i>B</i> mitgegeben, so werden diese Produkte über die Küchen/Bar (K) -
und Bereitstellungsansicht (B) geführt. Die Einstellung wird auf die Unterkategorien
vererbt, wenn die darunter liegenden Kategorien keine Angabe dazu enthalten.
Hinter dem zweiten Gleichheitszeichen kann die Nummer eines Arbeitsbondruckers
des jeweiligen Typs (Speise/Getränk) angegeben werden.

View File

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

View File

@ -1062,6 +1062,7 @@ class Admin {
array("foodtemplate",null,false),
array("drinktemplate",null,false),
array("canceltemplate",null,false),
array("clostemplate",null,false),
array("decpoint",null,false),
array("version",null,false),
array("payprinttype",null,false),
@ -1362,7 +1363,7 @@ class Admin {
$view = "preferences.html";
}
echo json_encode($view . "?v=1.5.6");
echo json_encode($view . "?v=1.5.7");
}
}
@ -1577,30 +1578,30 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.6"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.7"); }
} else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.6"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.7"); }
}
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.6"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.6"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.6"); }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.7"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.7"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.7"); }
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.6"); }
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.7"); }
}
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.6"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.6"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.6"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.6"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.6"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.6"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.6"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.6"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.6"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.6");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.6"); }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.7"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.7"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.7"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.7"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.7"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.7"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.7"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.7"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.7"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.7");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.7"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.6");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.6");
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.7");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.7");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -2069,6 +2070,7 @@ class Admin {
"foodtemplate" => array("dbcol" => "foodtemplate","checknum" => 0),
"drinktemplate" => array("dbcol" => "drinktemplate","checknum" => 0),
"canceltemplate" => array("dbcol" => "canceltemplate","checknum" => 0),
"clostemplate" => array("dbcol" => "clostemplate","checknum" => 0),
"serverUrl" => array("dbcol" => "serverurl","checknum" => 0),
"guesturl" => array("dbcol" => "guesturl","checknum" => 0),
"guestcode" => array("dbcol" => "guestcode","checknum" => 0),

View File

@ -54,6 +54,8 @@ $this->emailCsv($_GET['closingid'],$_GET['emailaddress'],$_GET['topic']);
$this->getClosing($_GET['closingid']);
} else if ($command == 'getClosingSummary') {
$this->getClosingSummary($_GET['closingid'],null,true);
} else if ($command == 'htmlreport') {
$this->htmlreport($_GET["closid"]);
} else {
echo "Command not supported.";
}
@ -847,4 +849,30 @@ echo json_encode(array("status" => "OK", "msg" => $retVal));
return $retVal;
}
}
private function htmlreport($closingid) {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$ok = self::checkForClosingConsistency($pdo, $closingid);
if (($ok == 0)) {
echo "Datenbank inkonsistent";
return;
}
$closing = $this->getClosingSummaryCore($closingid,$pdo,false,false,8);
$clostemplate = CommonUtils::getConfigValue($pdo, "clostemplate", "Kein Template festgelegt");
$templatelines = Templateutils::getTemplateAsLineArray($clostemplate);
$reporter = new ClosTemplater($templatelines,$closingid,$closing);
$txt = $reporter->createWithTemplate($pdo);
$html = "<html>";
$html = "<head><meta charset='UTF-8'></head>";
$html .= "<body><style>";
$html .= "</style>";
$html .= $txt;
$version = CommonUtils::getConfigValue($pdo, "version", "");
$html .= "<br><br><hr><div style='text-align:right;font-style:italic;'>OrderSprinter $version</div>";
$html .= "</body></html>";
echo $html;
}
}

View File

@ -20,6 +20,8 @@ require_once ('workreceipts.php');
require_once ('utilities/Logger.php');
require_once ('utilities/roles.php');
require_once ('utilities/permissions.php');
require_once ('utilities/basetemplater.php');
require_once ('utilities/clostemplater.php');
require_once ('guestsync.php');
require_once ('timetracking.php');
require_once ('tasks.php');

View File

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

View File

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

View File

@ -138,13 +138,6 @@ class Feedback {
$status = '';
$phpversion = phpversion();
if (strlen($xhr) > 900) {
$xhr = substr($xhr, 0, 899);
}
if (strlen($errormsg) > 150) {
$errormsg = substr($errormsg, 0, 149);
}
$arr = array("cmd" => $cmd, "fct" => $fct, "xhr" => $xhr, "errormsg" => $errormsg, "status" => $status, "version" => $version, "phpversion" => $phpversion);
$url = "http://www.ordersprinter.de/debug/save.php?cmd=save";

View File

@ -224,6 +224,11 @@ class Roomtables {
$arrayOfRooms = array();
$showprepinwaiter = CommonUtils::getConfigValue($pdo, 'showprepinwaiter', 1);
$workflowconfig = CommonUtils::getConfigValue($pdo, 'workflowconfig', 0);
$queryprodForTableView = false;
if (($showprepinwaiter == 1) && (($workflowconfig == 0) || ($workflowconfig == 1))) {
$queryprodForTableView = true;
}
foreach($dbresult as $zeile) {
$roomid = $zeile['id'];
@ -255,7 +260,7 @@ class Roomtables {
foreach ($tablesArray as $tableEntry) {
$arrayOfProdsAndIdsOfATable = array("prods" => array(), "ids" => '');
if ($showprepinwaiter == 1) {
if ($queryprodForTableView) {
$arrayOfProdsAndIdsOfATable = $queue->getAllPreparedProductsForTableidAsArray($pdo,$tableEntry->id);
}
$arrayOfProdsOfATable = $arrayOfProdsAndIdsOfATable['prods'];

View File

@ -1186,6 +1186,14 @@ class Basedb {
return;
}
public static function loadSampleCusHtmlTemplate($pdo) {
$file = "../customer/closingtemplate.txt";
$content = file_get_contents($file);
if ($content === false) {
$content = "Keine Vorlage vordefiniert";
}
return $content;
}
public static function loadSampleProdImages($pdo) {
$sql = "UPDATE %products% SET prodimageid=?";
CommonUtils::execSql($pdo, $sql, array(null));

View File

@ -0,0 +1,73 @@
<?php
class Basetemplater {
private $templatelines = array();
private $submodules = array();
private $closing = null;
function __construct($templatelines,$submodules,$closing) {
$this->templatelines = $templatelines;
$this->submodules = $submodules;
$this->closing = $closing;
}
public function createWithTemplate($pdo) {
$seperatedTemplate = Templateutils::separateSubModule($this->templatelines, $this->submodules);
$alldataitems = $this->getDataItems($pdo);
$txt = "";
foreach($alldataitems as $aDataEntry) {
$subInstances = array();
foreach($seperatedTemplate["submodulelines"] as $aSubModLineSection) {
$subModClassName = $aSubModLineSection["submodule"]["classname"];
$refl = new ReflectionClass($subModClassName);
$subInstances[] = $refl->newInstance($aSubModLineSection["foundlines"],$aDataEntry["id"],$this->closing);
}
foreach($seperatedTemplate["templatelines"] as $aTemplatelLine) {
$responsible = $aTemplatelLine["responsible"];
$line = $aTemplatelLine["line"];
if ($responsible == Templatedefs::$PARSE_SELF) {
$preprocessedLine = Abbreviations::replaceDefsInTextLine($line);
$txt .= $this->parse($pdo,$preprocessedLine,$aDataEntry);
} else if ($responsible == Templatedefs::$PARSE_CONDITIONAL) {
// parse line only if submodule has entries
$whichSubmodule = $aTemplatelLine["submoduleindex"];
$hasItems = call_user_func(array($subInstances[$whichSubmodule],"hasItems"),$pdo);
if ($hasItems) {
$preprocessedLine = Abbreviations::replaceDefsInTextLine($line);
$txt .= $this->parse($pdo,$preprocessedLine,$aDataEntry);
}
} else {
$whichSubmodule = $aTemplatelLine["submoduleindex"];
$txt .= call_user_func(array($subInstances[$whichSubmodule],"createWithTemplate"),$pdo);
}
}
}
return $txt;
}
public function parse($pdo,$text,$data) {
return $text;
}
public function getDataItems($pdo) {
return array();
}
public function hasItems($pdo) {
$items = $this->getDataItems($pdo);
if (count($items) > 0) {
return true;
} else {
return false;
}
}
public static function getClassName() {
return get_called_class();
}
}

View File

@ -0,0 +1,442 @@
<?php
class ClosTemplatestructure {
private static $structure = array(
"ClosTemplater" => array(
array("classname" => "ClosProdsReport","delimiter" => "PRODUKTE"),
array("classname" => "ClosOverviewReport","delimiter" => "ZUSAMMENFASSUNG"),
array("classname" => "ClosTaxesReport","delimiter" => "STEUERN"),
array("classname" => "ClosPaymentsReport","delimiter" => "ZAHLUNGSWEGE"),
),
"ClosProdsReport" => array(),
"ClosOverviewReport" => array(),
"ClosTaxesReport" => array(),
"ClosPaymentsReport" => array(
array("classname" => "ClosSingleReport","delimiter" => "ZAHLUNGSWEG")
),
"ClosSingleReport" => array()
);
private static $structure_old = array(
"Templater" => array(
array("classname" => "Reqsection","delimiter" => "SS"),
array("classname" => "Testcasesreport","delimiter" => "TC"),
array("classname" => "Matrixreporter","delimiter" => "MATRIX")
),
"Reqsection" => array(
array("classname" => "Reqdetails","delimiter" => "RD")
),
"Reqdetails" => array(
array("classname" => "Reqimgs","delimiter" => "REQIMG")
),
"Reqimgs" => array(),
"Testcasesreport" => array(
array("classname" => "Stepactionsreport","delimiter" => "TSACTIONS"),
array("classname" => "Stepexpectedreport","delimiter" => "TSEXPECTED"),
array("classname" => "Stepresultsreport","delimiter" => "TSRESULTS")
),
"Matrixreporter" => array(),
"Stepactionsreport" => array(),
"Stepexpectedreport" => array(),
"Stepresultsreport" => array()
);
public static function getSubModules($reporterClass) {
return self::$structure[$reporterClass];
}
}
class ClosTemplater extends Basetemplater {
private $templatelines = array();
private $closid = null;
private $closing = null;
function __construct($templatelines, $closid, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->closid = $closid;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Id}",$data["id"],$text);
$text = str_replace("{Tag}",$data["day"],$text);
$text = str_replace("{Monat}",$data["month"],$text);
$text = str_replace("{Jahr}",$data["year"],$text);
$text = str_replace("{Stunde}",$data["hour"],$text);
$text = str_replace("{Minute}",$data["minute"],$text);
$text = str_replace("{Sekunde}",$data["second"],$text);
$text = str_replace("{Bonanzahl}",$data["ticketcount"],$text);
$text = str_replace("{Bemerkung}",$data["remark"],$text);
$sum = str_replace(".", $data["decpoint"], $data["bruttosum"]);
$text = str_replace("{Bruttosumme}",$sum,$text);
$imgurl = "contenthandler.php?module=printqueue&command=getLogoAsPng";
$text = str_replace("{Logo-klein}","<img src='$imgurl' style='width:100px;' />",$text);
$text = str_replace("{Logo-gross}","<img src='$imgurl' style='width:300px;' />",$text);
$text = str_replace("{Betriebsinfo}",$data["companyinfo"],$text);
return $text;
}
public function getDataItems($pdo) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$companyinfo = str_replace("\n","<br>",$this->closing["companyinfo"]);
$clos = $this->closing["closing"];
$closdate = $clos->closingdate;
$datetimeparts = explode(" ", $closdate);
$dateparts = explode("-",$datetimeparts[0]);
$timeparts = explode(":",$datetimeparts[1]);
return array(array("id" => $this->closid,
"day" => $dateparts[2],
"month" => $dateparts[1],
"year" => $dateparts[0],
"hour" => $timeparts[0],
"minute" => $timeparts[1],
"second" => $timeparts[2],
"ticketcount" => $clos->billcount,
"bruttosum" => $clos->billsum,
"remark" => $clos->remark,
"decpoint" => $decpoint,
"companyinfo" => $companyinfo
));
}
}
class Abbreviations {
private static $defs = array();
public static function addUserDefinition($txt) {
$parts = explode('=',$txt,2);
$key = explode('#',$parts[0])[1];
$value = $parts[1];
self::$defs[] = array("key" => $key,"value" => $value);
}
public static function replaceDefsInTextLine($txt) {
foreach(self::$defs as $aDef) {
$txt = str_replace($aDef["key"], $aDef["value"], $txt);
}
return $txt;
}
}
class Templatedefs {
public static $PARSE_SELF = 0;
public static $PARSE_SUBMODULE = 1;
public static $PARSE_CONDITIONAL = 2;
}
class Templateutils {
public static function getTemplateAsLineArray($templateTxt) {
$alllines = explode("\n", $templateTxt);
return $alllines;
}
private static function hasStartDelimiterOfASubModule($line,$submodules) {
$trimmedLine = trim($line);
for ($i=0;$i<count($submodules);$i++) {
if ($trimmedLine == ">>" . $submodules[$i]["delimiter"]) {
return array(true,$i);
}
}
return array(false,null);
}
public static function separateSubModule($alllines,$submodules) {
$outlines = array();
$subtemplates = array();
$conditionalMarkups = array(); // line beginnings
$i=0;
foreach($submodules as $aSubModule) {
$subtemplates[] = array("submodule" => $aSubModule,"foundlines" => array());
// now store the conditional markup in associative array
$conditionalMarkups[$aSubModule["delimiter"]] = $i++;
}
$activeParsingSubmoduleIndex = null; // index in $subtemplates
$enddelimiter = null;
$started = false; // general for "is parsing lines for submodule"
$submodulelineAdded = false;
foreach($alllines as $aline) {
$trimmedLine = trim($aline);
$hasStartDel = self::hasStartDelimiterOfASubModule($trimmedLine, $submodules);
if (CommonUtils::startsWith($trimmedLine,"//")) {
} else if (preg_match("/#\[[a-zA-Z0-9_-]+\]=/i", $trimmedLine)) {
Abbreviations::addUserDefinition($trimmedLine);
} else if ($trimmedLine === $enddelimiter) {
$started = false;
} else if (($hasStartDel[0]) && !$started) {
// at this point we know there is a startdelimiter in the line
$activeParsingSubmoduleIndex = $hasStartDel[1];
$started = true;
$enddelimiter = "<<" . $subtemplates[$activeParsingSubmoduleIndex]["submodule"]["delimiter"];
} else if ($started) {
$subtemplates[$activeParsingSubmoduleIndex]["foundlines"][] = $aline;
if (!$submodulelineAdded) {
$outlines[] = array("responsible" => Templatedefs::$PARSE_SUBMODULE,"line" => $aline, "submoduleindex" => $activeParsingSubmoduleIndex);
$submodulelineAdded = true;
}
} else {
$lineParts = explode(":",$trimmedLine,3);
if (count($lineParts) >= 3) {
$markPart = $lineParts[1];
if (array_key_exists($markPart, $conditionalMarkups)) {
$conditionalLine = $lineParts[2];
$outlines[] = array("responsible" => Templatedefs::$PARSE_CONDITIONAL,"line" => $conditionalLine, "submoduleindex" => $conditionalMarkups[$markPart]);
} else {
$outlines[] = array("responsible" => Templatedefs::$PARSE_SELF,"line" =>$aline);
}
} else {
$outlines[] = array("responsible" => Templatedefs::$PARSE_SELF,"line" =>$aline);
}
$submodulelineAdded = false;
}
}
return array("templatelines" => $outlines, "submodulelines" => $subtemplates);
}
public static function debugOutput($sepTemp, $className) {
$templatelines = $sepTemp["templatelines"];
$txt = "Start debugOutput for '$className' - Templatelines:\n";
foreach($templatelines as $t) {
$isSelf = ($t["responsible"] == Templatedefs::$PARSE_SELF ? true : false );
switch($t["responsible"]) {
case Templatedefs::$PARSE_SELF:
$txt .= "SELF"; break;
case Templatedefs::$PARSE_CONDITIONAL:
$txt .= "COND"; break;
case Templatedefs::$PARSE_SUBMODULE:
$txt .= "SUB"; break;
default:
$txt .= "Undefined line marup"; break;
}
$txt .= " " . $t["line"];
if (!$isSelf) {
$txt .= " " . $t["submoduleindex"];
}
$txt .= "\r\n<br>";
}
return $txt;
}
}
class ClosProdsReport extends Basetemplater {
private $templatelines = array();
private $closid = null;
private $closing = null;
function __construct($templatelines, $closid, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->closid = $closid;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Anzahl}",$data["count"],$text);
$text = str_replace("{Steuer}",$data["tax"],$text);
$text = str_replace("{Produktname}",$data["productname"],$text);
$price = str_replace(".", $decpoint, $data["price"]);
$text = str_replace("{Einzelpreis}",$price,$text);
$sumprice = str_replace(".", $decpoint, $data["sumprice"]);
$text = str_replace("{Gesamtpreis}",$sumprice,$text);
return $text;
}
public function getDataItems($pdo) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$closprods = $this->closing["details"];
$prods = array();
foreach($closprods as $aProdEntry) {
$tax = str_replace(".", $decpoint, $aProdEntry["tax"]);
$prods[] = array("id" => $this->closid,
"count" => $aProdEntry["count"],
"productname" => $aProdEntry["productname"],
"price" => $aProdEntry["price"],
"tax" => $tax,
"sumprice" => $aProdEntry["sumprice"]
);
};
return $prods;
}
}
class ClosOverviewReport extends Basetemplater {
private $templatelines = array();
private $closid = null;
private $closing = null;
function __construct($templatelines, $closid, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->closid = $closid;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Brutto}",$data["brutto"],$text);
$text = str_replace("{Netto}",$data["netto"],$text);
$text = str_replace("{Zahlungsweg}",$data["name"],$text);
$text = str_replace("{Vorgang}",$data["status"],$text);
return $text;
}
public function getDataItems($pdo) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$closoverview = $this->closing["overview"];
$prods = array();
foreach($closoverview as $entry) {
$brutto = str_replace(".", $decpoint, $entry["sum"]);
$name = $entry["name"];
$netto = str_replace(".", $decpoint, $entry["netto"]);
$status = $entry["status"];
$statusTxt = "Verkauf";
if ($status == "c") {
$statusTxt = "Bareinlage/-auslage";
} else if ($status == "s") {
$statusTxt = "Stornooperation";
}
$prods[] = array("id" => $this->closid,
"brutto" => $brutto,
"netto" => $netto,
"name" => $name,
"status" => $statusTxt
);
};
return $prods;
}
}
class ClosTaxesReport extends Basetemplater {
private $templatelines = array();
private $closid = null;
private $closing = null;
function __construct($templatelines, $closid, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->closid = $closid;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Brutto}",$data["bruttosum"],$text);
$text = str_replace("{Netto}",$data["nettosum"],$text);
$text = str_replace("{Steuer}",$data["tax"],$text);
return $text;
}
public function getDataItems($pdo) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$closoverview = $this->closing["taxessum"];
$p = array();
foreach($closoverview as $entry) {
$tax = str_replace(".", $decpoint, $entry["t"]);
$bruttosum = str_replace(".", $decpoint, $entry["bruttosum"]);
$nettosum = str_replace(".", $decpoint, $entry["nettosum"]);
$p[] = array("id" => $this->closid,
"tax" => $tax,
"bruttosum" => $bruttosum,
"nettosum" => $nettosum
);
};
return $p;
}
}
class ClosPaymentsReport extends Basetemplater {
private $templatelines = array();
private $closid = null;
private $closing = null;
function __construct($templatelines, $closid, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->closid = $closid;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Zahlungsweg}",$data["payment"],$text);
return $text;
}
public function getDataItems($pdo) {
$payments = $this->closing["paymenttaxessum"];
$p = array();
foreach($payments as $entry) {
$p[] = array("payment" => $entry["payment"],
"id" => $entry["paymenttaxessum"]);
}
return $p;
}
}
class ClosSingleReport extends Basetemplater {
private $templatelines = array();
private $payment = null;
private $closing = null;
function __construct($templatelines, $payment, $closing) {
$submodules = ClosTemplatestructure::getSubModules(self::getClassName());
parent::__construct($templatelines,$submodules,$closing);
$this->templatelines = $templatelines;
$this->payment = $payment;
$this->closing = $closing;
}
public function parse($pdo,$text,$data) {
$currency = CommonUtils::getConfigValue($pdo, "currency", ".");
$text = str_replace("{Einheit}",$currency,$text);
$text = str_replace("{Brutto}",$data["bruttosum"],$text);
$text = str_replace("{Netto}",$data["nettosum"],$text);
$text = str_replace("{Steuer}",$data["tax"],$text);
return $text;
}
public function getDataItems($pdo) {
$decpoint = CommonUtils::getConfigValue($pdo, "decpoint", ".");
$payments = $this->payment;
foreach($payments as $entry) {
$tax = str_replace(".", $decpoint, $entry["t"]);
$bruttosum = str_replace(".", $decpoint, $entry["bruttosum"]);
$nettosum = str_replace(".", $decpoint, $entry["nettosum"]);
$p[] = array("id" => "dummy",
"tax" => $tax,
"bruttosum" => $bruttosum,
"nettosum" => $nettosum
);
}
return $p;
}
}

View File

@ -92,6 +92,11 @@ class Version {
return $rect;
}
public static function getDefaultClosTemplate($pdo) {
$r = Basedb::loadSampleCusHtmlTemplate($pdo);
return $r;
}
private static function updateNettoValuesOfBill($pdo) {
$sql = "SELECT %bill%.id as billid,IF(status='s',-1,1)*ROUND(SUM(price/(1 + %queue%.tax/100.0)),6) as netto FROM %queue%,%billproducts%,%bill% WHERE %billproducts%.billid=%bill%.id AND %billproducts%.queueid=%queue%.id AND (status is null OR status=? OR status=?) GROUP by billid";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -974,6 +979,16 @@ class Version {
}
}
public static function upd_1506_1507($pdo, $prefix, $dbname) {
try {
$closTemplate = self::getDefaultClosTemplate($pdo);
self::insertOrUpdateConfigItem($pdo, 'clostemplate', $closTemplate);
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1027,7 +1042,8 @@ class Version {
"1.5.2" => array("upd_1502_1503","1.5.3"),
"1.5.3" => array("upd_1503_1504","1.5.4"),
"1.5.4" => array("upd_1504_1505","1.5.5"),
"1.5.5" => array("upd_1505_1506","1.5.6")
"1.5.5" => array("upd_1505_1506","1.5.6"),
"1.5.6" => array("upd_1506_1507","1.5.7")
);
// RE;* also for install process no check is required

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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