OrderSprinter 1.2.2
This commit is contained in:
parent
e6c5c607b0
commit
2eeba2d580
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -7,8 +7,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.2.1">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.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.2">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -679,7 +679,7 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.2.1</button>
|
||||
<button id="updatebtn">Update -> 1.2.2</button>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
|
@ -1133,7 +1133,6 @@ $adminCl = new Admin();
|
|||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$rect = $this->getDefaultCustomRecTemplate();
|
||||
|
||||
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$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) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
|
@ -1283,6 +1311,30 @@ $rect .= "f: ; E_Summe:llllllllllllllllllll;\n\nj:l;";
|
|||
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)
|
||||
{
|
||||
$pdo = $this->pdo;
|
||||
|
@ -1318,6 +1370,8 @@ $this->basedb->createExtrasprodsTable($pdo);
|
|||
$this->basedb->createQueueExtrasTable($pdo);
|
||||
|
||||
$rect = $this->getDefaultCustomRecTemplate();
|
||||
$foodtemplate = $this->getDefaultWorkTemplateFood();
|
||||
$drinktemplate = $this->getDefaultWorkTemplateDrinks();
|
||||
|
||||
$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 , '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 , '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';
|
||||
$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', '')");
|
||||
|
@ -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 , '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 , '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 , 'remoteaccesscode', null)");
|
||||
$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) {
|
||||
// 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) {
|
||||
$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 {
|
||||
$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) {
|
||||
$this->insertUser($cookTxt[$lang],$adminpass ,0,0,1,1,1,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($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,1,$lang,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1677,7 +1733,7 @@ echo json_encode("Fehler: Ist OpenSSL richtig installiert?");
|
|||
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']);
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
|
@ -1706,7 +1762,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
}
|
||||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
$installerVersion = "1.2.1";
|
||||
$installerVersion = "1.2.2";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$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.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.2.0"
|
||||
"1.2.0","1.2.1"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -1744,7 +1800,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1200_1201($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1201_1202($_POST['prefix'], $version, $_POST['db']);
|
||||
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.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/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.",
|
||||
"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_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_CREATE = ["Nur Admin-Benutzer können andere Admin-Benutzer anlegen",
|
||||
"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."];
|
||||
|
||||
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;
|
||||
|
||||
|
@ -296,7 +302,9 @@ var generalValuesSettings = [
|
|||
["stornocode","Stornocode","i",1,"Stornocode wurde nicht angegeben!"],
|
||||
["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"],
|
||||
["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],
|
||||
["email","Emailadresse","i",0],
|
||||
["emailbadrating","Emailadresse schlechte Bewertung","i",0],
|
||||
|
@ -432,6 +440,8 @@ function setLanguage(l) {
|
|||
$("#taxusage").html("<i>(" + MAN_TAX_USE[l] + ")</i>");
|
||||
|
||||
$("#rectemplatehint").html(MAN_RECTEMPLATE_HINT[l]);
|
||||
$("#foodtemplatehint").html(MAN_FOODTEMPLATE_HINT[l]);
|
||||
$("#drinktemplatehint").html(MAN_DRINKTEMPLATE_HINT[l]);
|
||||
}
|
||||
|
||||
function createMonthSelection(label) {
|
||||
|
@ -495,6 +505,8 @@ function insertGeneralConfigItems(configResult) {
|
|||
|
||||
$("#companyinfo").val(values.companyinfo);
|
||||
$("#rectemplate").val(values.rectemplate);
|
||||
$("#foodtemplate").val(values.foodtemplate);
|
||||
$("#drinktemplate").val(values.drinktemplate);
|
||||
|
||||
$("#reservationnote").val(values.reservationnote);
|
||||
|
||||
|
@ -510,6 +522,9 @@ function insertGeneralConfigItems(configResult) {
|
|||
generalVals[3] = values.paymentconfig;
|
||||
generalVals[4] = values.workflowconfig;
|
||||
generalVals[16] = values.addreceipttoprinter;
|
||||
if ((values.addreceipttoprinter == "") || (values.addreceipttoprinter == null)) {
|
||||
generalVals[16] = 0;
|
||||
}
|
||||
|
||||
$("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType));
|
||||
$("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig));
|
||||
|
@ -625,7 +640,7 @@ function createAddRecPrinterPart(value) {
|
|||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="addreceipttoprinter">' + MAN_ADD_RECPRINTER[lang] + ':</label>';
|
||||
html += '<select name="addreceipttoprinter" id="addreceipttoprinter" data-theme="e">';
|
||||
if (value == "") {
|
||||
if ((value == "") || (value == "-") || (value == 0)) {
|
||||
html += '<option value="0" selected>-</option>';
|
||||
} else {
|
||||
html += '<option value="0">-</option>';
|
||||
|
@ -813,6 +828,8 @@ function changeConfig(changedEntries) {
|
|||
|
||||
function reactOnConfigChange(result) {
|
||||
if (result.status == "OK") {
|
||||
$(".genConfigEl").data("changed",false);
|
||||
getGeneralConfigItems();
|
||||
alert(MAN_CONFIG_CHANGED[lang]);
|
||||
} else {
|
||||
alert(MAN_CONFIG_CHANGE_ERROR[lang] + ": " + result.msg);
|
||||
|
@ -1297,7 +1314,7 @@ function handleAnswerShutdown(result) {
|
|||
function hasChangedData(idOfElem) {
|
||||
var fieldChangedAttr = $("" + idOfElem).data("changed");
|
||||
if (typeof fieldChangedAttr != 'undefined') {
|
||||
if (fieldChangedAttr == null) {
|
||||
if ((fieldChangedAttr == null) || (fieldChangedAttr == false)) {
|
||||
fieldChangedAttr = false;
|
||||
}
|
||||
} else {
|
||||
|
@ -2312,6 +2329,16 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<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>
|
||||
</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">
|
||||
<label for="reservationnote">Reservierungstemplate Email:</label>
|
||||
<textarea cols="40" rows="8" name="reservationnote" id="reservationnote" class="genConfigEl"></textarea>
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -716,6 +716,14 @@ class Admin {
|
|||
$row = $stmt->fetchObject();
|
||||
$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"));
|
||||
$row = $stmt->fetchObject();
|
||||
$decpoint = $row->setting;
|
||||
|
@ -879,7 +887,8 @@ class Admin {
|
|||
date_default_timezone_set(DbUtils::getTimeZone());
|
||||
$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,
|
||||
"payprinttype" => $payprinttype, "tax" => $tax, "togotax" => $togotax, "currency" => $currency,
|
||||
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
|
||||
|
@ -987,7 +996,7 @@ class Admin {
|
|||
$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'];
|
||||
|
||||
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_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.1"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.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.1"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.1");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.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.2"); };
|
||||
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.2"); };
|
||||
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.2"); };
|
||||
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.2"); };
|
||||
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.2"); };
|
||||
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.2");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.2");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1222,7 +1231,7 @@ class Admin {
|
|||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
// CAUTION: change version also in config.txt!!!
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.1",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.2",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1431,6 +1440,8 @@ class Admin {
|
|||
"printpass" => array("dbcol" => "printpass","checknum" => 0),
|
||||
"companyinfo" => array("dbcol" => "companyinfo","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),
|
||||
"email" => array("dbcol" => "email","checknum" => 0),
|
||||
"emailbadrating" => array("dbcol" => "emailbadrating","checknum" => 0),
|
||||
|
|
|
@ -18,13 +18,12 @@ class PrintQueue {
|
|||
}
|
||||
|
||||
function handleCommand($command) {
|
||||
// these command are only allowed for user with waiter rights
|
||||
if ($command == 'getNextReceiptPrintJobs') {
|
||||
// REM* feature level
|
||||
$fl = null;
|
||||
if (isset($_GET['fl'])) {
|
||||
$fl = $_GET['fl'];
|
||||
}
|
||||
// these command are only allowed for user with waiter rights
|
||||
if ($command == 'getNextReceiptPrintJobs') {
|
||||
if(isset($_GET['printers'])) {
|
||||
$this->getNextReceiptPrintJobs($_POST['pass'],$_GET['language'],$_GET['printers'],$fl);
|
||||
} else {
|
||||
|
@ -34,15 +33,15 @@ class PrintQueue {
|
|||
$this->getNextClosingPrintJobs($_POST['pass'],$_GET['language']);
|
||||
} else if ($command == 'getNextFoodWorkPrintJobs') {
|
||||
if (isset($_GET['printer'])) {
|
||||
$this->getNextFoodWorkPrintJobs($_GET['printer'],$_POST['pass']);
|
||||
$this->getNextFoodWorkPrintJobs($_GET['printer'],$_POST['pass'],$fl);
|
||||
} else {
|
||||
$this->getNextFoodWorkPrintJobs(null,$_POST['pass']);
|
||||
$this->getNextFoodWorkPrintJobs(null,$_POST['pass'],$fl);
|
||||
}
|
||||
} else if ($command == 'getNextDrinkWorkPrintJobs') {
|
||||
if (isset($_GET['printer'])) {
|
||||
$this->getNextDrinkWorkPrintJobs($_GET['printer'],$_POST['pass']);
|
||||
$this->getNextDrinkWorkPrintJobs($_GET['printer'],$_POST['pass'],$fl);
|
||||
} else {
|
||||
$this->getNextDrinkWorkPrintJobs(null,$_POST['pass']);
|
||||
$this->getNextDrinkWorkPrintJobs(null,$_POST['pass'],$fl);
|
||||
}
|
||||
} else if ($command == 'deletePrintJob') {
|
||||
$this->deletePrintJob($_POST['pass'],$_POST['id']);
|
||||
|
@ -98,7 +97,6 @@ class PrintQueue {
|
|||
public static function queueWorkPrintJob($pdo,$table,$timestamp,$prods,$kind,$printer,$username) {
|
||||
$table .= " ($username)";
|
||||
|
||||
// REM* now create the work print job
|
||||
$content = json_encode(array("table" => $table, "time" => $timestamp, "products" => $prods));
|
||||
|
||||
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
|
||||
|
@ -116,7 +114,6 @@ class PrintQueue {
|
|||
|
||||
$jobs = array();
|
||||
for ($printer=1;$printer<7;$printer++) {
|
||||
// REM* bills:
|
||||
$sql = "SELECT count(id) as count FROM %printjobs% WHERE printer=? AND type != '1' AND type != '2'";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($printer));
|
||||
|
@ -136,7 +133,6 @@ class PrintQueue {
|
|||
echo json_encode(array("status" => "OK", "msg" => $jobs));
|
||||
}
|
||||
|
||||
// REM* delete all printjobs
|
||||
function clearprintjobs($pdo) {
|
||||
if (!($this->userrights->hasCurrentUserRight('right_manager')) &&
|
||||
!($this->userrights->hasCurrentUserRight('is_admin'))
|
||||
|
@ -161,7 +157,6 @@ class PrintQueue {
|
|||
if(!($this->userrights->hasCurrentUserRight('right_bill'))) {
|
||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_BILL_NOT_AUTHOTRIZED, "msg" => ERROR_BILL_NOT_AUTHOTRIZED_MSG));
|
||||
} else {
|
||||
// REM* sort it that start is <= end job id
|
||||
if ($start > $end) {
|
||||
$tmp = $end;
|
||||
$end = $start;
|
||||
|
@ -174,13 +169,11 @@ class PrintQueue {
|
|||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
|
||||
for($jobId=$start;$jobId <= $end;$jobId++) {
|
||||
// REM* check if bill id exists
|
||||
$sql = "SELECT count(id) as countid FROM %bill% WHERE id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($jobId));
|
||||
$row =$stmt->fetchObject();
|
||||
if ($row->countid == 1) {
|
||||
// REM* yes, print
|
||||
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
|
||||
$stmt->execute(array($jobId,'3',$printer));
|
||||
|
@ -211,20 +204,17 @@ class PrintQueue {
|
|||
// now get receipt info from bill table
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
// REM* check if the receipt shall be printed to an additional printer
|
||||
$sql = "SELECT setting FROM %config% WHERE name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array("addreceipttoprinter"));
|
||||
$row = $stmt->fetchObject();
|
||||
$addprinter = $row->setting;
|
||||
|
||||
// REM* insert to normal queue:
|
||||
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($printInsertSql));
|
||||
$stmt->execute(array((string)($billid),'3',$printer));
|
||||
|
||||
if (!is_null($addprinter) && ($useaddrecprinter == 1)) {
|
||||
// REM* schedule also to the additional receipt printer
|
||||
$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) {
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,false);
|
||||
if ($isCorrect) {
|
||||
|
@ -390,12 +388,7 @@ class PrintQueue {
|
|||
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
// REM* get the template
|
||||
$sql = "SELECT setting FROM %config% WHERE name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array("rectemplate"));
|
||||
$row =$stmt->fetchObject();
|
||||
$template = $row->setting;
|
||||
$template = $this->getTemplate($pdo, "rectemplate");
|
||||
|
||||
if (intval($language) > 2) {
|
||||
$genInfo = $this->admin->getGeneralConfigItems(false,$pdo);
|
||||
|
@ -419,9 +412,8 @@ class PrintQueue {
|
|||
|
||||
if (in_array($printer, $printersArr)) {
|
||||
if (is_null($fl)) {
|
||||
// REM* no feature level -> do not sent template
|
||||
$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);
|
||||
}
|
||||
$billarray[] = $receiptJob;
|
||||
|
@ -434,21 +426,27 @@ class PrintQueue {
|
|||
}
|
||||
}
|
||||
|
||||
function getNextFoodWorkPrintJobs($printer,$md5pass) {
|
||||
$this->getNextWorkPrintJobs($md5pass,1,$printer);
|
||||
function getNextFoodWorkPrintJobs($printer,$md5pass,$fl) {
|
||||
$this->getNextWorkPrintJobs($md5pass,1,$printer,$fl);
|
||||
}
|
||||
|
||||
function getNextDrinkWorkPrintJobs($printer,$md5pass) {
|
||||
$this->getNextWorkPrintJobs($md5pass,2,$printer);
|
||||
function getNextDrinkWorkPrintJobs($printer,$md5pass,$fl) {
|
||||
$this->getNextWorkPrintJobs($md5pass,2,$printer,$fl);
|
||||
}
|
||||
|
||||
function getNextWorkPrintJobs($md5pass,$theType,$printer) {
|
||||
function getNextWorkPrintJobs($md5pass,$theType,$printer,$fl) {
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,false);
|
||||
|
||||
if ($isCorrect) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
|
||||
$templatekey = "foodtemplate";
|
||||
if ($theType === 2) {
|
||||
$templatekey = "drinktemplate";
|
||||
}
|
||||
$template = $this->getTemplate($pdo, $templatekey);
|
||||
|
||||
if (is_null($printer)) {
|
||||
$sql = "SELECT id,content,type FROM %printjobs% WHERE type=? ORDER BY id";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
|
@ -464,8 +462,13 @@ class PrintQueue {
|
|||
$workarray = array();
|
||||
foreach($result as $aWorkJob) {
|
||||
$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));
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($workarray);
|
||||
} else {
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -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.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/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=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/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue