OrderSprinter 1.2.11
This commit is contained in:
parent
7128cb4196
commit
cd2ff7c097
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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,12 +6,13 @@ function createProdTableHeaderLine() {
|
|||
var txt = "<tr><th>Name"
|
||||
+ "<th>Typ "
|
||||
+ "<th>Durchlauf Küche"
|
||||
+ "<th>Durchlauf Bereitst." +
|
||||
+ "<th>Durchlauf Bereitst."
|
||||
+ "<th>Drucker" +
|
||||
"<th id=shortnameheader class='prodheader'>Kurzname<th>Preis (A)" +
|
||||
"<th class='prodheader'>Preis (B)" +
|
||||
"<th class='prodheader'>Preis (C)" +
|
||||
"<th class='prodheader'>Steuersatz" +
|
||||
"<th class='prodheader'>Steuersatz Österreich" +
|
||||
"<th class='prodheader'>Audio" +
|
||||
"<th class='prodheader'>Verfügbar";
|
||||
return txt;
|
||||
|
@ -26,7 +27,7 @@ function ident(depth) {
|
|||
return txt;
|
||||
}
|
||||
|
||||
function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,audio,favorite) {
|
||||
function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,taxaustria,amount,available,audio,favorite) {
|
||||
var product = {
|
||||
id:id,
|
||||
longname:longname,
|
||||
|
@ -35,6 +36,8 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
priceB: priceB,
|
||||
priceC: priceC,
|
||||
tax: tax,
|
||||
taxaustria: taxaustria,
|
||||
amount: amount,
|
||||
available: available,
|
||||
audio: audio,
|
||||
favorite: favorite,
|
||||
|
@ -49,6 +52,8 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
+ "<td><input type='text' class='prodpriceB'></input>"
|
||||
+ "<td><input type='text' class='prodpriceC'></input>"
|
||||
+ "<td><input type='text' class='prodtax'></input>"
|
||||
+ "<td>" + this.createTaxAustriaSelection("prodtaxaustriasel_" + this.id)
|
||||
+ "<td><input type='text' class='prodamount'></input>"
|
||||
+ "<td>" + this.createAudioSelection(audiofiles,"audiosel_" + this.id)
|
||||
+ "<td>" + this.createAvailSelection("prodavail_" + this.id,PROD_NO,PROD_YES)
|
||||
+ "<td>" + this.createAvailSelection("prodfav_" + this.id,PROD_NO,PROD_YES)
|
||||
|
@ -63,6 +68,7 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
$("#prodleaf_" + this.id + " input.prodpriceB").val(this.priceB);
|
||||
$("#prodleaf_" + this.id + " input.prodpriceC").val(this.priceC);
|
||||
$("#prodleaf_" + this.id + " input.prodtax").val(this.tax);
|
||||
$("#prodleaf_" + this.id + " input.prodamount").val(this.amount);
|
||||
},
|
||||
|
||||
createAudioSelection:function(audiofiles,id) {
|
||||
|
@ -88,6 +94,41 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
}
|
||||
},
|
||||
|
||||
createOption:function(value,selected,txt) {
|
||||
if (value == selected) {
|
||||
return "<option value='" +value + "' selected>" + txt + "</option>";
|
||||
} else {
|
||||
return "<option value='" +value + "'>" + txt + "</option>";
|
||||
}
|
||||
},
|
||||
|
||||
createTaxAustriaSelection:function(id) {
|
||||
var txt = "<select id='" + id + "'>";
|
||||
if ((this.taxaustria == 0) || (this.taxaustria == 'null')) {
|
||||
this.taxaustria = 1;
|
||||
}
|
||||
txt += this.createOption(1,this.taxaustria,"Steuersatz 'Normal'");
|
||||
txt += this.createOption(2,this.taxaustria,"Steuersatz 'Ermäßigt 1'");
|
||||
txt += this.createOption(3,this.taxaustria,"Steuersatz 'Ermäßigt 2'");
|
||||
txt += this.createOption(4,this.taxaustria,"Steuersatz 'Besonders'");
|
||||
|
||||
txt += "</select>";
|
||||
|
||||
return txt;
|
||||
},
|
||||
|
||||
createTaxAustriaSel:function(id) {
|
||||
var visi = ""
|
||||
if (austria == 0) {
|
||||
visi = " style='display:none;' ";
|
||||
}
|
||||
var txt = '<p><div data-role="fieldcontain" ' + visi + '>'
|
||||
+ '<label for="' + id + '">Steuersatz Österreich:</label>'
|
||||
+ this.createTaxAustriaSelection(id)
|
||||
+ '</div></p>';
|
||||
return txt;
|
||||
},
|
||||
|
||||
createFavoriteSelection:function(id,text0,text1) {
|
||||
if (this.favorite == 1) {
|
||||
return "<select id=" + id + "><option value=0>" + text0[lang] + "</option><option value=1 selected>" + text1[lang] + "</option></select>";
|
||||
|
@ -138,6 +179,12 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
+ createInputField("prodtax_" + this.id,"prodtax_input_" + this.id,"tax")
|
||||
+ '</div></p>'
|
||||
|
||||
+ createInputField("prodamount_" + this.id,"prodamount_input_" + this.id,"amount")
|
||||
|
||||
+ "<div id=prodtaxaustriadiv_" + this.id + ">"
|
||||
+ this.createTaxAustriaSel("taxaustriasel_" + this.id)
|
||||
+ "</div>"
|
||||
|
||||
+ "<div id=audiocont_" + this.id + ">"
|
||||
+ this.createMobileAudioSel(audiofiles,"audiosel_" + this.id)
|
||||
+ "</div>"
|
||||
|
@ -179,6 +226,8 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
$("#prodpriceB_" + this.id).html(PROD_PRICE[lang] + ' (B)');
|
||||
$("#prodpriceC_" + this.id).html(PROD_PRICE[lang] + ' (C)');
|
||||
$("#prodtax_" + this.id).html(PROD_TAX[lang]);
|
||||
$("#prodtaxaustria_" + this.id).html(PROD_TAXAUSTRIA[lang]);
|
||||
$("#prodamount_" + this.id).html(PROD_AMOUNT[lang]);
|
||||
$("#prodpriceA_input_" + this.id).val(this.priceA.toString().replace(".",decpoint));
|
||||
$("#prodpriceB_input_" + this.id).val(this.priceB.toString().replace(".",decpoint));
|
||||
$("#prodpriceC_input_" + this.id).val(this.priceC.toString().replace(".",decpoint));
|
||||
|
@ -187,6 +236,10 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,tax,available,a
|
|||
$("#prodtax_input_" + this.id).val(this.tax.toString().replace(".",decpoint));
|
||||
}
|
||||
|
||||
if (this.amount != "null") {
|
||||
$("#prodamount_input_" + this.id).val(this.amount.toString().replace(".",decpoint));
|
||||
}
|
||||
|
||||
$("#availcont_" + this.id).html(this.createMobileAvail("prodavail_" + this.id,PROD_AVAILABLE[lang]));
|
||||
$("#favcont_" + this.id).html(this.createMobileFavorite("prodfav_" + this.id,PROD_FAVORITE[lang]));
|
||||
$("#audiocont_" + this.id).html(this.createMobileAudioSel(audiofiles,"audiosel_" + this.id));
|
||||
|
|
|
@ -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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -6,8 +6,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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.11">
|
||||
|
||||
<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.10</button>
|
||||
<button id="updatebtn">Update -> 1.2.11</button>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
|
@ -1445,6 +1445,37 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1210_1211($prefix, $version, $dbname) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
if ($version != "1.2.10") {
|
||||
$ret = $this->updateUserTable1209_1210($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('taxaustrianormal','20.0'));
|
||||
$stmt->execute(array('taxaustriaerm1','10.0'));
|
||||
$stmt->execute(array('taxaustriaerm2','13.0'));
|
||||
$stmt->execute(array('taxaustriaspecial','19.0'));
|
||||
|
||||
$this->execSql($pdo, "ALTER TABLE %products% ADD taxaustria INT (1) NULL AFTER tax");
|
||||
$this->execSql($pdo, "ALTER TABLE %products% ADD amount INT (5) NULL AFTER taxaustria");
|
||||
$this->execSql($pdo, "ALTER TABLE %histprod% ADD taxaustria INT (1) NULL AFTER tax");
|
||||
$this->execSql($pdo, "ALTER TABLE %queue% ADD taxaustria INT (1) NULL AFTER tax");
|
||||
|
||||
$this->updateVersion($pdo, '1.2.11');
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setVersion($prefix,$theVersion) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
|
@ -1543,6 +1574,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%pricelevel%` (`id` , `name`,`info`,`inf
|
|||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'pricelevel', '1')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'tax', '19.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'togotax', '7.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'taxaustrianormal', '20.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'taxaustriaerm1', '10.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'taxaustriaerm2', '13.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'taxaustriaspecial', '19.0')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'stornocode', '123')");
|
||||
$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')");
|
||||
|
@ -1558,7 +1593,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.10')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.11')");
|
||||
$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')");
|
||||
|
@ -1927,7 +1962,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
|
||||
$installerVersion = "1.2.10";
|
||||
$installerVersion = "1.2.11";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
@ -1957,7 +1992,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.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9"
|
||||
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -1965,7 +2000,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1209_1210($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1210_1211($_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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -247,18 +247,18 @@ var MAN_SMTPSECURE = ["SMTP-Protokoll","SMTP Protocol","SMTP Seguridad"];
|
|||
var MAN_SMTPPORT = ["SMTP-Port","SMTP Port","SMTP Port"];
|
||||
var MAN_WEBIMPRESSUM = ["Webimpressum","Web company info","www café info"];
|
||||
var MAN_TAX_ASSIGN = ["Umsatzsteuer-Zuweisung","Taxes assigment","Asignar impuestos"];
|
||||
var MAN_TAX_ASS_DESC = ["An dieser Stelle können pauschal zwei unterschiedliche Steuersätze den Speisen und den Getränken zugewiesen werden. Das ist vor allem für die Nutzung der Software in Ländern wie Österreich interessant.",
|
||||
"At this place it is possible to assign two different taxes to the foods and to the drinks. This is of interest for the use of this software in countries like Austria",
|
||||
var MAN_TAX_ASS_DESC = ["An dieser Stelle können pauschal zwei unterschiedliche Steuersätze den Speisen und den Getränken zugewiesen werden. Das ist für die Nutzung der Software in Österreich interessant. <b>Die Zuweisungen wirken sich nur im Betriebsmodus 'Österreich' aus!</b></b>",
|
||||
"At this place it is possible to assign two different taxes to the foods and to the drinks. This is of interest for the use of this software in Austria. <b>Only in the mode 'Austria' the assignment are used!</b>",
|
||||
"En esta locación se puede asignar impuestos diferentes a comidas y a bebidas"
|
||||
];
|
||||
var MAN_TAX_ASS_DESC2 = ["Wenn den Produkten kein spezifischer Steuersatz zugeordnet ist, wird für Tischbestellungen der normale Steuersatz und für Außer-Haus-Bestellungen der ToGo-Steuersatz verwendet.",
|
||||
"If you do not assign a specific tax to products the normal tax (table order) or togo tax is applied.",
|
||||
"Si no ha asignado un IVA a productos, la IVA normal (order a la mesa) or la IVA para llevar esta aplicada."];
|
||||
var MAN_TAX_ASS_DESC2 = ["(Die vorausgewählten Werte stellen nicht die aktuelle Zuweisung dar.)",
|
||||
"(The displayed values do not show the current assignments.)",
|
||||
"(Los valores mostrados no son los valores asignados de momento.)"];
|
||||
var MAN_FOOD = ["Speisen/Küche","Food/Kitchen","Comidas/Cocina"];
|
||||
var MAN_DRINKS = ["Getränke/Bar","Beverage/Bar","Bebidas/Bar"];
|
||||
var MAN_WRONG_NUMBER_FORMAT = ["Zuweisung unmöglich. Stimmt das Zahlenformat?","Assignment impossible. Is the number format correct?","Asignar no es posible. Es corecto el formato de los numeros?"];
|
||||
var MAN_TAX_USE = ["Wenn kein Steuersatz beim Produkt angegeben ist: MwSt/Tax/IVA für Tischbestellungen, -Togo für Außer-Haus-Verkauf.",
|
||||
"If no tax is specified for a product, these tax settings are used.",
|
||||
var MAN_TAX_USE = ["Wenn kein Steuersatz beim Produkt angegeben ist: MwSt/Tax/IVA für Tischbestellungen, -Togo für Außer-Haus-Verkauf. <b>Für Österreich gelten andere Steuersätze</b>, siehe Einstellungen unten!",
|
||||
"If no tax is specified for a product, these tax settings are used. <b>For Austria other tax settings are relevant</b>, see above!",
|
||||
"Si no un producto no tiene un IVA asignado, se usa estas IVAs"];
|
||||
var MAN_CANCEL_UNPAID_CODE = ["Stornierungscode unbez. Best.", "Cancel code unpaid items","Codigo para cancelor productos impagados"];
|
||||
|
||||
|
@ -304,6 +304,10 @@ var unpaidTables = "";
|
|||
var generalValuesSettings = [
|
||||
["usstval","MwSt","i",2,"Mehrwertsteuer ist kein Zahlenwert"],
|
||||
["togotaxval","ToGo-MwSt","i",2,"Togo-Mehrwertsteuer ist kein Zahlenwert"],
|
||||
["taxaustrianormalval","Österreich Steuer 'Normal'","i",2,"Angabe Österreich-Steuersatz 'normal' ist kein Zahlenwert"],
|
||||
["taxaustriaerm1val","Österreich Steuer 'Ermäßigt 1'","i",2,"Angabe Österreich-Steuersatz 'Ermäßigt 1' ist kein Zahlenwert"],
|
||||
["taxaustriaerm2val","Österreich Steuer 'Ermäßigt 2'","i",2,"Angabe Österreich-Steuersatz 'Ermäßigt 2' ist kein Zahlenwert"],
|
||||
["taxaustriaspecialval","Österreich Steuer 'Besonders'","i",2,"Angabe Österreich-Steuersatz 'Besonders' ist kein Zahlenwert"],
|
||||
["stornocode","Stornocode","i",1,"Stornocode wurde nicht angegeben!"],
|
||||
["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"],
|
||||
["companyinfo","Betriebsinfo","i",0],
|
||||
|
@ -496,6 +500,11 @@ function getGeneralConfigItems() {
|
|||
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGeneralConfigItems, "Fehler Konfigurationsdaten");
|
||||
}
|
||||
|
||||
function saveValueIntoForm(aValue, decpoint, formid) {
|
||||
var formattedVal = aValue.replace(".", decpoint);
|
||||
$(formid).val(formattedVal);
|
||||
}
|
||||
|
||||
function insertGeneralConfigItems(configResult) {
|
||||
if (configResult.status == "OK") {
|
||||
var values = configResult.msg;
|
||||
|
@ -504,13 +513,12 @@ function insertGeneralConfigItems(configResult) {
|
|||
|
||||
var decpoint = values.decpoint;
|
||||
$("#admin-page").data("decpoint",values.decpoint);
|
||||
var taxval = values.tax;
|
||||
var usstGerVal = taxval.replace(".", decpoint);
|
||||
$("#usstval").val(usstGerVal);
|
||||
|
||||
taxval = values.togotax;
|
||||
usstGerVal = taxval.replace(".", decpoint);
|
||||
$("#togotaxval").val(usstGerVal);
|
||||
saveValueIntoForm(values.tax,decpoint,"#usstval");
|
||||
saveValueIntoForm(values.togotax,decpoint,"#togotaxval");
|
||||
saveValueIntoForm(values.taxaustrianormal,decpoint,"#taxaustrianormalval");
|
||||
saveValueIntoForm(values.taxaustriaerm1,decpoint,"#taxaustriaerm1val");
|
||||
saveValueIntoForm(values.taxaustriaerm2,decpoint,"#taxaustriaerm2val");
|
||||
saveValueIntoForm(values.taxaustriaspecial,decpoint,"#taxaustriaspecialval");
|
||||
|
||||
$("#companyinfo").val(values.companyinfo);
|
||||
$("#rectemplate").val(values.rectemplate);
|
||||
|
@ -1220,11 +1228,11 @@ function binding() {
|
|||
$("#taxass_apply").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
var foodTax = $("#taxesassfood").val().trim();
|
||||
var foodTax = $("#taxesassfood option:selected").val();
|
||||
if (foodTax == "") {
|
||||
foodTax = -1;
|
||||
}
|
||||
var drinksTax = $("#taxesassdrinks").val().trim();
|
||||
var drinksTax = $("#taxesassdrinks option:selected").val();
|
||||
if (drinksTax == "") {
|
||||
drinksTax = -1;
|
||||
}
|
||||
|
@ -2472,6 +2480,26 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<label for="certificatesn"><span id="certificatesntxt">Zert.Seriennummer:</span></label>
|
||||
<input type="text" value="" data-mini="true" placeholder="1234567" id="certificatesn" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="taxaustrianormalval">Steuersatz 'Normal':</label>
|
||||
<input type="text" value="" data-mini="true" placeholder="7,0" id="taxaustrianormalval" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="taxaustriaerm1val">Steuersatz 'Ermäßigt-1':</label>
|
||||
<input type="text" value="" data-mini="true" placeholder="7,0" id="taxaustriaerm1val" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="taxaustriaerm2val">Steuersatz 'Ermäßigt-2':</label>
|
||||
<input type="text" value="" data-mini="true" placeholder="7,0" id="taxaustriaerm2val" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="taxaustriaspecialval">Steuersatz 'Besonders':</label>
|
||||
<input type="text" value="" data-mini="true" placeholder="7,0" id="taxaustriaspecialval" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
|
||||
|
@ -2559,6 +2587,8 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<li><b>Fixsteuersatz</b>: Es ist möglich, einem Produkt einen fixen Umsatzsteuersatz zuzuordnen, so dass das Produkt bei der Bestellung
|
||||
unabhängig von der Zuordnung <i>Tischbestellung</i> oder <i>Außer-Haus-Bestellung</i> immer den hier zugeordneten Steuersatz zugeordnet
|
||||
bekommt.
|
||||
<li><b>Steuersatz-Austria</b>: Diese Einstellung ist für Österreichische Betriebe wichtig: 1: Steuersatz 'Normal', 2: Ermäßigt-1, 3: Ermäßigt-2, 4: Steuersatz 'Besonders'. Ist der Betriebsmodus 'Österreich' ausgewählt, so wird <u><i>immer</i></u> dieser Steuersatz verwendet.
|
||||
<li><b>Menge</b>: Die verfügbare Menge. Bei jeder Bestellung wird die Anzahl um 1 vermindert. Kurz vor Erreichen der Anzahl 0 bekommt der Kellner einen Warnhinweis bei dem Produkt.
|
||||
</ul>
|
||||
|
||||
<p>Ein Produkteintrag mit weiteren Eigenschaften kann beispielsweise so aussehen:
|
||||
|
@ -2626,8 +2656,22 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<p id="taxesassdescr2"></p>
|
||||
<p>
|
||||
<table>
|
||||
<tr><td><span id=taxesfoodtxt></span> (%): <td><input type="text" id="taxesassfood" size="3" data-theme="a" placeholder="10" /></tr>
|
||||
<tr><td><span id=taxesdrinkstxt></span> (%): <td><input type="text" id="taxesassdrinks" size="3" data-theme="a" placeholder="20" /></tr>
|
||||
<tr><td><span id=taxesfoodtxt></span> (%): <td>
|
||||
<select id='taxesassfood'>
|
||||
<option value='1'>Steuersatz 'Normal'</option>
|
||||
<option value='2'>Steuersatz 'Ermäßigt-1'</option>
|
||||
<option value='3'>Steuersatz 'Ermäßigt-2'</option>
|
||||
<option value='4'>Steuersatz 'Besonders'</option>
|
||||
</select>
|
||||
</tr>
|
||||
<tr><td><span id=taxesdrinkstxt></span> (%): <td>
|
||||
<select id='taxesassdrinks'>
|
||||
<option value='1'>Steuersatz 'Normal'</option>
|
||||
<option value='2'>Steuersatz 'Ermäßigt-1'</option>
|
||||
<option value='3'>Steuersatz 'Ermäßigt-2'</option>
|
||||
<option value='4'>Steuersatz 'Besonders'</option>
|
||||
</select>
|
||||
</tr>
|
||||
<tr><td colspan=2><button type="submit" data-theme="e" id="taxass_apply"><span id=taxapplytxt>Anwenden</span></button></tr>
|
||||
</table>
|
||||
</p>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -707,7 +707,7 @@ class Admin {
|
|||
return;
|
||||
}
|
||||
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'"));
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'"));
|
||||
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
|
@ -797,6 +797,22 @@ class Admin {
|
|||
$row = $stmt->fetchObject();
|
||||
$togotax = $row->setting;
|
||||
|
||||
$stmt->execute(array("taxaustrianormal"));
|
||||
$row = $stmt->fetchObject();
|
||||
$taxaustrianormal = $row->setting;
|
||||
|
||||
$stmt->execute(array("taxaustriaerm1"));
|
||||
$row = $stmt->fetchObject();
|
||||
$taxaustriaerm1 = $row->setting;
|
||||
|
||||
$stmt->execute(array("taxaustriaerm2"));
|
||||
$row = $stmt->fetchObject();
|
||||
$taxaustriaerm2 = $row->setting;
|
||||
|
||||
$stmt->execute(array("taxaustriaspecial"));
|
||||
$row = $stmt->fetchObject();
|
||||
$taxaustriaspecial = $row->setting;
|
||||
|
||||
$stmt->execute(array("serverurl"));
|
||||
$row = $stmt->fetchObject();
|
||||
$serverurl = $row->setting;
|
||||
|
@ -954,6 +970,7 @@ class Admin {
|
|||
"version" => $version, "decpoint" => $decpoint,
|
||||
"serverurl" => $serverurl, "email" => $email, "receiveremail" => $receiveremail, "billlanguage" => $billlanguage,
|
||||
"payprinttype" => $payprinttype, "tax" => $tax, "togotax" => $togotax, "currency" => $currency,
|
||||
"taxaustrianormal" => $taxaustrianormal, "taxaustriaerm1" => $taxaustriaerm1, "taxaustriaerm2" => $taxaustriaerm2, "taxaustriaspecial" => $taxaustriaspecial,
|
||||
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
|
||||
"receiptfontsize" => $receiptfontsize, "reservationnote" => $reservationnote, "paymentconfig" => $paymentconfig,
|
||||
"workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating,
|
||||
|
@ -1074,7 +1091,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.2.10");
|
||||
echo json_encode($view . "?v=1.2.11");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1169,18 +1186,7 @@ class Admin {
|
|||
$pdo->beginTransaction();
|
||||
|
||||
try {
|
||||
if ($foodTax < 0) {
|
||||
$foodTax = null;
|
||||
} else {
|
||||
$foodTax = str_replace(",",".",$foodTax);
|
||||
}
|
||||
if ($drinksTax < 0) {
|
||||
$drinksTax = null;
|
||||
} else {
|
||||
$drinksTax = str_replace(",",".",$drinksTax);
|
||||
}
|
||||
|
||||
$sql = "UPDATE %products%,%prodtype% SET %products%.tax=? WHERE %products%.category=%prodtype%.id AND %prodtype%.kind=? AND %products%.removed is null AND %prodtype%.removed is null";
|
||||
$sql = "UPDATE %products%,%prodtype% SET %products%.taxaustria=? WHERE %products%.category=%prodtype%.id AND %prodtype%.kind=? AND %products%.removed is null AND %prodtype%.removed is null";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
|
||||
$stmt->execute(array($foodTax,0));
|
||||
|
@ -1291,24 +1297,24 @@ class Admin {
|
|||
|
||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.11"); };
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.10"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.11"); };
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.11"); };
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.11"); };
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.10"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.10"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.10");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.10");
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.11"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.11"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.11");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.11");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1317,7 +1323,7 @@ class Admin {
|
|||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
// CAUTION: change version also in config.txt!!!
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.10",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.11",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1522,6 +1528,10 @@ class Admin {
|
|||
$assoc_vals = array(
|
||||
"usstval" => array("dbcol" => "tax","checknum" => 1),
|
||||
"togotaxval" => array("dbcol" => "togotax","checknum" => 1),
|
||||
"taxaustrianormalval" => array("dbcol" => "taxaustrianormal","checknum" => 1),
|
||||
"taxaustriaerm1val" => array("dbcol" => "taxaustriaerm1","checknum" => 1),
|
||||
"taxaustriaerm2val" => array("dbcol" => "taxaustriaerm2","checknum" => 1),
|
||||
"taxaustriaspecialval" => array("dbcol" => "taxaustriaspecial","checknum" => 1),
|
||||
"stornocode" => array("dbcol" => "stornocode","checknum" => 0),
|
||||
"printpass" => array("dbcol" => "printpass","checknum" => 0),
|
||||
"companyinfo" => array("dbcol" => "companyinfo","checknum" => 0),
|
||||
|
|
|
@ -327,6 +327,13 @@ class Bill {
|
|||
return $out;
|
||||
}
|
||||
|
||||
public function getAustriaTaxes($pdo,$billid) {
|
||||
$sql = "select tax,IF(taxaustria is not null, taxaustria, 0) as taxaustria,concat('$sign',round(sum(price) - sum(price / (1.0 + tax/100.0)),2)) as mwst, concat('$sign',round(sum(price / (1.0 + tax/100.0)),2)) as netto, concat('$sign',sum(price)) as brutto FROM %queue%,%billproducts% WHERE %billproducts%.billid=? AND %billproducts%.queueid=%queue%.id group by tax ORDER BY taxaustria";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($billid));
|
||||
$result = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*
|
||||
* insert or take out cash money. The direction done by sign of $money value
|
||||
|
@ -729,7 +736,7 @@ class Bill {
|
|||
$commonUtils = new CommonUtils();
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $stornval, $stornonettoval, $tax, $userIdOfStornoUser);
|
||||
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`host`,`signature`) VALUES ( ?, ? , ?, ?,?,?, 's', ?,?,?,?,?)";
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`host`,`signature`) VALUES (?,?,?,?,?,?, 's', ?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array($nextbillid,$currentTime,$stornval,$stornonettoval,$tax,$tableid,$paymentid,$userIdOfStornoUser,$billid,0,$signature));
|
||||
$refIdOfStornoEntry = $pdo->lastInsertId();
|
||||
|
|
|
@ -286,13 +286,17 @@ class CommonUtils {
|
|||
if ($row->countid == 0) {
|
||||
return $default;
|
||||
} else {
|
||||
self::getExistingConfigValue($pdo, $item);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getExistingConfigValue($pdo,$item) {
|
||||
$sql = "SELECT setting FROM %config% WHERE name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($item));
|
||||
$row = $stmt->fetchObject();
|
||||
return $row->setting;
|
||||
}
|
||||
}
|
||||
|
||||
public static function callPlugin($pdo,$fct,$condition) {
|
||||
try {
|
||||
|
|
|
@ -197,6 +197,8 @@ class DbUtils {
|
|||
array("col" => 'priceB', "hist" => 1),
|
||||
array("col" => 'priceC', "hist" => 1),
|
||||
array("col" => 'tax', "hist" => 1),
|
||||
array("col" => 'taxaustria', "hist" => 1),
|
||||
array("col" => 'amount', "hist" => 0),
|
||||
array("col" => 'category', "hist" => 0),
|
||||
array("col" => 'favorite', "hist" => 1),
|
||||
array("col" => 'sorting', "hist" => 1),
|
||||
|
|
|
@ -84,7 +84,7 @@ class Products {
|
|||
if(isset($_POST['extras'])) {
|
||||
$extras = $_POST['extras'];
|
||||
}
|
||||
$this->applySingleProdData($_POST['id'],$_POST['longname'],$_POST['shortname'],$_POST['priceA'],$_POST['priceB'],$_POST['priceC'],$_POST['tax'],$_POST['available'],$_POST['audioFile'],$_POST['changeExtras'],$extras,$_POST['favorite'],$_POST['assignextrastotype']);
|
||||
$this->applySingleProdData($_POST['id'],$_POST['longname'],$_POST['shortname'],$_POST['priceA'],$_POST['priceB'],$_POST['priceC'],$_POST['tax'],$_POST['taxaustria'],$_POST['amount'],$_POST['available'],$_POST['audioFile'],$_POST['changeExtras'],$extras,$_POST['favorite'],$_POST['assignextrastotype']);
|
||||
} else if ($command == 'createExtra') {
|
||||
$this->createExtra($_POST['name'],$_POST['price']);
|
||||
} else if ($command == 'delExtra') {
|
||||
|
@ -98,7 +98,7 @@ class Products {
|
|||
} else if ($command == 'delproduct') {
|
||||
$this->delproduct($_POST['prodid']);
|
||||
} else if ($command == 'createProduct') {
|
||||
$this->createProduct($_POST['longname'],$_POST['shortname'],$_POST['priceA'],$_POST['priceB'],$_POST['priceC'],$_POST['tax'],$_POST['available'],$_POST['prodTypeId'],$_POST['audioFile'],$_POST['favorite']);
|
||||
$this->createProduct($_POST['longname'],$_POST['shortname'],$_POST['priceA'],$_POST['priceB'],$_POST['priceC'],$_POST['tax'],$_POST['taxaustria'],$_POST['amount'],$_POST['available'],$_POST['prodTypeId'],$_POST['audioFile'],$_POST['favorite']);
|
||||
} else if ($command == 'reassign') {
|
||||
$this->reassign($_POST['productid'],$_POST['typeid']);
|
||||
} else if ($command == 'createProdType') {
|
||||
|
@ -177,7 +177,7 @@ class Products {
|
|||
$typeArray[] = array("id" => $row['id'], "name" => $row['name'], "ref" => $ref);
|
||||
}
|
||||
|
||||
$sql = "select id,shortname,longname,audio,category as ref,favorite,$priceTxt as price,IF(tax is not null, tax, 'null') as tax from %products% where available='1' AND removed is null ORDER BY sorting";
|
||||
$sql = "select id,shortname,longname,audio,category as ref,favorite,$priceTxt as price,IF(tax is not null, tax, 'null') as tax,IF(taxaustria is not null, taxaustria, 'null') as taxaustria,IF(amount is not null, amount, 'null') as amount from %products% where available='1' AND removed is null ORDER BY sorting";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
|
@ -203,7 +203,7 @@ class Products {
|
|||
$stmt->execute(array($row['id']));
|
||||
$extras = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
$prodArray[] = array("id" => $row['id'], "name" => $row['shortname'], "longname" => $row['longname'], "audio" => $audio, "ref" => $ref, "favorite" => $fav, "price" => $row['price'], "tax" => $row['tax'], "extras" => $extras);
|
||||
$prodArray[] = array("id" => $row['id'], "name" => $row['shortname'], "longname" => $row['longname'], "audio" => $audio, "ref" => $ref, "favorite" => $fav, "price" => $row['price'], "tax" => $row['tax'], "taxaustria" => $row['taxaustria'],"amount" => $row['amount'],"extras" => $extras);
|
||||
}
|
||||
$pdo->commit();
|
||||
|
||||
|
@ -250,9 +250,9 @@ class Products {
|
|||
*/
|
||||
private function getProductsWithReferenz($pdo,$ref) {
|
||||
$prods = array();
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,available,audio from %products% where removed is null AND category is null ORDER BY sorting";
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,IF(taxaustria is not null, taxaustria, 'null') as taxaustria,available,IF(amount is not null, amount, 'null') as amount,audio from %products% where removed is null AND category is null ORDER BY sorting";
|
||||
if ($ref > 0) {
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,available,audio from %products% where removed is null AND category=$ref ORDER BY sorting";
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,IF(taxaustria is not null, taxaustria, 'null') as taxaustria,available,IF(amount is not null, amount, 'null') as amount,audio from %products% where removed is null AND category=$ref ORDER BY sorting";
|
||||
}
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
|
@ -268,6 +268,8 @@ class Products {
|
|||
"priceB" => $zeile['priceB'],
|
||||
"priceC" => $zeile['priceC'],
|
||||
"tax" => $zeile['tax'],
|
||||
"taxaustria" => $zeile['taxaustria'],
|
||||
"amount" => $zeile['amount'],
|
||||
"audio" => ($zeile['audio'] == null ? '' : $zeile['audio']),
|
||||
"type" => "p");
|
||||
$prods[] = $prod_entry;
|
||||
|
@ -373,11 +375,11 @@ class Products {
|
|||
$containedTypes = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||
|
||||
if (!is_null($ref) && ($ref>0)) {
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,available,favorite,audio,'p' as type from %products% where removed is null AND category=? ORDER BY sorting";
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,IF(taxaustria is not null, taxaustria, 'null') as taxaustria,available,IF(amount is not null, amount, 'null') as amount,favorite,audio,'p' as type from %products% where removed is null AND category=? ORDER BY sorting";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array($ref));
|
||||
} else {
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,available,favorite,audio,'p' as type from %products% where removed is null AND category is null ORDER BY sorting";
|
||||
$sql = "SELECT id,shortname,longname,priceA,priceB,priceC,IF(tax is not null, tax, 'null') as tax,IF(taxaustria is not null, taxaustria, 'null') as taxaustria,available,IF(amount is not null, amount, 'null') as amount,favorite,audio,'p' as type from %products% where removed is null AND category is null ORDER BY sorting";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
|
@ -890,7 +892,7 @@ class Products {
|
|||
}
|
||||
|
||||
|
||||
function applySingleProdData($id,$longname,$shortname,$priceA,$priceB,$priceC,$tax,$available,$audioFile,$changeExtras,$extras,$favorite,$assignextrastotype) {
|
||||
function applySingleProdData($id,$longname,$shortname,$priceA,$priceB,$priceC,$tax,$taxaustria,$amount,$available,$audioFile,$changeExtras,$extras,$favorite,$assignextrastotype) {
|
||||
if (!is_numeric($id) || !is_numeric($available) || !is_numeric($favorite) ||!is_numeric($priceA) || !is_numeric($priceB) || !is_numeric($priceC) || (!is_numeric($tax) && ($tax != "null")) ) {
|
||||
return;
|
||||
}
|
||||
|
@ -898,15 +900,18 @@ class Products {
|
|||
if ($tax == "null") {
|
||||
$tax = null;
|
||||
}
|
||||
if ($amount == "null") {
|
||||
$amount = null;
|
||||
}
|
||||
if ($audioFile == '') {
|
||||
$audioFile = null;
|
||||
}
|
||||
$updateSql = "UPDATE %products% SET shortname=?, longname=?, priceA=?, priceB=?, priceC=?, tax=?, available=?, audio=?, favorite=? WHERE id=?";
|
||||
$updateSql = "UPDATE %products% SET shortname=?, longname=?, priceA=?, priceB=?, priceC=?, tax=?, taxaustria=?, amount=?,available=?, audio=?, favorite=? WHERE id=?";
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($updateSql));
|
||||
$stmt->execute(array($shortname,$longname,$priceA,$priceB,$priceC,$tax,$available,$audioFile,$favorite,$id));
|
||||
$stmt->execute(array($shortname,$longname,$priceA,$priceB,$priceC,$tax,$taxaustria,$amount,$available,$audioFile,$favorite,$id));
|
||||
|
||||
if ($assignextrastotype == 0) {
|
||||
if ($changeExtras == 1) {
|
||||
|
@ -996,7 +1001,7 @@ class Products {
|
|||
echo json_encode(array("status" => "OK"));
|
||||
}
|
||||
|
||||
function createProduct($longname,$shortname,$priceA,$priceB,$priceC,$tax,$available,$typeId,$audioFile,$favorite) {
|
||||
function createProduct($longname,$shortname,$priceA,$priceB,$priceC,$tax,$taxaustria,$amount,$available,$typeId,$audioFile,$favorite) {
|
||||
if (!is_numeric($typeId) || !is_numeric($available) || !is_numeric($favorite)|| !is_numeric($priceA) || !is_numeric($priceB) || !is_numeric($priceC)) {
|
||||
return;
|
||||
}
|
||||
|
@ -1013,12 +1018,12 @@ class Products {
|
|||
$shortname = $longname;
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `tax`, `category`,`favorite`,`available`,`audio`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?)";
|
||||
$sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `tax`, `taxaustria`,`amount`,`category`,`favorite`,`available`,`audio`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?)";
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array($shortname,$longname,$priceA,$priceB,$priceC,$tax,$typeId,$favorite,$available,$audioFile));
|
||||
$stmt->execute(array($shortname,$longname,$priceA,$priceB,$priceC,$tax,$taxaustria,$amount,$typeId,$favorite,$available,$audioFile));
|
||||
|
||||
$newProdId = $pdo->lastInsertId();
|
||||
$this->sorter->setMaxSortingForProdId($pdo, $newProdId);
|
||||
|
|
|
@ -820,17 +820,10 @@ class QueueContent {
|
|||
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$sql = "SELECT setting FROM %config% where name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array('togotax'));
|
||||
$row = $stmt->fetchObject();
|
||||
$togotax = $row->setting;
|
||||
$stmt->execute(array('tax'));
|
||||
$row = $stmt->fetchObject();
|
||||
$normaltax = $row->setting;
|
||||
$stmt->execute(array('workflowconfig'));
|
||||
$row = $stmt->fetchObject();
|
||||
$workflowconfig = $row->setting;
|
||||
$togotax = CommonUtils::getExistingConfigValue($pdo, 'togotax');
|
||||
$normaltax = CommonUtils::getExistingConfigValue($pdo, 'tax');
|
||||
$workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
|
||||
$austria = CommonUtils::getExistingConfigValue($pdo, 'austria');
|
||||
|
||||
// get current pricelevel
|
||||
$currentPriceLevel = $this->commonUtils->getCurrentPriceLevel($pdo);
|
||||
|
@ -847,7 +840,7 @@ class QueueContent {
|
|||
$theChangedPrice = str_replace(',','.',$theChangedPrice);
|
||||
|
||||
// now get the price for this pricelevel
|
||||
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax FROM %products% where id=?";
|
||||
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($getPriceSql));
|
||||
$stmt->execute(array($productid));
|
||||
$row = $stmt->fetchObject();
|
||||
|
@ -856,6 +849,13 @@ class QueueContent {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_null($row->amount)) {
|
||||
$amount = max(($row->amount -1),0);
|
||||
$sql = "UPDATE %products% SET amount=? WHERE id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($amount,$productid));
|
||||
}
|
||||
|
||||
$productname = $row->longname;
|
||||
if (($theChangedPrice == "NO") || (!is_numeric($theChangedPrice))) {
|
||||
$price_for_level_A = $row->priceA;
|
||||
|
@ -882,9 +882,33 @@ class QueueContent {
|
|||
if ($togo == 1) {
|
||||
$tax = $togotax;
|
||||
}
|
||||
|
||||
if ($austria == 1) {
|
||||
$taxaustrianumber = $row->taxaustria;
|
||||
$configItem = "";
|
||||
switch($taxaustrianumber) {
|
||||
case 1:
|
||||
$configItem = "taxaustrianormal";
|
||||
break;
|
||||
case 2:
|
||||
$configItem = "taxaustriaerm1";
|
||||
break;
|
||||
case 3:
|
||||
$configItem = "taxaustriaerm2";
|
||||
break;
|
||||
case 4:
|
||||
$configItem = "taxaustriaspecial";
|
||||
break;
|
||||
default:
|
||||
$configItem = "taxaustrianormal";
|
||||
}
|
||||
$tax = CommonUtils::getExistingConfigValue($pdo, $configItem);
|
||||
} else {
|
||||
$taxaustrianumber = null;
|
||||
if (!is_null($row->tax)) {
|
||||
$tax = $row->tax;
|
||||
}
|
||||
}
|
||||
|
||||
$extras = null;
|
||||
if (array_key_exists("extras",$aProd)) {
|
||||
|
@ -912,12 +936,12 @@ class QueueContent {
|
|||
$ordertime = date('Y-m-d H:i:s');
|
||||
|
||||
$insertSql = "INSERT INTO `%queue%` (
|
||||
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
|
||||
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
|
||||
VALUES (
|
||||
NULL , ?,?,?,?,?,?,?,?,?,?,?, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL,NULL,'0',NULL,'0');";
|
||||
NULL , ?,?,?,?,?,?,?,?,?,?,?,?, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL,NULL,'0',NULL,'0');";
|
||||
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql));
|
||||
$stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo));
|
||||
$stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo));
|
||||
$queueid = $pdo->lastInsertId();
|
||||
|
||||
if (!is_null($extras) && ($extras != "")) {
|
||||
|
|
|
@ -7,6 +7,8 @@ class ProductEntry {
|
|||
private $priceB; // price level B
|
||||
private $priceC; // price level C
|
||||
private $tax;
|
||||
private $taxaustria;
|
||||
private $amount;
|
||||
private $longName; // the name that shall appear on the receipt
|
||||
private $prodid = null;
|
||||
private $available = 1;
|
||||
|
@ -14,6 +16,8 @@ class ProductEntry {
|
|||
private static $PRICE_B = "PreisB";
|
||||
private static $PRICE_C = "PreisC";
|
||||
private static $TAX = "Fixsteuersatz";
|
||||
private static $TAXAUSTRIA = "Steuersatz-Austria";
|
||||
private static $AMOUNT = "Menge";
|
||||
private static $SHORTNAME = "Kurzname";
|
||||
private static $AVAILABLE = "vorhanden";
|
||||
private static $ID = "ID";
|
||||
|
@ -30,6 +34,8 @@ class ProductEntry {
|
|||
$priceB = str_replace('.', $decpoint, $aProd['priceB']);
|
||||
$priceC = str_replace('.', $decpoint, $aProd['priceC']);
|
||||
$tax = str_replace('.', $decpoint, $aProd['tax']);
|
||||
$taxaustria = $aProd['taxaustria'];
|
||||
$amount = $aProd['amount'];
|
||||
|
||||
$prodText = "$longname; $priceA";
|
||||
$extArr = array();
|
||||
|
@ -47,6 +53,14 @@ class ProductEntry {
|
|||
$extArr[] = self::$PRICE_C . ":$priceC";
|
||||
}
|
||||
|
||||
if (!is_null($taxaustria) && ($taxaustria != 'null')) {
|
||||
$extArr[] = self::$TAXAUSTRIA . ":$taxaustria";
|
||||
}
|
||||
|
||||
if (!is_null($amount) && ($amount != 'null')) {
|
||||
$extArr[] = self::$AMOUNT . ":$amount";
|
||||
}
|
||||
|
||||
if ($available == 0) {
|
||||
$extArr[] = self::$AVAILABLE . ":nein";
|
||||
}
|
||||
|
@ -75,6 +89,9 @@ class ProductEntry {
|
|||
$this->priceC = null;
|
||||
$this->shortName = null;
|
||||
|
||||
$this->taxaustria = 0;
|
||||
$this->amount = "";
|
||||
|
||||
if (count($propertyparts) > 1) {
|
||||
if (trim($propertyparts[1]) == "") {
|
||||
return;
|
||||
|
@ -100,6 +117,13 @@ class ProductEntry {
|
|||
$this->shortName = $value;
|
||||
} else if ($identifier == self::$ID) {
|
||||
$this->prodid = $value;
|
||||
} else if ($identifier == self::$TAXAUSTRIA) {
|
||||
if (($value<0) || ($value > 4)) {
|
||||
$value = null;
|
||||
}
|
||||
$this->taxaustria = $value;
|
||||
} else if ($identifier == self::$AMOUNT) {
|
||||
$this->amount = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,6 +175,13 @@ class ProductEntry {
|
|||
return $this->available;
|
||||
}
|
||||
|
||||
function getTaxAustria() {
|
||||
return $this->taxaustria;
|
||||
}
|
||||
function getAmount() {
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
function toString() {
|
||||
return "S:" . $this->shortName . " PA:" . $this->priceA . " PB:" . $this->priceB . " PC:" . $this->priceC . " Tax:" . $this->tax . " R:" . $this->longName;
|
||||
}
|
||||
|
|
|
@ -352,6 +352,14 @@ class TypeAndProductFileManager {
|
|||
$priceB = $product->getPriceB();
|
||||
$priceC = $product->getPriceC();
|
||||
$tax = $product->getTax();
|
||||
$taxaustria = trim($product->getTaxAustria());
|
||||
if (($taxaustria == "") || ($taxaustria == 0)) {
|
||||
$taxaustria = null;
|
||||
}
|
||||
$amount = trim($product->getAmount());
|
||||
if (trim($amount) == "") {
|
||||
$amount = null;
|
||||
}
|
||||
$shortName = $product->getShortName();
|
||||
$longName = $product->getLongName();
|
||||
$prodid = $product->getProdId();
|
||||
|
@ -379,15 +387,15 @@ class TypeAndProductFileManager {
|
|||
}
|
||||
}
|
||||
if ($isNewProd) {
|
||||
$sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `tax`, `category`,`available`,`favorite`,`sorting`) VALUES (NULL,";
|
||||
$sql = $sql . "?,?,?,?,?,?,?,?,?,?)";
|
||||
$sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `tax`, `taxaustria`, `amount`, `category`,`available`,`favorite`,`sorting`) VALUES (NULL,";
|
||||
$sql = $sql . "?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$tax, $category,$available,$favorite,$sorting));
|
||||
$stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$tax, $taxaustria, $amount, $category,$available,$favorite,$sorting));
|
||||
$prodid = $pdo->lastInsertId();
|
||||
HistFiller::createProdInHist($pdo, $prodid);
|
||||
} else {
|
||||
|
||||
$sql = "SELECT shortname,longname,priceA,priceB,priceC,tax,available,category FROM %products% WHERE id=?";
|
||||
$sql = "SELECT shortname,longname,priceA,priceB,priceC,tax,taxaustria,amount,available,category FROM %products% WHERE id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($prodid));
|
||||
$row = $stmt->fetchObject();
|
||||
|
@ -398,12 +406,14 @@ class TypeAndProductFileManager {
|
|||
|| ($row->priceB != $priceB)
|
||||
|| ($row->priceC != $priceC)
|
||||
|| ($row->available != $available)
|
||||
|| ($row->tax != $tax));
|
||||
|| ($row->tax != $tax)
|
||||
|| ($row->taxaustria != $taxaustria)
|
||||
|| ($row->amount != $amount));
|
||||
|
||||
if ($changed) {
|
||||
$sql = "UPDATE %products% SET shortname=?,longname=?,priceA=?,priceB=?,priceC=?,tax=?,available=?,sorting=? WHERE id=?";
|
||||
$sql = "UPDATE %products% SET shortname=?,longname=?,priceA=?,priceB=?,priceC=?,tax=?,taxaustria=?,amount=?,available=?,sorting=? WHERE id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$tax,$available,$sorting,$prodid));
|
||||
$stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$tax,$taxaustria,$amount,$available,$sorting,$prodid));
|
||||
HistFiller::updateProdInHist($pdo, $prodid);
|
||||
} else {
|
||||
$sql = "UPDATE %products% SET sorting=? WHERE id=?";
|
||||
|
|
|
@ -410,6 +410,8 @@ class Basedb {
|
|||
`priceB` " . DECIMALSMALL . " NULL,
|
||||
`priceC` " .DECIMALSMALL . " NULL,
|
||||
`tax` " . DECIMALSMALL . " NULL,
|
||||
`taxaustria` INT(1) NULL,
|
||||
`amount` INT(5) NULL,
|
||||
`category` INT(3) NULL,
|
||||
`favorite` INT(1) NULL,
|
||||
`sorting` INT(2) NULL,
|
||||
|
@ -510,6 +512,7 @@ class Basedb {
|
|||
`pricelevel` INT( 3 ) NOT NULL ,
|
||||
`price` " . DECIMALSMALL . " NOT NULL,
|
||||
`tax` " . DECIMALSMALL . " NOT NULL,
|
||||
`taxaustria` INT(1) NULL,
|
||||
`productname` VARCHAR( 150 ) NULL,
|
||||
`ordertime` DATETIME NULL ,
|
||||
`orderuser` INT(10) NOT NULL ,
|
||||
|
@ -568,6 +571,7 @@ class Basedb {
|
|||
`priceB` " . DECIMALSMALL . " NULL,
|
||||
`priceC` " . DECIMALSMALL . " NULL,
|
||||
`tax` " . DECIMALSMALL . " NULL,
|
||||
`taxaustria` INT(1) NULL,
|
||||
`sorting` INT(2) NULL,
|
||||
`available` INT(2) NOT NULL,
|
||||
`favorite` INT(1) NULL,
|
||||
|
|
|
@ -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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -29,6 +29,8 @@ var PROD_NEW_PROD = ["Neues Produkt","New product","Nuevo producto"];
|
|||
var PROD_NO_TONE = ["Kein Ton","No audio","Ningún sonido"];
|
||||
var PROD_PRICE = ["Preis","Price","Precio"];
|
||||
var PROD_TAX = ["Steuersatz immer","Tax always","Impuesto siempre"];
|
||||
var PROD_TAXAUSTRIA = ["Steuersatz Österreich","Tax Austria","Impuesto Austria"];
|
||||
var PROD_AMOUNT = ["Verfügbare Menge","Available amount","Cuanto hay"];
|
||||
var PROD_SHORTNAME = ["Kurzname:","Short name:","Nombre corto"];
|
||||
var PROD_LONG_NAME = ["Langname:","Long name:","Nombre largo"];
|
||||
var PROD_AVAILABLE = ["Verfügbar","Available","Disponible"];
|
||||
|
@ -70,6 +72,7 @@ var PROD_PLACEHOLDER_NEW_PRODTYPE = ["Name der neuen Kategorie", "Name of the ne
|
|||
var MAX_PRICE = 999.99;
|
||||
|
||||
var decpoint = ".";
|
||||
var austria = 0;
|
||||
var lang = 0;
|
||||
|
||||
var p_allprods = [];
|
||||
|
@ -160,13 +163,13 @@ function setLanguage(language) {
|
|||
var i=0;
|
||||
for (i=0;i<pt.length;i++) {
|
||||
var prod = pt[i];
|
||||
var aProduct = newProduct(prod.id,prod.longname,prod.shortname,prod.priceA,prod.priceB,prod.priceC,prod.tax,prod.available,prod.audio,prod.favorite);
|
||||
var aProduct = newProduct(prod.id,prod.longname,prod.shortname,prod.priceA,prod.priceB,prod.priceC,prod.tax,prod.taxaustria,prod.amount,prod.available,prod.audio,prod.favorite);
|
||||
prodleafs[prodleafs.length] = aProduct;
|
||||
txt += aProduct.createListStructureLine(audiofiles);
|
||||
}
|
||||
if (ct != null) {
|
||||
var dummyPrice = "0.00".replace(".",decpoint);
|
||||
var aProduct = newProduct("n" + ct.id,"","",dummyPrice,dummyPrice,dummyPrice,"null",1,"",0);
|
||||
var aProduct = newProduct("n" + ct.id,"","",dummyPrice,dummyPrice,dummyPrice,"null",0,"null",1,"",0);
|
||||
prodleafs[prodleafs.length] = aProduct;
|
||||
txt += aProduct.createListStructureLine(audiofiles);
|
||||
}
|
||||
|
@ -380,9 +383,18 @@ function setLanguage(language) {
|
|||
tax = tax.toString().replace(decpoint,".");
|
||||
}
|
||||
|
||||
var amount = $("#prodamount_input_" + prodid).val().trim();
|
||||
if (amount === "") {
|
||||
amount = "null";
|
||||
} else {
|
||||
amount = amount.toString().replace(decpoint,".");
|
||||
}
|
||||
|
||||
var selectedTaxAustria = $("#taxaustriasel_" + prodid + " option:selected").val();
|
||||
|
||||
var selectedAudioFile = $("#audiosel_" + prodid + " option:selected").text();
|
||||
|
||||
if (selectedAudioFile == 'Kein Ton') {
|
||||
if (selectedAudioFile === 'Kein Ton') {
|
||||
selectedAudioFile = '';
|
||||
}
|
||||
|
||||
|
@ -391,12 +403,12 @@ function setLanguage(language) {
|
|||
var favorite = $( "#prodfav_" + prodid + " option:selected").val();
|
||||
|
||||
var priceA_Arr = convertToDecimalPoint(priceA);
|
||||
if (priceB.length != 0) {
|
||||
if (priceB.length !== 0) {
|
||||
var priceB_Arr = convertToDecimalPoint(priceB);
|
||||
} else {
|
||||
var priceB_Arr = convertToDecimalPoint(priceA);
|
||||
}
|
||||
if (priceC.length != 0) {
|
||||
if (priceC.length !== 0) {
|
||||
var priceC_Arr = convertToDecimalPoint(priceC);
|
||||
} else {
|
||||
var priceC_Arr = convertToDecimalPoint(priceA);
|
||||
|
@ -418,6 +430,8 @@ function setLanguage(language) {
|
|||
priceB:priceB_Arr[1],
|
||||
priceC:priceC_Arr[1],
|
||||
tax:taxTxt,
|
||||
taxaustria: selectedTaxAustria,
|
||||
amount: amount,
|
||||
selectedAudioFile:selectedAudioFile,
|
||||
available:available,
|
||||
favorite:favorite
|
||||
|
@ -469,6 +483,8 @@ function setLanguage(language) {
|
|||
priceB: props.priceB,
|
||||
priceC: props.priceC,
|
||||
tax: props.tax,
|
||||
taxaustria: props.taxaustria,
|
||||
amount: props.amount,
|
||||
available: props.available,
|
||||
audioFile: props.selectedAudioFile,
|
||||
changeExtras: doChangeExtras,
|
||||
|
@ -497,7 +513,7 @@ function setLanguage(language) {
|
|||
}
|
||||
|
||||
function refreshProduct(prodData) {
|
||||
var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.tax,prodData.available,prodData.audio,prodData.favorite);
|
||||
var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.tax,prodData.taxaustria,prodData.amount,prodData.available,prodData.audio,prodData.favorite);
|
||||
aProduct.insertValuesIntoMenuList();
|
||||
$("#assextralist_" + prodData.id).html("");
|
||||
$("#assextralist_" + prodData.id).trigger("create");
|
||||
|
@ -514,6 +530,11 @@ function setLanguage(language) {
|
|||
tax = "null";
|
||||
}
|
||||
|
||||
var amount = props.amount;
|
||||
if (amount.trim() == "") {
|
||||
amount = "null";
|
||||
}
|
||||
|
||||
var data = {
|
||||
longname: props.longname,
|
||||
shortname: props.shortname,
|
||||
|
@ -521,6 +542,8 @@ function setLanguage(language) {
|
|||
priceB: props.priceB,
|
||||
priceC: props.priceC,
|
||||
tax: props.tax,
|
||||
taxaustria: props.taxaustria,
|
||||
amount: amount,
|
||||
available: props.available,
|
||||
prodTypeId: tid,
|
||||
audioFile: props.selectedAudioFile,
|
||||
|
@ -875,6 +898,7 @@ function setLanguage(language) {
|
|||
if (configResult.status == "OK") {
|
||||
var values = configResult.msg;
|
||||
decpoint = values.decpoint;
|
||||
austria = values.austria;
|
||||
$("#info-page").data("decpoint",values.decpoint);
|
||||
setLanguage(values.userlanguage);
|
||||
getAudioFiles();
|
||||
|
|
|
@ -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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
<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.10">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.11">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue