+ ACHTUNG: Eine Kommunikation mit dem Kernsystem ist derzeit nicht aktiv. Bitte weisen Sie das Bedienpersonal darauf hin oder geben die Bestellung beim Kellner auf.
+
+
+
+
Tischauswahl
+
Bitte wählen Sie den Tisch aus:
+
+
+
+
+
Tisch-Code
+
Bitte geben Sie hier den Tisch-Code ein:
+
+
Bitte geben Sie hier die Tageslosung ein:
+
+
+
+
+
+
+
+
+
Auswahl der Speise oder des Getränks
+
Bitte wähle Sie die Gruppe bzw. die Speise oder das Getränk aus:
+
+
+
+
+
+
+
+
+
+
+
Bestätigung
+
Soll das ausgewählt Produkt bestellt werden?
+
+
+
+
+
+
+
+
+
+
Bestellvorgang
+
Sollen noch weitere Speisen oder Getränke bestellt werden?
+
+
@@ -3747,6 +3684,7 @@ $(document).on("pageinit", "#admin-page", function () {
Tage: Man kann die Tage einschränken, an denen ein Produkt bestellt werden kann. 0=Sonntag, 1=Montag, usw. bis 6=Samstag. Wird ein Produkt an allen Tagen verkauft, ist keine Angabe erforderlich. Ein Produkt, welches nur an Wochenenden verkauft wird, muss mit '06' oder '60' ausgezeichnet werden.
Bildnr: Produkte können mit Bildern versehen werden. Jedes Bild in der Bilddatenbank besitzt eine eindeutige ID. Über die Angabe der Bildnummer können Bilder mehreren Produkten zugeordnet werden. Bilder, die keine Referenz mehr besitzen, werden regelmäßig aus der Datenbank entfernt.
+
Anzeige: K: Anzeige nur in der Kellneransicht, G: Anzeige nur in der Gastbestellansicht, KG: Anzeige in beiden Ansichten (Standard)
Ein Produkteintrag mit weiteren Eigenschaften kann beispielsweise so aussehen:
@@ -3837,30 +3775,10 @@ $(document).on("pageinit", "#admin-page", function () {
Raumplan
@@ -3977,6 +3895,17 @@ $(document).on("pageinit", "#admin-page", function () {
+
+
+
+
Aktion wird durchgeführt
+
+
+
+
+
+
+
diff --git a/webapp/paydesk.html b/webapp/paydesk.html
index 3371145..7dd70ca 100644
--- a/webapp/paydesk.html
+++ b/webapp/paydesk.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/php/admin.php b/webapp/php/admin.php
index 5382f0d..1f97ce8 100644
--- a/webapp/php/admin.php
+++ b/webapp/php/admin.php
@@ -79,6 +79,7 @@ class Admin {
"setPreferimgdesk" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"setPreferimgmobile" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"setPrefershowplusminus" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
+ "setPreferfixbtns" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"getOrderVolume" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"getButtonSizes" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"getPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
@@ -88,6 +89,7 @@ class Admin {
"getPreferimgdesk" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"getPreferimgmobile" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"getPrefershowplusminus" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
+ "getPreferfixbtns" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"isInstalled" => array("loggedin" => 0, "isadmin" => 0, "rights" => null),
"isPrinterServerActive" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
@@ -286,6 +288,10 @@ class Admin {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->setShowplusminus($_POST['preferredvalue']);
}
+ } else if ($command == 'setPreferfixbtns') {
+ if ($this->isUserAlreadyLoggedInForPhp()) {
+ $this->setPreferfixbtns($_POST['preferredvalue']);
+ }
} else if ($command == 'setKeepTypeLevel') {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->setKeepTypeLevel($_POST['keeptypelevel']);
@@ -322,6 +328,10 @@ class Admin {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->getShowplusminus();
}
+ } else if ($command == 'getPreferfixbtns') {
+ if ($this->isUserAlreadyLoggedInForPhp()) {
+ $this->getPreferfixbtns();
+ }
} else if ($command == 'getKeepTypeLevel') {
if ($this->isUserAlreadyLoggedInForPhp()) {
$this->getKeepTypeLevel();
@@ -376,6 +386,8 @@ class Admin {
$pdo = DbUtils::openDbAndReturnPdoStatic();
Hotelinterface::hs3sync($pdo);
+ Guestsync::sync($pdo);
+
$TIMEOUT = 20;
$active = json_encode(array("status" => "OK","msg" => 1));
@@ -754,12 +766,18 @@ class Admin {
self::getUserValue('preferimgmobile', 0);
}
function getShowplusminus() {
+ echo json_encode(self::getUserValueAllowNull("showplusminus"));
+ }
+ function getPreferfixbtns() {
+ echo json_encode(self::getUserValueAllowNull("preferfixbtns"));
+ }
+ public static function getUserValueAllowNull($col) {
$userid = $_SESSION['userid'];
$pdo = DbUtils::openDbAndReturnPdoStatic();
- $sql = "SELECT IFNULL(showplusminus,0) AS result FROM %user% WHERE id=?";
+ $sql = "SELECT IFNULL($col,0) AS result FROM %user% WHERE id=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($userid));
$pdo = null;
- echo json_encode($row->result);
+ return $row->result;
}
function getKeepTypeLevel() {
self::getUserValue('keeptypelevel',1);
@@ -833,6 +851,12 @@ class Admin {
}
self::setUserValue('showplusminus',$preferValue);
}
+ function setPreferfixbtns($preferValue) {
+ if ($preferValue == 0) {
+ $preferValue = null;
+ }
+ self::setUserValue('preferfixbtns',$preferValue);
+ }
function setKeepTypeLevel($preferValue) {
self::setUserValue('keeptypelevel',$preferValue);
}
@@ -935,7 +959,7 @@ class Admin {
$right_changeprice = 0;
$supplyRight = 0;
if ($userLoggedIn) {
- $sql = "SELECT language,right_supply,right_changeprice,keeptypelevel,extrasapplybtnpos,right_paydesk,IFNULL(preferimgdesk,0) as preferimgdesk,IFNULL(preferimgmobile,0) as preferimgmobile,IFNULL(showplusminus,0) as showplusminus FROM %user%,%roles% WHERE %user%.id=? AND %user%.roleid=%roles%.id";
+ $sql = "SELECT language,right_supply,right_changeprice,keeptypelevel,extrasapplybtnpos,right_paydesk,IFNULL(preferimgdesk,0) as preferimgdesk,IFNULL(preferimgmobile,0) as preferimgmobile,IFNULL(showplusminus,0) as showplusminus,IFNULL(preferfixbtns,0) as preferfixbtns FROM %user%,%roles% WHERE %user%.id=? AND %user%.roleid=%roles%.id";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($_SESSION['userid']));
$row = $stmt->fetchObject();
@@ -957,7 +981,8 @@ class Admin {
"jsonMenuItemsAndVersion" => $jsonMenuItems,
"preferimgdesk" => $row->preferimgdesk,
"preferimgmobile" => $row->preferimgmobile,
- "showplusminus" => $row->showplusminus
+ "showplusminus" => $row->showplusminus,
+ "preferfixbtns" => $row->preferfixbtns
);
echo json_encode($retVal);
}
@@ -992,9 +1017,13 @@ class Admin {
$taxaustriaerm2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustriaerm2",null);
$taxaustriaspecial = CommonUtils::getConfigValueStmt($pdo,$stmt,"taxaustriaspecial",null);
$serverurl = CommonUtils::getConfigValueStmt($pdo,$stmt,"serverurl",null);
+ $guesturl = CommonUtils::getConfigValueStmt($pdo,$stmt,"guesturl",null);
+ $guestcode = CommonUtils::getConfigValueStmt($pdo,$stmt,"guestcode",null);
+ $dailycode = CommonUtils::getConfigValueStmt($pdo,$stmt,"dailycode",null);
$email = CommonUtils::getConfigValueStmt($pdo,$stmt,"email",null);
$bigfontworkreceipt = CommonUtils::getConfigValueStmt($pdo,$stmt,"bigfontworkreceipt",null);
$prominentsearch = CommonUtils::getConfigValueStmt($pdo,$stmt,"prominentsearch",null);
+ $guestjobprint = CommonUtils::getConfigValueStmt($pdo,$stmt,"guestjobprint",null);
$discount1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount1",null);
$discount2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount2",null);
$discount3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount3",null);
@@ -1095,13 +1124,14 @@ class Admin {
$retVal = array("companyinfo" => $companyInfo, "rectemplate" => $rectemplate, "foodtemplate" => $foodtemplate, "drinktemplate" => $drinktemplate, "canceltemplate" => $canceltemplate,
"version" => $version, "decpoint" => $decpoint,
- "serverurl" => $serverurl, "email" => $email, "receiveremail" => $receiveremail, "billlanguage" => $billlanguage,
+ "serverurl" => $serverurl, "guesturl" => $guesturl, "guestcode" => $guestcode, "dailycode" => $dailycode,
+ "email" => $email, "receiveremail" => $receiveremail, "billlanguage" => $billlanguage,
"hotelinterface" => $hotelinterface, "hsinfile" => $hsinfile, "hsoutfile" => $hsoutfile, "hscurrency" => $hscurrency,
"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,
+ "workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating, "guestjobprint" => $guestjobprint,
"rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitemsf" => $groupworkitemsf,"groupworkitemsd" => $groupworkitemsd,
"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,
@@ -1215,7 +1245,7 @@ class Admin {
$view = "preferences.html";
}
- echo json_encode($view . "?v=1.3.26");
+ echo json_encode($view . "?v=1.4.0");
}
}
@@ -1422,27 +1452,27 @@ 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.3.26"); };
+ if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.0"); };
} else {
- if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.26"); };
+ if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.0"); };
}
- if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.26"); };
- if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.26"); };
- if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.26"); };
+ if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.0"); };
+ if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.0"); };
+ if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.0"); };
if ($_SESSION['modus'] == 0) {
- if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.26"); };
+ if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.0"); };
}
- if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.26"); };
- if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.26"); };
- if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.26"); };
- if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.26"); };
- if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.26"); };
- if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.26"); };
- if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.26"); };
- if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.26"); };
- $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.26");
- $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.3.26");
- $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.26");
+ if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.0"); };
+ if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.0"); };
+ if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.0"); };
+ if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.0"); };
+ if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.0"); };
+ if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.0"); };
+ if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.0"); };
+ if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.0"); };
+ $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.0");
+ $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.0");
+ $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.0");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@@ -1450,7 +1480,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
- $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.26",
+ $mainMenuAndVersion = array ("version" => "OrderSprinter 1.4.0",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@@ -1645,7 +1675,7 @@ class Admin {
$pdo = DbUtils::openDbAndReturnPdoStatic();
- if ($_POST["isAdmin"] == 1) {
+ if (($_POST["isAdmin"] == 1) && (!$_SESSION['is_admin'])) {
echo json_encode(array("status" => "ERROR","msg" => "Nicht-Admins dürfen keine Rollen mit Admin-Rechten setzen!"));
return;
}
@@ -1867,6 +1897,9 @@ class Admin {
"drinktemplate" => array("dbcol" => "drinktemplate","checknum" => 0),
"canceltemplate" => array("dbcol" => "canceltemplate","checknum" => 0),
"serverUrl" => array("dbcol" => "serverurl","checknum" => 0),
+ "guesturl" => array("dbcol" => "guesturl","checknum" => 0),
+ "guestcode" => array("dbcol" => "guestcode","checknum" => 0),
+ "dailycode" => array("dbcol" => "dailycode","checknum" => 0),
"email" => array("dbcol" => "email","checknum" => 0),
"emailbadrating" => array("dbcol" => "emailbadrating","checknum" => 0),
"emailratingcontact" => array("dbcol" => "emailratingcontact","checknum" => 0),
@@ -1876,6 +1909,7 @@ class Admin {
"addreceipttoprinter" => array("dbcol" => "addreceipttoprinter", "checknum" => 0),
"bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0),
"prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0),
+ "guestjobprint" => array("dbcol" => "guestjobprint","checknum" => 0),
"discount1" => array("dbcol" => "discount1","checknum" => 0),
"discount2" => array("dbcol" => "discount2","checknum" => 0),
"discount3" => array("dbcol" => "discount3","checknum" => 0),
@@ -2314,7 +2348,7 @@ class Admin {
echo("Eintragsid; Datum ; Benutzerid; Benutzername; Adminrechte; Kellnerrechte;Kuechenrechte; Barrechte; Bereitstellungsrechte; Kassenrechte; Reportrechte; Kassenbonrechte; Angebotsrechte; Beurteilungsrechte; Preisänderungsrechte; Gästerechte; Tageserfassungsrecht; Dashboardrechte; Managerrechte; Aktiviert\n");
$sql = "SELECT DISTINCT %hist%.id as id,date,";
- $sql .= "userid,username,is_admin,right_waiter,right_kitchen,right_bar,right_supply,";
+ $sql .= "IFNULL(userid,'') as userid,IFNULL(username,'') as username,is_admin,right_waiter,right_kitchen,right_bar,right_supply,";
$sql .= "right_paydesk,right_statistics,right_bill,right_products,right_rating,right_changeprice,right_customers,right_closing,right_dash,right_manager,active,";
$sql .= "description ";
$sql .= " FROM %hist%, %histuser%, %histactions% ";
diff --git a/webapp/php/closing.php b/webapp/php/closing.php
index e763f2c..71266dd 100644
--- a/webapp/php/closing.php
+++ b/webapp/php/closing.php
@@ -133,6 +133,8 @@ echo json_encode("Remote access code not correct!");
}
private function createClosing ($remark,$doPrint = 1) {
+set_time_limit(60*60);
+
if (is_null($remark)) {
$remark = "";
}
diff --git a/webapp/php/commonutils.php b/webapp/php/commonutils.php
index c19e396..3091413 100644
--- a/webapp/php/commonutils.php
+++ b/webapp/php/commonutils.php
@@ -301,7 +301,7 @@ class CommonUtils {
} else {
$stmt->execute($params);
}
- return ($stmt->fetchAll());
+ return ($stmt->fetchAll(PDO::FETCH_ASSOC));
}
public static function execSql($pdo,$sql,$params) {
diff --git a/webapp/php/contenthandler.php b/webapp/php/contenthandler.php
index 556b457..26e7495 100644
--- a/webapp/php/contenthandler.php
+++ b/webapp/php/contenthandler.php
@@ -19,6 +19,7 @@ require_once ('updater.php');
require_once ('workreceipts.php');
require_once ('utilities/Logger.php');
require_once ('utilities/roles.php');
+require_once ('guestsync.php');
$module = $_GET["module"];
$command = $_GET["command"];
@@ -76,6 +77,8 @@ if ($module == 'admin') {
} else if ($module == 'updater') {
$updater = new Updater();
$updater->handleCommand($command);
+} else if ($module == 'guestsync') {
+ Guestsync::handleCommand($command);
}
diff --git a/webapp/php/dbutils.php b/webapp/php/dbutils.php
index 9749714..764ad4f 100644
--- a/webapp/php/dbutils.php
+++ b/webapp/php/dbutils.php
@@ -193,6 +193,7 @@ class DbUtils {
array("col" => 'available', "hist" => 1, "property" => "available"),
array("col" => 'audio', "hist" => 1, "property" => "audio"),
array("col" => 'prodimageid', "hist" => 1, "property" => "prodimageid"),
+ array("col" => 'display', "hist" => 1, "property" => "display"),
array("col" => 'removed', "hist" => 0)
);
}
\ No newline at end of file
diff --git a/webapp/php/debug.php b/webapp/php/debug.php
index 1421f20..c34bce9 100644
--- a/webapp/php/debug.php
+++ b/webapp/php/debug.php
@@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) {
$status = substr($status, 0,149);
}
- $version = "1.3.26";
+ $version = "1.4.0";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else {
diff --git a/webapp/php/guestsync.php b/webapp/php/guestsync.php
new file mode 100644
index 0000000..ff3ffb3
--- /dev/null
+++ b/webapp/php/guestsync.php
@@ -0,0 +1,264 @@
+ "OK","msg" => '');
+ }
+
+ $url = CommonUtils::getConfigValue($pdo, 'guesturl', "");
+ if (is_null($url)) {
+ return array("status" => "OK","msg" => "");
+ } else {
+ $url = trim($url);
+ if ($url == "") {
+ return array("status" => "OK","msg" => "");
+ }
+ }
+ $guestcode = trim(CommonUtils::getConfigValue($pdo, 'guestcode', ''));
+
+ if ($guestcode == '') {
+ $ret = array("status" => "ERROR","msg" => "Guest system access code not set - stopping here for security reasons!");
+ return $ret;
+ }
+
+ $timezone = CommonUtils::getConfigValue($pdo, 'timezone', "Europe/Berlin");
+ $dailycode = CommonUtils::getConfigValue($pdo, 'dailycode', "dfhdztfghgjzt");
+
+ $resttables = json_encode(Roomtables::getTablesForGuestsystem($pdo));
+ // id,name,code in an array
+
+ $prodTypes = self::getMenuForGuests($pdo);
+ $types = json_encode($prodTypes["types"]);
+ $products = json_encode($prodTypes["products"]);
+
+ $currency = CommonUtils::getConfigValue($pdo, 'currency', 'Euro');
+ $decpoint = CommonUtils::getConfigValue($pdo, 'decpoint', '.');
+
+ $transferdata = array(
+ "timezone" => $timezone,
+ "dailycode" => $dailycode,
+ "resttables" => $resttables,
+ "guestcode" => $guestcode,
+ "types" => $types,
+ "products" => $products,
+ "currency" => $currency,
+ "decpoint" => $decpoint
+ );
+
+ $data = json_encode($transferdata);
+ $transferdataBase64 = base64_encode($data);
+
+ $guestorders = self::sendToGuestsystem($pdo,$url, $transferdataBase64);
+
+ $i=0;
+ }
+
+ private static function sendToGuestsystem($pdo,$url, $data) {
+
+ $url .= "/sync.php";
+
+ $query = http_build_query(array("data" => $data));
+
+ $opts = array(
+ 'http' => array(
+ 'header' => "Content-Type: application/x-www-form-urlencoded\r\n" .
+ "Content-Length: " . strlen($query) . "\r\n" .
+ "User-Agent:MyAgent/1.0\r\n",
+ 'method' => 'POST',
+ 'content' => $query
+ )
+ );
+
+ $context = stream_context_create($opts);
+
+ $ret = file_get_contents($url, false, $context);
+
+ if (!$ret) {
+ $ret = array("status" => "ERROR","msg" => "Communication with guest system not successful!");
+ }
+
+ self::insertWorkDataFromGuestSystem($pdo, $ret);
+ }
+
+ private static function insertWorkDataFromGuestSystem($pdo,$dataJson) {
+ $data = json_decode($dataJson, true);
+ if ($data["status"] == "OK") {
+ try {
+ $entries = $data["msg"];
+ foreach($entries as $entry) {
+ $date = $entry["date"];
+ $tableid = $entry["tableid"];
+ $prodid = $entry["prodid"];
+ $dailycode = $entry["dailycode"];
+ $tablecode = $entry["tablecode"];
+
+ $permission = self::checkPermission($pdo, $tableid, $tablecode, $prodid, $dailycode);
+
+ if ($permission) {
+ self::addToQueue($pdo,$date,$prodid,$tableid);
+ }
+ }
+ } catch (Exception $ex) {
+ echo $ex->getMessage();
+ }
+ }
+ }
+
+ private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) {
+ $dailycodeInDb = trim(CommonUtils::getConfigValue($pdo, 'dailycode', ''));
+ if ($dailycode != trim($dailycodeInDb)) {
+ return false;
+ }
+
+ $sql = "SELECT IFNULL(code,'') as code from %resttables% WHERE id=? AND allowoutorder=?";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, array($tableid,1));
+ if (count($result) == 0) {
+ return false;
+ }
+ $tablecodeInDb = trim($result[0]["code"]);
+ if ($tablecodeInDb != $tablecode) {
+ return false;
+ }
+
+ $sql = "SELECT id FROM %products% WHERE id=? AND removed is null AND (display is null OR display='KG' OR display='G')";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, array($prodid));
+ if (count($result) == 0) {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ private static function shallWeSync($pdo) {
+ date_default_timezone_set(DbUtils::getTimeZone());
+ $date = new DateTime();
+ $currentTimeStamp = $date->getTimestamp();
+
+ $sql = "SELECT value FROM %work% WHERE item=?";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, array('lastsyncwithguest'));
+
+ if (count($result) == 0) {
+
+ $sql = "INSERT INTO %work% (item,value) VALUES(?,?)";
+ CommonUtils::execSql($pdo, $sql, array("lastsyncwithguest",$currentTimeStamp));
+
+ return true;
+ } else {
+ $lastaccess = $result[0]["value"];
+
+ if (($currentTimeStamp - $lastaccess) > 5) {
+ $sql = "UPDATE %work% SET value=? WHERE item=?";
+ CommonUtils::execSql($pdo, $sql, array($currentTimeStamp,"lastsyncwithguest"));
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ private static $typesWithContent = array();
+
+ private static function getMenuForGuests($pdo) {
+ date_default_timezone_set(DbUtils::getTimeZone());
+ $dayofweek = date('N');
+ if ($dayofweek == 7) {
+ $dayofweek = 0;
+ }
+
+ $pricelevel = CommonUtils::getConfigValue($pdo, "pricelevel", 0);
+
+ $priceTxt = "priceA";
+ if ($pricelevel == 2) {
+ $priceTxt = "priceB";
+ } else if ($pricelevel == 3) {
+ $priceTxt = "priceC";
+ }
+
+ $sql = "select id,longname,category as ref,$priceTxt as price,IFNULL(unit,0) as unit,IF(days is not null, days, '0123456') as days ";
+ $sql .= " from %products% where available='1' AND removed is null AND (days is null OR days like ?) AND (display = 'KG' OR display = 'G' OR display is null) ";
+ $sql .= " AND (unit is null OR unit='0') ";
+ $sql .= " ORDER BY longname";
+
+ $allProducts = CommonUtils::fetchSqlAll($pdo, $sql, array("%$dayofweek%"));
+
+
+ $sql = "select id,name,IFNULL(reference,0) as reference from %prodtype% where removed is null";
+ $allTypes = CommonUtils::fetchSqlAll($pdo, $sql, null);
+
+ $filteredTypes = self::filterUsedTypes($allTypes, $allProducts);
+
+ return array("products" => $allProducts,"types" => $filteredTypes);
+ }
+
+
+ private static function filterUsedTypes($types,$products) {
+ self::$typesWithContent = array();
+ foreach ($products as $p) {
+ $ref = $p["ref"];
+ $typeOfProd = self::getTypeOfId($types, $ref);
+ if (!is_null($typeOfProd)) {
+ self::declareProdTypeAndParentsInUse($types, $typeOfProd);
+ }
+ }
+ $out = array();
+ $keys = array_keys(self::$typesWithContent);
+ foreach($keys as $aKey) {
+ $t = self::$typesWithContent[$aKey];
+ $out[] = array("id" => $t["id"],"reference" => $t["reference"],"name" => $t["name"]);
+ }
+ return $out;
+ }
+
+ private static function getTypeOfId($alltypes,$typeid) {
+ foreach($alltypes as $t) {
+ if ($t["id"] == $typeid) {
+ return $t;
+ }
+ }
+ return null;
+ }
+
+ private static function declareProdTypeAndParentsInUse($alltypes,$aType) {
+ $typeid = $aType["id"];
+ $reference = $aType["reference"];
+ if (!array_key_exists($typeid, self::$typesWithContent)) {
+ self::$typesWithContent[$typeid] = array("id" => $typeid,"name" => $aType["name"],"reference" => $reference);
+
+ $parent = null;
+ foreach($alltypes as $a) {
+ $typeid = $a["id"];
+ if ($typeid == $reference) {
+ $parent = $a;
+ break;
+ }
+ }
+ if (!is_null($parent)) {
+ self::declareProdTypeAndParentsInUse($alltypes, $parent);
+ }
+ }
+ }
+
+ private static function addToQueue($pdo,$date,$prodid,$tableid) {
+ $printjob = CommonUtils::getConfigValue($pdo, 'guestjobprint', 1);
+ if (is_null($printjob)) {
+ $printjob = 1;
+ }
+ $queue = new QueueContent();
+ $queue->addProductListToQueueForGuest($pdo, $date, $tableid, $prodid, $printjob);
+ }
+}
+
diff --git a/webapp/php/products.php b/webapp/php/products.php
index 881c2f1..085bfdd 100644
--- a/webapp/php/products.php
+++ b/webapp/php/products.php
@@ -185,7 +185,8 @@ class Products {
array("id" => "audio", "get" => "IF(audio is not null, audio, '') as audio","histid" => "","histget" => "","histexportname" => "","isnumber" => "0"),
array("id" => "favorite", "get" => "IF(favorite is not null, favorite, '') as favorite","histid" => "prodid","histget" => "favorite","histexportname" => "Favorit","isnumber" => "0", "exportvals" => array("default" => "Nein","1" => "Ja")),
array("id" => "type", "get" => "'p' as type","histid" => "","histget" => "","histexportname" => "","isnumber" => "0"),
- array("id" => "prodimageid", "get" => "IF(prodimageid is not null, prodimageid, 0) as prodimageid","histid" => "prodimageid","histget" => "prodimageid","histexportname" => "Bildnr","isnumber" => "1")
+ array("id" => "prodimageid", "get" => "IF(prodimageid is not null, prodimageid, 0) as prodimageid","histid" => "prodimageid","histget" => "prodimageid","histexportname" => "Bildnr","isnumber" => "1"),
+ array("id" => "display", "get" => "IF(display is not null, display, 'KG') as display","histid" => "display","histget" => "display","histexportname" => "Anzeige","isnumber" => "0")
);
function getDateValueAsBoolInterpretatedIcon($aValue) {
@@ -235,7 +236,7 @@ class Products {
}
$sql = "select id,shortname,longname,audio,category as ref,favorite,$priceTxt as price,IF(unit is not null, unit, '0') as unit,IF(days is not null, days, '0123456') as days,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 ";
- $sql .= " from %products% where available='1' AND removed is null AND (days is null OR days like ?) ORDER BY sorting";
+ $sql .= " from %products% where available='1' AND removed is null AND (days is null OR days like ?) AND (display = 'KG' OR display = 'K' OR display is null) ORDER BY sorting";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array("%$dayofweek%"));
$prodArray = array();
diff --git a/webapp/php/queuecontent.php b/webapp/php/queuecontent.php
index b3c8275..c7730ec 100644
--- a/webapp/php/queuecontent.php
+++ b/webapp/php/queuecontent.php
@@ -141,6 +141,9 @@ class QueueContent {
function getUserName($userid) {
$pdo = $this->dbutils->openDbAndReturnPdo();
+ if (is_null($userid)) {
+ return "";
+ }
$sql = "SELECT username FROM %user% WHERE id=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($userid));
if ($row != null) {
@@ -177,6 +180,8 @@ class QueueContent {
$pdo = $this->dbutils->openDbAndReturnPdo();
+ Guestsync::sync($pdo);
+
if ($this->areBillExisting($pdo)) {
@@ -565,7 +570,7 @@ class QueueContent {
$sql = "SELECT tableno,%room%.abbreviation FROM %resttables%,%room% WHERE %resttables%.id=? AND %resttables%.roomid=%room%.id";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($theTableid));
- if (is_null($row->abbreviation)) {
+ if (is_null($row->abbreviation) || ($row->abbreviation == '')) {
$tablename = $row->tableno;
} else {
$tablename = $row->abbreviation . "-" . $row->tableno;
@@ -994,7 +999,7 @@ class QueueContent {
$cashenabled = CommonUtils::getConfigValue($pdo, "cashenabled", 1);
if ($cashenabled == 0) {
$idStr = join(',',$insertedQueueIds);
- $this->declarePaidCreateBillReturnBillId($pdo,$idStr, $theTableid, 1, 0, 0, true);
+ $this->declarePaidCreateBillReturnBillId($pdo,$idStr, $theTableid, 1, 0, 0, true,'','','');
}
if ($doPrint == 1) {
@@ -1012,6 +1017,103 @@ class QueueContent {
$pdo->commit();
}
+ function addProductListToQueueForGuest($pdo,$ordertime,$theTableid,$prodid,$doPrint) {
+
+ if(session_id() == '') {
+ session_start();
+ }
+
+ date_default_timezone_set(DbUtils::getTimeZone());
+
+ $pdo->beginTransaction();
+
+ $tax = CommonUtils::getExistingConfigValue($pdo, 'tax');
+ $workflowconfig = CommonUtils::getExistingConfigValue($pdo, 'workflowconfig');
+
+ $currentPriceLevel = $this->commonUtils->getCurrentPriceLevel($pdo);
+ $currentPriceLevelId = $currentPriceLevel["id"];
+
+ $insertedQueueIds = array();
+
+
+ $productid = $prodid;
+ $theOption = '';
+ $theChangedPrice = "NO";
+
+ $getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?";
+ $row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
+ if ($row == null) {
+ echo "Fehler: Preise nicht vorhanden"; // error
+ 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;
+
+ $price_for_level_A = $row->priceA;
+ $price_for_level_B = $row->priceB;
+ $price_for_level_C = $row->priceC;
+
+ $price = $price_for_level_A; // default - levl 1
+ if ($currentPriceLevelId == 2) {
+ $price = $price_for_level_B;
+ } else if ($currentPriceLevelId == 3) {
+ $price = $price_for_level_C;
+ } // else: use default price A
+
+
+ $taxaustrianumber = null;
+ if (!is_null($row->tax)) {
+ $tax = $row->tax;
+ }
+
+
+ if (is_null($theTableid) || (is_numeric($theTableid) && is_numeric($productid))) {
+ $useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
+
+ $insertSql = "INSERT INTO `%queue%` (
+ `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
+ VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?, null, null, NULL,NULL,'0',NULL,'0');";
+
+ $stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql));
+ $stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),0));
+ $queueid = $pdo->lastInsertId();
+
+
+ if (($workflowconfig == 3) && ($doPrint == 0)) {
+ $this->reallyDeclareAsCooked($pdo,$queueid);
+ $this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
+ } else {
+ if ($useConditions["usekitchen"] == 0) {
+ $this->reallyDeclareAsCooked($pdo,$queueid);
+ if ($useConditions["usesupply"] == 0) {
+ $this->declareProductBeDeliveredWithGivenPdo($pdo,$queueid);
+ }
+ } else {
+ $insertedQueueIds[] = $queueid;
+ }
+ }
+ }
+
+
+ $cashenabled = CommonUtils::getConfigValue($pdo, "cashenabled", 1);
+ if ($cashenabled == 0) {
+ $idStr = join(',',$insertedQueueIds);
+ $this->declarePaidCreateBillReturnBillId($pdo,$idStr, $theTableid, 1, 0, 0, true,'','','');
+ }
+
+ if ($doPrint == 1) {
+ $this->doWorkPrint($pdo,$theTableid,$insertedQueueIds,'Gastbestellung','s', $_SESSION['language']);
+ }
+
+ $pdo->commit();
+ }
/*
* Do as if the product would have been removed from queue - but don't do it exactly,
diff --git a/webapp/php/roomtables.php b/webapp/php/roomtables.php
index 7df8f26..c9f06c1 100644
--- a/webapp/php/roomtables.php
+++ b/webapp/php/roomtables.php
@@ -34,6 +34,8 @@ class Roomtables {
$this->getUnpaidTables($_GET['roomid']);
} else if ($command == 'getRoomfield') {
$this->getRoomfield();
+ } else if ($command == 'getRoomfieldAlsoInactive') {
+ $this->getRoomfieldAlsoInactive();
} else if ($command == 'setRoomInfo') {
if ($this->hasCurrentUserAdminRights()) {
$this->setRoomInfo($_POST['rooms']);
@@ -59,7 +61,7 @@ class Roomtables {
}
public static function getUnpaidTablesCore($pdo,$roomid) {
- $tablesSql = "SELECT id,tableno FROM %resttables% WHERE %resttables%.roomid =? AND removed is null";
+ $tablesSql = "SELECT id,tableno FROM %resttables% WHERE %resttables%.roomid =? AND removed is null ORDER BY sorting";
$stmt = $pdo->prepare(DbUtils::substTableAlias($tablesSql));
$stmt->execute(array($roomid));
@@ -146,7 +148,7 @@ class Roomtables {
* get only the rooms (for paydesk, because tables are dynamic due to their pay status)
*/
function getRooms() {
- $sql = "SELECT id,roomname FROM %room% WHERE removed is null";
+ $sql = "SELECT id,roomname FROM %room% WHERE removed is null ORDER BY sorting";
$pdo = $this->dbutils->openDbAndReturnPdo();
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute();
@@ -175,7 +177,7 @@ class Roomtables {
private function getAllTablesAndRooms($pdo)
{
$queue = new QueueContent();
- $sql = "SELECT id,roomname FROM %room% WHERE removed is null ORDER BY id";
+ $sql = "SELECT id,roomname FROM %room% WHERE removed is null ORDER BY sorting";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute();
$dbresult = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -187,9 +189,9 @@ class Roomtables {
$tablesArray = array();
- $sql = "SELECT %resttables%.id as id,%resttables%.tableno as name,IFNULL(SUM(IF(%queue%.ordertime is not null AND %queue%.paidtime is null AND %queue%.isclosed is null,%queue%.price,0.00)),0.00) as pricesum FROM %resttables% ";
- $sql .= " LEFT OUTER JOIN %queue% ON %queue%.tablenr=%resttables%.id WHERE %resttables%.removed is null AND ";
- $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id,name";
+ $sql = "SELECT %resttables%.id as id,%resttables%.tableno as name,%resttables%.sorting as sorting,IFNULL(SUM(IF(%queue%.ordertime is not null AND %queue%.paidtime is null AND %queue%.isclosed is null,%queue%.price,0.00)),0.00) as pricesum FROM %resttables% ";
+ $sql .= " LEFT OUTER JOIN %queue% ON %queue%.tablenr=%resttables%.id WHERE %resttables%.removed is null AND active='1' AND ";
+ $sql .= " %resttables%.roomid=? GROUP BY %resttables%.id,name ORDER BY %resttables%.sorting";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@@ -244,76 +246,118 @@ class Roomtables {
function setRoomInfo($rooms) {
- $pdo = $this->dbutils->openDbAndReturnPdo();
+ $pdo = DbUtils::openDbAndReturnPdoStatic();
+
$pdo->beginTransaction();
- $sql = "UPDATE %room% SET removed=?";
- $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
- $stmt->execute(array('1'));
-
- $sql = "UPDATE %resttables% SET removed=?";
- $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
- $stmt->execute(array('1'));
-
- $sql = "DELETE FROM %tablepos%";
- $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
- $stmt->execute();
- $sql = "DELETE FROM %tablemaps%";
- $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
- $stmt->execute();
-
- $noOfRooms = count($rooms);
- for ($roomindex = 0;$roomindex < $noOfRooms; $roomindex++) {
- $aRoom = $rooms[$roomindex];
- $aRoomName = $aRoom[0];
- $aRoomAbbr = $aRoom[1];
- if ($aRoomAbbr == "") {
- $aRoomAbbr = null;
- }
- $roomPrinter = $aRoom[2];
- if ($roomPrinter == 0) {
- $roomPrinter = null;
+ try {
+
+
+ $sql = "UPDATE %resttables% SET removed=1";
+ CommonUtils::execSql($pdo, $sql, null);
+
+ $sql = "UPDATE %room% SET removed=1";
+ CommonUtils::execSql($pdo, $sql, null);
+
+ foreach($rooms as $aRoom) {
+ $roomid = $aRoom["roomid"];
+ $printer = $aRoom["printer"];
+ if ($printer == 0) {
+ $printer = null;
+ }
+ $name = trim($aRoom["name"]);
+ $sorting = trim($aRoom["sorting"]);
+ $abbreviation = trim($aRoom["abbreviation"]);
+
+ if (!is_numeric($roomid)) {
+ $sql = "INSERT INTO %room% (roomname,abbreviation,printer,sorting) VALUES(?,?,?,?)";
+ CommonUtils::execSql($pdo, $sql, array($name,$abbreviation,$printer,$sorting));
+ $roomid = $pdo->lastInsertId();
+ } else {
+ $sql = "UPDATE %room% SET removed=?,roomname=?,abbreviation=?,printer=?,sorting=? WHERE id=?";
+ CommonUtils::execSql($pdo, $sql, array(null,$name,$abbreviation,$printer,$sorting,$roomid));
+ }
+ $tables = $aRoom["tables"];
+
+ foreach($tables as $t) {
+ $tableid = $t["id"];
+ $tablename = $t["tablename"];
+ $name = $t["name"];
+ $code = $t["code"];
+ $sorting = $t["sorting"];
+ $active = $t["active"];
+ $allowoutorder = $t["allowoutorder"];
+
+ if (!is_numeric($tableid)) {
+ $sql = "INSERT INTO %resttables% (tableno,roomid,code,name,active,allowoutorder,sorting) VALUES(?,?,?,?,?,?,?)";
+ CommonUtils::execSql($pdo, $sql, array($tablename,$roomid,$code,$name,$active,$allowoutorder,$sorting));
+ } else {
+ $sql = "UPDATE %resttables% SET removed=?,tableno=?,roomid=?,code=?,name=?,active=?,allowoutorder=?,sorting=? WHERE id=?";
+ CommonUtils::execSql($pdo, $sql, array(null,$tablename,$roomid,$code,$name,$active,$allowoutorder,$sorting,$tableid));
+ }
+ }
}
- $sql = "INSERT INTO `%room%` (`id`, `roomname`, `abbreviation`, `printer`) VALUES (NULL,?,?,?)";
- $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
- $stmt->execute(array($aRoomName,$aRoomAbbr,$roomPrinter));
- $roomId = $pdo->lastInsertId();
-
- $tablesArr = $aRoom[3];
-
- $noOfTables = count($tablesArr);
- for ($tableindex = 0; $tableindex < $noOfTables; $tableindex++) {
- $aTableName = $tablesArr[$tableindex];
- $sql = "INSERT INTO `%resttables%` (`id` , `tableno`, `roomid`) VALUES (NULL ,?,?)";
- $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
- $stmt->execute(array($aTableName,$roomId));
+ $sql = "select %tablepos%.id as posid,%resttables%.removed FROM %tablepos%,%resttables% WHERE %resttables%.removed is not null AND %resttables%.id=%tablepos%.tableid";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, null);
+ foreach($result as $r) {
+ $sql = "DELETE FROM %tablepos% WHERE id=?";
+ CommonUtils::execSql($pdo, $sql, array($r["posid"]));
+ };
+ $sql = "select %tablemaps%.id as posid,%room%.removed FROM %tablemaps%,%room% WHERE %room%.removed is not null AND %room%.id=%tablemaps%.roomid";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, null);
+ foreach($result as $r) {
+ $sql = "DELETE FROM %tablemaps% WHERE id=?";
+ CommonUtils::execSql($pdo, $sql, array($r["posid"]));
}
+
+ $pdo->commit();
+ } catch (Exception $ex) {
+ echo json_encode(array("status" => "ERROR","msg" => $ex->getMessage()));
+ $pdo->rollBack();
+ return;
}
- $pdo->commit();
- echo json_encode("OK");
+ $this->getRoomfieldAlsoInactive($pdo);
}
- function getRoomfield() {
- $pdo = $this->dbutils->openDbAndReturnPdo();
+ function getRoomfieldAlsoInactive($pdo = null) {
+ if (is_null($pdo)) {
+ $pdo = $this->dbutils->openDbAndReturnPdo();
+ }
+ $this->getRoomfieldCore($pdo, true);
+ }
+
+ function getRoomfield($pdo = null) {
+ if (is_null($pdo)) {
+ $pdo = $this->dbutils->openDbAndReturnPdo();
+ }
+ $this->getRoomfieldCore($pdo, false);
+ }
+
+ function getRoomfieldCore($pdo,$includeInActiveTables) {
- $sql = "SELECT id,roomname,IFNULL(abbreviation,'') as abbreviation,IFNULL(printer,0) as printer FROM %room% WHERE removed is null ORDER BY 'sorting'";
+ $sql = "SELECT id,roomname,IFNULL(abbreviation,'') as abbreviation,IFNULL(printer,0) as printer,sorting FROM %room% WHERE removed is null ORDER BY 'sorting'";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute();
$result = $stmt->fetchAll();
- $numberOfRooms = $stmt->rowCount();
-
- $roomIdNameArray = array();
-
+ $numberOfRooms = count($result);
+
$maxTables = 0;
$roomArr = array();
+
+ $where = "removed is null AND active='1'";
+ if ($includeInActiveTables) {
+ $where = "removed is null";
+ }
+
foreach($result as $row) {
$roomid = $row['id'];
$roomname = $row['roomname'];
$abbreviation = $row['abbreviation'];
$printer = $row['printer'];
+ $roomsorting = $row['sorting'];
- $sql = "SELECT id,tableno FROM %resttables% WHERE roomid=? AND removed is null ORDER BY 'sorting'";
+ $sql = "SELECT id,tableno,IFNULL(code,'') as code,IFNULL(name,'') as name,IFNULL(allowoutorder,0) as allowoutorder,IFNULL(sorting,1) as sorting,IFNULL(active,1) as active FROM %resttables% WHERE roomid=? AND $where ORDER BY 'sorting'";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($row['id']));
$numberOfTables = $stmt->rowCount();
@@ -322,13 +366,17 @@ class Roomtables {
$tableArr = array();
foreach($tableresult as $aTable) {
- $tableArr[] = array("id" => $aTable['id'], "tablename" => $aTable['tableno']);
+ $tableArr[] = array("id" => $aTable['id'], "tablename" => $aTable['tableno'],"name" => $aTable['name'],"code" => $aTable['code'],"allowoutorder" => $aTable['allowoutorder'],"active" => $aTable['active'],"sorting" => $aTable['sorting']);
}
- $roomArr[] = array("roomid" => $roomid, "roomname" => $roomname, "abbreviation" => $abbreviation, "printer" => $printer, "tables" => $tableArr, "noOfTables" => $numberOfTables);
+ $roomArr[] = array("roomid" => $roomid, "roomname" => $roomname, "abbreviation" => $abbreviation, "printer" => $printer, "sorting" => $roomsorting, "tables" => $tableArr, "noOfTables" => $numberOfTables);
}
echo json_encode(array("status" => "OK", "noOfRooms" => $numberOfRooms, "maxTables" => $maxTables, "roomfield" => $roomArr));
}
+
+ public static function getTablesForGuestsystem($pdo) {
+ $sql = "SELECT id,name,code FROM %resttables% WHERE removed is null AND active=? AND allowoutorder=? AND code is not null";
+ $result = CommonUtils::fetchSqlAll($pdo, $sql, array(1,1));
+ return $result;
+ }
}
-
-?>
\ No newline at end of file
diff --git a/webapp/php/tablemap.php b/webapp/php/tablemap.php
index 7f16249..b1ae875 100644
--- a/webapp/php/tablemap.php
+++ b/webapp/php/tablemap.php
@@ -103,7 +103,7 @@ class TableMap {
public static function getTableMapCore($pdo,$roomid) {
- $sql = "SELECT id,tableno as name FROM %resttables% WHERE roomid=? AND removed is null";
+ $sql = "SELECT id,tableno as name,active FROM %resttables% WHERE roomid=? AND removed is null AND active='1'";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($roomid));
$tables = $stmt->fetchAll();
@@ -247,9 +247,9 @@ class TableMap {
}
private static function getAllTablesOfRoom($pdo,$roomid) {
- $sql = "SELECT id FROM %resttables% WHERE roomid=?";
+ $sql = "SELECT id FROM %resttables% WHERE roomid=? AND active=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
- $stmt->execute(array($roomid));
+ $stmt->execute(array($roomid,1));
$tables = $stmt->fetchAll();
return $tables;
}
diff --git a/webapp/php/utilities/TypeAndProducts/ProductEntry.php b/webapp/php/utilities/TypeAndProducts/ProductEntry.php
index 09305ff..f3c4b6a 100644
--- a/webapp/php/utilities/TypeAndProducts/ProductEntry.php
+++ b/webapp/php/utilities/TypeAndProducts/ProductEntry.php
@@ -18,6 +18,7 @@ class ProductEntry {
private $unit = null;
private $days = null;
private $prodimageid = 0;
+ private $display = 'KG';
private static $PRICE_B = "PreisB";
private static $PRICE_C = "PreisC";
@@ -30,6 +31,7 @@ class ProductEntry {
private static $DAYS = "Tage";
private static $ID = "ID";
private static $IMAGEID = "Bildnr";
+ private static $DISPLAY = "Anzeige";
public function createFromPostData($postData) {
@@ -65,6 +67,10 @@ class ProductEntry {
$this->unit = null;
}
}
+ if (($this->display != 'K') && ($this->display != 'G')) {
+ $this->display = null;
+ }
+
if (is_null($this->days) || ($this->days == "")) {
$this->days = '0123456';
}
@@ -83,23 +89,23 @@ class ProductEntry {
}
public function createProductInDb($pdo) {
- $sql = "INSERT INTO `%products%` (`id`,`shortname`,`longname`,`priceA`,`priceB`,`priceC`,`unit`,`days`,`tax`,`taxaustria`,`amount`,`category`,`favorite`,`available`,`audio`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ $sql = "INSERT INTO `%products%` (`id`,`shortname`,`longname`,`priceA`,`priceB`,`priceC`,`unit`,`display`,`days`,`tax`,`taxaustria`,`amount`,`category`,`favorite`,`available`,`audio`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
if ($this->days == '0123456') {
$this->days = null;
}
- $stmt->execute(array($this->shortName,$this->longName,$this->priceA,$this->priceB,$this->priceC,$this->unit,$this->days,$this->tax,$this->taxaustria,$this->amount,$this->category,$this->favorite,$this->available,$this->audio));
+ $stmt->execute(array($this->shortName,$this->longName,$this->priceA,$this->priceB,$this->priceC,$this->unit,$this->display,$this->days,$this->tax,$this->taxaustria,$this->amount,$this->category,$this->favorite,$this->available,$this->audio));
return ($pdo->lastInsertId());
}
public function applyProductInDb($pdo) {
- $updateSql = "UPDATE %products% SET shortname=?, longname=?, priceA=?, priceB=?, priceC=?, unit=?, days=?, tax=?, taxaustria=?, amount=?,available=?, audio=?, favorite=? WHERE id=?";
+ $updateSql = "UPDATE %products% SET shortname=?, longname=?, priceA=?, priceB=?, priceC=?, unit=?, display=?, days=?, tax=?, taxaustria=?, amount=?,available=?, audio=?, favorite=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($updateSql));
if ($this->days == '0123456') {
$this->days = null;
}
- $stmt->execute(array($this->shortName,$this->longName,$this->priceA,$this->priceB,$this->priceC,$this->unit,$this->days,$this->tax,$this->taxaustria,$this->amount,$this->available,$this->audio,$this->favorite,$this->prodid));
+ $stmt->execute(array($this->shortName,$this->longName,$this->priceA,$this->priceB,$this->priceC,$this->unit,$this->display,$this->days,$this->tax,$this->taxaustria,$this->amount,$this->available,$this->audio,$this->favorite,$this->prodid));
}
//
@@ -116,6 +122,7 @@ class ProductEntry {
$unit = $aProd['unit'];
$days = $aProd['days'];
$prodimageid = $aProd['prodimageid'];
+ $display = $aProd['display'];
$tax = str_replace('.', $decpoint, $aProd['tax']);
$taxaustria = $aProd['taxaustria'];
$amount = $aProd['amount'];
@@ -165,6 +172,15 @@ class ProductEntry {
if (!is_null($prodimageid) && ($prodimageid != 0)) {
$extArr[] = self::$IMAGEID . ":" . $prodimageid;
}
+
+ if (!is_null($display) && (strtoupper($display) != "KG")) {
+ $display = strtoupper($display);
+ if (($display == 'K') || ($display == 'G')) {
+ $extArr[] = self::$DISPLAY . ":" . $display;
+ }
+ }
+
+ // REMÜ show ext parameters if there are any
if (count($extArr) > 0) {
$prodText .= " # " . join("; ", $extArr);
}
@@ -187,6 +203,7 @@ class ProductEntry {
$this->unit = null;
$this->days = null;
$this->prodimageid = null;
+ $this->display = null;
$this->shortName = null;
$this->taxaustria = 0;
@@ -234,6 +251,14 @@ class ProductEntry {
$value = null;
}
$this->prodimageid = $value;
+ } else if ($identifier == self::$DISPLAY) {
+ $value = strtoupper($value);
+ if ($value == 'KG') {
+ $value = null;
+ } else if (($value != 'K') && ($value != 'G')) {
+ $value = null;
+ }
+ $this->display = $value;
}
}
}
@@ -311,8 +336,10 @@ class ProductEntry {
function getProdImageId() {
return (($this->prodimageid == 0) ? null : $this->prodimageid);
}
+ function getDisplay() {
+ return (($this->display == 'KG') ? null : $this->display);
+ }
function toString() {
return "S:" . $this->shortName . " PA:" . $this->priceA . " PB:" . $this->priceB . " PC:" . $this->priceC . " Tax:" . $this->tax . " R:" . $this->longName;
}
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/webapp/php/utilities/TypeAndProducts/TypeAndProductFileManager.php b/webapp/php/utilities/TypeAndProducts/TypeAndProductFileManager.php
index 0f6f15f..363df87 100644
--- a/webapp/php/utilities/TypeAndProducts/TypeAndProductFileManager.php
+++ b/webapp/php/utilities/TypeAndProducts/TypeAndProductFileManager.php
@@ -370,6 +370,7 @@ class TypeAndProductFileManager {
$available = $product->getAvailable();
$favorite = 0;
$prodimageid = $product->getProdImageId();
+ $display = $product->getDisplay();
$sql = "SELECT id FROM %prodimages% WHERE id=?";
$prodimages = CommonUtils::fetchSqlAll($pdo, $sql, array($prodimageid));
@@ -399,15 +400,15 @@ class TypeAndProductFileManager {
}
}
if ($isNewProd) {
- $sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `unit`,`days`, `tax`, `taxaustria`, `amount`, `category`,`available`,`favorite`,`sorting`,`prodimageid`) VALUES (NULL,";
- $sql = $sql . "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ $sql = "INSERT INTO `%products%` (`id`, `shortname`, `longname`, `priceA`, `priceB`, `priceC`, `unit`,`days`, `tax`, `taxaustria`, `amount`, `category`,`available`,`favorite`,`sorting`,`prodimageid`,`display`) VALUES (NULL,";
+ $sql = $sql . "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
- $stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$unit,$days,$tax, $taxaustria, $amount, $category,$available,$favorite,$sorting,$prodimageid));
+ $stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$unit,$days,$tax, $taxaustria, $amount, $category,$available,$favorite,$sorting,$prodimageid,$display));
$prodid = $pdo->lastInsertId();
HistFiller::createProdInHist($pdo, $prodid);
} else {
- $sql = "SELECT shortname,longname,priceA,priceB,priceC,unit,days,tax,taxaustria,amount,available,category,prodimageid FROM %products% WHERE id=?";
+ $sql = "SELECT shortname,longname,priceA,priceB,priceC,unit,days,tax,taxaustria,amount,available,category,prodimageid,display FROM %products% WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($prodid));
$row = $stmt->fetchObject();
@@ -423,12 +424,13 @@ class TypeAndProductFileManager {
|| ($row->tax != $tax)
|| ($row->taxaustria != $taxaustria)
|| ($row->prodimageid != $prodimageid)
+ || ($row->display != $display)
|| ($row->amount != $amount));
if ($changed) {
- $sql = "UPDATE %products% SET shortname=?,longname=?,priceA=?,priceB=?,priceC=?,unit=?,days=?,tax=?,taxaustria=?,amount=?,available=?,sorting=?,prodimageid=? WHERE id=?";
+ $sql = "UPDATE %products% SET shortname=?,longname=?,priceA=?,priceB=?,priceC=?,unit=?,days=?,tax=?,taxaustria=?,amount=?,available=?,sorting=?,prodimageid=?,display=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
- $stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$unit,$days,$tax,$taxaustria,$amount,$available,$sorting,$prodimageid,$prodid));
+ $stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$unit,$days,$tax,$taxaustria,$amount,$available,$sorting,$prodimageid,$display,$prodid));
$changedProdIds[] = $prodid;
} else {
$sql = "UPDATE %products% SET sorting=? WHERE id=?";
diff --git a/webapp/php/utilities/basedb.php b/webapp/php/utilities/basedb.php
index 39c60be..ab07937 100644
--- a/webapp/php/utilities/basedb.php
+++ b/webapp/php/utilities/basedb.php
@@ -202,8 +202,9 @@ class Basedb {
`prodbtnsize` INT(1) NULL,
`prefertablemap` INT(1) NULL,
`preferimgdesk` INT(1) NULL,
- `preferimgmobile` INT(1),
- `showplusminus` INT(1),
+ `preferimgmobile` INT(1) NULL,
+ `preferfixbtns` INT(1) NULL,
+ `showplusminus` INT(1) NULL,
`keeptypelevel` INT(1) NOT NULL,
`extrasapplybtnpos` INT(1) NOT NULL,
`failedlogins` VARCHAR(20) NULL,
@@ -300,6 +301,10 @@ class Basedb {
`id` INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`tableno` VARCHAR ( 150 ) NOT NULL,
`roomid` INT ( 10 ) NOT NULL,
+ `code` VARCHAR ( 200 ) NULL,
+ `name` VARCHAR ( 50 ) NULL,
+ `active` INT(1) NULL,
+ `allowoutorder` INT(1) NULL,
`removed` INT(2) NULL,
`sorting` INT(2) NULL,
FOREIGN KEY (roomid) REFERENCES %room%(id)
@@ -413,6 +418,7 @@ class Basedb {
`available` INT(2) NOT NULL,
`audio` VARCHAR ( 150 ) NULL,
`prodimageid` INT(10) NULL,
+ `display` VARCHAR(3) NULL,
`removed` INT(1) NULL,
FOREIGN KEY (category) REFERENCES %prodtype%(id),
FOREIGN KEY (prodimageid) REFERENCES %prodimages%(id)
@@ -585,7 +591,7 @@ class Basedb {
`taxaustria` INT(1) NULL,
`productname` VARCHAR( 150 ) NULL,
`ordertime` DATETIME NULL ,
- `orderuser` INT(10) NOT NULL ,
+ `orderuser` INT(10) NULL ,
`anoption` VARCHAR( 150 ) NULL ,
`pricechanged` INT(1) NULL ,
`togo` INT(1) NULL ,
@@ -666,6 +672,7 @@ class Basedb {
`favorite` INT(1) NULL,
`audio` VARCHAR ( 150 ) NULL,
`prodimageid` INT(10) NULL,
+ `display` VARCHAR(3) NULL,
`extras` VARCHAR ( 300 ) NULL,
FOREIGN KEY (prodid) REFERENCES %products%(id)
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb
@@ -785,6 +792,51 @@ class Basedb {
}
}
+ function initTableOrder($pdo) {
+ $maxNoOfRoom = array();
+ $sql = "SELECT id,roomid FROM %resttables% WHERE removed is null";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ $stmt->execute();
+ $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $sql = "UPDATE %resttables% SET sorting=? WHERE id=?";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ foreach ($result as $r) {
+ $tableid = $r["id"];
+ $roomid = $r["roomid"];
+ if (!key_exists($roomid, $maxNoOfRoom)) {
+ $maxNoOfRoom[$roomid] = 0;
+ }
+ $nextSort = $maxNoOfRoom[$roomid] + 1;
+ $maxNoOfRoom[$roomid] = $nextSort;
+ $stmt->execute(array($nextSort,$tableid));
+ }
+ $sql = "UPDATE %resttables% SET active='1' WHERE active is null";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ $stmt->execute();
+ $sql = "UPDATE %resttables% SET allowoutorder='1' WHERE allowoutorder is null";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ $stmt->execute();
+ $sql = "UPDATE %resttables% SET name=tableno WHERE name is null";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ $stmt->execute();
+ }
+
+ function initRoomOrder($pdo) {
+ $sql = "SELECT id FROM %room% WHERE removed IS NULL ORDER BY id";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ $stmt->execute();
+ $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $counter = 1;
+ $sql = "UPDATE %room% SET sorting=? WHERE id=?";
+ $stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
+ foreach($result as $aRoom) {
+ $stmt->execute(array($counter,$aRoom["id"]));
+ $counter++;
+ }
+ }
+
function createHsinTable($pdo) {
$sql = "
CREATE TABLE `%hsin%` (
diff --git a/webapp/preferences.html b/webapp/preferences.html
index 8e6bbea..758d07e 100644
--- a/webapp/preferences.html
+++ b/webapp/preferences.html
@@ -5,7 +5,7 @@
-
+
@@ -52,6 +52,7 @@ var PREF_TM_TEXT = ["Text-Buttons","Text buttons","botones con textos"];
var PREF_IMG_DESK = ["Produktbilder in Desktopansicht","Images in Desktop view","Imagenes en vista de desktop"];
var PREF_IMG_MOBILE = ["Produktbilder in Mobilansicht","Images in mobile view","Imagenes en vista de móviles"];
var PREF_SHOW_PLUS_MINUS = ["Anzahl (+/-) in Mobilansicht","Amount (+/-) in mobile view","Ajustar numero en vista móvil"];
+var PREF_IMG_FIX_BTNS = ["Fixierte Navigationsbuttons (mobile Bestellansicht)","Fixed Navigation Buttons (mobile order view)","Botones fijos de navigación (vista movíl de ordenes)"];
var PREF_NO = ["Nein","No","No"];
var PREF_YES = ["Ja","Yes","Si"];
@@ -238,6 +239,9 @@ function setPreferimgdesk() {
function setPreferimgmobile() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferimgmobile",null,fillPreferimgmobile,"Keine Information über Bevorzugung Produktbilder in Mobilansicht");
}
+function setPreferfixbtns() {
+ doAjax("GET","php/contenthandler.php?module=admin&command=getPreferfixbtns",null,fillPreferfixbtns,"Keine Information über Bevorzugung Fix-Buttons");
+}
function setShowplusminus() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPrefershowplusminus",null,fillPrefershowplusminus,"Keine Information über Bevorzugung Mengenangabe in Mobilansicht");
}
@@ -353,6 +357,10 @@ function fillPreferimgmobile(preferredVaue) {
$("#preferimgmobilebtnpart").html(createPreferImgPart(preferredVaue, "preferimgmobilelabel", PREF_IMG_MOBILE[l]));
$("#preferimgpartbox").trigger("create");
}
+function fillPreferfixbtns(preferredVaue) {
+ $("#preferfixbtnspart").html(createPreferImgPart(preferredVaue, "preferfixbtnslabel", PREF_IMG_FIX_BTNS[l]));
+ $("#preferthemepartbox").trigger("create");
+}
function fillPrefershowplusminus(preferredVaue) {
$("#prefershowplusminusbtnpart").html(createPreferImgPart(preferredVaue, "prefershowplusminuslabel", PREF_SHOW_PLUS_MINUS[l]));
$("#preferimgpartbox").trigger("create");
@@ -458,6 +466,13 @@ function binding() {
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferimgmobile",{preferredvalue:newVal},handleGeneralAnswer,"Produktbilder Mobil");
binding();
});
+ // setPreferfixbtns
+ $("#preferfixbtnslabel").off('change').on('change', function(e) {
+ var newVal = $("#preferfixbtnslabel").find(":selected").val();
+ fillPreferfixbtns(newVal);
+ doAjax("POST","php/contenthandler.php?module=admin&command=setPreferfixbtns",{preferredvalue:newVal},handleGeneralAnswer,"Fix-Buttons");
+ binding();
+ });
$("#prefershowplusminuslabel").off('change').on('change', function(e) {
var newVal = $("#prefershowplusminuslabel").find(":selected").val();
$("#prefershowplusminusbtnpart").html(createPreferImgPart(newVal, "prefershowplusminuslabel", PREF_SHOW_PLUS_MINUS[l]));
@@ -505,6 +520,7 @@ $(document).on("pageinit", "#pref-page", function () {
setPreferimgdesk();
setPreferimgmobile();
setShowplusminus();
+ setPreferfixbtns();
binding();
});
@@ -582,6 +598,7 @@ $(document).on("pageinit", "#pref-page", function () {
Mobil-Design
+
Reload nach einer Änderung drücken!
@@ -595,7 +612,7 @@ $(document).on("pageinit", "#pref-page", function () {
-
Passwordänderung
+
Passwortänderung
diff --git a/webapp/products.html b/webapp/products.html
index 48c0a02..21891ec 100644
--- a/webapp/products.html
+++ b/webapp/products.html
@@ -7,7 +7,7 @@
-
+
@@ -32,6 +32,7 @@ var PROD_NO_TONE = ["Kein Ton","No audio","Ningún sonido"];
var PROD_PRICE = ["Preis","Price","Precio"];
var PROD_UNIT = ["Einheit","Unit","Unidad"];
var PROD_DAYS = ["Tage","Days","Dias"];
+var PROD_DISPLAY = ["Anzeige","Display","Publicar"];
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"];
@@ -290,11 +291,15 @@ function setLanguage(language) {
if ((prod.unit !== undefined) && (prod.unit != null)) {
unit = prod.unit;
}
+ var display = 'KG';
+ if ((prod.display !== undefined) && (prod.display != null)) {
+ display = prod.display;
+ }
var days = '';
if (days != '0123456') {
days = prod.days;
}
- var aProduct = newProduct(prod.id,prod.longname,prod.shortname,prod.priceA,prod.priceB,prod.priceC,unit,days,prod.tax,prod.taxaustria,prod.amount,prod.available,prod.audio,prod.favorite);
+ var aProduct = newProduct(prod.id,prod.longname,prod.shortname,prod.priceA,prod.priceB,prod.priceC,unit,display,days,prod.tax,prod.taxaustria,prod.amount,prod.available,prod.audio,prod.favorite);
prodleafs[prodleafs.length] = aProduct;
if (!prodsListPrinted) {
@@ -305,7 +310,7 @@ function setLanguage(language) {
}
if (ct != null) {
var dummyPrice = "0.00".replace(".",decpoint);
- var aProduct = newProduct("n" + ct.id,"","",dummyPrice,dummyPrice,dummyPrice,0,"0123456","null",0,"null",1,"",0);
+ var aProduct = newProduct("n" + ct.id,"","",dummyPrice,dummyPrice,dummyPrice,0,'KG',"0123456","null",0,"null",1,"",0);
prodleafs[prodleafs.length] = aProduct;
txt += aProduct.createListStructureLine(audiofiles);
}
@@ -538,6 +543,7 @@ function setLanguage(language) {
var priceB = $("#prodpriceB_input_" + prodid).val().trim();
var priceC = $("#prodpriceC_input_" + prodid).val().trim();
var unit = $("#produnit_input_" + prodid).val();
+ var display = $("#proddisplay_input_" + prodid).val();
var days = $("#proddays_input_" + prodid).val().trim();
var tax = $("#prodtax_input_" + prodid).val().trim();
if (tax == "") {
@@ -598,6 +604,7 @@ function setLanguage(language) {
priceC:priceC_Arr[1],
tax:taxTxt,
unit:unit,
+ display:display,
days:days,
taxaustria: selectedTaxAustria,
amount: amount,
@@ -656,6 +663,7 @@ function setLanguage(language) {
priceB: props.priceB,
priceC: props.priceC,
unit:props.unit,
+ display: props.display,
days:days,
tax: props.tax,
taxaustria: props.taxaustria,
@@ -693,7 +701,6 @@ function setLanguage(language) {
doAjax("POST", url, postdata, refreshProduct, "Fehler Produktdaten");
}
}
-
}
function refreshProductAndConfirm(prodData) {
@@ -702,7 +709,7 @@ function setLanguage(language) {
}
function refreshProduct(prodData) {
- var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.unit,prodData.days,prodData.tax,prodData.taxaustria,prodData.amount,prodData.available,prodData.audio,prodData.favorite);
+ var aProduct = newProduct(prodData.id,prodData.longname,prodData.shortname,prodData.priceA,prodData.priceB,prodData.priceC,prodData.unit,prodData.display,prodData.days,prodData.tax,prodData.taxaustria,prodData.amount,prodData.available,prodData.audio,prodData.favorite);
aProduct.insertValuesIntoMenuList();
$("#assextralist_" + prodData.id).html("");
$("#assextralist_" + prodData.id).trigger("create");
@@ -735,6 +742,7 @@ function setLanguage(language) {
priceB: props.priceB,
priceC: props.priceC,
unit: props.unit,
+ display: props.display,
days:days,
tax: props.tax,
taxaustria: props.taxaustria,
diff --git a/webapp/rating.html b/webapp/rating.html
index f4d2871..7308f45 100644
--- a/webapp/rating.html
+++ b/webapp/rating.html
@@ -7,7 +7,7 @@
-
+
diff --git a/webapp/reports.html b/webapp/reports.html
index fa13e93..db9e9fa 100644
--- a/webapp/reports.html
+++ b/webapp/reports.html
@@ -7,7 +7,7 @@
-
+
diff --git a/webapp/reservation.html b/webapp/reservation.html
index 0255834..d6bcd89 100644
--- a/webapp/reservation.html
+++ b/webapp/reservation.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html
index a4a4310..3da35ef 100644
--- a/webapp/supplydesk.html
+++ b/webapp/supplydesk.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/waiter.html b/webapp/waiter.html
index 9ed62a0..bf71205 100644
--- a/webapp/waiter.html
+++ b/webapp/waiter.html
@@ -4,8 +4,8 @@
-
-
+
+
@@ -33,7 +33,7 @@
+var W_TABLES=["Tische","Tables","Mesas"];var W_ATABLE=["Tisch","Table","Mesa"];var W_ROOMS=["Räume","Rooms","Espacios"];var W_SELECTION=["Auswahl","Selection","Selección"];var W_LAST_SELECTED=["zuletzt","last","seleccionado"];var W_FAVS=["Favoriten","Favorites","Favoritos"];var W_NEW_ORDER=["Neue Order","New Orders","Ordenes nuevas"];var W_KIT_BAR=["nicht serviert/unbezahlt","unserved/unpaid","no servido/impagado"];var W_OTHER_PROD=["Auswahl Produktkategorie","Select product categroy","Categoría diferente"];var W_WORK_TICKET=["Arbeitsbon","Work ticket","Tique de trabajar"];var W_NOTE=["Bemerkung","Comment","Comentario"];var W_SEND_ORDERS=["Bestellung senden","Send orders","Enviar Ordenes"];var W_TO_PAYDESK=["-> Kasse","-> Paydesk","-> Caja"];var W_TABLECHANGE=["Tischwechsel","Change table","Cambiar mesa"];var W_ROOMTABLE=["Raum-Tisch","Room-Table","Espacio-Mesa"];var W_TABLE_SEL=["Tischauswahl","Select table","Qué mesa?"];var W_UNDELIV_INFO=["Liste enthält die Produkte die noch in der Küchen-/Baransicht sind, sowie unbezahlte Produkte, die die Bereitstellungsansicht nicht durchlaufen.","List contains the products which are still in kitchen or bar view, as well as unpaid products that do not pass the supplydesk view.","La lista contiene los productos que estan todavía en modulo de cocina/bar, también productos impagados que no pasan vista de productos preparados."];var W_REMOVE_ERROR=["Ansicht nicht mehr aktuell - Liste wird neu geladen.","View is obsolete - List will be reloaded.","Vista no esta actual - vamos a actualisar la lista."];var W_FOOD_FOR=["Speisen für","Food for","Comidas para"];var W_DRINKS_FOR=["Getränke für","Beverage for","Bebidas para"];var W_ACT_NEW_ORD_EL=["Aktion auswählen","Select action","Que acción?"];var W_ACT_CHANGE=["Ändern","Modify","Modificar"];var W_ACT_CHANGE_ALL=["Alle Ändern","Modify all","Modificar todo"];var W_ACT_CHANGE_ONE=["Einen Artikel ändern","Modify one item","Modificar un artículo"];var W_APPLY=["Anwenden","Apply","Aplicar"];var W_CANCEL=["Abbrechen","Cancel","Cancelar"];var W_STILL_UNSENT_ORDERS=["Es sind noch ungesendete Orders vorhanden!","There are unsent orders in the list","Hay elementos in la liste que no han enviados"];var W_EXTRAS=["Extras/Optionen","Add-ons/Options","Opciones"];var W_OPEN_PANEL=["Extras-Auswahl noch offen","Add-ons selection still open","Selección de opciones todavía abierta"];var W_DEL=["Löschen","Delete","Removar"];var W_MSG=["Nachricht","Message","Mensaje"];var W_CHANGE_PRICE=["Neuer Preis: ","New price: ","Cambiar precio: "];var W_PRICE=["Preis","Price","Precio"];var W_WRONG_FORMAT=["Falsches Zahlenformat","Wrong number format","Formato de precio incorecto"];var W_TOGO=["Außer-Haus-Verkauf","Sale with Tax No 2","Venta IVA 2"];var W_YES=["Ja","Yes","Si"];var W_NO=["Nein","No","No"];var W_DISCARD_NO_ASK=["Es sind noch ungesendete Orders vorhanden! Sollen diese verworfen werden?","There are still unsent orders. Do you want to discard them?","Hay todavía ordenes non-enviados. Removarlos?"];var W_DISCARD_HEADER=["Neue Orders verwerfen?","Discard new orders?","Removar ordenes nuevos?"];var W_SEARCH=["Produktsuche","Product search","Buscar producto"];var W_SEARCHRESULTS=["Suchergebnis","Search Result","Encontrado"];var W_WRONG_PIN=["Falscher Stornocode","Wrong cancel code","Codigo falso"];var W_NO_ORDERS=["Keine gebuchten Orders vorhanden!","No orders available!","No hay ningún orden!"];var W_TO_PAY=["offen","to pay","a pagar"];var W_MOVE_PRODS=["Produkte verschieben","Move products","Productos a otra mesa"];var W_NO_PRODS_SELECTED=["Es wurden keine Produkte ausgewählt!","You have not chosen any products!","No ha seleccionado ningún producto!"];var W_MAX_PRICE_EXCEEDED=["Der Maximalwert für den Preis wurde überschritten!","The max. value for the price is exceeded!","El valor del precio es más que el maximum!"];var W_REORDER=["Nachbestellen","Reorder","Order una vez mas"];var W_REMOVE=["Entfernen","Remove","Removar"];var W_SELALL=["Alles auswählen","Select all","Elegir todo"];var W_UNSELALL=["Alles abwählen","Unselect all","No elegir nada"];var W_ONLY=["noch","only","sólo"];var W_DEL_ALL_UNDELIVERED=["Entferne alles","Remove all","Borrar todo"];var W_DEL_ALL_ASSIGNED_PRODS=["Alle Produkte löschen?","Delete all products?","Removar todos los productos?"];var W_NO_VALID_PRICE=["Keine gültige Preiseingabe","No valid price","Precio no valido"];var W_NO_REORDER_VAR_PRICE=["Produkt mit variablem Preis kann nicht auf diese Weise nachbestellt werden.","Produkt with variable price cannot be reordered this way.","Producto con un precio variable no se puede reordenado asi."];var CHANGE_ALL=0;var CHANGE_ONE=1;var WORKFLOW_DIGI_WORK=0;var WORKFLOW_DIGI=1;var WORKFLOW_WORK=2;var WORKFLOW_WORK_SEND=3;function Grouping(b,a){this.set=b;this.sortedset=[];this.group=function(){this.sortedset=[];for(var g=0;g/g,">"))}function setLanguage(i){lang=i;$("#roomtableheader2").html(W_ROOMTABLE[lang]);$("#tableselection").html(W_TABLE_SEL[lang]);$("#actiontxt").html(W_ACT_NEW_ORD_EL[lang]);$("#actdeltxt").html(W_DEL[lang]);$("#discard_new_orders_yes").html(W_YES[lang]);$("#discard_new_orders_no").html(W_NO[lang]);$("#discardnewordersask").html(W_DISCARD_NO_ASK[lang]);$("#discardnoheader").html(W_DISCARD_HEADER[lang]);$("#moveprods").html(W_MOVE_PRODS[lang]);var f="";if(prominentsearch==0){f+='