diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe index efc07b5..d7180a5 100644 Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ diff --git a/spider/clientdetails.html b/spider/clientdetails.html index 8439fb5..0c3364c 100644 --- a/spider/clientdetails.html +++ b/spider/clientdetails.html @@ -1,8 +1,7 @@ -

- +
- - \ No newline at end of file diff --git a/spider/clientset.html b/spider/clientset.html index 337a3ad..6e20d95 100644 --- a/spider/clientset.html +++ b/spider/clientset.html @@ -1,6 +1,5 @@ - -
+ - diff --git a/webapp/install.html b/webapp/install.html index a5156b2..436be79 100644 --- a/webapp/install.html +++ b/webapp/install.html @@ -725,7 +725,7 @@ $(document).ready(function() { diff --git a/webapp/install/installer.php b/webapp/install/installer.php index 5c6aae3..242a32c 100644 --- a/webapp/install/installer.php +++ b/webapp/install/installer.php @@ -2287,6 +2287,32 @@ return false; } } +function updateUserTable1316_1317($prefix, $version, $dbname) { +$pdo = $this->pdo; +try { +if ($version != "1.3.16") { +$ret = $this->updateUserTable1315_1316($prefix, $version, $dbname); +if (!$ret) { +echo "Version update v1.3.15 to 1.3.16 not successful."; +return false; +} +} + +DbUtils::overrulePrefix($prefix); + +$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)"; +$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql)); +$stmt->execute(array('dblog','1')); + +$this->updateVersion($pdo, '1.3.17'); + +return true; +} catch (PDOException $e) { +echo "Error in v1.3.16 to 1.3.17: $e"; +return false; +} +} + function setVersion($prefix,$theVersion) { $pdo = $this->pdo; @@ -2413,7 +2439,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.3.16')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.17')"); $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')"); @@ -2461,6 +2487,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'memorylimit', '512')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'updateurl', 'http://www.ordersprinter.de/update')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'restaurantmode', '1')"); +$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'dblog', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'returntoorder', '1')"); $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'discountname1', '')"); @@ -2843,7 +2870,7 @@ $zones[] = $timezone_identifiers[$i]; } echo json_encode($zones); } else if ($command == 'update') { -$installerVersion = "1.3.16"; +$installerVersion = "1.3.17"; $admin = new InstallAdmin(); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); @@ -2874,7 +2901,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27" "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.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17", "1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12", -"1.3.13","1.3.14","1.3.15" +"1.3.13","1.3.14","1.3.15","1.3.16" ); if (!in_array($version, $supportedVersions)) { @@ -2882,7 +2909,7 @@ echo json_encode("Quellversion nicht unterstützt"); return; } -$ret = $admin->updateUserTable1315_1316($_POST['prefix'], $version, $_POST['db']); +$ret = $admin->updateUserTable1316_1317($_POST['prefix'], $version, $_POST['db']); if(session_id() == '') { session_start(); diff --git a/webapp/kitchen.html b/webapp/kitchen.html index a3879c6..a7b3897 100644 --- a/webapp/kitchen.html +++ b/webapp/kitchen.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/manager.html b/webapp/manager.html index 308b2b2..ea1f009 100644 --- a/webapp/manager.html +++ b/webapp/manager.html @@ -5,7 +5,7 @@ - + @@ -347,6 +347,7 @@ var MAN_SHOWPAYMENT5 = ["Überweisung","Transfer","transferencia"]; var MAN_SHOWPAYMENT6 = ["Lastschrift","debitsCard","Débito"]; var MAN_SHOWPAYMENT7 = ["Hotelzimmer","Hotel room","Habitación"]; var MAN_SHOWPAYMENT8 = ["Gast","Guest","Huésped"]; +var MAN_DBLOG = ["Debug-Logging","Debug logging","Debug logging"]; var MAN_RESTAURANT_MODE = ["Restaurantmodus","Restaurant mode","Usar para restaurantes"]; var MAN_REST_MODE_HINT = ["Hinweis: Wird der Restaurantmodus auf Nein gesetzt, wird in der Desktopansicht die Tischauswahl deaktiviert. Alle Produkte werden als Außer-Haus-Verkauf gebucht.","Hint: If the restautant mode is set to no in the desktop view the table selection is deactivated and all products are ordered as to-go","Nota: Si el modus del restaurante es configurado a no en la vista de Desktop la selección de las mesas es deactivada y todos los productos son ordenados como to-go"]; var MAN_SPECIAL_SETTINGS_TXT = ["Einstellungen für spezielle Abläufe:","Settings for special workflows:","Configuración para workflows muy escpeciales:"]; @@ -377,7 +378,7 @@ var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"]; var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"]; var lang = 0; -var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0]; +var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1]; var numberOfClosings = 0; @@ -411,7 +412,6 @@ var generalValuesSettings = [ ["bigfontworkreceipt",MAN_WORKFONT_CONFIG[lang],"s",7], ["prominentsearch",MAN_PROMINENT_SEARCH[lang],"s",8], ["groupworkitemsf",MAN_GROUP_WORK_ITEMS_F[lang],"s",9], - ["groupworkitemsd",MAN_GROUP_WORK_ITEMS_D[lang],"s",38], ["discount1",MAN_DISCOUNT1[lang],"s",11], ["discount2",MAN_DISCOUNT2[lang],"s",12], ["discount3",MAN_DISCOUNT3[lang],"s",13], @@ -419,7 +419,6 @@ var generalValuesSettings = [ ["digigopaysetready",MAN_DIGI_GOPAY_SET_READY[lang],"s",14], ["waitergopayprint",MAN_WAITER_GOPAY_PRINT[lang],"s",15], ["oneprodworkrecf",MAN_ONE_PROD_WORKREC_F[lang],"s",17], - ["oneprodworkrecd",MAN_ONE_PROD_WORKREC_D[lang],"s",39], ["digiprintwork",MAN_DIGI_PRINTWORK[lang],"s",18], ["printandqueuejobs",MAN_PRINT_AND_QUEUE[lang],"s",19], ["cashenabled",MAN_CASH[lang],"s",20], @@ -473,7 +472,10 @@ var generalValuesSettings = [ ["hs3refresh",MAN_HS3REFRESH[lang],"i",0,""], ["dashslot1",MAN_DASHSLOT1[lang],"s",35], ["dashslot2",MAN_DASHSLOT2[lang],"s",36], - ["dashslot3",MAN_DASHSLOT3[lang],"s",37] + ["dashslot3",MAN_DASHSLOT3[lang],"s",37], + ["groupworkitemsd",MAN_GROUP_WORK_ITEMS_D[lang],"s",38], + ["oneprodworkrecd",MAN_ONE_PROD_WORKREC_D[lang],"s",39], + ["dblog",MAN_DBLOG[lang],"s",40] ]; var predef = ""; @@ -740,9 +742,10 @@ function insertGeneralConfigItems(configResult) { $("#partOfDigiprintwork").html(createDigiprintwork(values.digiprintwork)); $("#partOfPrintAndQueueJobs").html(createPrintAndQueueJobs(values.printandqueuejobs)); $("#partOfCash").html(createCash(values.cashenabled)); - $("#partOfReturntoorder").html(createReturntoorder(values.returntoorder)); - $("#partOfBeepCooked").html(createBeepCooked(values.beepcooked)); - $("#partOfRestaurantmode").html(createRestaurantmode(values.restaurantmode)); + $("#partOfReturntoorder").html(createYesNo("returntoorder",MAN_RETURNTOORDER,values.returntoorder)); + $("#partOfBeepCooked").html(createYesNo("beepcooked",MAN_BEEP_COOKED, values.beepcooked)); + $("#partOfRestaurantmode").html(createYesNo("restaurantmode",MAN_RESTAURANT_MODE, values.restaurantmode)); + $("#partOfDblog").html(createYesNo("dblog",MAN_DBLOG, values.dblog)); $("#partOfclosshowci").html(createYesNo("closshowci",MAN_CLOSSHOWCI,values.closshowci)); $("#partOfclosshowpaytaxes").html(createYesNo("closshowpaytaxes",MAN_CLOSSHOWPAYTAXES,values.closshowpaytaxes)); @@ -786,7 +789,6 @@ function insertGeneralConfigItems(configResult) { generalVals[7] = values.bigfontworkreceipt; generalVals[8] = values.prominentsearch; generalVals[9] = values.groupworkitemsf; - generalVals[38] = values.groupworkitemsd; generalVals[11] = parseInt(values.discount1); generalVals[12] = parseInt(values.discount2); @@ -798,7 +800,6 @@ function insertGeneralConfigItems(configResult) { generalVals[14] = values.digigopaysetready; generalVals[15] = values.waitergopayprint; generalVals[17] = values.oneprodworkrecf; - generalVals[39] = values.oneprodworkrecd; generalVals[18] = values.digiprintwork; generalVals[19] = values.printandqueuejobs; generalVals[20] = values.cashenabled; @@ -823,6 +824,10 @@ function insertGeneralConfigItems(configResult) { generalVals[36] = values.dashslot2; generalVals[37] = values.dashslot3; + generalVals[38] = values.groupworkitemsd; + generalVals[39] = values.oneprodworkrecd; + generalVals[40] = values.dblog; + $("#smtphost").val(values.smtphost); $("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth)); $("#smtpuser").val(values.smtpuser); @@ -989,15 +994,6 @@ function createPrintAndQueueJobs(theValue) { function createCash(theValue) { return createYesNo("cashenabled",MAN_CASH, theValue); } -function createReturntoorder(theValue) { - return createYesNo("returntoorder",MAN_RETURNTOORDER, theValue); -} -function createBeepCooked(theValue) { - return createYesNo("beepcooked",MAN_BEEP_COOKED, theValue); -} -function createRestaurantmode(theValue) { - return createYesNo("restaurantmode",MAN_RESTAURANT_MODE, theValue); -} function createYesNo(label,nameOnGui,theValue) { var html = '
'; @@ -1665,9 +1661,9 @@ function handleUpdateCheckResult(answer) { var millis=getMillis(); setTimeout(function(){ - document.location.href = "install.html?v=1.3.16&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.17&mode=onlyupdate&n=" + millis; },250); - document.location.href = "install.html?v=1.3.16&mode=onlyupdate&n=" + millis; + document.location.href = "install.html?v=1.3.17&mode=onlyupdate&n=" + millis; } function handleUpdateReplace(answer) { @@ -3272,6 +3268,8 @@ $(document).on("pageinit", "#admin-page", function () {
+
+

  diff --git a/webapp/paydesk.html b/webapp/paydesk.html index 0731872..7a91a5b 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 44cb449..73571ba 100644 --- a/webapp/php/admin.php +++ b/webapp/php/admin.php @@ -955,6 +955,7 @@ class Admin { $showpayment8 = CommonUtils::getConfigValueStmt($pdo,$stmt,"showpayment8",1); $restaurantmode = CommonUtils::getConfigValueStmt($pdo,$stmt,"restaurantmode",1); + $dblog = CommonUtils::getConfigValueStmt($pdo,$stmt,"dblog",1); $smtphost = ""; $smtpauth = 1; @@ -1015,7 +1016,7 @@ class Admin { "digiprintwork" => $digiprintwork, "memorylimit" => $memorylimit, "updateurl" => $updateurl, "hs3refresh" => $hs3refresh, "paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "rksvserver" => $rksvserver, "addreceipttoprinter" => $addreceipttoprinter, "printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "returntoorder" => $returntoorder, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode, - "discountname1" => $discountname1,"discountname2" => $discountname2,"discountname3" => $discountname3, + "discountname1" => $discountname1,"discountname2" => $discountname2,"discountname3" => $discountname3, "dblog" => $dblog, "closshowci" => $closshowci, "closshowpaytaxes" => $closshowpaytaxes, "closshowprods" => $closshowprods,"hosttext" => $hosttext, "showpayment2" => $showpayment2, "showpayment3" => $showpayment3, @@ -1117,7 +1118,7 @@ class Admin { $view = "preferences.html"; } - echo json_encode($view . "?v=1.3.16"); + echo json_encode($view . "?v=1.3.17"); } } @@ -1320,26 +1321,26 @@ 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.16"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.17"); }; } else { - if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.16"); }; + if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.17"); }; } - if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.16"); }; - if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.16"); }; - if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.16"); }; + if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.17"); }; + if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.17"); }; + if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.17"); }; if ($_SESSION['modus'] == 0) { - if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.16"); }; + if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.17"); }; } - if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.16"); }; - if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.16"); }; - if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.16"); }; - if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.16"); }; - if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.16"); }; - if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.16"); }; - if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.16"); }; - if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.16"); }; - $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.16"); - $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.16"); + if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.17"); }; + if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.17"); }; + if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.17"); }; + if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.17"); }; + if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.17"); }; + if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.17"); }; + if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.17"); }; + if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.17"); }; + $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.17"); + $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.17"); } $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); @@ -1347,7 +1348,7 @@ class Admin { $waiterMessage = $this->getMessage(null, "waitermessage"); } - $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.16", + $mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.17", "user" => $currentUser, "menu" => $mainMenu, "waitermessage" => $waiterMessage, @@ -1737,6 +1738,7 @@ class Admin { "showpayment8" => array("dbcol" => "showpayment8","checknum" => 0), "restaurantmode" => array("dbcol" => "restaurantmode","checknum" => 0), + "dblog" => array("dbcol" => "dblog","checknum" => 0), "smtphost" => array("dbcol" => "smtphost","checknum" => 0), "smtpauth" => array("dbcol" => "smtpauth","checknum" => 1), "smtpuser" => array("dbcol" => "smtpuser","checknum" => 0), diff --git a/webapp/php/bill.php b/webapp/php/bill.php index b9b4372..b9b3fd3 100644 --- a/webapp/php/bill.php +++ b/webapp/php/bill.php @@ -1034,6 +1034,7 @@ class Bill { $netto = str_replace(".",$decpoint,$netto_orig); $tax = str_replace(".",$decpoint,$tax_orig); $signature = $zeile['signature']; + $dbstatus = $zeile['status']; $status = $zeile['status']; if ($status == 'x') { $status = $this->t["laterCancelled"][$l]; @@ -1054,7 +1055,7 @@ class Bill { $host = ($zeile['host'] == 1 ? "x" : "-"); $reason = $zeile['reason']; - if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature)) { + if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature,$dbstatus)) { echo "Inconsistent Data Base Content!\n"; return; } diff --git a/webapp/php/closing.php b/webapp/php/closing.php index d58ca4e..4492922 100644 --- a/webapp/php/closing.php +++ b/webapp/php/closing.php @@ -18,7 +18,7 @@ require_once 'translations.php'; function handleCommand($command) { // all commands require closing,manager or admin rights -if (!($this->hasCurrentUserManagerOrAdminRights()) && ($command != 'createClosing') && ($command != 'getClosings')) { +if (!($this->hasCurrentUserManagerOrAdminRights()) && ($command != 'createClosing') && ($command != 'getClosings') && ($command != 'remotecreateclosing')) { if ($command != 'exportCsv') { echo json_encode(array("status" => "ERROR", "code" => ERROR_MANAGER_NOT_AUTHOTRIZED, "msg" => ERROR_MANAGER_NOT_AUTHOTRIZED_MSG)); } else { @@ -31,6 +31,17 @@ return; // user has manager rights if($command == 'createClosing') { $this->createClosing($_POST['remark']); +} else if ($command == 'remotecreateclosing') { +if (isset($_POST['remoteaccesscode'])) { +if (isset($_POST['remark'])) { +$this->remotecreateclosing($_POST['remoteaccesscode'],$_POST['remark']); +} else { +$this->remotecreateclosing($_POST['remoteaccesscode'],''); +} +} else { +echo json_encode("Remote access code not given"); +} +return; } else if ($command == 'getClosings') { $this->getClosings($_GET['month'], $_GET['year']); } else if ($command == 'exportCsv') { @@ -106,6 +117,21 @@ return false; } } +private function remotecreateclosing($remoteaccesscode,$remark) { +$pdo = DbUtils::openDbAndReturnPdoStatic(); +$code = CommonUtils::getConfigValue($pdo, 'remoteaccesscode', null); + +if (is_null($code) || ($code == '')) { +echo json_encode("Remote access code was not configured!"); +} else { +if (md5($remoteaccesscode) == $code) { +$this->createClosing($remark); +} else { +echo json_encode("Remote access code not correct!"); +} +} +} + private function createClosing ($remark) { if (is_null($remark)) { $remark = ""; @@ -225,6 +251,12 @@ $sql = "UPDATE %queue% SET isclosed=?"; $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt->execute(array(1)); +$dblogging = CommonUtils::getConfigValue($pdo, 'dblog', 1); +if ($dblogging == 0) { +$sql = "DELETE FROM %log%"; +CommonUtils::execSql($pdo, $sql, null); +} + // commit must before email, because there direct access to db happens $pdo->commit(); diff --git a/webapp/php/commonutils.php b/webapp/php/commonutils.php index 60a62cd..fe269ad 100644 --- a/webapp/php/commonutils.php +++ b/webapp/php/commonutils.php @@ -102,7 +102,7 @@ class CommonUtils { $pdo = $this->dbutils->openDbAndReturnPdo(); } - $sql = "SELECT billdate,brutto,netto,userid,IF(tax is not null, tax, '0.00') as tax,signature FROM %bill% WHERE id=?"; + $sql = "SELECT billdate,brutto,netto,userid,IF(tax is not null, tax, '0.00') as tax,signature,status FROM %bill% WHERE id=?"; $stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $stmt->execute(array($id)); $row = $stmt->fetchObject(); @@ -113,11 +113,18 @@ class CommonUtils { $tax = $row->tax; $userid = $row->userid; $signature = $row->signature; - - return($this->verifyBillByValues($pdo,$billdate, $brutto, $netto, $tax, $userid, $signature)); + $status = $row->status; + + return($this->verifyBillByValues($pdo,$billdate, $brutto, $netto, $tax, $userid, $signature, $status)); } - function verifyBillByValues($pdo,$billdate,$brutto,$netto,$tax,$userid,$signature) { + function verifyBillByValues($pdo,$billdate,$brutto,$netto,$tax,$userid,$signature,$status) { + + if (($status == "c") && ($brutto == 0.00)) { + // workaround - the signature for cash inserts of vaue 0.00 are sometimes incorrect + return true; + } + if (is_null($signature)) { return false; } @@ -354,14 +361,17 @@ class CommonUtils { return false; } - public static function log($pdo,$component,$message) { - date_default_timezone_set(DbUtils::getTimeZone()); - $currentTime = date('Y-m-d H:i:s'); - $sql = "INSERT INTO %log% (date,component,message) VALUES(?,?,?)"; - $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); - $stmt->execute(array($currentTime,$component,$message)); + public static function log($pdo, $component, $message) { + $dblog = self::getConfigValue($pdo, "dblog", 1); + if ($dblog == 1) { + date_default_timezone_set(DbUtils::getTimeZone()); + $currentTime = date('Y-m-d H:i:s'); + $sql = "INSERT INTO %log% (date,component,message) VALUES(?,?,?)"; + $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); + $stmt->execute(array($currentTime, $component, $message)); + } } - + public static function getLog($pdo) { $sql = "SELECT date,component,message FROM %log%"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); @@ -391,5 +401,4 @@ class CommonUtils { $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/webapp/php/updater.php b/webapp/php/updater.php index 8b34bfa..23ddeb8 100644 --- a/webapp/php/updater.php +++ b/webapp/php/updater.php @@ -117,7 +117,7 @@ class Updater { $infoFileLines = $infoFile["msg"]; if (count($infoFileLines) > 1) { - $checkIfNewerVersion = self::isV2Newer('1.3.16',trim($infoFileLines[0])); + $checkIfNewerVersion = self::isV2Newer('1.3.17',trim($infoFileLines[0])); return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0)); } else { return array("status" => "ERROR","msg" => "Info file not valid","url" => $url); diff --git a/webapp/php/utilities/pdfexport.php b/webapp/php/utilities/pdfexport.php index 78f22c0..e1b7fa8 100644 --- a/webapp/php/utilities/pdfexport.php +++ b/webapp/php/utilities/pdfexport.php @@ -166,6 +166,7 @@ class PdfExport extends FPDF { $netto = str_replace(".",$this->decpoint,$netto_orig); $tax = str_replace(".",$this->decpoint,$tax_orig); $signature = $zeile['signature']; + $dbstatus = $zeile['status']; $status = $zeile['status']; if ($status == 'x') { $status = self::osGetSaleItemName($l,"laterCancelled"); @@ -186,7 +187,7 @@ class PdfExport extends FPDF { $paymentname = '"' . addslashes($zeile['payway']) . '"'; $host = ($zeile['host'] == 1 ? "x" : "-"); - if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature)) { + if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature, $dbstatus)) { echo "Database is inconsistent! Bill $billid "; if ($zeile['status'] == "c") { echo '- a cash operation ("Bareinlage/Barauslage"). '; diff --git a/webapp/preferences.html b/webapp/preferences.html index 1927c17..e3dfd82 100644 --- a/webapp/preferences.html +++ b/webapp/preferences.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/products.html b/webapp/products.html index 7035dbd..54dc0f9 100644 --- a/webapp/products.html +++ b/webapp/products.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/rating.html b/webapp/rating.html index b214842..55e78c7 100644 --- a/webapp/rating.html +++ b/webapp/rating.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reports.html b/webapp/reports.html index ba86c8c..96de812 100644 --- a/webapp/reports.html +++ b/webapp/reports.html @@ -7,7 +7,7 @@ - + diff --git a/webapp/reservation.html b/webapp/reservation.html index 0b4f586..71f4f7a 100644 --- a/webapp/reservation.html +++ b/webapp/reservation.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/supplydesk.html b/webapp/supplydesk.html index a4eed69..77fd8bf 100644 --- a/webapp/supplydesk.html +++ b/webapp/supplydesk.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/waiter.html b/webapp/waiter.html index 060b309..d30bb16 100644 --- a/webapp/waiter.html +++ b/webapp/waiter.html @@ -4,8 +4,8 @@ - - + +

Betriebe-Tabelle managen
@@ -36,6 +35,3 @@

- - - diff --git a/spider/index.html b/spider/index.html index ee16a18..f9fa0e4 100644 --- a/spider/index.html +++ b/spider/index.html @@ -38,7 +38,7 @@ function handleResultOfInstallCheck(is_installed) { function handleLoginResult(status) { if (status == "Yes") { // user could be logged in - reloadPage("overview.html"); + reloadPage("overview.php"); } else { // user entered wrong access code alert("Falscher Zugangscode"); diff --git a/spider/install/installer.php b/spider/install/installer.php index a69d00e..bd4cf38 100644 --- a/spider/install/installer.php +++ b/spider/install/installer.php @@ -85,7 +85,7 @@ class Installer { } Database::dropTables($pdo); Database::createEmptyTables($pdo, $prefix); - Database::setVersion($pdo,$prefix,"1.3.16"); + Database::setVersion($pdo,$prefix,"1.3.17"); Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour return array("status" => "OK","msg" => "Installation successful"); diff --git a/spider/js/clientset.js b/spider/js/clientset.js index 0d121f3..d2ec30d 100644 --- a/spider/js/clientset.js +++ b/spider/js/clientset.js @@ -57,7 +57,7 @@ ClientSet.bindRateSelection = function() { } ClientSet.reloadOverviewPage = function() { - reloadPage("overview.html"); + reloadPage("overview.php"); }; diff --git a/spider/overview.html b/spider/overview.php similarity index 96% rename from spider/overview.html rename to spider/overview.php index bf8d89d..a18b32c 100644 --- a/spider/overview.html +++ b/spider/overview.php @@ -81,9 +81,6 @@ $( document ).ready(function() { $.ajaxSetup({ cache: false }); doAjax("GET","php/generals.php?command=getSpiderVersion",null,insertSpiderVersion,null); - - $("#clientoviewarea").load("clientset.html"); - $("#clientsdetailsarea").load("clientdetails.html"); doAjax("POST","php/generals.php?command=isUserLoggedIn",null,handleLoginStatus,null); bindLogout(); @@ -122,7 +119,9 @@ $( document ).ready(function() {

+

+

@@ -132,7 +131,10 @@ $( document ).ready(function() {

-
+ +
+ +
diff --git a/spider/php/clients.php b/spider/php/clients.php index 5e1e5f8..2dc5d3d 100644 --- a/spider/php/clients.php +++ b/spider/php/clients.php @@ -132,7 +132,7 @@ function saveclients() { $sql = "SELECT * FROM %clients%"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(); - $retStr = json_encode($stmt->fetchAll()); + $retStr = json_encode($stmt->fetchAll(PDO::FETCH_ASSOC)); header("Pragma: public"); header("Expires: 0"); @@ -155,12 +155,12 @@ function saveclients() { function readclients() { if ($_FILES['userfile']['error'] != UPLOAD_ERR_OK //checks for errors && is_uploaded_file($_FILES['userfile']['tmp_name'])) { //checks that file is uploaded - header("Location: ../infopage.html?e=overview.html=Kann_Datei_nicht_laden."); + header("Location: ../infopage.html?e=overview.php=Kann_Datei_nicht_laden."); exit(); } if(!file_exists($_FILES['userfile']['tmp_name']) || !is_uploaded_file($_FILES['userfile']['tmp_name'])) { - header("Location: ../infopage.html?e=overview.html=Datei_nicht_angegeben."); + header("Location: ../infopage.html?e=overview.php=Datei_nicht_angegeben."); exit(); } @@ -174,11 +174,11 @@ function readclients() { foreach ($content as $client) { $sql = "INSERT INTO %clients% (`id` , `name`,`url`,`remoteaccesscode`,`basicauthuser`,`basicauthpass`,`remark`) VALUES (NULL,?,?,?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); - $stmt->execute(array($client->name,$client->url,$client->code,$client->basicauthuser,$client->basicauthpass,$client->remark)); + $stmt->execute(array($client->name,$client->url,$client->remoteaccesscode,$client->basicauthuser,$client->basicauthpass,$client->remark)); } $pdo->commit(); - header("Location: ../infopage.html?i=overview.html=Import_war_erfolgreich."); /* Browser umleiten */ + header("Location: ../infopage.html?i=overview.php=Import_war_erfolgreich."); /* Browser umleiten */ exit; } diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe index efc07b5..d7180a5 100644 Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ diff --git a/webapp/bar.html b/webapp/bar.html index 718034f..88a463a 100644 --- a/webapp/bar.html +++ b/webapp/bar.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/bill.html b/webapp/bill.html index f0952d3..cf31202 100644 --- a/webapp/bill.html +++ b/webapp/bill.html @@ -5,7 +5,7 @@ - + diff --git a/webapp/elements/dash.js b/webapp/elements/dash.js index 0267e93..9af9785 100644 --- a/webapp/elements/dash.js +++ b/webapp/elements/dash.js @@ -66,35 +66,35 @@ function Dash() { this.createDurationReport = function(slotid,hourdata,currency) { $(slotid + " h1").html('Verweildauer (Minuten)'); - this.createDashReport(slotid,hourdata,'Verweildauer (Minuten)',"hour","average",'line'); + this.createDashReport(slotid,hourdata,'Verweildauer (Minuten)',"hour","average",'line','Dauer','Uhrzeit'); }; this.createMonthReport = function(slotid,monthdata,currency) { $(slotid + " h1").html('Monatseinnahme (' + currency + ")"); - this.createDashReport(slotid,monthdata.content,'Monatseinnahme (' + currency + ")","iter","sum",'line'); + this.createDashReport(slotid,monthdata.content,'Monatseinnahme (' + currency + ")","iter","sum",'line','Summe','Tag'); }; this.createDayReport = function(slotid,monthdata,currency) { $(slotid + " h1").html('Tagesseinnahmen (' + currency + ")"); - this.createDashReport(slotid,monthdata.content,'Tageseinnahmen (' + currency + ")","iter","sum",'line'); + this.createDashReport(slotid,monthdata.content,'Tageseinnahmen (' + currency + ")","iter","sum",'line','Summe','Stunde'); }; this.createUserCash = function(slotid,usersums,currency) { $(slotid + " h1").html('Kellnereinnahmen (' + currency + ")","iter","sum",'bar'); - this.createDashReport(slotid,usersums.content,'Einnahmen (' + currency + ")","iter","sum",'bar'); + this.createDashReport(slotid,usersums.content,'Einnahmen (' + currency + ")","iter","sum",'bar','Summe','Benutzer'); }; this.createProdCountReport = function(slotid,prodcount,currency) { $(slotid + " h1").html('Anzahl verkaufte Produkte','longname','value','bar'); - this.createDashReport(slotid,prodcount,'Anzahl verkaufte Produkte','longname','value','bar'); + this.createDashReport(slotid,prodcount,'Anzahl verkaufte Produkte','longname','value','bar', 'Anzahl','Produkt'); }; this.createProdSumReport = function(slotid,prodcount,currency) { $(slotid + " h1").html('Umsatz verkaufte Produkte (' + currency + ')','longname','value','bar'); - this.createDashReport(slotid,prodcount,'Umsatz verkaufte Produkte (' + currency + ')','longname','value','bar'); + this.createDashReport(slotid,prodcount,'Umsatz verkaufte Produkte (' + currency + ')','longname','value','bar', 'Summe','Produkt'); }; - this.createDashReport = function(slotid,prodcount,label,nameLabel,valueLabel,chartType) { + this.createDashReport = function(slotid,prodcount,label,nameLabel,valueLabel,chartType, ylabel, xlabel) { var values = []; var names = []; @@ -131,6 +131,10 @@ function Dash() { ticks: { beginAtZero:true, fontColor: "#CCC", // this here + }, + scaleLabel: { + display: true, + labelString: ylabel } }], xAxes:[{ @@ -138,8 +142,12 @@ function Dash() { color:"rgba(255,255,255,0.5)", zeroLineColor:"rgba(255,255,255,0.5)" }, + scaleLabel: { + display: true, + labelString: xlabel + } }], - }, + }, animation: false, legend: { diff --git a/webapp/feedback.html b/webapp/feedback.html index 2e731d3..f725316 100644 --- a/webapp/feedback.html +++ b/webapp/feedback.html @@ -4,7 +4,7 @@ - + diff --git a/webapp/index.html b/webapp/index.html index 8a101fe..c09c486 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -9,8 +9,8 @@ - - + + @@ -206,7 +206,7 @@ function handleResultOfInstallCheck(is_installed) { if (is_installed == "Yes") { useInstallation(); } else { - setTimeout(function(){document.location.href = "install.html?v=1.3.16"},500); + setTimeout(function(){document.location.href = "install.html?v=1.3.17"},500); } } @@ -251,7 +251,7 @@ $(document).on("pageinit", "#index-page", function () {
Passwort: +
Passwort:
  - +