OrderSprinter 1.1.9

This commit is contained in:
Geno 2020-11-19 22:53:50 +01:00
parent 3f65119d9a
commit 5afff34e69
24 changed files with 236 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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -444,6 +444,19 @@ table.prodtable .prodpriceC {
background-color: rgb(246, 246, 246, 0.0) !important;
}
@media all and (min-width: 0em){
.typetop img { width:100px; }
.typehigher img { width:100px; }
}
@media all and (min-width: 20em){
.typetop img { width:120px; }
.typehigher img { width:120px; }
}
@media all and (min-width: 40em){
.typetop img { width:160px; }
.typehigher img { width:160px; }
}
.prodminus,.srminus {
position: absolute;
top: 0px; bottom: 0px; right: 130px;

View File

@ -297,7 +297,9 @@ function createProdType(id,name,kind,usekitchen,usesupplydesk,printer) {
return txt;
},
createLowerMenuTypeStructure: function() {
var newTypeName = '<p><input type="text" name="newtypename" id="newtypename_' + this.id + '" /></p>';
var style = ' style="background-color: white;" ';
var newTypeName = '<p><input type="text" name="newtypename" id="newtypename_' + this.id + '" placeholder="' + PROD_PLACEHOLDER_NEW_PRODTYPE[lang] + '"' + style + '/></p>';
var newTypeBtn = '<p><button id="newtype_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_NEW_CAT[lang] + '</button></p>';
var assignBtn = '<p><button id="assignprod_' + this.id + '" type="submit" data-theme="c" class="oscmd">' + PROD_ASSIGN[lang] + ' &#10155; </button></p>';
return newTypeName + newTypeBtn + assignBtn;

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.1.8</button>
<button id="updatebtn">Update -> 1.1.9</button>
</td>
<td>&nbsp;</td>
</tr>

View File

@ -718,6 +718,42 @@ $ret &= $this->setVersion($prefix, '1.1.8');
return $ret;
}
function updateUserTable1108_1109($prefix,$version) {
$pdo = $this->pdo;
try {
if ($version != "1.1.8") {
$ret = $this->updateUserTable1107_1108($prefix,$version);
if (!$ret) {
return false;
}
}
$adminCl = new Admin();
DbUtils::overrulePrefix($prefix);
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('groupworkitems','1'));
$sql = "ALTER TABLE %user% ADD extrasapplybtnpos INT(1) NULL AFTER keeptypelevel";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$sql = "UPDATE %user% SET extrasapplybtnpos=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array(1));
$sql = "ALTER TABLE %user% MODIFY extrasapplybtnpos INT(1) NOT NULL";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$this->updateVersion($pdo, '1.1.9');
return true;
} catch (PDOException $e) {
return false;
}
}
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
try {
@ -789,7 +825,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.1.8')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.9')");
$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')");
@ -798,6 +834,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'cancelunpaidcode', '')");
$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 , 'groupworkitems', '1')");
$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')");
@ -1161,7 +1198,7 @@ return;
$supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27","1.0.28","1.0.29",
"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.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.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"
);
if (!in_array($version, $supportedVersions)) {
@ -1169,7 +1206,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1107_1108($_POST['prefix'], $version);
$ret = $admin->updateUserTable1108_1109($_POST['prefix'], $version);
if(session_id() == '') {
session_start();

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -132,6 +132,7 @@ 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_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_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_CHANGE_CONFIG_HEAD = ["Konfiguration ändern?","Change configuration?","Modificar configuración?"];
var MAN_CHANGE_CONFIG_CONTENT = ["Sollen folgende Werte geändert werden? ","Do you want to change these values? ","Debe ser cambiado estos datos? "];
@ -238,7 +239,7 @@ var MAN_SIZE_NORMAL = ["normal","normal","normal"];
var MAN_SIZE_BIG = ["groß","big","grande"];
var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0];
var generalVals = [12,2,0,3,0,1,1,0,0,1];
var numberOfClosings = 0;
@ -257,6 +258,7 @@ var generalValuesSettings = [
["paymentconfig",MAN_PAYMENT_CONFIG[lang],"s",3],
["bigfontworkreceipt",MAN_WORKFONT_CONFIG[lang],"s",7],
["prominentsearch",MAN_PROMINENT_SEARCH[lang],"s",8],
["groupworkitems",MAN_GROUP_WORK_ITEMS[lang],"s",9],
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
["billlanguage",MAN_LANG_OF_RECEIPT[lang],"s",2],
@ -436,6 +438,7 @@ function insertGeneralConfigItems(configResult) {
$("#partOfWorkflowConfig").html(createWorkflowConfigPart(values.workflowconfig));
$("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt));
$("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch));
$("#partOfGroupWorkItems").html(createGroupWorkItemsPart(values.groupworkitems));
var language = values.billlanguage;
generalVals[2] = language;
$("#partOfBillLanguage").html(createBillLanguagePart(language));
@ -460,6 +463,7 @@ function insertGeneralConfigItems(configResult) {
generalVals[6] = values.smtpsecure;
generalVals[7] = values.bigfontworkreceipt;
generalVals[8] = values.prominentsearch;
generalVals[9] = values.groupworkitems;
$("#smtphost").val(values.smtphost);
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
@ -549,7 +553,22 @@ function createProminentSearchPart(theValue) {
return html;
}
function createWorkflowConfigPart(workflow) {
function createGroupWorkItemsPart(theValue) {
var html = '<div class="ui-field-contain">';
html += '<label for="groupworkitems">' + MAN_GROUP_WORK_ITEMS[lang] + ':</label>';
html += '<select name="groupworkitems" id="groupworkitems" data-theme="e">';
if (theValue == 0) {
html += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
html += '<option value="1">' + MAN_YES[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_NO[lang] + '</option>';
html += '<option value="1" selected>' + MAN_YES[lang] + '</option>';
}
html += '</select></div>';
return html;
}
function createWorkflowConfigPart(workflow) {
var html = '<div class="ui-field-contain">';
html += '<label for="workflowconfig">' + MAN_WORKFLOW[lang] + ':</label>';
html += '<select name="workflowconfig" id="workflowconfig" data-theme="e">';
@ -2033,6 +2052,7 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfWorkflowConfig"></div>
<div id="partOfBigFontWorkReceipt"></div>
<div id="partOfProminentSearch"></div>
<div id="partOfGroupWorkItems"></div>
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
</form><!-- Konfiguration -->

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -546,6 +546,7 @@ function displayProdsToPayForTable(jsonContent,tablename) {
refreshList("#oben");
addAllToUnten(jsonContent,tablename);
window.scrollTo(0,0);
}
function generateListItem(theme,icon,id,content) {

View File

@ -171,6 +171,10 @@ class Admin {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->setKeepTypeLevel($_POST['keeptypelevel']);
}
} else if ($command == 'setApplyExtrasBtnPos') {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->setExtrasApplyBtnPos($_POST['applyextrasbtnpos']);
}
} else if ($command == 'getOrderVolume') {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->getOrderVolume();
@ -187,6 +191,10 @@ class Admin {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->getKeepTypeLevel();
}
} else if ($command == 'getApplyExtrasBtnPos') {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->getApplyExtrasBtnPos();
}
} else if ($command == 'isInstalled') {
$this->isInstalled();
}
@ -478,6 +486,10 @@ class Admin {
self::getUserValue('keeptypelevel',1);
}
function getApplyExtrasBtnPos() {
self::getUserValue('extrasapplybtnpos', 1);
}
function getOrderVolume() {
self::getUserValue('ordervolume',0);
}
@ -503,6 +515,9 @@ class Admin {
function setKeepTypeLevel($preferValue) {
self::setUserValue('keeptypelevel',$preferValue);
}
function setExtrasApplyBtnPos($preferValue) {
self::setUserValue('extrasapplybtnpos',$preferValue);
}
function setLastModuleOfUser($view) {
if ($this->isUserAlreadyLoggedInForPhp()) {
@ -595,7 +610,7 @@ class Admin {
$right_changeprice = 0;
$supplyRight = 0;
if ($userLoggedIn) {
$sql = "SELECT language,right_supply,right_changeprice,keeptypelevel FROM %user% WHERE id=?";
$sql = "SELECT language,right_supply,right_changeprice,keeptypelevel,extrasapplybtnpos FROM %user% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($_SESSION['userid']));
$row = $stmt->fetchObject();
@ -611,6 +626,7 @@ class Admin {
"userlanguage" => $row->language,
"buttonsizes" => $buttonSizes,
"keeptypelevel" => $row->keeptypelevel,
"extrasapplybtnpos" => $row->extrasapplybtnpos,
"isUserLoggedIn" => 1,
"jsonMenuItemsAndVersion" => $jsonMenuItems
);
@ -672,6 +688,13 @@ class Admin {
$row = $stmt->fetchObject();
$prominentsearch = $row->setting;
$stmt->execute(array("groupworkitems"));
$row = $stmt->fetchObject();
$groupworkitems = $row->setting;
if (is_null($groupworkitems)) {
$groupworkitems = 1;
}
// for update reasons check for null
$stmt->execute(array("receiveremail"));
$row = $stmt->fetchObject();
@ -764,7 +787,7 @@ class Admin {
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
"receiptfontsize" => $receiptfontsize, "reservationnote" => $reservationnote, "paymentconfig" => $paymentconfig,
"workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating,
"rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,
"rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitems" => $groupworkitems,
"sday" => $now["mday"],"smonth" => $now["mon"], "syear" => $now["year"], "shour" => $now["hours"], "smin" => $now["minutes"],
"smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport,
"webimpressum" => $webimpressum, "cancelunpaidcode" => $cancelunpaidcode);
@ -1079,19 +1102,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.1.8"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.8"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.8"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.8"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.1.9"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.9"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.9"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.9"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html"); };
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.8"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.8"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.8"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.8"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.8"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.8"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.8");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.8");
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.9"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.9"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.9"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.9"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.9"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.9"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.9");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.9");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1100,7 +1123,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
// CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.8",
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.9",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@ -1311,6 +1334,7 @@ class Admin {
"paymentconfig" => array("dbcol" => "paymentconfig","checknum" => 0),
"bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0),
"prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0),
"groupworkitems" => array("dbcol" => "groupworkitems","checknum" => 0),
"workflowconfig" => array("dbcol" => "workflowconfig","checknum" => 0),
"receiptfontsize" => array("dbcol" => "receiptfontsize","checknum" => 0),
"billlanguage" => array("dbcol" => "billlanguage","checknum" => 0),

View File

@ -651,7 +651,7 @@ class Products {
$pdo = $this->dbutils->openDbAndReturnPdo();
$pdo->beginTransaction();
$ret = self::createExtraCore($pdo,$name,$price);
$ret = self::createExtraCore($pdo,$name,$price,array());
if ($ret == ERROR_NAME_EXISTS_ALREADY) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_NAME_EXISTS_ALREADY, "msg" => ERROR_NAME_EXISTS_ALREADY_MSG));
$pdo->rollBack();

View File

@ -342,6 +342,16 @@ class QueueContent {
}
$queueStr = implode(',',$queueIds);
$sql = "SELECT setting FROM %config% where name=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array('groupworkitems'));
$row = $stmt->fetchObject();
$groupworkitems = $row->setting;
if (is_null($groupworkitems)) {
$groupworkitems = 1;
}
$sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,anoption,%prodtype%.kind as kind,%prodtype%.printer as printer FROM %queue%,%products%,%prodtype% WHERE %prodtype%.kind=? AND %queue%.id IN ($queueStr) AND productid=%products%.id AND %products%.category=%prodtype%.id ORDER BY productname";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($kind));
@ -377,13 +387,51 @@ class QueueContent {
"printer" => $aQueueItem["printer"],
"extras" => $extras
);
$jobs[] = $theEntry;
if ($groupworkitems) {
$this->grouping($jobs, $theEntry);
} else {
$jobs[] = $theEntry;
}
}
}
if ($groupworkitems) {
// new put the count number into the longname
foreach($jobs as &$aJob) {
$cnt = $aJob["count"];
if ($cnt > 1) {
$aJob["longname"] = $cnt . "x " . $aJob["longname"];
}
}
}
return $jobs;
}
private function grouping(&$collection,$entry) {
$extrasTxt = join(",",$entry["extras"]);
$found = false;
foreach($collection as &$anEntry) {
if (($anEntry["longname"] == $entry["longname"]) && ($anEntry["anoption"] == $entry["anoption"]) && (join(",",$anEntry["extras"]) == $extrasTxt)) {
$found = true;
$anEntry["count"] = $anEntry["count"] + 1;
}
}
if (!$found) {
$collection[] = array("id" => $entry["id"],
"productid" => $entry["productid"],
"longname" => $entry["longname"],
"printer" => $entry["printer"],
"anoption" => $entry["anoption"],
"kind" => $entry["kind"],
"extras" => $entry["extras"],
"count" => 1
);
}
}
private function doWorkPrint($pdo,$theTableid,$insertedQueueIds,$username,$payPrintType,$lang) {
// is it server or local print?

View File

@ -230,6 +230,7 @@ class Basedb {
`prodbtnsize` INT(1) NULL,
`prefertablemap` INT(1) NULL,
`keeptypelevel` INT(1) NOT NULL,
`extrasapplybtnpos` INT(1) NOT NULL,
`active` INT (2) NOT NULL
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
";

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -56,6 +56,10 @@ var PREF_KTL_GO_HIGH = ["-> oberste Produkthierarchie","-> top product hierarchy
var PREF_KTL_DESC = ["Soll in der Bestellansicht nach Auswahl eines Produktes wieder an den Anfang der Produkthierarchie gesprungen werden?",
"Do you prefer to jump to the top of the product hierachy after selecting a product in the waiter view?",
"Donde quiere Usted empezar después de seleccion de un producto?"];
var PREF_APPLY_EXTRA_POS = ["Position Extras-Anwenden-Button","Position apply extras button","Posicion aplicar boton extras"];
var PREF_APPLY_EXTRAS_OPTION_TOP = ["Listenanfang","Start of list","Al inicio de la lista"];
var PREF_APPLY_EXTRAS_OPTION_BOTTOM = ["Listenende","End of list","Al final de la lista"];
var PREF_APPLY_EXTRAS_OPTION_BOTH = ["Listenanfang und -ende","Start and end of list","Al inicio y final de la lista"];
var l=0;
@ -210,6 +214,10 @@ function setKeepTypeLevel() {
doAjax("GET","php/contenthandler.php?module=admin&command=getKeepTypeLevel",null,fillKeepTypeLevel,"Keine Information über Bevorzugung Bestellnavigation");
}
function setApplyBtnPos() {
doAjax("GET","php/contenthandler.php?module=admin&command=getApplyExtrasBtnPos",null,fillExtrasApplyBtnPosPart,"Keine Information über Position Extra-Anwenden-Button");
}
function fillOrderVolume(volume) {
$("#slidervolume").val(volume);
$("#slidervolume").slider('refresh');
@ -253,6 +261,19 @@ function createPreferKTLPart(prefervalue,label,labeltxt) {
return html;
}
function createPreferExtrasApplyBtnPosPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTTOM[l] + '</option>';
html += '<option value="2"' + isSelected(2,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_TOP[l] + '</option>';
html += '<option value="3"' + isSelected(3,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTH[l] + '</option>';
html += '</select></div>';
return html;
}
function fillButtonSizes(buttonsizes) {
$("#roombtnpart").html(createBtnSizePart(buttonsizes.roombtnsize, "roombtnsize", PREF_ROOM_BTN_SIZE[l]));
$("#tablebtnpart").html(createBtnSizePart(buttonsizes.tablebtnsize, "tablebtnsize", PREF_TABLE_BTN_SIZE[l]));
@ -270,6 +291,12 @@ function fillKeepTypeLevel(preferKeepTypeLevel) {
$("#preferktlpartbox").trigger("create");
}
// REM* position iof apply button for extras
function fillExtrasApplyBtnPosPart(applyPos) {
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(applyPos, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
$("#preferktlpartbox").trigger("create");
}
function handleBtnSize(jsonResult) {
if (jsonResult != "OK") {
alert("Fehler");
@ -346,11 +373,18 @@ function binding() {
$("#preferktllabel").off('change').on('change', function(e) {
var newVal = $("#preferktllabel").find(":selected").val();
$("#preferktlbtnpart").html(createPreferKTLPart(newVal, "preferktllabel", PREF_TM[l]));
$("#preferktlbtnpart").html(createPreferKTLPart(newVal, "preferktllabel", PREF_KTL[l]));
$("#preferktlpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setKeepTypeLevel",{keeptypelevel:newVal},handleGeneralAnswer,"Keep Type Level");
binding();
});
$("#preferapplyposlabel").off('change').on('change', function(e) {
var newVal = $("#preferapplyposlabel").find(":selected").val();
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(newVal, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
$("#preferktlpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setApplyExtrasBtnPos",{applyextrasbtnpos:newVal},handleGeneralAnswer,"Apply Extras Button Position");
binding();
});
}
$(document).on("pageinit", "#pref-page", function () {
@ -362,6 +396,7 @@ $(document).on("pageinit", "#pref-page", function () {
setButtonSizes();
setPreferTablemap();
setKeepTypeLevel();
setApplyBtnPos();
binding();
});
@ -422,9 +457,10 @@ $(document).on("pageinit", "#pref-page", function () {
</div>
<div id="preferktlpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="preferktltxt">Tischplan</span></h3>
<p><span id="preferktldesc">Besxhreibung</span></p>
<h3><span id="preferktltxt">Bestellnavigation</span></h3>
<p><span id="preferktldesc">Beschreibung</span></p>
<div id="preferktlbtnpart"></div>
<div id="preferapplypospart"></div>
</div>
</div>

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -63,6 +63,7 @@ var PROD_ASSIGN_EXTRAS_ALL = ["Extras allen Produkten dieser Kategorie zuweisen:
var PROD_PRINTER = ["Drucker","Printer","Imrpimadora"];
var PROD_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"];
var PROD_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"];
var PROD_PLACEHOLDER_NEW_PRODTYPE = ["Name der neuen Kategorie", "Name of the new category","Nombre de la categoría nueva"];
var decpoint = ".";
var lang = 0;

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 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.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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 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.1.8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -95,6 +95,8 @@ var supplyright = 0;
var keeptypelevel = 1;
var applyExtraBtnPos = 1;
var prominentsearch = 0;
var osroombtnsize = 0;
@ -668,6 +670,7 @@ function insertWaiterSettings(settings) {
rightchangeprice = settings.rightchangeprice;
supplyright = settings.supplyright;
keeptypelevel = settings.keeptypelevel;
applyExtraBtnPos = settings.extrasapplybtnpos;
prominentsearch = config.prominentsearch;
setLanguage(settings.userlanguage);
@ -1119,6 +1122,9 @@ function attachAndDisplayFirstRefTypes(jsonTypesAndProds) {
function listOfExtras(prodid) {
var size = getProdSizeClass();
var li = "<li data-role=\"list-divider\" data-theme=\"b\" data-role=\"heading\">" + W_EXTRAS[lang] +"</li>";
if (applyExtraBtnPos != 1) {
li += '<li data-theme="c"><a href="#" id="extra_atop_' + prodid + '" class="extrasel ' + size + '">' + W_APPLY[lang] + '</a></li>';
}
for (var i=0;i<w_allextras.length;i++) {
var anExtra = w_allextras[i];
var extraid=anExtra.extraid;
@ -1131,7 +1137,9 @@ function listOfExtras(prodid) {
}
li += '<li data-theme="' + dt + '" data-icon="' + di + '"><a href="#" id="extra_' + extraid + '_' + prodid + '" class="extrasel ' + size + '">' + toHtml(extraname) + '</a></li>';
}
li += '<li data-theme="c"><a href="#" id="extra_a_' + prodid + '" class="extrasel ' + size + '">' + W_APPLY[lang] + '</a></li>';
if (applyExtraBtnPos != 2) {
li += '<li data-theme="c"><a href="#" id="extra_abottom_' + prodid + '" class="extrasel ' + size + '">' + W_APPLY[lang] + '</a></li>';
}
li += createHigherLine(size);
return li;
}
@ -1143,7 +1151,7 @@ function bindExtrasSel() {
var ids = this.id.split("_");
var extraid = ids[1];
var prodid = ids[2];
if (extraid == "a") {
if ((extraid == "abottom") || (extraid == "atop")) {
var aProd = getProdEntry(prodid);
var allAvailExtrasOfProd = aProd.extras;
var assignedExtras = [];
@ -1324,6 +1332,7 @@ function bindFavEvent() {
function displayTypesProds(ref,extras) {
window.scrollTo(0,0);
if (ref==0) {
fillFavArea();
bindFavEvent();