OrderSprinter 1.2.8
This commit is contained in:
parent
19372fbca8
commit
c85966dcbb
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
.groupitem{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;background-color:Gray;width:100px;height:30px;margin:10px;border:2px solid;border-top-right-radius:2em;border-bottom-right-radius:2em;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888}.groupitemchoice{background-color:#ffece4;width:100px;height:30px;margin:10px;border-radius:2px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888}.groupitemchoiceselected{background-color:#ddece4;width:100px;height:30px;margin:10px;border-radius:2px;border:2px solid red;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888}
|
||||
.groupitem{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white;background-color:Gray;width:100px;height:30px;margin:10px;border:2px solid;border-top-right-radius:2em;border-bottom-right-radius:2em;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word;white-space:pre-line;overflow:hidden}.groupitemchoice{background-color:#ffece4;width:100px;height:30px;margin:10px;border-radius:2px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word;white-space:pre-line;overflow:hidden}.groupitemchoiceselected{background-color:#ddece4;width:100px;height:30px;margin:10px;border-radius:2px;border:2px solid red;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word;white-space:pre-line;overflow:hidden}
|
|
@ -1 +1 @@
|
|||
html{overflow-y:scroll}.ospage{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.header{background:black}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}#loggedinuser{text-align:left;width:50%}#versioninfo{text-align:right;color:white;width:50%}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.footer{order:5}}.input100{width:100%;height:50px}.input50{width:49%;height:50px}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.inputblue[type="text"]{background-color:#8ee5ee}.inputblue[type="submit"]{background-color:#8ee5ee}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.extraitem:last-child{border-bottom:0}#loggedinuser{color:black}.buttonarea{box-shadow:10px 10px 5px #888}
|
||||
html{overflow-y:scroll}.ospage{display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;text-align:center;color:white}.ospage>*{padding:10px;flex:100%}.main{text-align:left;background:cornflowerblue;-webkit-flex:5;flex:5;-webkit-flex-flow:nowrap;flex-flow:nowrap}.header{background:black}.footer{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-flex-wrap:row nowrap;flex-flow:row nowrap;background:black;-webkit-align-items:stretch;align-items:stretch}#loggedinuser{text-align:left;width:50%}#versioninfo{text-align:right;color:white;width:50%}.aside1{background:moccasin;color:black;width:0;-webkit-flex:2;flex:2}.aside2{background:violet;-webkit-flex:1;flex:1}@media all and (min-width:400px){.aside1{order:1}.main{order:2}.aside2{order:3}.ordereditem-sentcontainer{order:4}.footer{order:5}}.input100{width:100%;height:50px;font-weight:bold;text-align:center}.input50{width:49%;height:50px;font-weight:bold;text-align:center}.inputwhite[type="text"]{background-color:white}.inputwhite[type="submit"]{background-color:white}.inputgreen[type="text"]{background-color:#0f0}.inputgreen[type="submit"]{background-color:#0f0}.inputblue[type="text"]{background-color:#8ee5ee}.inputblue[type="submit"]{background-color:#8ee5ee}.infoarea{width:49%;background-color:#afa;color:black;font-weight:bold;font-size:20px;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;border:2px solid red}.mainmenuchoice{list-style-type:none;padding:0;border:1px solid #ddd}.mainmenuitem{padding:8px 16px;border-bottom:1px solid #ddd;background-color:#fff6b5;height:40px;font-size:16px;font-weight:bold}.mainmenuitem:hover{background-color:#eed33f}.extraitem:last-child{border-bottom:0}#loggedinuser{color:black}.buttonarea{box-shadow:10px 10px 5px #888}
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -679,7 +679,7 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.2.7</button>
|
||||
<button id="updatebtn">Update -> 1.2.8</button>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
|
@ -1386,6 +1386,27 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1207_1208($prefix, $version, $dbname) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
if ($version != "1.2.7") {
|
||||
$ret = $this->updateUserTable1206_1207($prefix, $version, $dbname);
|
||||
if (!$ret) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$this->basedb->createLogTable($pdo);
|
||||
|
||||
$this->updateVersion($pdo, '1.2.8');
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setVersion($prefix,$theVersion) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
|
@ -1444,6 +1465,7 @@ $this->basedb->setTimeZone($timezone);
|
|||
|
||||
$this->basedb->dropTables($pdo);
|
||||
|
||||
$this->basedb->createLogTable($pdo);
|
||||
$this->basedb->createRatingsTable($pdo);
|
||||
$this->createPaymentTable($pdo);
|
||||
$this->basedb->createUserTable($pdo);
|
||||
|
@ -1498,7 +1520,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
|||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.7')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.8')");
|
||||
$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')");
|
||||
|
@ -1867,7 +1889,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
|
||||
$installerVersion = "1.2.7";
|
||||
$installerVersion = "1.2.8";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
@ -1897,7 +1919,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
|||
"1.0.40","1.0.41","1.0.42","1.0.43",
|
||||
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
|
||||
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
||||
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6"
|
||||
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -1905,7 +1927,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1206_1207($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1207_1208($_POST['prefix'], $version, $_POST['db']);
|
||||
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -888,16 +888,27 @@ function isNumeric(n) {
|
|||
|
||||
function startCreateClosing(remark) {
|
||||
if (unpaidTables.length == "") {
|
||||
hideClosingBtn();
|
||||
doAjax("POST","php/contenthandler.php?module=closing&command=createClosing",{ remark: remark },createClosing,"Tagesabschluss");
|
||||
} else {
|
||||
|
||||
|
||||
areYouSure("Tageserfassung", MAN_UNPAID1[lang] + unpaidTables + ". " + MAN_UNPAID2[lang], MAN_YES[lang], function() {
|
||||
doAjax("POST","php/contenthandler.php?module=closing&command=createClosing",{ remark: remark },createClosing,"Tagesabschluss");
|
||||
});
|
||||
hideClosingBtn();
|
||||
doAjax("POST","php/contenthandler.php?module=closing&command=createClosing",{ remark: remark },createClosing,"Tagesabschluss");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function hideClosingBtn() {
|
||||
$("#closingwaiticon").show();
|
||||
$("#createclosing").hide();
|
||||
}
|
||||
|
||||
function showClosingBtn() {
|
||||
$("#closingwaiticon").hide();
|
||||
$("#createclosing").show();
|
||||
}
|
||||
|
||||
function binding() {
|
||||
$("#createclosing").off("click").on("click", function (e) {
|
||||
|
@ -1118,7 +1129,9 @@ function binding() {
|
|||
window.open("php/contenthandler.php?module=bill&command=exportPdfReport&" + dateparams,'_blank');
|
||||
} else if (theId == "createpdfsummary") {
|
||||
window.open("php/contenthandler.php?module=bill&command=exportPdfSummary&" + dateparams,'_blank');
|
||||
}
|
||||
} else if (theId == "createlogexport") {
|
||||
window.open("php/contenthandler.php?module=admin&command=exportLog",'_blank');
|
||||
}
|
||||
});
|
||||
|
||||
$("#changeroomsize").off("click").on("click", function (e) {
|
||||
|
@ -1342,6 +1355,7 @@ function hasChangedData(idOfElem) {
|
|||
}
|
||||
|
||||
function createClosing(closingresult) {
|
||||
showClosingBtn();
|
||||
requestUnpaidTables();
|
||||
setMonthYearSelection();
|
||||
getLastClosings();
|
||||
|
@ -2247,6 +2261,7 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
|
||||
<input type="text" id="remarkfield" value="" data-mini="true" placeholder="Bemerkung" />
|
||||
<button type="submit" data-theme="f" class="cancelButton" data-icon="plus" id="createclosing">Erstellen</button>
|
||||
<img id="closingwaiticon" src="php/3rdparty/images/ajax-loader.gif" style="display:none;"/>
|
||||
|
||||
<div id=partofclosings>
|
||||
<div data-role="collapsible" data-theme="d" data-content-theme="d">
|
||||
|
@ -2299,6 +2314,7 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createprodexport">Export Produktdaten</button>
|
||||
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createuserexport">Export Benutzerdaten</button>
|
||||
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createconfigexport">Export Konfiguration</button>
|
||||
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createlogexport">Export Log</button>
|
||||
</form>
|
||||
</div><!-- Datenexport -->
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,6 +61,7 @@ class Admin {
|
|||
|
||||
"exportConfigCsv" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||
"exportUserCsv" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||
"exportLog" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||
"setOrderVolume" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setKeepTypeLevel" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
|
@ -217,6 +218,10 @@ class Admin {
|
|||
if ($this->isCurrentUserAdmin() || $this->hasCurrentUserRight('right_manager')) {
|
||||
$this->exportUserCsv();
|
||||
}
|
||||
} else if ($command == 'exportLog') {
|
||||
if ($this->isCurrentUserAdmin() || $this->hasCurrentUserRight('right_manager')) {
|
||||
$this->exportLog();
|
||||
}
|
||||
} else if ($command == 'setOrderVolume') {
|
||||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->setOrderVolume($_POST['volume']);
|
||||
|
@ -1069,7 +1074,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.2.7");
|
||||
echo json_encode($view . "?v=1.2.8");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1286,24 +1291,24 @@ class Admin {
|
|||
|
||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.8"); };
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.7"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.2.8"); };
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.8"); };
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.8"); };
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.7"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.7"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.7");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.7");
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.8"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.8"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.8");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.8");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1312,7 +1317,7 @@ class Admin {
|
|||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
// CAUTION: change version also in config.txt!!!
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.7",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.8",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1882,6 +1887,16 @@ class Admin {
|
|||
}
|
||||
}
|
||||
|
||||
private function exportLog() {
|
||||
header("Content-type: text/plain");
|
||||
header("Content-Disposition: attachment; filename=server.log");
|
||||
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
echo CommonUtils::getLog($pdo);
|
||||
}
|
||||
|
||||
private function exportUserCsv() {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$this->writeCsvHeader("datenexport-benutzer.csv");
|
||||
|
@ -1958,7 +1973,7 @@ class Admin {
|
|||
}
|
||||
|
||||
private function getAllTablesToBackupRestore() {
|
||||
return array("closing","logo","printjobs","ratings","work","payment","room","resttables","tablepos","tablemaps","pricelevel","prodtype","products","config",
|
||||
return array("log","closing","logo","printjobs","ratings","work","payment","room","resttables","tablepos","tablemaps","pricelevel","prodtype","products","config",
|
||||
"user","reservations","bill","queue","billproducts","comments","histprod","histconfig","histuser","histactions","hist","extras","extrasprods","queueextras");
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,11 @@ class Bill {
|
|||
}
|
||||
if ($command == 'doCashAction') {
|
||||
if ($this->hasCurrentUserPaydeskRights()) {
|
||||
$this->doCashAction($_POST['money']);
|
||||
$remark = "";
|
||||
if(isset($_POST["remark"])) {
|
||||
$remark = $_POST['remark'];
|
||||
}
|
||||
$this->doCashAction($_POST['money'],$remark);
|
||||
} else {
|
||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_PAYDESK_NOT_AUTHOTRIZED, "msg" => ERROR_PAYDESK_NOT_AUTHOTRIZED_MSG));
|
||||
}
|
||||
|
@ -327,7 +331,7 @@ class Bill {
|
|||
/*
|
||||
* insert or take out cash money. The direction done by sign of $money value
|
||||
*/
|
||||
private function doCashAction($money) {
|
||||
private function doCashAction($money,$remark) {
|
||||
// current time
|
||||
date_default_timezone_set(DbUtils::getTimeZone());
|
||||
$currentTime = date('Y-m-d H:i:s');
|
||||
|
@ -359,9 +363,9 @@ class Bill {
|
|||
$commonUtils = new CommonUtils();
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $money, $money, 0.0, $userId);
|
||||
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`signature`) VALUES ( ?, ? , ?,?,?, ?, 'c', ?,?,?,?)";
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`reason`,`signature`) VALUES ( ?, ? , ?,?,?, ?, 'c', ?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array($nextbillid,$currentTime,$money,$money,'0.00',-1,1,$userId,NULL,$signature));
|
||||
$stmt->execute(array($nextbillid,$currentTime,$money,$money,'0.00',-1,1,$userId,NULL,$remark,$signature));
|
||||
|
||||
$lastId = $pdo->lastInsertId();
|
||||
$prevbrutto = 0;
|
||||
|
|
|
@ -202,6 +202,8 @@ array(
|
|||
$newversionavailable = @file_get_contents($url, false, $ctx);
|
||||
// TODO: has to be forwarded to user to inform him
|
||||
|
||||
CommonUtils::keepOnlyLastLog($pdo);
|
||||
// call plugin after completion of closing
|
||||
CommonUtils::callPlugin($pdo, "createClosing", "after");
|
||||
|
||||
echo json_encode(array("status" => "OK", "msg" => $content));
|
||||
|
|
|
@ -311,5 +311,43 @@ class CommonUtils {
|
|||
} catch(Exception $e) { }
|
||||
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 getLog($pdo) {
|
||||
$sql = "SELECT date,component,message FROM %log%";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
$txt = "";
|
||||
foreach ($result as $aLogLine) {
|
||||
$txt .= $aLogLine["date"] . ";" . $aLogLine["component"] . ";" . $aLogLine["message"] . "\n";
|
||||
}
|
||||
return $txt;
|
||||
}
|
||||
|
||||
public static function getLastLog($pdo) {
|
||||
$sql = "SELECT date,component,message FROM %log% WHERE DATE_SUB(NOW(),INTERVAL 2 HOUR) <= date";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
$txt = "";
|
||||
foreach ($result as $aLogLine) {
|
||||
$txt .= $aLogLine["date"] . ";" . $aLogLine["component"] . ";" . $aLogLine["message"] . "\n";
|
||||
}
|
||||
return $txt;
|
||||
}
|
||||
|
||||
public static function keepOnlyLastLog($pdo) {
|
||||
$sql = "DELETE FROM %log% WHERE DATE_SUB(NOW(),INTERVAL 2 HOUR) > date";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -130,6 +130,7 @@ class DbUtils {
|
|||
|
||||
$out = str_replace("%reservations%",$prefix . 'reservations',$out);
|
||||
$out = str_replace("%logo%",$prefix . 'logo',$out);
|
||||
$out = str_replace("%log%",$prefix . 'log',$out);
|
||||
$out = str_replace("%extras%", $prefix . 'extras',$out);
|
||||
$out = str_replace("%extrasprods%",$prefix . 'extrasprods', $out);
|
||||
$out = str_replace("%queueextras%",$prefix . 'queueextras', $out);
|
||||
|
@ -203,6 +204,5 @@ class DbUtils {
|
|||
array("col" => 'audio', "hist" => 1),
|
||||
array("col" => 'removed', "hist" => 0)
|
||||
);
|
||||
|
||||
}
|
||||
?>
|
|
@ -69,6 +69,8 @@ class PrintQueue {
|
|||
$this->clearprintjobs($pdo);
|
||||
} else if ($command == 'batchReceiptPrintJob') {
|
||||
$this->batchReceiptPrintJob($_POST['start'],$_POST['end']);
|
||||
} else if ($command == 'getLastLog') {
|
||||
$this->getLastLog($_POST['pass']);
|
||||
} else {
|
||||
echo "Kommando nicht erkannt!";
|
||||
}
|
||||
|
@ -100,7 +102,7 @@ class PrintQueue {
|
|||
header( "Pragma: no-cache" );
|
||||
header( "Content-Type: text/html; charset=utf8" );
|
||||
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,true);
|
||||
$isCorrect = $this->isPasswordCorrect(null,$md5pass,true);
|
||||
if ($isCorrect) {
|
||||
echo "ok";
|
||||
} else {
|
||||
|
@ -121,6 +123,10 @@ class PrintQueue {
|
|||
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
|
||||
$stmt->execute(array($content,intval($kind) + 1,$printer));
|
||||
|
||||
$idOfWorkJob = $pdo->lastInsertId();
|
||||
|
||||
CommonUtils::log($pdo,"QUEUE","Create work job with id=$idOfWorkJob for tableid $table from user $username of kind $kind for printer=$printer");
|
||||
}
|
||||
|
||||
function getPrintJobOverview($pdo) {
|
||||
|
@ -223,6 +229,8 @@ class PrintQueue {
|
|||
// now get receipt info from bill table
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
CommonUtils::log($pdo, "PRINTQUEUE", "Insert bill with id=$billid for printer=$printer into queue.");
|
||||
|
||||
$sql = "SELECT setting FROM %config% WHERE name=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array("addreceipttoprinter"));
|
||||
|
@ -259,6 +267,8 @@ class PrintQueue {
|
|||
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
CommonUtils::log($pdo, "PRINTQUEUE", "Insert closing with id=$closingid for printer=$printer into queue.");
|
||||
|
||||
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($printInsertSql));
|
||||
$stmt->execute(array((string)($closingid),'4',$printer));
|
||||
|
@ -274,9 +284,11 @@ class PrintQueue {
|
|||
return $row->setting;
|
||||
}
|
||||
|
||||
function isPasswordCorrect($pass,$verbose) {
|
||||
function isPasswordCorrect($pdo,$pass,$verbose) {
|
||||
if (is_null($pdo)) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
}
|
||||
$sql = "SELECT setting FROM %config% WHERE name=?";
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array("printpass"));
|
||||
$row =$stmt->fetchObject();
|
||||
|
@ -363,10 +375,11 @@ class PrintQueue {
|
|||
}
|
||||
|
||||
function getNextClosingPrintJobs($md5pass,$language,$fl=0) {
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,false);
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
if ($isCorrect) {
|
||||
ob_start();
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
|
||||
$this->saveLastPrintServerAccess($pdo);
|
||||
|
||||
$closing = new Closing();
|
||||
|
@ -400,13 +413,24 @@ class PrintQueue {
|
|||
return $row->setting;
|
||||
}
|
||||
|
||||
function getLastLog ($md5pass) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
if ($isCorrect || true) {
|
||||
echo json_encode(CommonUtils::getLastLog($pdo));
|
||||
} else {
|
||||
echo json_encode("Log file from server unavaible due to wrong printcode");
|
||||
}
|
||||
}
|
||||
|
||||
function getNextReceiptPrintJobs($md5pass,$language,$printers,$fl) {
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,false);
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
if ($isCorrect) {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getReceipts: p=$printers, fl=$fl");
|
||||
ob_start();
|
||||
$printersArr = explode ( ',', $printers );
|
||||
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$this->saveLastPrintServerAccess($pdo);
|
||||
|
||||
$template = $this->getTemplate($pdo, "rectemplate");
|
||||
|
@ -425,11 +449,14 @@ class PrintQueue {
|
|||
|
||||
$result = $stmt->fetchAll();
|
||||
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextReceiptPrintJobs: retrieve " . count($result) . " jobs");
|
||||
|
||||
$billarray = array();
|
||||
foreach($result as $aBill) {
|
||||
$printJobId = $aBill['id'];
|
||||
$aBillId = $aBill["content"];
|
||||
$printer = $aBill["printer"];
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextReceiptPrintJobs: collect bill with id=$aBillId for printer=$printer");
|
||||
|
||||
if (in_array($printer, $printersArr)) {
|
||||
if (is_null($fl)) {
|
||||
|
@ -442,7 +469,9 @@ class PrintQueue {
|
|||
}
|
||||
echo json_encode($billarray);
|
||||
ob_end_flush();
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextReceiptPrintJobs: sent data to caller");
|
||||
} else {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextReceiptPrintJobs: Wrong printcode");
|
||||
echo json_encode(array());
|
||||
}
|
||||
}
|
||||
|
@ -456,10 +485,11 @@ class PrintQueue {
|
|||
}
|
||||
|
||||
function getNextWorkPrintJobs($md5pass,$theType,$printer,$fl) {
|
||||
$isCorrect = $this->isPasswordCorrect($md5pass,false);
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
|
||||
|
||||
if ($isCorrect) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: type = $theType, printer = $printer, fl= $fl");
|
||||
$this->saveLastPrintServerAccess($pdo);
|
||||
|
||||
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
|
||||
|
@ -480,10 +510,12 @@ class PrintQueue {
|
|||
}
|
||||
|
||||
$result = $stmt->fetchAll();
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: retrieve " . count($result) . " jobs");
|
||||
|
||||
$workarray = array();
|
||||
foreach($result as $aWorkJob) {
|
||||
$aWork = json_decode($aWorkJob["content"]); // is in json format
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: collect work receipt with id=" . $aWorkJob["id"] . " for printer=$printer");
|
||||
if ($fl >= 2) {
|
||||
$workarray[] = array("id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => intval($bigFontWorkReceipt), "template" => $template);
|
||||
} else {
|
||||
|
@ -491,16 +523,18 @@ class PrintQueue {
|
|||
$workarray[] = array("id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => intval($bigFontWorkReceipt));
|
||||
}
|
||||
}
|
||||
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: sent data to caller");
|
||||
echo json_encode($workarray);
|
||||
} else {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: wrong printcode");
|
||||
echo json_encode(array());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function deletePrintJob($pass,$id) {
|
||||
$isCorrect = $this->isPasswordCorrect($pass,false);
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$isCorrect = $this->isPasswordCorrect($pdo,$pass,false);
|
||||
if ($isCorrect) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$this->saveLastPrintServerAccess($pdo);
|
||||
|
@ -510,6 +544,7 @@ class PrintQueue {
|
|||
$stmt->execute(array($id));
|
||||
echo json_encode(array("status" => "OK", "code" => OK, "msg" => "Druckauftrag erfolgreich gelöscht."));
|
||||
} else {
|
||||
CommonUtils::log($pdo,"PRINTQUEUE", "deletePrintJob: wrong printcode");
|
||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_NOT_AUTHOTRIZED, "msg" => ERROR_NOT_AUTHOTRIZED_MSG));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1717,6 +1717,8 @@ class QueueContent {
|
|||
|
||||
CommonUtils::callPlugin($pdo, "createBill", "after");
|
||||
|
||||
CommonUtils::log($pdo, "QUEUE", "Created bill with id=$billid from user $userid");
|
||||
|
||||
echo json_encode(array("status" => "OK", "msg" => $billInfo));
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ class Basedb {
|
|||
$out = str_replace("%comments%",$this->prefix . "comments",$out);
|
||||
$out = str_replace("%reservations%",$this->prefix . "reservations",$out);
|
||||
$out = str_replace("%logo%",$this->prefix . "logo",$out);
|
||||
$out = str_replace("%log%",$this->prefix . "log",$out);
|
||||
$out = str_replace("%extras%",$this->prefix . "extras",$out);
|
||||
$out = str_replace("%extrasprods%",$this->prefix . "extrasprods", $out);
|
||||
$out = str_replace("%queueextras%",$this->prefix . "queueextras", $out);
|
||||
|
@ -153,6 +154,7 @@ class Basedb {
|
|||
$this->doSQLcatch($pdo, "drop TABLE `%payment%`");
|
||||
|
||||
$this->doSQLcatch($pdo, "drop TABLE `%logo%`");
|
||||
$this->doSQLcatch($pdo, "drop TABLE `%log%`");
|
||||
}
|
||||
|
||||
function dropTablesNoCatch($pdo) {
|
||||
|
@ -186,6 +188,20 @@ class Basedb {
|
|||
$this->doSQL($pdo, "drop TABLE `%room%`");
|
||||
$this->doSQL($pdo, "drop TABLE `%payment%`");
|
||||
$this->doSQL($pdo, "drop TABLE `%logo%`");
|
||||
$this->doSQL($pdo, "drop TABLE `%log%`");
|
||||
}
|
||||
|
||||
function createLogTable($pdo) {
|
||||
$sql = "
|
||||
CREATE TABLE `%log%` (
|
||||
`id` INT (3) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`date` DATETIME NULL,
|
||||
`component` VARCHAR ( 20 ) NULL,
|
||||
`message` VARCHAR ( 500 ) NULL
|
||||
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb
|
||||
";
|
||||
$stmt = $pdo->prepare($this->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
function createPaymentTable($pdo) {
|
||||
|
@ -708,6 +724,7 @@ class Basedb {
|
|||
|
||||
function createEmptyTables($pdo)
|
||||
{
|
||||
$this->createLogTable($pdo);
|
||||
$this->createPaymentTable($pdo);
|
||||
$this->createUserTable($pdo);
|
||||
$this->createRoomTable($pdo);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -41,6 +41,7 @@ function initializeMainMenu(menuid) {
|
|||
}
|
||||
|
||||
function intervalGetPrinterStatus(seconds) {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=isPrinterServerActive",null,setPrinterStatus,null,true);
|
||||
var fetchTimer = setInterval(function() {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=isPrinterServerActive",null,setPrinterStatus,null,true);
|
||||
}, seconds * 1000);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1326,6 +1326,8 @@ var W_SELALL = ["Alles auswählen","Select all","Elegir todo"];
|
|||
var W_UNSELALL = ["Alles abwählen","Unselect all","No elegir nada"];
|
||||
var W_NO_PRODS_SELECTED = ["Es wurden keine Produkte ausgewählt!","You have not chosen any products!","No ha seleccionado ningún producto!"];
|
||||
|
||||
var P_CASHACTION_OK = ["Kassenaktion abgeschlossen.","Action completed.","Acción terminado."];
|
||||
|
||||
$(document).ready(function(){
|
||||
selectedroomindex = null;
|
||||
productFilter = null;
|
||||
|
@ -1336,6 +1338,7 @@ $(document).ready(function(){
|
|||
getMenuInBackground(60);
|
||||
getPayments(savePayments);
|
||||
getHostTemplate();
|
||||
intervalGetPrinterStatus(5);
|
||||
});
|
||||
|
||||
function savePayments(allPayments) {
|
||||
|
@ -1587,6 +1590,7 @@ function displayRightButtons() {
|
|||
$("#paydeskbtn").show();
|
||||
}
|
||||
$("#hostbutton").hide();
|
||||
$("#cashbutton").hide();
|
||||
$("#paydeskcash").hide();
|
||||
$("#paydeskprint").hide();
|
||||
$("#goorderbtn").hide();
|
||||
|
@ -1605,6 +1609,7 @@ function displayRightButtons() {
|
|||
// REM* paydesk
|
||||
$("#paydeskbtn").hide();
|
||||
$("#hostbutton").show();
|
||||
$("#cashbutton").show();
|
||||
if (prodsaccounted.length > 0) {
|
||||
// REM* there are orders so show buttons
|
||||
$("#paydeskcash").show();
|
||||
|
@ -1815,13 +1820,19 @@ function bindActBtn() {
|
|||
actcount++;
|
||||
} else if (cmd === "actdiscount1btn") {
|
||||
actprice = origprice - origprice * discount1/100;
|
||||
$("#actpricefield").val(actprice.toString().replace(".", decpoint));
|
||||
var modifiedPrice = actprice.toFixed(2).replace(".", decpoint);
|
||||
$("#actpricefield").val(modifiedPrice);
|
||||
$("#actpriceinfo").html(modifiedPrice + " " + currency);
|
||||
} else if (cmd === "actdiscount2btn") {
|
||||
actprice = origprice - origprice * discount2/100;
|
||||
$("#actpricefield").val(actprice.toString().replace(".", decpoint));
|
||||
var modifiedPrice = actprice.toFixed(2).replace(".", decpoint);
|
||||
$("#actpricefield").val(modifiedPrice);
|
||||
$("#actpriceinfo").html(modifiedPrice + " " + currency);
|
||||
} else if (cmd === "actdiscount3btn") {
|
||||
actprice = origprice - origprice * discount3/100;
|
||||
$("#actpricefield").val(actprice.toString().replace(".", decpoint));
|
||||
var modifiedPrice = actprice.toFixed(2).replace(".", decpoint);
|
||||
$("#actpricefield").val(modifiedPrice);
|
||||
$("#actpriceinfo").html(modifiedPrice + " " + currency);
|
||||
}
|
||||
insertDataIntoActDialog();
|
||||
});
|
||||
|
@ -1992,6 +2003,7 @@ function showProductsToPay(answer) {
|
|||
|
||||
function displayProdsToPayForTable() {
|
||||
bindHostButton("#hostbutton");
|
||||
bindCashButton();
|
||||
if (prodsToPayList.length == 0) {
|
||||
$("#oben").html("Keine weiteren Artikel vorhanden.");
|
||||
} else {
|
||||
|
@ -2795,6 +2807,68 @@ function calcSum() {
|
|||
$("#priceinreceipt2").html(overallbrutto.toFixed(2).replace(".",decpoint) + " " + currency);
|
||||
}
|
||||
|
||||
|
||||
function bindCashButton() {
|
||||
$("#cashbutton").off("click").on("click", function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$("#cashdlg").dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
height: 470,
|
||||
width: 500,
|
||||
buttons: {
|
||||
"Abbrechen": function() {$(this).dialog("close"); },
|
||||
"Einlegen": function() { cashOperation("in"); },
|
||||
"Entnehmen": function() { cashOperation("out"); }
|
||||
}
|
||||
});
|
||||
$("#cashmoney").val("");
|
||||
$("#cashremark").val("");
|
||||
$("#cashdlg").dialog("open");
|
||||
|
||||
doAjax("POST", "php/contenthandler.php?module=bill&command=getCashOverviewOfUser", null, insertCashValues, "Fehler Kassenaktion");
|
||||
|
||||
$(".ui-dialog-buttonset .ui-button").css("font-weight","bold");
|
||||
$(".ui-dialog-buttonset .ui-button").css("color","black");
|
||||
$(".ui-dialog-buttonset .ui-button:nth-child(2)").css("background-color","#e0e0d1");
|
||||
$(".ui-dialog-buttonset .ui-button:nth-child(2)").css("background-color","#ccff99");
|
||||
$(".ui-dialog-buttonset .ui-button:nth-child(3)").css("background-color","#ffcc99");
|
||||
});
|
||||
}
|
||||
|
||||
function insertCashValues(jsonText) {
|
||||
$("#cashbyguests").html((parseFloat(jsonText.guestmoney).toFixed(2)).replace(".",decpoint));
|
||||
$("#cashtotal").html((parseFloat(jsonText.total).toFixed(2)).replace(".",decpoint));
|
||||
}
|
||||
|
||||
function cashOperation(direction) {
|
||||
// REM* is the value of type numeric?
|
||||
var money = $("#cashmoney").val().replace(",", ".");
|
||||
if (isNaN(money)) {
|
||||
alert("Keine Zahl!");
|
||||
} else {
|
||||
$("#cashdlg").dialog("close");
|
||||
|
||||
var remark = $("#cashremark").val();
|
||||
|
||||
if (direction === "out") {
|
||||
money = 0.0 - parseFloat(money);
|
||||
}
|
||||
|
||||
doAjax("POST", "php/contenthandler.php?module=bill&command=doCashAction", {money: money, remark: remark}, handleCashActionResult, "Fehler Kassenaktion");
|
||||
}
|
||||
}
|
||||
|
||||
function handleCashActionResult(jsonText) {
|
||||
if (jsonText.status == "ERROR") {
|
||||
alert("Fehler " + jsonText.code + ": " + jsonText.msg);
|
||||
} else if (jsonText.status == "OK") {
|
||||
alert(P_CASHACTION_OK[lang]);
|
||||
}
|
||||
}
|
||||
|
||||
function bindHostButton(hostbtnid) {
|
||||
|
||||
$("#hostbutton").off("click").on("click", function (e) {
|
||||
|
@ -2845,7 +2919,7 @@ function printBill(billid) {
|
|||
<body>
|
||||
|
||||
<div class="ospage">
|
||||
<header class="header">Kellneransicht (<span id="panelmodetxt">Bestellung</span>)</header>
|
||||
<header class="header">Kellneransicht (<span id="panelmodetxt">Bestellung</span>) <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></header>
|
||||
|
||||
<aside class="aside aside1">
|
||||
<div class="tablepanel">
|
||||
|
@ -2888,6 +2962,7 @@ function printBill(billid) {
|
|||
<div class="buttonarea">
|
||||
<input id="mainmenubtn" class="input100 inputwhite"type="submit" value="Hautmenü" />
|
||||
<input id="paydeskbtn" class="input100 inputwhite"type="submit" value="Kasse" style="display:none;"/><br>
|
||||
<input id="cashbutton" class="input100 inputwhite"type="submit" style="display:none;" value="Ein-/Auslage" />
|
||||
<input id="hostbutton" class="input100 inputwhite btnswitchoff"type="submit" style="display:none;" value="Bewirtungsbeleg" />
|
||||
<input id="paydeskcash" class="input100 inputwhite"type="submit" style="display:none;" value="Zahlung" />
|
||||
<input id="paydeskprint" class="input100 inputwhite"type="submit" style="display:none;" value="Bondruck" />
|
||||
|
@ -2960,5 +3035,21 @@ function printBill(billid) {
|
|||
</div>
|
||||
<ul id="productsToMoveList" class="extraschoice"></ul>
|
||||
</div>
|
||||
|
||||
<div id="cashdlg" title="Ein-/Auslage" style="display:none;">
|
||||
<h3><span id="cashoverviewtxt">Übersicht Kellnerkasse</span></h3>
|
||||
|
||||
<p><span id="overviewdetails">Diese Übersicht enthält die Bewirtungseinnahme durch den Kellner seit der letzten Tageslosung sowie
|
||||
als weiteren Wert den Kassenstand unter Berücksichtigung der eigenen Eingaben und Entnahmen.</span><p>
|
||||
<p><i><span id="cashsum">Bewirtungseinnahmen:</span></i> <b><span id=cashbyguests></span></b></p>
|
||||
<p><i><span id="includeowncash">inkl. eigener Kassen-Eingaben/Entnahmen:</span></i> <b><span id=cashtotal></span></b><p>
|
||||
|
||||
<div>
|
||||
<input id="cashmoney" class="input100 inputblue" type="text" placeholder="0,00"/>
|
||||
</div>
|
||||
<div>
|
||||
<input id="cashremark" class="input100 inputblue" type="text" placeholder="Bemerkung"/>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue