OrderSprinter 1.5.14
This commit is contained in:
parent
c076710ca5
commit
894e66302e
|
@ -9,8 +9,8 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.13" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.13" />
|
||||
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.14" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.14" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
||||
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<div data-role="footer" data-theme="b" id="thefooter1">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a"> OrderSprinter</div>
|
||||
<div class="ui-block-b grid_right" id="versioninfo">1.5.13 </div>
|
||||
<div class="ui-block-b grid_right" id="versioninfo">1.5.14 </div>
|
||||
</div><!-- /grid-a -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
|
|||
} else {
|
||||
echo "<html>";
|
||||
echo "<head><title>Installation Gastsystem</title>";
|
||||
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.13">';
|
||||
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.14">';
|
||||
echo "</head>";
|
||||
echo "<body><div class=surround>";
|
||||
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.13</span><br><br>";
|
||||
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.14</span><br><br>";
|
||||
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />";
|
||||
echo "<br><input type=submit value='Installation starten' class=installbtn />";
|
||||
echo "</form></div></html>";
|
||||
|
|
Binary file not shown.
|
@ -85,7 +85,7 @@ class Installer {
|
|||
}
|
||||
Database::dropTables($pdo);
|
||||
Database::createEmptyTables($pdo, $prefix);
|
||||
Database::setVersion($pdo,$prefix,"1.5.13");
|
||||
Database::setVersion($pdo,$prefix,"1.5.14");
|
||||
Database::setAccessPassword($pdo,$prefix,$adminpass);
|
||||
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
|
||||
return array("status" => "OK","msg" => "Installation successful");
|
||||
|
|
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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -13,8 +13,8 @@
|
|||
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
||||
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
|
||||
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
|
||||
<script src="utilities.js?v=1.5.13"></script>
|
||||
<script src="kitchenbar.js?v=1.5.13"></script>
|
||||
<script src="utilities.js?v=1.5.14"></script>
|
||||
<script src="kitchenbar.js?v=1.5.14"></script>
|
||||
<style>
|
||||
|
||||
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -86,7 +86,7 @@ Getränke = KBD = 1
|
|||
Weine = KBD = 1
|
||||
Wein Lambrusco; 7,00 # Kurzname:Lambrusco ; Bildnr: 10
|
||||
Wein trocken; 7,00 # Bildnr: 10
|
||||
Wein lieboich; 6,00 # Bildnr: 1
|
||||
Wein lieblich; 6,00 # Bildnr: 1
|
||||
#
|
||||
# Es folgen die Extras
|
||||
!Sahne # 0,50 ; Tasse Kaffee , Becher Kaffee
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -9,8 +9,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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -229,7 +229,7 @@ function handleResultOfInstallCheck(is_installed) {
|
|||
if (is_installed == "Yes") {
|
||||
useInstallation();
|
||||
} else {
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.5.13"},500);
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.5.14"},500);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -794,7 +794,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.5.13</button>
|
||||
<button id="updatebtn">Update -> 1.5.14</button>
|
||||
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
|
|
|
@ -14,6 +14,7 @@ require_once ('../php/utilities/decimaldefs.php');
|
|||
require_once ('../php/utilities/roles.php');
|
||||
require_once ('../php/utilities/version.php');
|
||||
require_once ('../php/admin.php');
|
||||
require_once ('../php/closing.php');
|
||||
|
||||
class ConfigWriter {
|
||||
function getConfigVals() {
|
||||
|
@ -200,37 +201,6 @@ file_put_contents("../php/config1.php", $configText);
|
|||
}
|
||||
}
|
||||
|
||||
function createSslKeys($pdo) {
|
||||
$sslconfig = array(
|
||||
"digest_alg" => "sha512",
|
||||
"private_key_bits" => 4096,
|
||||
"private_key_type" => OPENSSL_KEYTYPE_RSA,
|
||||
);
|
||||
// thus the signature is exactly 512 bytes
|
||||
|
||||
// Create the private and public key
|
||||
$res = openssl_pkey_new($sslconfig);
|
||||
if (is_null($res) || ($res=="")) {
|
||||
// openssl may be incorrectly installed
|
||||
return false;
|
||||
}
|
||||
|
||||
// Extract the private key from $res to $privKey
|
||||
openssl_pkey_export($res, $privKey);
|
||||
|
||||
// Extract the public key from $res to $pubKey
|
||||
$pubKey = openssl_pkey_get_details($res);
|
||||
$pubKey = $pubKey["key"];
|
||||
|
||||
$sql = "INSERT INTO `%work%` (`id` , `item`,`value`,`signature`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array("privkey","privkey",$privKey));
|
||||
|
||||
$sql = "INSERT INTO `%work%` (`id` , `item`,`value`,`signature`) VALUES ( NULL,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array("cert","cert",$pubKey));
|
||||
return true;
|
||||
}
|
||||
|
||||
static function insertSampleMenu($pdo,$adminCl) {
|
||||
Basedb::loadSampleProdImages($pdo);
|
||||
|
@ -369,13 +339,8 @@ echo json_encode("Fehler beim Update: " . $updResult["msg"]);
|
|||
return;
|
||||
}
|
||||
|
||||
$ok = $admin->createSslKeys($pdo);
|
||||
|
||||
$admin->signLastBillId();
|
||||
if (!$ok) {
|
||||
echo json_encode("Fehler: Ist OpenSSL richtig installiert?");
|
||||
return;
|
||||
}
|
||||
|
||||
$roleid = Roles::insertAdminRole($pdo);
|
||||
$admin->insertUser("admin", $_POST['adminpass'], $roleid, $_POST['lang'], 1);
|
||||
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
|
||||
|
@ -414,7 +379,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
set_time_limit(60*30);
|
||||
$installerVersion = "1.5.13";
|
||||
$installerVersion = "1.5.14";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -13,8 +13,8 @@
|
|||
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
||||
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
|
||||
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
|
||||
<script src="utilities.js?v=1.5.13"></script>
|
||||
<script src="kitchenbar.js?v=1.5.13"></script>
|
||||
<script src="utilities.js?v=1.5.14"></script>
|
||||
<script src="kitchenbar.js?v=1.5.14"></script>
|
||||
<style>
|
||||
|
||||
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -13,10 +13,10 @@
|
|||
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
||||
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
||||
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
|
||||
<script src="utilities.js?v=1.5.13"></script>
|
||||
<script src="elements/tablemap.js?v=1.5.13"></script>
|
||||
<script src="elements/roommap.js?v=1.5.13"></script>
|
||||
<script src="elements/groundplan.js?v=1.5.13"></script>
|
||||
<script src="utilities.js?v=1.5.14"></script>
|
||||
<script src="elements/tablemap.js?v=1.5.14"></script>
|
||||
<script src="elements/roommap.js?v=1.5.14"></script>
|
||||
<script src="elements/groundplan.js?v=1.5.14"></script>
|
||||
|
||||
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
|
||||
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
|
||||
|
@ -472,6 +472,8 @@ var MAN_PRINTPICKUPS = ["Drucke Abholbons","Pickup receipts","Imprimir tickets d
|
|||
var MAN_PRINTPICKUPS_ALWAYS = ["Immer","Always","Siempre"];
|
||||
var MAN_PRINTPICKUPS_TOGO = ["Nur für Außer-Haus-Bestellungen","Only für to-go orders","Solo para To go"];
|
||||
var MAN_PRINTPICKUP_HINT = ["Abholbons funktionieren nur in Kombination mit Arbeitsbons!","Pickup receipts only work with work receipts!","Tiquets de recogidos solo on tickets de trabajo!"];
|
||||
var MAN_BILLPRINTJOBS = ["Arb.bons-Buttons in Kassenansicht","Work receipt buttons in paydesk view","Botones de tiquets de trabajo en vista de pagar"];
|
||||
var MAN_BILPRODUCTS_HINT = ["Mit dieser Einstellung ist es möglich, in der Kassenansicht die Aufträge ausgewählter Arbeitsbons mit einem Klick auf den Kassenbon zu schieben.","With this setting it is possible to move the orders of selected work receipts in the paydesk view by 1-click to the receipt.","Con esta parametrización es posible desplazar las órdenes de los recibos de trabajo seleccionados en la vista de caja haciendo clic en el recibo de caja."];
|
||||
var MAN_LOCAL_PRINT_OPTION = ["Lokal (nicht empfohlen)","Local (not recommended)","Local (non recomendado)"];
|
||||
var MAN_SERVER_PRINT_OPTION = ["Server","Server","Servidor"];
|
||||
var MAN_SHOWHOSTPRINT = ["Bewirtungsbeleg auswählbar","Hospitality receipt selectable","recibo de hospitalidad posible"];
|
||||
|
@ -480,7 +482,7 @@ var MAN_SHOWPICKDELBTN = ["Zeige Entfernen-Button in Abholansicht","Show remove
|
|||
var MAN_SHOWPICKHELP = ["Zeige Hilfebereich","Show help area","Mostrar area de ayuda"];
|
||||
|
||||
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, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1];
|
||||
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,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1,2];
|
||||
|
||||
var numberOfClosings = 0;
|
||||
|
||||
|
@ -623,7 +625,8 @@ var generalValuesSettings = [
|
|||
["showpickupdelbtn",MAN_SHOWPICKDELBTN[lang],"s",58],
|
||||
["showpickhelp",MAN_SHOWPICKHELP[lang],"s",59],
|
||||
["showpayments",MAN_SHOWPAYMENTS[lang],"s",60],
|
||||
["cbirdfolder",MAN_CBIRD_FOLDER[lang],"i",0,""]
|
||||
["cbirdfolder",MAN_CBIRD_FOLDER[lang],"i",0,""],
|
||||
["billprintjobs",MAN_BILLPRINTJOBS[lang],"s",61]
|
||||
];
|
||||
|
||||
var predef = "";
|
||||
|
@ -950,6 +953,7 @@ function insertGeneralConfigItems(configResult) {
|
|||
$("#partOfRestaurantmode").html(createYesNo("restaurantmode",MAN_RESTAURANT_MODE, values.restaurantmode));
|
||||
$("#partOfDblog").html(createYesNo("dblog",MAN_DBLOG, values.dblog));
|
||||
$("#partOfPrintpickups").html(createPickupConfigPart(values.printpickups));
|
||||
$("#partOfBillprintjobs").html(createBillprintjobsConfigPart(values.billprintjobs));
|
||||
$("#partOfForceprint").html(createYesNo("forceprint",MAN_FORCE_PRINT, values.forceprint));
|
||||
$("#partOfPrintextras").html(createYesNo("printextras",MAN_PRINT_EXTRAS, values.printextras));
|
||||
$("#partOfPriceinlist").html(createYesNo("priceinlist",MAN_PRICE_IN_LIST, values.priceinlist));
|
||||
|
@ -1068,6 +1072,7 @@ function insertGeneralConfigItems(configResult) {
|
|||
generalVals[58] = values.showpickupdelbtn;
|
||||
generalVals[59] = values.showpickhelp;
|
||||
generalVals[60] = values.showpayments;
|
||||
generalVals[61] = values.billprintjobs;
|
||||
|
||||
defaulttmp = values.defaulttmp;
|
||||
|
||||
|
@ -1349,6 +1354,30 @@ function createPickupConfigPart(workflow) {
|
|||
return html;
|
||||
}
|
||||
|
||||
function createBillprintjobsConfigPart(workflow) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="billprintjobs">' + MAN_BILLPRINTJOBS[lang] + ':</label>';
|
||||
html += '<select name="billprintjobs" id="billprintjobs" data-theme="e">';
|
||||
|
||||
if (workflow == 0) {
|
||||
html += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
|
||||
html += '<option value="1">' + MAN_PRINTPICKUPS_ALWAYS[lang] + '</option>';
|
||||
html += '<option value="2">' + MAN_PRINTPICKUPS_TOGO[lang] + '</option>';
|
||||
} else if (workflow == 1) {
|
||||
html += '<option value="0">' + MAN_NO[lang] + '</option>';
|
||||
html += '<option value="1" selected>' + MAN_PRINTPICKUPS_ALWAYS[lang] + '</option>';
|
||||
html += '<option value="2">' + MAN_PRINTPICKUPS_TOGO[lang] + '</option>';
|
||||
} else if (workflow == 2){
|
||||
html += '<option value="0">' + MAN_NO[lang] + '</option>';
|
||||
html += '<option value="1">' + MAN_PRINTPICKUPS_ALWAYS[lang] + '</option>';
|
||||
html += '<option value="2" selected>' + MAN_PRINTPICKUPS_TOGO[lang] + '</option>';
|
||||
}
|
||||
html += '</select></div>';
|
||||
|
||||
html += "<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_BILPRODUCTS_HINT[lang] + "</i></p>";
|
||||
return html;
|
||||
}
|
||||
|
||||
function createDefaultViewPart(item) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="defaultview">' + MAN_DEFAULTVIEW[lang] + ':</label>';
|
||||
|
@ -1501,7 +1530,7 @@ function initRestoreFileUpload() {
|
|||
} else {
|
||||
alert("Import war erfolgreich.");
|
||||
setTimeout(function(){
|
||||
document.location.href = "index.html?v=1.5.13";
|
||||
document.location.href = "index.html?v=1.5.14";
|
||||
},250);
|
||||
}
|
||||
},
|
||||
|
@ -2055,9 +2084,9 @@ function handleUpdateCheckResult(answer) {
|
|||
|
||||
var millis=getMillis();
|
||||
setTimeout(function(){
|
||||
document.location.href = "install.html?v=1.5.13&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.5.14&mode=onlyupdate&n=" + millis;
|
||||
},250);
|
||||
document.location.href = "install.html?v=1.5.13&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.5.14&mode=onlyupdate&n=" + millis;
|
||||
}
|
||||
|
||||
function handleUpdateReplace(answer) {
|
||||
|
@ -3685,6 +3714,7 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
</div>
|
||||
<div id="partOfGroupWorkItemsf"></div>
|
||||
<div id="partOfGroupWorkItemsd"></div>
|
||||
<div id="partOfBillprintjobs"></div>
|
||||
|
||||
<br><b><u><span id="discountsectiontxt">Rabatte</span></u></b><br><br>
|
||||
<div data-role="fieldcontain">
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -857,9 +857,13 @@ class Admin {
|
|||
if ($mobileTheme == 1) {
|
||||
$cssFile = "orderstyle-pale.min.css";
|
||||
$cssAppend = ".opentable { color:black;} .timeline { color:black;}";
|
||||
$cssAppend .= "#tmpdirtxt,#tmpdirhint,#closingcreationtxt,#urlpath { color:black;}";
|
||||
$cssAppend .= ".groundplan input[type=text] {color:black;}";
|
||||
} else if ($mobileTheme == 2) {
|
||||
$cssFile = "orderstyle-darksoul.min.css";
|
||||
$cssAppend = ".opentable { color:white;} .timeline { color:black;}";
|
||||
$cssAppend .= "#tmpdirtxt,#tmpdirhint,#closingcreationtxt,#urlpath { color:black;}";
|
||||
$cssAppend .= ".groundplan input[type=text] {color:black;}";
|
||||
}
|
||||
|
||||
$file = "3rdparty/orderstyle/$cssFile";
|
||||
|
@ -1025,7 +1029,7 @@ class Admin {
|
|||
return;
|
||||
}
|
||||
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'discountname1'","'discountname2'","'discountname3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'","'startprodsearch'","'priceinlist'","'showdaycode'","'dailycode'","'showtogo'"));
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'discountname1'","'discountname2'","'discountname3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'","'startprodsearch'","'priceinlist'","'showdaycode'","'dailycode'","'showtogo'","'restaurantmode'","'billprintjobs'"));
|
||||
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
|
@ -1169,6 +1173,7 @@ class Admin {
|
|||
array("defaultview",0,false),
|
||||
array("dblog",1,false),
|
||||
array("printpickups",0,false),
|
||||
array("billprintjobs",2,false),
|
||||
array("printextras",0,false),
|
||||
array("forceprint",0,false),
|
||||
array("priceinlist",0,false),
|
||||
|
@ -1397,7 +1402,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.5.13");
|
||||
echo json_encode($view . "?v=1.5.14");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1613,31 +1618,31 @@ 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.5.13"); }
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.14"); }
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.13"); }
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.14"); }
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.14"); }
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.14"); }
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.13"); }
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.13"); }
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.13");
|
||||
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.13"); }
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.14"); }
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.14"); }
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.14"); }
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.14");
|
||||
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.14"); }
|
||||
|
||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.13");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.13");
|
||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.14");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.14");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -2194,6 +2199,7 @@ class Admin {
|
|||
"defaultview" => array("dbcol" => "defaultview", "checknum" => 0),
|
||||
"dblog" => array("dbcol" => "dblog","checknum" => 0),
|
||||
"printpickups" => array("dbcol" => "printpickups","checknum" => 0),
|
||||
"billprintjobs" => array("dbcol" => "billprintjobs","checknum" => 0),
|
||||
"printextras" => array("dbcol" => "printextras","checknum" => 0),
|
||||
"forceprint" => array("dbcol" => "forceprint","checknum" => 0),
|
||||
"priceinlist" => array("dbcol" => "priceinlist","checknum" => 0),
|
||||
|
|
|
@ -482,7 +482,7 @@ class Bill {
|
|||
$money = '0.00';
|
||||
}
|
||||
CommonUtils::log($pdo, "QUEUE", "Calc bill signature for cash money '$money' at billtime '$currentTime'");
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $money, $money, 0.0, $userId);
|
||||
$signature = CommonUtils::calcSignatureForBill($currentTime, $money, $money, $userId);
|
||||
|
||||
$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));
|
||||
|
@ -688,7 +688,7 @@ class Bill {
|
|||
session_start();
|
||||
}
|
||||
$userid = $_SESSION['userid'];
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, '0.00', '0.00', '0.00', $userid);
|
||||
$signature = CommonUtils::calcSignatureForBill($currentTime, '0.00', '0.00', $userid);
|
||||
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`prevbrutto`,`prevnetto`,`tableid`,`paymentid`,`userid`,`ref`,`tax`,`host`,`reservationid`,`guestinfo`,`intguestid`,`signature`,`reason`) VALUES (?,?,?,?,?,?,?,?,?,NULL,NULL,?,?,?,?,?,?)";
|
||||
CommonUtils::execSql($pdo, $sql, array($nextbillid,$currentTime,'0.00', '0.00',$newprevbrutto,$newprevnetto,$tableid,1,$userid,0,null,null,null,$signature,'STARTBELEG'));
|
||||
|
@ -772,7 +772,7 @@ class Bill {
|
|||
$tableid = 0;
|
||||
}
|
||||
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
|
||||
$signature = CommonUtils::calcSignatureForBill($currentTime, $brutto, $netto, $userid);
|
||||
|
||||
$billInsertSql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tableid`,`paymentid`,`userid`,`ref`,`tax`,`host`,`reservationid`,`guestinfo`,`intguestid`,`intguestpaid`,`signature`) VALUES (?,?,?,?,?,?,?,NULL,NULL,?,?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($billInsertSql));
|
||||
|
@ -926,7 +926,7 @@ class Bill {
|
|||
$stornonettoval = 0.0 - floatval($netto);
|
||||
|
||||
$commonUtils = new CommonUtils();
|
||||
$signature = $commonUtils->calcSignatureForBill($pdo,$currentTime, $stornval, $stornonettoval, $tax, $userIdOfStornoUser);
|
||||
$signature = CommonUtils::calcSignatureForBill($currentTime, $stornval, $stornonettoval, $userIdOfStornoUser);
|
||||
|
||||
$sql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`tax`,`tableid`, `status`, `paymentid`,`userid`,`ref`,`host`,`reservationid`,`guestinfo`,`signature`) VALUES (?,?,?,?,?,?, 's', ?,?,?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
|
@ -1183,7 +1183,7 @@ class Bill {
|
|||
$host = ($zeile['host'] == 1 ? "x" : "-");
|
||||
$reason = $zeile['reason'];
|
||||
|
||||
if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature,$dbstatus)) {
|
||||
if (!CommonUtils::verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $userid, $signature,$dbstatus)) {
|
||||
echo "Inconsistent Data Base Content!\n";
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -222,9 +222,7 @@ $prevClosingDate = "";
|
|||
// sign the date
|
||||
$pricesumstr = number_format($pricesum, 2, ".", '');
|
||||
$data = "I($newClosingId)-S($prevClosingDate)-E($closingTime)-D($billsToTake)-S($pricesumstr)";
|
||||
$pkeyid = $utils->getPrivkey($pdo);
|
||||
openssl_sign($data, $signature, $pkeyid);
|
||||
openssl_free_key($pkeyid);
|
||||
$signature = md5($data);
|
||||
|
||||
// now add values to closing table to prepare for electronic signature
|
||||
$sql = "UPDATE %closing% SET billcount=?, billsum=?,signature=? WHERE id=?";
|
||||
|
@ -612,9 +610,11 @@ $startDate = $previousClosingDate;
|
|||
$billsumstr = number_format($billsum, 2, ".", '');
|
||||
$data = "I($closingid)-S($startDate)-E($closingdate)-D($billcount)-S($billsumstr)";
|
||||
|
||||
$pubkeyid = $commonUtils->getCert($pdo);
|
||||
$ok = openssl_verify($data, $signature, $pubkeyid);
|
||||
openssl_free_key($pubkeyid);
|
||||
$md5ofData = md5($data);
|
||||
$ok = 1;
|
||||
if ($signature != $md5ofData) {
|
||||
$ok = 0;
|
||||
}
|
||||
if (($ok == 0) || ($billcount <> $foundBillCount)) {
|
||||
// something went wrong!
|
||||
$this->returnErrorInconsDB($doCsvExport, $onlyresultreturn);
|
||||
|
@ -737,6 +737,27 @@ public function getClosingSummary($closingid,$pdo,$fromWeb,$fl=0) {
|
|||
return $this->getClosingSummaryCore($closingid, $pdo, $fromWeb, true,$fl);
|
||||
}
|
||||
|
||||
public static function signAllClosings($pdo) {
|
||||
$sql = "select id,closingdate,billcount,billsum,remark,signature from %closing%";
|
||||
$r = CommonUtils::fetchSqlAll($pdo, $sql);
|
||||
$sql = "UPDATE %closing% SET signature=? WHERE id=?";
|
||||
foreach ($r as $c) {
|
||||
$closingid = $c["id"];
|
||||
$previousClosingDate = self::getDateOfPreviousClosing($pdo,$closingid);
|
||||
if (is_null($previousClosingDate)) {
|
||||
$startDate = "";
|
||||
} else {
|
||||
$startDate = $previousClosingDate;
|
||||
}
|
||||
$billsumstr = number_format($c["billsum"], 2, ".", '');
|
||||
$billcount = $c["billcount"];
|
||||
$closingdate = $c["closingdate"];
|
||||
$data = "I($closingid)-S($startDate)-E($closingdate)-D($billcount)-S($billsumstr)";
|
||||
$md5ofdata = md5($data);
|
||||
CommonUtils::execSql($pdo, $sql, array($md5ofdata,$closingid));
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkForClosingConsistency($pdo,$closingid) {
|
||||
$sql = "select id,closingdate,billcount,billsum,remark,signature from %closing% where id=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
|
@ -754,10 +775,11 @@ $billsumstr = number_format($closingpart->billsum, 2, ".", '');
|
|||
$billcount = $closingpart->billcount;
|
||||
$closingdate = $closingpart->closingdate;
|
||||
$data = "I($closingid)-S($startDate)-E($closingdate)-D($billcount)-S($billsumstr)";
|
||||
$commonUtils = new CommonUtils();
|
||||
$pubkeyid = $commonUtils->getCert($pdo);
|
||||
$ok = openssl_verify($data, $closingpart->signature, $pubkeyid);
|
||||
openssl_free_key($pubkeyid);
|
||||
$md5ofdata = md5($data);
|
||||
$ok = 1;
|
||||
if (($closingpart->signature) != $md5ofdata) {
|
||||
$ok = 0;
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,15 +39,16 @@ class CommonUtils {
|
|||
$row =$stmt->fetchObject();
|
||||
$lastBillid = intval($row->value);
|
||||
$lastBillInc = $lastBillid+1;
|
||||
$signature = base64_decode($row->signature);
|
||||
$signature = $row->signature;
|
||||
|
||||
if ($lastBillInc != $nextIdToUse) {
|
||||
return false;
|
||||
} else {
|
||||
// test for correct signature
|
||||
$pubkeyid = $this->getCert($pdo);
|
||||
$ok = openssl_verify("B($lastBillid)", $signature, $pubkeyid);
|
||||
openssl_free_key($pubkeyid);
|
||||
$check = md5("B($lastBillid)");
|
||||
$ok = 1;
|
||||
if ($check != $signature) {
|
||||
$ok = 0;
|
||||
}
|
||||
|
||||
if ($ok == 0) {
|
||||
return false;
|
||||
|
@ -72,16 +73,7 @@ class CommonUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getPrivkey($pdo) {
|
||||
$privkey = $this->getKeyFromWorkTable($pdo, "privkey");
|
||||
return(openssl_get_privatekey($privkey)); // private key
|
||||
}
|
||||
|
||||
function getCert($pdo) {
|
||||
$pubKey = $this->getKeyFromWorkTable($pdo, "cert");
|
||||
return(openssl_get_publickey($pubKey));
|
||||
}
|
||||
|
||||
|
||||
function getKeyFromWorkTable($pdo,$key) {
|
||||
$sql = "SELECT signature FROM %work% WHERE item=?";
|
||||
|
@ -91,16 +83,25 @@ class CommonUtils {
|
|||
return($row->signature);
|
||||
}
|
||||
|
||||
public static function setMd5OfLastBillidInWorkTable($pdo) {
|
||||
$sql = "SELECT value FROM %work% where item=?";
|
||||
$r = self::fetchSqlAll($pdo, $sql, array("lastbillid"));
|
||||
if (count($r) > 0) {
|
||||
$maxid = $r[0]["value"];
|
||||
$signature = md5("B($maxid)");
|
||||
$sql = "UPDATE %work% SET signature=? WHERE item=?";
|
||||
self::execSql($pdo, $sql, array($signature,"lastbillid"));
|
||||
}
|
||||
}
|
||||
|
||||
function setLastBillIdInWorkTable($pdo,$lastBillId) {
|
||||
if (is_null($pdo)) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
}
|
||||
$pkeyid = $this->getPrivkey($pdo);
|
||||
openssl_sign("B($lastBillId)", $signature, $pkeyid);
|
||||
openssl_free_key($pkeyid);
|
||||
|
||||
$signature = md5("B($lastBillId)");
|
||||
$sql = "UPDATE %work% SET value=?, signature=? WHERE item=?";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||
$signature = base64_encode($signature);
|
||||
$stmt->execute(array($lastBillId,$signature,"lastbillid"));
|
||||
}
|
||||
|
||||
|
@ -122,10 +123,10 @@ class CommonUtils {
|
|||
$signature = $row->signature;
|
||||
$status = $row->status;
|
||||
|
||||
return($this->verifyBillByValues($pdo,$billdate, $brutto, $netto, $tax, $userid, $signature, $status));
|
||||
return(self::verifyBillByValues($pdo,$billdate, $brutto, $netto, $userid, $signature, $status));
|
||||
}
|
||||
|
||||
function verifyBillByValues($pdo,$billdate,$brutto,$netto,$tax,$userid,$signature,$status) {
|
||||
public static function verifyBillByValues($pdo,$billdate,$brutto,$netto,$userid,$signature,$status) {
|
||||
|
||||
if (($status == "c") && ($brutto == 0.00)) {
|
||||
// workaround - the signature for cash inserts of vaue 0.00 are sometimes incorrect
|
||||
|
@ -136,38 +137,41 @@ class CommonUtils {
|
|||
return false;
|
||||
}
|
||||
if (is_null($pdo)) {
|
||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
}
|
||||
|
||||
$brutto = number_format($brutto, 2, ".", '');
|
||||
$netto = number_format($netto, 2, ".", '');
|
||||
$tax = number_format($tax, 2, ".", '');
|
||||
|
||||
$data = "D($billdate)B($brutto)N($netto)T($tax)U($userid)";
|
||||
$pubkeyid = $this->getCert($pdo);
|
||||
$ok = openssl_verify($data, $signature, $pubkeyid);
|
||||
openssl_free_key($pubkeyid);
|
||||
|
||||
if ($ok == 0) {
|
||||
$data = "D($billdate)B($brutto)N($netto)T(0)U($userid)";
|
||||
$md5OfData = md5($data);
|
||||
if ($signature != $md5OfData) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function calcSignaturesForAllBills($pdo) {
|
||||
$sql = "SELECT id,billdate,brutto,netto,userid FROM %bill%";
|
||||
$r = CommonUtils::fetchSqlAll($pdo, $sql);
|
||||
$sql = "UPDATE %bill% SET signature=? WHERE id=?";
|
||||
foreach($r as $b) {
|
||||
$bruttostr = number_format($b["brutto"], 2, ".", '');
|
||||
$nettostr = number_format($b["netto"], 2, ".", '');
|
||||
$theTime = $b["billdate"];
|
||||
$userid = $b["userid"];
|
||||
$data = md5("D($theTime)B($bruttostr)N($nettostr)T(0)U($userid)");
|
||||
CommonUtils::execSql($pdo, $sql, array($data,$b["id"]));
|
||||
}
|
||||
}
|
||||
|
||||
function calcSignatureForBill($pdo,$theTime,$brutto,$netto,$tax,$userid) {
|
||||
public static function calcSignatureForBill($theTime,$brutto,$netto,$userid) {
|
||||
// now calculate the signature for the bill entry
|
||||
$bruttostr = number_format($brutto, 2, ".", '');
|
||||
$nettostr = number_format($netto, 2, ".", '');
|
||||
if (is_null($tax)) {
|
||||
$taxstr = "0.00";
|
||||
} else {
|
||||
$taxstr = number_format($tax, 2, ".", '');
|
||||
}
|
||||
$data = "D($theTime)B($bruttostr)N($nettostr)T($taxstr)U($userid)";
|
||||
$pkeyid = $this->getPrivkey($pdo);
|
||||
openssl_sign($data, $signature, $pkeyid);
|
||||
openssl_free_key($pkeyid);
|
||||
$data = "D($theTime)B($bruttostr)N($nettostr)T(0)U($userid)";
|
||||
$signature = md5($data);
|
||||
return $signature;
|
||||
}
|
||||
|
||||
|
|
|
@ -853,7 +853,7 @@ class Customers {
|
|||
$txt = "<head>";
|
||||
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
|
||||
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
|
||||
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.13">';
|
||||
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.14">';
|
||||
$txt .= "</head>";
|
||||
return $txt;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
|
|||
if (strlen($status) > 150) {
|
||||
$status = substr($status, 0,149);
|
||||
}
|
||||
$version = "1.5.13";
|
||||
$version = "1.5.14";
|
||||
|
||||
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
|
||||
} else {
|
||||
|
|
|
@ -117,7 +117,7 @@ class Feedback {
|
|||
$rights .= $this->getdbinfo();
|
||||
}
|
||||
$server = $_SERVER['HTTP_USER_AGENT'];
|
||||
$msg = "Rolle:$role\nEmail:$email\nTel.:$tel\nRechte:$rights\nServer:$server\n\nVersion:$version\n\nNachricht:\n$content";
|
||||
$msg = "\nEmail:$email\nTel.:$tel\nNachricht:$content\nRolle:$role\nRechte:$rights\nServer:$server\n\nVersion:$version\n";
|
||||
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$version = CommonUtils::getConfigValue($pdo, 'version', 'no-version');
|
||||
|
|
|
@ -1512,7 +1512,7 @@ class QueueContent {
|
|||
|
||||
function getJsonProductsOfTableToPay($tableid) {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo, ordertime,IFNULL(prodimageid,0) as prodimageid
|
||||
$sql = "SELECT %queue%.id as id,longname,%queue%.price as price,%queue%.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,%queue%.togo as togo, ordertime,IFNULL(prodimageid,0) as prodimageid,IFNULL(printjobid,0) as printjobid
|
||||
FROM %queue%
|
||||
INNER JOIN %products% ON %queue%.productid = %products%.id
|
||||
INNER JOIN %pricelevel% ON %queue%.pricelevel = %pricelevel%.id
|
||||
|
@ -1536,11 +1536,12 @@ class QueueContent {
|
|||
$togo = $zeile["togo"];
|
||||
$queueid = $zeile['id'];
|
||||
$prodimageid = $zeile['prodimageid'];
|
||||
$printjobid = $zeile["printjobid"];
|
||||
|
||||
$extras = $this->getExtrasOfQueueItem($pdo,$queueid);
|
||||
|
||||
$prodId = $zeile['prodid'];
|
||||
$prodsToPay[] = array("id" => $queueid, "prodid" => $prodId, "longname" => $longName, "pricelevelname" => $thePriceLevelName, "price" => $thePrice, "tax" => $theTax, "togo" => $togo, "prodimageid" => $prodimageid, "extras" => $extras);
|
||||
$prodsToPay[] = array("id" => $queueid, "prodid" => $prodId, "longname" => $longName, "pricelevelname" => $thePriceLevelName, "price" => $thePrice, "tax" => $theTax, "togo" => $togo, "prodimageid" => $prodimageid, "printjobid" => $printjobid, "extras" => $extras);
|
||||
}
|
||||
echo json_encode(array("status" => "OK", "msg" => $prodsToPay));
|
||||
}
|
||||
|
@ -1969,7 +1970,7 @@ class QueueContent {
|
|||
$brutto = $row->brutto;
|
||||
$netto = $row->netto;
|
||||
|
||||
$signature = $this->commonUtils->calcSignatureForBill($pdo,$currentTime, $brutto, $netto, '0.00', $userid);
|
||||
$signature = CommonUtils::calcSignatureForBill($currentTime, $brutto, $netto, $userid);
|
||||
|
||||
$billInsertSql = "INSERT INTO `%bill%` (`id` , `billdate`,`brutto`,`netto`,`prevbrutto`,`prevnetto`,`tableid`,`paymentid`,`userid`,`ref`,`tax`,`host`,`reservationid`,`guestinfo`,`intguestid`,`printextras`,`signature`) VALUES (?,?,?,?,?,?,?,?,?,NULL,NULL,?,?,?,?,?,?)";
|
||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($billInsertSql));
|
||||
|
|
|
@ -165,7 +165,7 @@ class Reports {
|
|||
$retArrayLastMonth = $this->iterateForDays($pdo, $allDates['monthAndYearOfLastMonth'],intval($allDates['lastDayOfLastMonth']),true);
|
||||
|
||||
// products in the last 30 days:
|
||||
$retArrayProds = $this->sumSortedByProducts($pdo, $allDates['lastMonthComplete'], $allDates['currentTimeStr']);
|
||||
$retArrayProds = $this->sumSortedByProducts($pdo, $allDates['last30days'][0], $allDates['currentTimeStr']);
|
||||
|
||||
$retRatings = $this->getRatings($pdo,$allDates['last30days'],$allDates['lastMonthComplete'], $allDates['currentTimeStr']);
|
||||
|
||||
|
|
|
@ -847,14 +847,6 @@ class Basedb {
|
|||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
function getPrivkey($pdo) {
|
||||
$sql = "SELECT signature FROM %work% WHERE item=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute(array("privkey"));
|
||||
$row = $stmt->fetchObject();
|
||||
$privkey = $row->signature;
|
||||
return(openssl_get_privatekey($privkey));
|
||||
}
|
||||
|
||||
function signLastBillid($pdo) {
|
||||
$sql = "SELECT MAX(id) as maxbillid FROM %bill%";
|
||||
|
@ -866,11 +858,9 @@ class Basedb {
|
|||
} else {
|
||||
$lastBillId = 0;
|
||||
}
|
||||
$pkeyid = $this->getPrivkey($pdo);
|
||||
|
||||
$lastBillId = intval($lastBillId);
|
||||
openssl_sign("B($lastBillId)", $signature, $pkeyid);
|
||||
openssl_free_key($pkeyid);
|
||||
$signature = base64_encode($signature);
|
||||
$signature = md5("B($lastBillId)");
|
||||
|
||||
$sql = "SELECT id FROM %work% WHERE item=?";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
|
|
|
@ -180,14 +180,9 @@ class PdfExport extends FPDF {
|
|||
|
||||
$ref = ($zeile['ref'] == null ? "" : $zeile['ref']);
|
||||
$userid = $zeile['userid'];
|
||||
$username = $zeile['username'];
|
||||
$closingid = $zeile['closingid'];
|
||||
$closingdate = $zeile['closingdate'];
|
||||
$remark = '"' . addslashes($zeile['remark']) . '"';
|
||||
$paymentname = '"' . addslashes($zeile['payway']) . '"';
|
||||
$host = ($zeile['host'] == 1 ? "x" : "-");
|
||||
|
||||
if (!$commonUtils->verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $tax_orig, $userid, $signature, $dbstatus)) {
|
||||
if (!CommonUtils::verifyBillByValues(null,$billdate, $brutto_orig, $netto_orig, $userid, $signature, $dbstatus)) {
|
||||
echo "Database is inconsistent! Bill $billid ";
|
||||
if ($zeile['status'] == "c") {
|
||||
echo '- a cash operation ("Bareinlage/Barauslage"). ';
|
||||
|
|
|
@ -1081,6 +1081,26 @@ class Version {
|
|||
}
|
||||
}
|
||||
|
||||
public static function upd_1513_1514($pdo, $prefix, $dbname) {
|
||||
try {
|
||||
$sql = "UPDATE %work% SET signature=? WHERE item=?";
|
||||
self::execSqlWithParam($pdo, $sql, array("","privkey"));
|
||||
self::execSqlWithParam($pdo, $sql, array("","cert"));
|
||||
self::execSqlWithParam($pdo, $sql, array("","lastbillid"));
|
||||
self::execSql($pdo, "ALTER TABLE %work% MODIFY signature VARCHAR(50) NULL");
|
||||
CommonUtils::setMd5OfLastBillidInWorkTable($pdo);
|
||||
self::execSql($pdo, "ALTER TABLE %bill% MODIFY signature VARCHAR(50) NULL");
|
||||
CommonUtils::calcSignaturesForAllBills($pdo);
|
||||
self::execSql($pdo, "ALTER TABLE %closing% MODIFY signature VARCHAR(50) NULL");
|
||||
Closing::signAllClosings($pdo);
|
||||
|
||||
self::insertOrUpdateConfigItem($pdo, 'billprintjobs', '2');
|
||||
return array(true);
|
||||
} catch (PDOException $e) {
|
||||
return array(false,$e);
|
||||
}
|
||||
}
|
||||
|
||||
public static $updateOrder = array(
|
||||
"1.3.0" => array("upd_1300_1301","1.3.1"),
|
||||
"1.3.1" => array("upd_1301_1302","1.3.2"),
|
||||
|
@ -1141,7 +1161,8 @@ class Version {
|
|||
"1.5.9" => array("upd_1509_1510","1.5.10"),
|
||||
"1.5.10" => array("upd_1510_1511","1.5.11"),
|
||||
"1.5.11" => array("upd_1511_1512","1.5.12"),
|
||||
"1.5.12" => array("upd_1512_1513","1.5.13")
|
||||
"1.5.12" => array("upd_1512_1513","1.5.13"),
|
||||
"1.5.13" => array("upd_1513_1514","1.5.14")
|
||||
);
|
||||
|
||||
// RE;* also for install process no check is required
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
||||
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
|
||||
|
||||
<script src="utilities.js?v=1.5.13"></script>
|
||||
<script src="utilities.js?v=1.5.14"></script>
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
|
||||
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
||||
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
|
||||
|
||||
<script src="utilities.js?v=1.5.13"></script>
|
||||
<script src="utilities.js?v=1.5.14"></script>
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
|
||||
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
|
||||
|
|
|
@ -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.5.13">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.14">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,6 +24,7 @@
|
|||
<input id="payall" class="input50 inputwhite" type="submit" value="Alles" />
|
||||
<div class="infoarea"><span id="priceinreceipt"></span></div>
|
||||
</div>
|
||||
<div id="billprintjobspanel" style="display:none;"></div>
|
||||
<div id="oben" class="paypanel" style="display:none;"></div>
|
||||
<hr>
|
||||
<div id="unten" class="paypanel" style="display:none;"></div>
|
||||
|
|
Loading…
Reference in New Issue