OrderSprinter 1.2.2

This commit is contained in:
Geno 2020-11-19 22:59:54 +01:00
parent e6c5c607b0
commit 2eeba2d580
22 changed files with 178 additions and 81 deletions

Binary file not shown.

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -7,8 +7,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.2.1"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.1"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.2">
<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" />

View File

@ -679,7 +679,7 @@ $(document).ready(function() {
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.2.1</button> <button id="updatebtn">Update -> 1.2.2</button>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>

View File

@ -1133,7 +1133,6 @@ $adminCl = new Admin();
DbUtils::overrulePrefix($prefix); DbUtils::overrulePrefix($prefix);
$rect = $this->getDefaultCustomRecTemplate(); $rect = $this->getDefaultCustomRecTemplate();
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)"; $sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('rectemplate',$rect)); $stmt->execute(array('rectemplate',$rect));
@ -1257,6 +1256,35 @@ return false;
} }
} }
function updateUserTable1201_1202($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.2.1") {
$ret = $this->updateUserTable1200_1201($prefix, $version, $dbname);
if (!$ret) {
return false;
}
}
DbUtils::overrulePrefix($prefix);
$foodTemplate = $this->getDefaultWorkTemplateFood();
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('foodtemplate',$foodTemplate));
$drinkTemplate = $this->getDefaultWorkTemplateDrinks();
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('drinktemplate',$drinkTemplate));
$this->updateVersion($pdo, '1.2.2');
return true;
} catch (PDOException $e) {
return false;
}
}
function setVersion($prefix,$theVersion) { function setVersion($prefix,$theVersion) {
$pdo = $this->pdo; $pdo = $this->pdo;
try { try {
@ -1283,6 +1311,30 @@ $rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
return $rect; return $rect;
} }
function getDefaultWorkTemplateFood() {
$rect = "SS:Speisen\nt:v\nz:v\n";
$rect .= "\n";
$rect .= "START_WORK\n";
$rect .= "f:-;\n";
$rect .= "N:v;\ns: ;b:v;\n";
$rect .= "e:v\n";
$rect .= "END_WORK\n";
$rect .= "f:-";
return $rect;
}
function getDefaultWorkTemplateDrinks() {
$rect = "SS:Getränke\nt:v\nz:v\n";
$rect .= "\n";
$rect .= "START_WORK\n";
$rect .= "f:-;\n";
$rect .= "N:v;\ns: ;b:v;\n";
$rect .= "e:v\n";
$rect .= "END_WORK\n";
$rect .= "f:-";
return $rect;
}
function createTables($decpoint,$billlanguage,$currency,$timezone) function createTables($decpoint,$billlanguage,$currency,$timezone)
{ {
$pdo = $this->pdo; $pdo = $this->pdo;
@ -1318,6 +1370,8 @@ $this->basedb->createExtrasprodsTable($pdo);
$this->basedb->createQueueExtrasTable($pdo); $this->basedb->createQueueExtrasTable($pdo);
$rect = $this->getDefaultCustomRecTemplate(); $rect = $this->getDefaultCustomRecTemplate();
$foodtemplate = $this->getDefaultWorkTemplateFood();
$drinktemplate = $this->getDefaultWorkTemplateDrinks();
$printpass = md5("123"); $printpass = md5("123");
@ -1332,6 +1386,8 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'printpass', '$printpass')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'printpass', '$printpass')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'companyinfo', 'Musterrestaurant\nBeispielstrasse 123\n12345 Musterort')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'companyinfo', 'Musterrestaurant\nBeispielstrasse 123\n12345 Musterort')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'rectemplate', '$rect')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'rectemplate', '$rect')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'foodtemplate', '$foodtemplate')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'drinktemplate', '$drinktemplate')");
$resTxt = 'Vielen Dank für Ihre Reservierung am DATUM um ZEIT Uhr für ANZAHL Personen.\n\nWir freuen uns auf Ihren Besuch!\n\nBETRIEBSINFO'; $resTxt = 'Vielen Dank für Ihre Reservierung am DATUM um ZEIT Uhr für ANZAHL Personen.\n\nWir freuen uns auf Ihren Besuch!\n\nBETRIEBSINFO';
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'reservationnote', '$resTxt')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'reservationnote', '$resTxt')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'serverurl', '')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'serverurl', '')");
@ -1341,7 +1397,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.2')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
@ -1612,15 +1668,15 @@ $stmt->execute(array(6,76,22));
if ($workflow == 2) { if ($workflow == 2) {
// only receipts - no views kitchen,bar,supply // only receipts - no views kitchen,bar,supply
$this->insertUser($waiterTxt[$lang],$adminpass,0,1,0,0,0,1,0,1,0,0,0,1,0,$lang,1); $this->insertUser($waiterTxt[$lang],$adminpass,0,1,0,0,0,1,0,1,0,0,0,0,1,0,$lang,1);
if ($level == 3) { if ($level == 3) {
$this->insertUser($bossTxt[$lang],$adminpass ,0,1,0,0,0,1,1,1,1,1,1,1,1,$lang,1); $this->insertUser($bossTxt[$lang],$adminpass ,0,1,0,0,0,1,1,1,1,1,1,1,1,1,$lang,1);
} }
} else { } else {
$this->insertUser($waiterTxt[$lang],$adminpass,0,1,0,0,1,1,0,1,0,0,0,1,0,$lang,1); $this->insertUser($waiterTxt[$lang],$adminpass,0,1,0,0,1,1,0,1,0,0,0,0,1,0,$lang,1);
if ($level == 3) { if ($level == 3) {
$this->insertUser($cookTxt[$lang],$adminpass ,0,0,1,1,1,0,0,0,0,0,0,0,0,$lang,1); $this->insertUser($cookTxt[$lang],$adminpass ,0,0,1,1,1,0,0,0,0,0,0,0,0,0,$lang,1);
$this->insertUser($bossTxt[$lang],$adminpass ,0,1,1,1,1,1,1,1,1,1,1,1,1,$lang,1); $this->insertUser($bossTxt[$lang],$adminpass ,0,1,1,1,1,1,1,1,1,1,1,1,1,1,$lang,1);
} }
} }
@ -1677,7 +1733,7 @@ echo json_encode("Fehler: Ist OpenSSL richtig installiert?");
return; return;
} }
$admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,1,0,0,$_POST['lang'],1); $admin->insertUser("admin",$_POST['adminpass'],1,0,0,0,0,0,0,0,0,1,1,1,0,0,$_POST['lang'],1);
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']); $admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();
@ -1706,7 +1762,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.2.1"; $installerVersion = "1.2.2";
$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']);
@ -1736,7 +1792,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"1.0.40","1.0.41","1.0.42","1.0.43", "1.0.40","1.0.41","1.0.42","1.0.43",
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17", "1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30", "1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
"1.2.0" "1.2.0","1.2.1"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -1744,7 +1800,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1200_1201($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1201_1202($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') { if(session_id() == '') {
session_start(); session_start();

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
<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" />

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.2.1"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
<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" />
@ -197,6 +197,12 @@ var MAN_WORKFLOW_WR_AND_TRANSFER_HLP = ["Hinweis: 'Arbeitsbons mit Serverübermi
var MAN_RECTEMPLATE_HINT = ["Hinweis: Die Anpassung der Bonvorlage ist in der Anleitung und auf der Produktwebseite beschrieben.", var MAN_RECTEMPLATE_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.", "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."]; "Nota: La adapción del template esta explicada en la página web y el manual."];
var MAN_FOODTEMPLATE_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_DRINKTEMPLATE_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_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 = ["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", var MAN_NO_ADMIN_CREATE = ["Nur Admin-Benutzer können andere Admin-Benutzer anlegen",
"Only admin users can create other admin users", "Only admin users can create other admin users",
@ -284,7 +290,7 @@ var MAN_CONFIRM_GO_LIVE = ["Die Umsatz- und Logdaten wurden gelöscht und nur di
"La configuración esta re-creado. Entonces es necesario registrar de nuevo."]; "La configuración esta re-creado. Entonces es necesario registrar de nuevo."];
var lang = 0; var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,""]; var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0];
var numberOfClosings = 0; var numberOfClosings = 0;
@ -297,6 +303,8 @@ var generalValuesSettings = [
["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"], ["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"],
["companyinfo","Betriebsinfo","i",0], ["companyinfo","Betriebsinfo","i",0],
["rectemplate","Bonvorlage ","i",0], ["rectemplate","Bonvorlage ","i",0],
["foodtemplate","Arb.bonvorlage Speisen","i",0],
["drinktemplate","Arb.bonvorlage Getränke","i",0],
["serverUrl","Serveradresse","i",0], ["serverUrl","Serveradresse","i",0],
["email","Emailadresse","i",0], ["email","Emailadresse","i",0],
["emailbadrating","Emailadresse schlechte Bewertung","i",0], ["emailbadrating","Emailadresse schlechte Bewertung","i",0],
@ -432,6 +440,8 @@ function setLanguage(l) {
$("#taxusage").html("<i>(" + MAN_TAX_USE[l] + ")</i>"); $("#taxusage").html("<i>(" + MAN_TAX_USE[l] + ")</i>");
$("#rectemplatehint").html(MAN_RECTEMPLATE_HINT[l]); $("#rectemplatehint").html(MAN_RECTEMPLATE_HINT[l]);
$("#foodtemplatehint").html(MAN_FOODTEMPLATE_HINT[l]);
$("#drinktemplatehint").html(MAN_DRINKTEMPLATE_HINT[l]);
} }
function createMonthSelection(label) { function createMonthSelection(label) {
@ -495,6 +505,8 @@ function insertGeneralConfigItems(configResult) {
$("#companyinfo").val(values.companyinfo); $("#companyinfo").val(values.companyinfo);
$("#rectemplate").val(values.rectemplate); $("#rectemplate").val(values.rectemplate);
$("#foodtemplate").val(values.foodtemplate);
$("#drinktemplate").val(values.drinktemplate);
$("#reservationnote").val(values.reservationnote); $("#reservationnote").val(values.reservationnote);
@ -510,6 +522,9 @@ function insertGeneralConfigItems(configResult) {
generalVals[3] = values.paymentconfig; generalVals[3] = values.paymentconfig;
generalVals[4] = values.workflowconfig; generalVals[4] = values.workflowconfig;
generalVals[16] = values.addreceipttoprinter; generalVals[16] = values.addreceipttoprinter;
if ((values.addreceipttoprinter == "") || (values.addreceipttoprinter == null)) {
generalVals[16] = 0;
}
$("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType)); $("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType));
$("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig)); $("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig));
@ -625,7 +640,7 @@ function createAddRecPrinterPart(value) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="addreceipttoprinter">' + MAN_ADD_RECPRINTER[lang] + ':</label>'; html += '<label for="addreceipttoprinter">' + MAN_ADD_RECPRINTER[lang] + ':</label>';
html += '<select name="addreceipttoprinter" id="addreceipttoprinter" data-theme="e">'; html += '<select name="addreceipttoprinter" id="addreceipttoprinter" data-theme="e">';
if (value == "") { if ((value == "") || (value == "-") || (value == 0)) {
html += '<option value="0" selected>-</option>'; html += '<option value="0" selected>-</option>';
} else { } else {
html += '<option value="0">-</option>'; html += '<option value="0">-</option>';
@ -813,6 +828,8 @@ function changeConfig(changedEntries) {
function reactOnConfigChange(result) { function reactOnConfigChange(result) {
if (result.status == "OK") { if (result.status == "OK") {
$(".genConfigEl").data("changed",false);
getGeneralConfigItems();
alert(MAN_CONFIG_CHANGED[lang]); alert(MAN_CONFIG_CHANGED[lang]);
} else { } else {
alert(MAN_CONFIG_CHANGE_ERROR[lang] + ": " + result.msg); alert(MAN_CONFIG_CHANGE_ERROR[lang] + ": " + result.msg);
@ -1297,7 +1314,7 @@ function handleAnswerShutdown(result) {
function hasChangedData(idOfElem) { function hasChangedData(idOfElem) {
var fieldChangedAttr = $("" + idOfElem).data("changed"); var fieldChangedAttr = $("" + idOfElem).data("changed");
if (typeof fieldChangedAttr != 'undefined') { if (typeof fieldChangedAttr != 'undefined') {
if (fieldChangedAttr == null) { if ((fieldChangedAttr == null) || (fieldChangedAttr == false)) {
fieldChangedAttr = false; fieldChangedAttr = false;
} }
} else { } else {
@ -2312,6 +2329,16 @@ $(document).on("pageinit", "#admin-page", function () {
<textarea cols="40" rows="8" name="rectemplate" id="rectemplate" class="genConfigEl"></textarea> <textarea cols="40" rows="8" name="rectemplate" id="rectemplate" class="genConfigEl"></textarea>
<i id=rectemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i> <i id=rectemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div> </div>
<div data-role="fieldcontain">
<label for="foodtemplate">Vorlage Speisebons:</label>
<textarea cols="40" rows="8" name="foodtemplate" id="foodtemplate" class="genConfigEl"></textarea>
<i id=foodtemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain">
<label for="drinktemplate">Vorlage Getränkebons:</label>
<textarea cols="40" rows="8" name="drinktemplate" id="drinktemplate" class="genConfigEl"></textarea>
<i id=drinktemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<label for="reservationnote">Reservierungstemplate Email:</label> <label for="reservationnote">Reservierungstemplate Email:</label>
<textarea cols="40" rows="8" name="reservationnote" id="reservationnote" class="genConfigEl"></textarea> <textarea cols="40" rows="8" name="reservationnote" id="reservationnote" class="genConfigEl"></textarea>

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

View File

@ -716,6 +716,14 @@ class Admin {
$row = $stmt->fetchObject(); $row = $stmt->fetchObject();
$rectemplate = $row->setting; $rectemplate = $row->setting;
$stmt->execute(array("foodtemplate"));
$row = $stmt->fetchObject();
$foodtemplate = $row->setting;
$stmt->execute(array("drinktemplate"));
$row = $stmt->fetchObject();
$drinktemplate = $row->setting;
$stmt->execute(array("decpoint")); $stmt->execute(array("decpoint"));
$row = $stmt->fetchObject(); $row = $stmt->fetchObject();
$decpoint = $row->setting; $decpoint = $row->setting;
@ -879,7 +887,8 @@ class Admin {
date_default_timezone_set(DbUtils::getTimeZone()); date_default_timezone_set(DbUtils::getTimeZone());
$now = getdate(); $now = getdate();
$retVal = array("companyinfo" => $companyInfo, "rectemplate" => $rectemplate, "version" => $version, "decpoint" => $decpoint, $retVal = array("companyinfo" => $companyInfo, "rectemplate" => $rectemplate, "foodtemplate" => $foodtemplate, "drinktemplate" => $drinktemplate,
"version" => $version, "decpoint" => $decpoint,
"serverurl" => $serverurl, "email" => $email, "receiveremail" => $receiveremail, "billlanguage" => $billlanguage, "serverurl" => $serverurl, "email" => $email, "receiveremail" => $receiveremail, "billlanguage" => $billlanguage,
"payprinttype" => $payprinttype, "tax" => $tax, "togotax" => $togotax, "currency" => $currency, "payprinttype" => $payprinttype, "tax" => $tax, "togotax" => $togotax, "currency" => $currency,
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter, "userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
@ -987,7 +996,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.2.1"); echo json_encode($view . "?v=1.2.2");
} }
} }
@ -1201,19 +1210,19 @@ class Admin {
$right_rating = $_SESSION['right_rating']; $right_rating = $_SESSION['right_rating'];
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.1"); }; if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.2"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.1"); }; if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.2"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.1"); }; if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.2"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.1"); }; if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.2"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.1"); }; if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.2"); };
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.1"); }; if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.2"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.1"); }; if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.2"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.1"); }; if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.2"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.1"); }; if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.2"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.1"); }; if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.2"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.1"); }; if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.2"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.1"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.2");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.1"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.2");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1222,7 +1231,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage"); $waiterMessage = $this->getMessage(null, "waitermessage");
} }
// CAUTION: change version also in config.txt!!! // CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.1", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.2",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,
@ -1431,6 +1440,8 @@ class Admin {
"printpass" => array("dbcol" => "printpass","checknum" => 0), "printpass" => array("dbcol" => "printpass","checknum" => 0),
"companyinfo" => array("dbcol" => "companyinfo","checknum" => 0), "companyinfo" => array("dbcol" => "companyinfo","checknum" => 0),
"rectemplate" => array("dbcol" => "rectemplate","checknum" => 0), "rectemplate" => array("dbcol" => "rectemplate","checknum" => 0),
"foodtemplate" => array("dbcol" => "foodtemplate","checknum" => 0),
"drinktemplate" => array("dbcol" => "drinktemplate","checknum" => 0),
"serverUrl" => array("dbcol" => "serverurl","checknum" => 0), "serverUrl" => array("dbcol" => "serverurl","checknum" => 0),
"email" => array("dbcol" => "email","checknum" => 0), "email" => array("dbcol" => "email","checknum" => 0),
"emailbadrating" => array("dbcol" => "emailbadrating","checknum" => 0), "emailbadrating" => array("dbcol" => "emailbadrating","checknum" => 0),

View File

@ -18,13 +18,12 @@ class PrintQueue {
} }
function handleCommand($command) { function handleCommand($command) {
// these command are only allowed for user with waiter rights
if ($command == 'getNextReceiptPrintJobs') {
// REM* feature level
$fl = null; $fl = null;
if (isset($_GET['fl'])) { if (isset($_GET['fl'])) {
$fl = $_GET['fl']; $fl = $_GET['fl'];
} }
// these command are only allowed for user with waiter rights
if ($command == 'getNextReceiptPrintJobs') {
if(isset($_GET['printers'])) { if(isset($_GET['printers'])) {
$this->getNextReceiptPrintJobs($_POST['pass'],$_GET['language'],$_GET['printers'],$fl); $this->getNextReceiptPrintJobs($_POST['pass'],$_GET['language'],$_GET['printers'],$fl);
} else { } else {
@ -34,15 +33,15 @@ class PrintQueue {
$this->getNextClosingPrintJobs($_POST['pass'],$_GET['language']); $this->getNextClosingPrintJobs($_POST['pass'],$_GET['language']);
} else if ($command == 'getNextFoodWorkPrintJobs') { } else if ($command == 'getNextFoodWorkPrintJobs') {
if (isset($_GET['printer'])) { if (isset($_GET['printer'])) {
$this->getNextFoodWorkPrintJobs($_GET['printer'],$_POST['pass']); $this->getNextFoodWorkPrintJobs($_GET['printer'],$_POST['pass'],$fl);
} else { } else {
$this->getNextFoodWorkPrintJobs(null,$_POST['pass']); $this->getNextFoodWorkPrintJobs(null,$_POST['pass'],$fl);
} }
} else if ($command == 'getNextDrinkWorkPrintJobs') { } else if ($command == 'getNextDrinkWorkPrintJobs') {
if (isset($_GET['printer'])) { if (isset($_GET['printer'])) {
$this->getNextDrinkWorkPrintJobs($_GET['printer'],$_POST['pass']); $this->getNextDrinkWorkPrintJobs($_GET['printer'],$_POST['pass'],$fl);
} else { } else {
$this->getNextDrinkWorkPrintJobs(null,$_POST['pass']); $this->getNextDrinkWorkPrintJobs(null,$_POST['pass'],$fl);
} }
} else if ($command == 'deletePrintJob') { } else if ($command == 'deletePrintJob') {
$this->deletePrintJob($_POST['pass'],$_POST['id']); $this->deletePrintJob($_POST['pass'],$_POST['id']);
@ -98,7 +97,6 @@ class PrintQueue {
public static function queueWorkPrintJob($pdo,$table,$timestamp,$prods,$kind,$printer,$username) { public static function queueWorkPrintJob($pdo,$table,$timestamp,$prods,$kind,$printer,$username) {
$table .= " ($username)"; $table .= " ($username)";
// REM* now create the work print job
$content = json_encode(array("table" => $table, "time" => $timestamp, "products" => $prods)); $content = json_encode(array("table" => $table, "time" => $timestamp, "products" => $prods));
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)"; $printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
@ -116,7 +114,6 @@ class PrintQueue {
$jobs = array(); $jobs = array();
for ($printer=1;$printer<7;$printer++) { for ($printer=1;$printer<7;$printer++) {
// REM* bills:
$sql = "SELECT count(id) as count FROM %printjobs% WHERE printer=? AND type != '1' AND type != '2'"; $sql = "SELECT count(id) as count FROM %printjobs% WHERE printer=? AND type != '1' AND type != '2'";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($printer)); $stmt->execute(array($printer));
@ -136,7 +133,6 @@ class PrintQueue {
echo json_encode(array("status" => "OK", "msg" => $jobs)); echo json_encode(array("status" => "OK", "msg" => $jobs));
} }
// REM* delete all printjobs
function clearprintjobs($pdo) { function clearprintjobs($pdo) {
if (!($this->userrights->hasCurrentUserRight('right_manager')) && if (!($this->userrights->hasCurrentUserRight('right_manager')) &&
!($this->userrights->hasCurrentUserRight('is_admin')) !($this->userrights->hasCurrentUserRight('is_admin'))
@ -161,7 +157,6 @@ class PrintQueue {
if(!($this->userrights->hasCurrentUserRight('right_bill'))) { if(!($this->userrights->hasCurrentUserRight('right_bill'))) {
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));
} else { } else {
// REM* sort it that start is <= end job id
if ($start > $end) { if ($start > $end) {
$tmp = $end; $tmp = $end;
$end = $start; $end = $start;
@ -174,13 +169,11 @@ class PrintQueue {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
for($jobId=$start;$jobId <= $end;$jobId++) { for($jobId=$start;$jobId <= $end;$jobId++) {
// REM* check if bill id exists
$sql = "SELECT count(id) as countid FROM %bill% WHERE id=?"; $sql = "SELECT count(id) as countid FROM %bill% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($jobId)); $stmt->execute(array($jobId));
$row =$stmt->fetchObject(); $row =$stmt->fetchObject();
if ($row->countid == 1) { if ($row->countid == 1) {
// REM* yes, print
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)"; $printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
$stmt->execute(array($jobId,'3',$printer)); $stmt->execute(array($jobId,'3',$printer));
@ -211,20 +204,17 @@ class PrintQueue {
// now get receipt info from bill table // now get receipt info from bill table
$pdo = $this->dbutils->openDbAndReturnPdo(); $pdo = $this->dbutils->openDbAndReturnPdo();
// REM* check if the receipt shall be printed to an additional printer
$sql = "SELECT setting FROM %config% WHERE name=?"; $sql = "SELECT setting FROM %config% WHERE name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array("addreceipttoprinter")); $stmt->execute(array("addreceipttoprinter"));
$row = $stmt->fetchObject(); $row = $stmt->fetchObject();
$addprinter = $row->setting; $addprinter = $row->setting;
// REM* insert to normal queue:
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)"; $printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($printInsertSql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($printInsertSql));
$stmt->execute(array((string)($billid),'3',$printer)); $stmt->execute(array((string)($billid),'3',$printer));
if (!is_null($addprinter) && ($useaddrecprinter == 1)) { if (!is_null($addprinter) && ($useaddrecprinter == 1)) {
// REM* schedule also to the additional receipt printer
$stmt->execute(array((string)($billid),'3',$addprinter)); $stmt->execute(array((string)($billid),'3',$addprinter));
} }
@ -382,6 +372,14 @@ class PrintQueue {
} }
} }
function getTemplate($pdo,$templatekey) {
$sql = "SELECT setting FROM %config% WHERE name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($templatekey));
$row =$stmt->fetchObject();
return $row->setting;
}
function getNextReceiptPrintJobs($md5pass,$language,$printers,$fl) { function getNextReceiptPrintJobs($md5pass,$language,$printers,$fl) {
$isCorrect = $this->isPasswordCorrect($md5pass,false); $isCorrect = $this->isPasswordCorrect($md5pass,false);
if ($isCorrect) { if ($isCorrect) {
@ -390,12 +388,7 @@ class PrintQueue {
$pdo = $this->dbutils->openDbAndReturnPdo(); $pdo = $this->dbutils->openDbAndReturnPdo();
// REM* get the template $template = $this->getTemplate($pdo, "rectemplate");
$sql = "SELECT setting FROM %config% WHERE name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array("rectemplate"));
$row =$stmt->fetchObject();
$template = $row->setting;
if (intval($language) > 2) { if (intval($language) > 2) {
$genInfo = $this->admin->getGeneralConfigItems(false,$pdo); $genInfo = $this->admin->getGeneralConfigItems(false,$pdo);
@ -419,9 +412,8 @@ class PrintQueue {
if (in_array($printer, $printersArr)) { if (in_array($printer, $printersArr)) {
if (is_null($fl)) { if (is_null($fl)) {
// REM* no feature level -> do not sent template
$receiptJob = array("id" => $printJobId,"bill" => $bill->getBillWithId($pdo,$aBillId,$language,$printer)); $receiptJob = array("id" => $printJobId,"bill" => $bill->getBillWithId($pdo,$aBillId,$language,$printer));
} else if ($fl == 1) { } else if ($fl >= 1) {
$receiptJob = array("id" => $printJobId,"bill" => $bill->getBillWithId($pdo,$aBillId,$language,$printer), "template" => $template); $receiptJob = array("id" => $printJobId,"bill" => $bill->getBillWithId($pdo,$aBillId,$language,$printer), "template" => $template);
} }
$billarray[] = $receiptJob; $billarray[] = $receiptJob;
@ -434,21 +426,27 @@ class PrintQueue {
} }
} }
function getNextFoodWorkPrintJobs($printer,$md5pass) { function getNextFoodWorkPrintJobs($printer,$md5pass,$fl) {
$this->getNextWorkPrintJobs($md5pass,1,$printer); $this->getNextWorkPrintJobs($md5pass,1,$printer,$fl);
} }
function getNextDrinkWorkPrintJobs($printer,$md5pass) { function getNextDrinkWorkPrintJobs($printer,$md5pass,$fl) {
$this->getNextWorkPrintJobs($md5pass,2,$printer); $this->getNextWorkPrintJobs($md5pass,2,$printer,$fl);
} }
function getNextWorkPrintJobs($md5pass,$theType,$printer) { function getNextWorkPrintJobs($md5pass,$theType,$printer,$fl) {
$isCorrect = $this->isPasswordCorrect($md5pass,false); $isCorrect = $this->isPasswordCorrect($md5pass,false);
if ($isCorrect) { if ($isCorrect) {
$pdo = $this->dbutils->openDbAndReturnPdo(); $pdo = $this->dbutils->openDbAndReturnPdo();
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo); $bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
$templatekey = "foodtemplate";
if ($theType === 2) {
$templatekey = "drinktemplate";
}
$template = $this->getTemplate($pdo, $templatekey);
if (is_null($printer)) { if (is_null($printer)) {
$sql = "SELECT id,content,type FROM %printjobs% WHERE type=? ORDER BY id"; $sql = "SELECT id,content,type FROM %printjobs% WHERE type=? ORDER BY id";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
@ -464,8 +462,13 @@ class PrintQueue {
$workarray = array(); $workarray = array();
foreach($result as $aWorkJob) { foreach($result as $aWorkJob) {
$aWork = json_decode($aWorkJob["content"]); // is in json format $aWork = json_decode($aWorkJob["content"]); // is in json format
if ($fl >= 2) {
$workarray[] = array("id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => intval($bigFontWorkReceipt), "template" => $template);
} else {
// default without template
$workarray[] = array("id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => intval($bigFontWorkReceipt)); $workarray[] = array("id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => intval($bigFontWorkReceipt));
} }
}
echo json_encode($workarray); echo json_encode($workarray);
} else { } else {

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

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

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

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

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

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

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