OrderSprinter 1.3.12

This commit is contained in:
Geno 2020-11-19 23:03:07 +01:00
parent 02d99d8865
commit 6da4856b5a
26 changed files with 163 additions and 53 deletions

Binary file not shown.

View File

@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.3.11");
Database::setVersion($pdo,$prefix,"1.3.12");
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.

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.12">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -206,7 +206,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") {
useInstallation();
} else {
setTimeout(function(){document.location.href = "install.html?v=1.3.11"},500);
setTimeout(function(){document.location.href = "install.html?v=1.3.12"},500);
}
}

View File

@ -725,7 +725,7 @@ $(document).ready(function() {
<tr id=updateline>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.3.11</button>
<button id="updatebtn">Update -> 1.3.12</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td>
<td>&nbsp;</td>

View File

@ -2131,6 +2131,28 @@ return false;
}
}
function updateUserTable1311_1312($prefix, $version, $dbname) {
$pdo = $this->pdo;
try {
if ($version != "1.3.11") {
$ret = $this->updateUserTable1310_1311($prefix, $version, $dbname);
if (!$ret) {
echo "Version update v1.3.10 to 1.3.11 not successful.";
return false;
}
}
DbUtils::overrulePrefix($prefix);
$this->updateVersion($pdo, '1.3.12');
return true;
} catch (PDOException $e) {
echo "Error in v1.3.11 to 1.3.12: $e";
return false;
}
}
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
@ -2257,7 +2279,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.11')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.12')");
$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')");
@ -2670,7 +2692,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
$installerVersion = "1.3.11";
$installerVersion = "1.3.12";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@ -2700,7 +2722,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10"
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11"
);
if (!in_array($version, $supportedVersions)) {
@ -2708,7 +2730,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1310_1311($_POST['prefix'], $version, $_POST['db']);
$ret = $admin->updateUserTable1311_1312($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -360,7 +360,9 @@ var MAN_FONTSIZE_HINT = ["Die Schriftgröße hat nur Einfluss, wenn kein eigenes
var MAN_INIT_AUSTRIA = ["Erstelle Startbeleg (Österreich)","Create initial receipt (Austria)","Crear tiquet inicial (Austria)"];
var MAN_GOLIVE_WAIT_HINT = ["Bitte beachten Sie, dass diese Aktion auf langsamen Servern mehrere Minuten dauern kann. Schließen Sie diesen Dialog und warten Sie auf die Meldung, dass det Vorgang abgeschlossen wurde.","Please be aware that this action may take a while on slow servers. Please close this dialog and wait for the message that the process has completed.","Esta acción puede durar unos minutos. Por favor confirme este dialogo y espere por el mensaje que la acción esta completada."]
var MAN_CLOSING_TIME_LIMIT_ERROR = ["Ein Tagesabschluss wurde nicht erzeugt, weil zwischen zwei Tagesabschlüssen etwas Zeit (mind. 2 Min.) vergehen sollte.","No closure was created because between two clsoings there should be some time (at least 2 minutes).","No conclusión esta creado porque el tiempo entre dos conclusiones debe ser un rato (min, 2 minutos)."];
var MAN_DB_PROPERTIES = ["Größe der Datenbanktabellen","Sizes of the data base tables","Tamaño de los tabulas de la base de datos"];
var MAN_DBTABLENAME = ["Tabelle","Table","Tabula"];
var MAN_DBTABLESIZE = ["Größe (KB)","Size (KB)","Tamaño (KB)"];
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];
@ -370,6 +372,7 @@ var numberOfClosings = 0;
var unpaidTables = "";
var version = '';
var newerversionavailable = 0;
var adminIsLoggedIn = false;
var generalValuesSettings = [
["usstval","MwSt","i",2,"Mehrwertsteuer ist kein Zahlenwert"],
@ -531,6 +534,7 @@ function setLanguage(l) {
$("#uplfiletxt").html(MAN_UPLOAD_FILE[l]);
$("#bakrestxt").html(MAN_BAK_REST_HEAD[l]);
$("#updatetxt").html(MAN_UPDATE_HEAD[l]);
$('#dbproptxt').html(MAN_DB_PROPERTIES[l]);
$("#updatebtntxt").html(MAN_CHECK_UPDATE_BTN[l]);
$("#updatehinttxt").html(MAN_UPDATE_HINT[l]);
$("#availableversiontxt").html(MAN_AVAIL_UPD_VERSION[l]);
@ -616,6 +620,7 @@ function createMonthSelection(label) {
function showPanelsDueToUserStatus(jsonAnswer) {
if (jsonAnswer == "admin") {
$("#dbactionui").show();
adminIsLoggedIn = true;
}
if (jsonAnswer == "manager" || (jsonAnswer == 'admin')) {
$("#userpart").show();
@ -1587,9 +1592,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis();
setTimeout(function(){
document.location.href = "install.html?v=1.3.11&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.3.12&mode=onlyupdate&n=" + millis;
},250);
document.location.href = "install.html?v=1.3.11&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.3.12&mode=onlyupdate&n=" + millis;
}
function handleUpdateReplace(answer) {
@ -2380,6 +2385,31 @@ function tablelist(no,rowId) {
return text;
}
function getDbStat() {
doAjax("GET","php/contenthandler.php?module=admin&command=getDbStat",null,fillDbStat,"DB Eigenschaften",true);
}
function fillDbStat(answer) {
if (answer.status != "OK") {
return;
}
var max = answer.msg.max;
var tablesizes = answer.msg.tablesizes;
var txt = '<table class="reporttable">';
txt += '<tr><th style="width:220px;">' + MAN_DBTABLENAME[lang] + '<th style="width:200px;">' + MAN_DBTABLESIZE[lang] + '<th>&nbsp;</tr>';
for (var i=0;i<tablesizes.length;i++) {
var tblname = tablesizes[i].table_name;
var sizeInKb = tablesizes[i].tablesizeinmb;
var porcentage = 100/max * sizeInKb;
var img = '<img src="img/green.png" style="height:20px;width:' + porcentage + '%" />';
txt += '<tr><td>' + tblname + '<td>' + sizeInKb + '<td>' + img + '</tr>';
}
txt += '</table>';
$("#dbtablearea").html(txt);
}
function askForCurrentRoomField() {
doAjax("GET","php/contenthandler.php?module=roomtables&command=getRoomfield",null,initroomfield,"Raumplan",true);
}
@ -2653,9 +2683,12 @@ function continueInitialization() {
getLastClosings();
getSpeisekarte();
askForCurrentRoomField();
if (adminIsLoggedIn) {
getSpeisekarte();
askForCurrentRoomField();
getDbStat();
}
$("#userfile").val('');
@ -3342,6 +3375,12 @@ $(document).on("pageinit", "#admin-page", function () {
</div>
</div>
<p><div data-role="collapsible" data-collapsed="true" data-theme="f" data-content-theme="c" class="noprint" id="dbproparea">
<p><h3><span id="dbproptxt">Tabellen...</span></h3>
<p><div id="dbtablearea"></div>
</div>
<p>
<form action="dummy" method="GET">
<!-- <button type="submit" data-theme="e" id="initreceiptbutton"><span id="initreceiptbtntxt">Startbeleg</span></button>-->

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -60,6 +60,7 @@ class Admin {
"fill" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"fillSpeisekarte" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"assignTaxes" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"getDbStat" => array("loggedin" => 1, "isadmin" => 1, "rights" => null),
"exportConfigCsv" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
"exportUserCsv" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
@ -283,6 +284,8 @@ class Admin {
$this->isPrinterServerActive();
} else if ($command == 'getWaiterMessage') {
$this->getWaiterMessage();
} else if ($command == 'getDbStat') {
$this->getDbStat();
}
else {
echo "Command not supported.";
@ -1085,7 +1088,7 @@ class Admin {
$view = "preferences.html";
}
echo json_encode($view . "?v=1.3.11");
echo json_encode($view . "?v=1.3.12");
}
}
@ -1287,25 +1290,25 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.11"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.12"); };
} else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.11"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.12"); };
}
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.11"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.11"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.11"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.12"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.12"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.12"); };
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.11"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.12"); };
}
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.11"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.11"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.11"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.11"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.11"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.11"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.11"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.11");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.11");
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.12"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.12"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.12"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.12"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.12"); };
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.12"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.12"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.12");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.12");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1313,7 +1316,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.11",
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.12",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@ -1322,6 +1325,29 @@ class Admin {
return($mainMenuAndVersion);
}
private function getDbStat() {
try {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "SELECT table_name, round(sum( data_length + index_length ) / 1024) as tablesizeinmb FROM information_schema.TABLES ";
$sql .= " WHERE table_schema=? AND table_name like ? group by table_name order by table_name";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array(MYSQL_DB,TAB_PREFIX . "%"));
$max = 0;
foreach ($result as $aTableResult) {
$size = intval($aTableResult["tablesizeinmb"]);
if ($max < $size) {
$max = $size;
}
}
echo json_encode(array("status" => "OK","msg" => array("max" => $max,"tablesizes" => $result)));
} catch (Exception $e) {
echo json_encode(array("status" => "ERROR","msg" => "Error: $e"));
return;
}
}
private function getWaiterMessage() {
try {
$pdo = DbUtils::openDbAndReturnPdoStatic();

View File

@ -673,8 +673,6 @@ class Products {
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($lastExtraId,$assProdId));
$histextra = self::getExtrasForProd($pdo,$assProdId);
self::updateHistOnlyForExtrasOfProd($pdo, $assProdId,$histextra);
}
return OK;
} catch (Exception $ex) {

View File

@ -117,7 +117,7 @@ class Updater {
$infoFileLines = $infoFile["msg"];
if (count($infoFileLines) > 1) {
$checkIfNewerVersion = self::isV2Newer('1.3.11',trim($infoFileLines[0]));
$checkIfNewerVersion = self::isV2Newer('1.3.12',trim($infoFileLines[0]));
return array("status" => "OK","msg" => $infoFileLines[0],"url" => $url,"neweravailable" => ($checkIfNewerVersion ? 1 : 0));
} else {
return array("status" => "ERROR","msg" => "Info file not valid","url" => $url);

View File

@ -126,7 +126,13 @@ class HistFiller {
if (!is_null($extraCol)) {
$sql = "UPDATE %". $histtable . "% SET " . $extraCol . "=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($extraVal,$newRefIdForHist));
try {
if (strlen($extraVal) > 300) {
$extraVal = substr($extraVal, 0, 300);
}
$stmt->execute(array($extraVal,$newRefIdForHist));
} catch (Exception $ex) {
}
}
self::insertIntoHist($pdo, $histaction, $newRefIdForHist);

View File

@ -341,6 +341,8 @@ class TypeAndProductFileManager {
private function fillProductDbTable($pdo,$leafArray) {
$sortArr = array();
$changedProdIds = array();
for ($i=0;$i < $leafArray->size(); $i++) {
$theLeafEntry = $leafArray->get($i);
$product = new ProductEntry();
@ -418,7 +420,7 @@ class TypeAndProductFileManager {
$sql = "UPDATE %products% SET shortname=?,longname=?,priceA=?,priceB=?,priceC=?,unit=?,days=?,tax=?,taxaustria=?,amount=?,available=?,sorting=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($shortName,$longName,$priceA,$priceB,$priceC,$unit,$days,$tax,$taxaustria,$amount,$available,$sorting,$prodid));
HistFiller::updateProdInHist($pdo, $prodid);
$changedProdIds[] = $prodid;
} else {
$sql = "UPDATE %products% SET sorting=? WHERE id=?";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
@ -430,7 +432,7 @@ class TypeAndProductFileManager {
$stmt->execute(array($category,null,$prodid));
}
}
return (array("status" => "OK"));
return (array("status" => "OK","changedprods" => $changedProdIds));
}
/*
@ -515,6 +517,7 @@ class TypeAndProductFileManager {
return $ret;
}
$ret = $this->fillProductDbTable($pdo,$this->leafArray);
$changedprodids = $ret["changedprods"];
// now add the extras
$prodInstance = new Products();
@ -522,7 +525,23 @@ class TypeAndProductFileManager {
foreach($this->extras as $anExtraLine) {
$anExtra = new ExtraItem($pdo,$anExtraLine);
$prodInstance->createExtraCore($pdo, $anExtra->getName(), $anExtra->getPrice(), $anExtra->getAssignedProdIds());
$changedExtrasProdIds = $anExtra->getAssignedProdIds();
foreach($changedExtrasProdIds as $anId) {
if (!in_array($anId, $changedprodids)) {
$changedprodids[] = $anId;
}
}
}
foreach ($changedprodids as $anId) {
try {
HistFiller::updateProdInHist($pdo, $anId);
} catch (Exception $ex) {
}
}
unset($ret["changedprods"]);
return $ret;
}
}

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -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.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -4,8 +4,8 @@
<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.3.11">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.11">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.12">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.12">
<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