OrderSprinter 1.2.1

This commit is contained in:
Geno 2020-11-19 22:59:50 +01:00
parent 27a1ab8de0
commit e6c5c607b0
20 changed files with 147 additions and 44 deletions

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.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1">
<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.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1">
<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" />
@ -349,7 +349,7 @@ function getBillWithId(id) {
function printBill(billid) { function printBill(billid) {
doAjax("POST","php/contenthandler.php?module=printqueue&command=queueReceiptPrintJob", doAjax("POST","php/contenthandler.php?module=printqueue&command=queueReceiptPrintJob",
{billid : billid }, null, "Druckfehler"); {billid : billid , useaddrecprinter: 0}, null, "Druckfehler");
} }
function areYouSure(text1, text2, button, callback) { function areYouSure(text1, text2, button, callback) {

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.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1">
<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,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.0"> <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.0"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.1">
<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.0</button> <button id="updatebtn">Update -> 1.2.1</button>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>

View File

@ -1232,6 +1232,29 @@ return true;
} catch (PDOException $e) { } catch (PDOException $e) {
return false; return false;
} }
}
function updateUserTable1200_1201($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.2.0") {
$ret = $this->updateUserTable1130_1200($prefix, $version, $dbname);
if (!$ret) {
return false;
}
}
DbUtils::overrulePrefix($prefix);
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
$stmt->execute(array('addreceipttoprinter',null));
$this->updateVersion($pdo, '1.2.1');
return true;
} catch (PDOException $e) {
return false;
}
} }
function setVersion($prefix,$theVersion) { function setVersion($prefix,$theVersion) {
@ -1318,7 +1341,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.0')"); $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 , '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')");
@ -1328,6 +1351,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'bigfontworkreceipt', '0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'bigfontworkreceipt', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'prominentsearch', '0')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'prominentsearch', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitems', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitems', '1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'addreceipttoprinter', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'smtphost', '')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'smtphost', '')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'smtpauth', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'smtpauth', '1')");
@ -1682,7 +1706,7 @@ $zones[] = $timezone_identifiers[$i];
} }
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
$installerVersion = "1.2.0"; $installerVersion = "1.2.1";
$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']);
@ -1711,7 +1735,8 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39", "1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39",
"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"
); );
if (!in_array($version, $supportedVersions)) { if (!in_array($version, $supportedVersions)) {
@ -1719,7 +1744,7 @@ echo json_encode("Quellversion nicht unterstützt");
return; return;
} }
$ret = $admin->updateUserTable1130_1200($_POST['prefix'], $version, $_POST['db']); $ret = $admin->updateUserTable1200_1201($_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.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1">
<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.0"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.1">
<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" />
@ -131,6 +131,7 @@ var MAN_TABLE_LABEL = ["Tische","Tables","Mesas"];
var MAN_LANG_OF_RECEIPT = ["Bonsprache","Receipt language","Idioma de tique"]; var MAN_LANG_OF_RECEIPT = ["Bonsprache","Receipt language","Idioma de tique"];
var MAN_PRINT_CONCEPT = ["Druckkonzept","Print concept","Concepto de impresión"]; var MAN_PRINT_CONCEPT = ["Druckkonzept","Print concept","Concepto de impresión"];
var MAN_PAYMENT_CONFIG = ["Menü Zahlungsweg","Menu Payment Type","Selección tipo de pagar"]; var MAN_PAYMENT_CONFIG = ["Menü Zahlungsweg","Menu Payment Type","Selección tipo de pagar"];
var MAN_ADD_RECPRINTER = ["Kassenbon zusätzlich auf","Receipt additionally on","Imprimir tiques también a"];
var MAN_WORKFONT_CONFIG = ["Arbeitsbon Schriftgröße","Font size work receipt","Tamaño de letras en tiques de trabajo"]; var MAN_WORKFONT_CONFIG = ["Arbeitsbon Schriftgröße","Font size work receipt","Tamaño de letras en tiques de trabajo"];
var MAN_PROMINENT_SEARCH = ["Prominente Produktsuche","Prominent Product search","Buscar de productos ariba"]; var MAN_PROMINENT_SEARCH = ["Prominente Produktsuche","Prominent Product search","Buscar de productos ariba"];
var MAN_DISCOUNT1 = ["Rabatt 1 (%)","Discount 1 (%)","Descuento 1 (%)"]; var MAN_DISCOUNT1 = ["Rabatt 1 (%)","Discount 1 (%)","Descuento 1 (%)"];
@ -145,6 +146,9 @@ var MAN_WAITER_GOPAY_PRINT = ["Bestell-Kassenbutton druckt Arbeitsbons","Waiter'
var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese Einstellung, ob bei Druck auf den Button 'Kasse' Arbeitsbons gedruckt werden sollen.", var MAN_WAITER_GOPAY_DESCR = ["Im Arbeitsablauf 'nur Arbeitsbons' bestimmt diese Einstellung, ob bei Druck auf den Button 'Kasse' Arbeitsbons gedruckt werden sollen.",
"In the 'only work receipts' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view work receipts shall be printed.", "In the 'only work receipts' workflow this setting specifies if after pressing the 'paydesk' button in the waiter's view work receipts shall be printed.",
"En el modus 'solo tiques de trabajar' este boton especifica se debe imprimido el tique de trabajar despues el click en el boton 'caja' en la vista de camarero."]; "En el modus 'solo tiques de trabajar' este boton especifica se debe imprimido el tique de trabajar despues el click en el boton 'caja' en la vista de camarero."];
var MAN_ADD_RECPRINTER_DESCR = ["Wird hier ein weiterer Drucker angegeben, so werden alle Kassenbons beim Druck über die Kassenansicht zusätzlich auf diesem Drucker ausgedruckt.",
"If a printer is set every print job that is invoked on the paydesk view will be printed also on the specified printer",
"Si esta seleccionado una imprimadora aquí cada tiquet va a ser imprimido en la imprimidora también"];
var MAN_GROUP_WORK_ITEMS = ["Artikelzusammenfassung Arbeitsbon","Summary articels on work receipt", "Agrupación articulos tique d. tr." ]; var MAN_GROUP_WORK_ITEMS = ["Artikelzusammenfassung Arbeitsbon","Summary articels on work receipt", "Agrupación articulos tique d. tr." ];
var MAN_RES_NOTE = ["Reservierungsbestätigung","Confirmation reservation","Text de email para reservación"]; var MAN_RES_NOTE = ["Reservierungsbestätigung","Confirmation reservation","Text de email para reservación"];
var MAN_CHANGE_CONFIG_HEAD = ["Konfiguration ändern?","Change configuration?","Modificar configuración?"]; var MAN_CHANGE_CONFIG_HEAD = ["Konfiguration ändern?","Change configuration?","Modificar configuración?"];
@ -280,7 +284,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,""];
var numberOfClosings = 0; var numberOfClosings = 0;
@ -309,6 +313,7 @@ var generalValuesSettings = [
["austria",MAN_AUSTRIA[lang],"s",10], ["austria",MAN_AUSTRIA[lang],"s",10],
["digigopaysetready",MAN_DIGI_GOPAY_SET_READY[lang],"s",14], ["digigopaysetready",MAN_DIGI_GOPAY_SET_READY[lang],"s",14],
["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15], ["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15],
["addreceipttoprinter",MAN_ADD_RECPRINTER[lang],"s",16],
["workflowconfig",MAN_WORKFLOW[lang],"s",4], ["workflowconfig",MAN_WORKFLOW[lang],"s",4],
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0], ["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
["billlanguage",MAN_LANG_OF_RECEIPT[lang],"s",2], ["billlanguage",MAN_LANG_OF_RECEIPT[lang],"s",2],
@ -384,6 +389,7 @@ function setLanguage(l) {
$("#austriahint").html(MAN_AUSTRIA_INCOMPLETE[l]); $("#austriahint").html(MAN_AUSTRIA_INCOMPLETE[l]);
$("#digigopaysetreadyhint").html("<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_DIGI_GOPAY_DESCR[l] + "</i></p>"); $("#digigopaysetreadyhint").html("<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_DIGI_GOPAY_DESCR[l] + "</i></p>");
$("#waitergopayprinthint").html("<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_WAITER_GOPAY_DESCR[l] + "</i></p>"); $("#waitergopayprinthint").html("<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_WAITER_GOPAY_DESCR[l] + "</i></p>");
$("#addrecprinterhint").html("<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_ADD_RECPRINTER_DESCR[l] + "</i></p>");
$("#aeskeytxt").html(MAN_AESKEY[l]); $("#aeskeytxt").html(MAN_AESKEY[l]);
$("#certificatesntxt").html(MAN_CERTIFICATE_SN[l]); $("#certificatesntxt").html(MAN_CERTIFICATE_SN[l]);
@ -503,9 +509,11 @@ function insertGeneralConfigItems(configResult) {
} }
generalVals[3] = values.paymentconfig; generalVals[3] = values.paymentconfig;
generalVals[4] = values.workflowconfig; generalVals[4] = values.workflowconfig;
generalVals[16] = values.addreceipttoprinter;
$("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType)); $("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType));
$("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig)); $("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig));
$("#partOfAddRecPrinter").html(createAddRecPrinterPart(values.addreceipttoprinter));
$("#partOfWorkflowConfig").html(createWorkflowConfigPart(values.workflowconfig)); $("#partOfWorkflowConfig").html(createWorkflowConfigPart(values.workflowconfig));
$("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt)); $("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt));
$("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch)); $("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch));
@ -613,6 +621,26 @@ function createPaymentConfigPart(payment) {
return html; return html;
} }
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 == "") {
html += '<option value="0" selected>-</option>';
} else {
html += '<option value="0">-</option>';
}
for (var i=1;i<=6;i++) {
if (value == i) {
html += '<option value="' + i + '" selected>' + MAN_PRINTER[lang] + ' ' + i + '</option>';
} else {
html += '<option value="' + i + '">' + MAN_PRINTER[lang] + ' ' + i + '</option>';
}
}
html += '</select></div>';
return html;
}
function createBigFontWorkReceiptPart(theValue) { function createBigFontWorkReceiptPart(theValue) {
var html = '<div class="ui-field-contain">'; var html = '<div class="ui-field-contain">';
html += '<label for="bigfontworkreceipt">' + MAN_WORKFONT_CONFIG[lang] + ':</label>'; html += '<label for="bigfontworkreceipt">' + MAN_WORKFONT_CONFIG[lang] + ':</label>';
@ -1165,6 +1193,7 @@ function binding() {
e.preventDefault(); e.preventDefault();
setVisibilityOfAustriaButtons(); setVisibilityOfAustriaButtons();
setVisibilityDueToWorkflow(); setVisibilityDueToWorkflow();
setVisibilityDueToPrintType();
}); });
bindSelectionsWithActions(); bindSelectionsWithActions();
@ -1190,6 +1219,15 @@ function bindSelectionsWithActions() {
$("#configpart").trigger("create"); $("#configpart").trigger("create");
bindSelectionsWithActions(); bindSelectionsWithActions();
}); });
$("#payprinttype").off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var newval = $("#payprinttype").find(":selected").val();
$("#partOfPayPrintType").html(createPayPrintTypePart(newval));
setVisibilityDueToPrintType();
$("#configpart").trigger("create");
bindSelectionsWithActions();
});
} }
function setVisibilityOfAustriaButtons() { function setVisibilityOfAustriaButtons() {
@ -1216,6 +1254,16 @@ function setVisibilityDueToWorkflow() {
} }
} }
function setVisibilityDueToPrintType() {
// partAddrecPrinterIfServerPrint
var payprinttype = $("#payprinttype").find(":selected").val();
if (payprinttype == 2) {
$("#partAddrecPrinterIfServerPrint").show();
} else {
$("#partAddrecPrinterIfServerPrint").hide();
}
}
function confirmMsg (result) { function confirmMsg (result) {
if (result.status != 'OK') { if (result.status != 'OK') {
var code = result.code; var code = result.code;
@ -2336,6 +2384,12 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfDiscount1"></div> <div id="partOfDiscount1"></div>
<div id="partOfDiscount2"></div> <div id="partOfDiscount2"></div>
<div id="partOfDiscount3"></div> <div id="partOfDiscount3"></div>
<div id="partAddrecPrinterIfServerPrint">
<div id="partOfAddRecPrinter"></div>
<span id=addrecprinterhint></span>
</div>
<div id="partOfAustria"></div> <div id="partOfAustria"></div>
<div id="partIfAustriaEnabled"> <div id="partIfAustriaEnabled">

File diff suppressed because one or more lines are too long

View File

@ -841,6 +841,7 @@ class Admin {
$paymentconfig = $this->getConfigItemOrDefault("paymentconfig", $stmt, 0); $paymentconfig = $this->getConfigItemOrDefault("paymentconfig", $stmt, 0);
$workflowconfig = $this->getConfigItemOrDefault("workflowconfig", $stmt, 0); $workflowconfig = $this->getConfigItemOrDefault("workflowconfig", $stmt, 0);
$addreceipttoprinter = $this->getConfigItemOrDefault("addreceipttoprinter", $stmt, "");
$smtphost = ""; $smtphost = "";
$smtpauth = 1; $smtpauth = 1;
@ -889,7 +890,7 @@ class Admin {
"smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport, "smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport,
"webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3, "webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode, "discount1" => $discount1,"discount2" => $discount2,"discount3" => $discount3,
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint,
"paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn "paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "addreceipttoprinter" => $addreceipttoprinter
); );
if ($forHtml) { if ($forHtml) {
@ -986,7 +987,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.2.0"); echo json_encode($view . "?v=1.2.1");
} }
} }
@ -1200,19 +1201,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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); }; 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.0"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.1");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.0"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.1");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1221,7 +1222,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.0", $mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.1",
"user" => $currentUser, "user" => $currentUser,
"menu" => $mainMenu, "menu" => $mainMenu,
"waitermessage" => $waiterMessage, "waitermessage" => $waiterMessage,
@ -1437,6 +1438,7 @@ class Admin {
"receiveremail" => array("dbcol" => "receiveremail","checknum" => 0), "receiveremail" => array("dbcol" => "receiveremail","checknum" => 0),
"payprinttype" => array("dbcol" => "payprinttype","checknum" => 0), "payprinttype" => array("dbcol" => "payprinttype","checknum" => 0),
"paymentconfig" => array("dbcol" => "paymentconfig","checknum" => 0), "paymentconfig" => array("dbcol" => "paymentconfig","checknum" => 0),
"addreceipttoprinter" => array("dbcol" => "addreceipttoprinter", "checknum" => 0),
"bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0), "bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0),
"prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0), "prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0),
"discount1" => array("dbcol" => "discount1","checknum" => 0), "discount1" => array("dbcol" => "discount1","checknum" => 0),
@ -1479,6 +1481,12 @@ class Admin {
} }
} }
if ($name == 'addreceipttoprinter') {
if ((((string)$aVal) == "0") || (!is_numeric($aVal))) {
$aVal = null;
}
}
if ($name == "remoteaccesscode") { if ($name == "remoteaccesscode") {
if (((string)$aVal) == "") { if (((string)$aVal) == "") {
$aVal = null; $aVal = null;

View File

@ -47,7 +47,11 @@ class PrintQueue {
} else if ($command == 'deletePrintJob') { } else if ($command == 'deletePrintJob') {
$this->deletePrintJob($_POST['pass'],$_POST['id']); $this->deletePrintJob($_POST['pass'],$_POST['id']);
} else if ($command == 'queueReceiptPrintJob') { } else if ($command == 'queueReceiptPrintJob') {
$this->queueReceiptPrintJob($_POST['billid']); if (isset($_POST['useaddrecprinter'])) {
$this->queueReceiptPrintJob($_POST['billid'],$_POST['useaddrecprinter']);
} else {
$this->queueReceiptPrintJob($_POST['billid'],0);
}
} else if ($command == 'queueClosingSummary') { } else if ($command == 'queueClosingSummary') {
$this->queueClosingSummary($_GET['closingid']); $this->queueClosingSummary($_GET['closingid']);
} else if ($command == 'testConnection') { } else if ($command == 'testConnection') {
@ -112,8 +116,8 @@ class PrintQueue {
$jobs = array(); $jobs = array();
for ($printer=1;$printer<7;$printer++) { for ($printer=1;$printer<7;$printer++) {
// bills: // REM* bills:
$sql = "SELECT count(id) as count FROM %printjobs% WHERE printer=?"; $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));
$result = $stmt->fetchObject(); $result = $stmt->fetchObject();
@ -186,7 +190,7 @@ class PrintQueue {
} }
} }
function queueReceiptPrintJob($billid) { function queueReceiptPrintJob($billid,$useaddrecprinter) {
// waiter, or manager, bill, admin rights required // waiter, or manager, bill, admin rights required
if (!($this->userrights->hasCurrentUserRight('right_paydesk')) && if (!($this->userrights->hasCurrentUserRight('right_paydesk')) &&
!($this->userrights->hasCurrentUserRight('right_manager')) && !($this->userrights->hasCurrentUserRight('right_manager')) &&
@ -207,15 +211,27 @@ 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=?";
$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,?,?,?)"; $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)) {
// REM* schedule also to the additional receipt printer
$stmt->execute(array((string)($billid),'3',$addprinter));
}
echo json_encode("OK"); echo json_encode("OK");
} }
} }
public function queueClosingSummary($closingid) { public function queueClosingSummary($closingid) {
if (!($this->userrights->hasCurrentUserRight('right_paydesk')) && if (!($this->userrights->hasCurrentUserRight('right_paydesk')) &&
!($this->userrights->hasCurrentUserRight('right_manager')) && !($this->userrights->hasCurrentUserRight('right_manager')) &&

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