OrderSprinter 1.5.24

This commit is contained in:
Geno 2020-11-19 23:12:35 +01:00
parent 86c9d4cafd
commit ab07fb4203
41 changed files with 338 additions and 164 deletions

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.23" /> <link rel="stylesheet" href="css/gueststyle.css?v=1.5.24" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.23" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.24" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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" /> <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-1.11.3.min.js"></script>
@ -105,7 +105,7 @@
<div data-role="footer" data-theme="b" id="thefooter1"> <div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a"> <div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div> <div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.23&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">1.5.24&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
} else { } else {
echo "<html>"; echo "<html>";
echo "<head><title>Installation Gastsystem</title>"; echo "<head><title>Installation Gastsystem</title>";
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.23">'; echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.24">';
echo "</head>"; echo "</head>";
echo "<body><div class=surround>"; echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.23</span><br><br>"; echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.24</span><br><br>";
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />"; 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 "<br><input type=submit value='Installation starten' class=installbtn />";
echo "</form></div></html>"; echo "</form></div></html>";

View File

@ -85,7 +85,7 @@ class Installer {
} }
Database::dropTables($pdo); Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix); Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.5.23"); Database::setVersion($pdo,$prefix,"1.5.24");
Database::setAccessPassword($pdo,$prefix,$adminpass); Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
return array("status" => "OK","msg" => "Installation successful"); return array("status" => "OK","msg" => "Installation successful");
@ -135,4 +135,3 @@ if ($command == 'getConfig') {
} else if ($command == 'update') { } else if ($command == 'update') {
// to be filled when next version is available // to be filled when next version is available
} }
?>

Binary file not shown.

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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" /> <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-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.23"></script> <script src="utilities.js?v=1.5.24"></script>
<script src="kitchenbar.js?v=1.5.23"></script> <script src="kitchenbar.js?v=1.5.24"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -1 +1 @@
.productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}.osprod-desk-0{width:100px;height:40px}.osprod-desk-1{width:100px;height:100px}.osprod-desk-2{width:120px;height:130px}.prodToMoveEl{padding:8px 16px;border-bottom:1px solid #ddd;height:40px;font-size:16px;font-weight:bold}.proditemselected{background-color:#0f0}.proditemunselected{background-color:#eee}.whitebackground{background-color:white} .productspanel{display:-webkit-flex;display:flex;-webkit-justify-content:left;justify-content:left;-webkit-flex-wrap:row wrap;flex-flow:row wrap;background-color:lightgrey}.productitem{background-color:#ff0;margin:10px;border-radius:25px;border:2px solid #73ad21;padding:20px;color:black;font-weight:bold;text-align:center;box-shadow:10px 10px 5px #888;word-wrap:break-word}.osprod-desk-0{width:100px;height:40px}.osprod-desk-1{width:100px;height:100px}.osprod-desk-2{width:120px;height:130px}.prodToMoveEl{padding:8px 16px;border-bottom:1px solid #ddd;height:40px;font-size:16px;font-weight:bold}.proditemselected{background-color:#0f0}.proditemunselected{background-color:#eee}.whitebackground{background-color:white}#entervalueunit{font-weight:bold}

View File

@ -34,6 +34,7 @@ Speisen = KBF = 1
Salate = KBF = 1 Salate = KBF = 1
Blattsalat ; 2,00 # Bildnr:25 Blattsalat ; 2,00 # Bildnr:25
Bunter Salat; 3,00 # Bildnr:26 Bunter Salat; 3,00 # Bildnr:26
Mix; 1,20 # Einheit: gr
Deftiges = KBF = 1 Deftiges = KBF = 1
Mittagsgericht ; 12,00 # Bildnr:28 Mittagsgericht ; 12,00 # Bildnr:28
Pasta ; 5,00 # Bildnr:29 Pasta ; 5,00 # Bildnr:29

View File

@ -142,8 +142,10 @@ function newProduct(id, longname, shortname,priceA,priceB,priceC,barcode,unit,di
if ((this.unit == 0) || (this.unit == 'null')) { if ((this.unit == 0) || (this.unit == 'null')) {
this.unit = 0; this.unit = 0;
} }
txt += this.createOption(0,this.unit,"Stück"); var instance = this;
txt += this.createOption(1,this.unit,"Eingabe"); g_units_arr.forEach(function (item) {
txt += instance.createOption(item.value,instance.unit,item.longtext);
});
txt += "</select>"; txt += "</select>";

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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 http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.24">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -231,7 +231,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") { if (is_installed == "Yes") {
useInstallation(); useInstallation();
} else { } else {
setTimeout(function(){document.location.href = "install.html?v=1.5.23"},500); setTimeout(function(){document.location.href = "install.html?v=1.5.24"},500);
} }
} }

View File

@ -912,7 +912,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.5.23</button> <button id="updatebtn">Update -> 1.5.24</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -319,6 +319,51 @@ echo json_encode("ERROR");
} else if ($command == 'getConfig') { } else if ($command == 'getConfig') {
$configWriter = new ConfigWriter(); $configWriter = new ConfigWriter();
$configWriter->getConfigVals(); $configWriter->getConfigVals();
} else if ($command == 'defaultinstall') {
DbUtils::overrulePrefix("os_");
DbUtils::overruleDbName("ordersprinter");
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo("localhost","ordersprinter","os","dbpass");
$admin->setPdo($pdo);
$admin->setPrefix("os_");
$admin->setTimeZone("Europe/Berlin");
DbUtils::overruleTimeZone($_POST['timezone']);
DbUtils::overrulePrefix($_POST['prefix']);
set_time_limit(60*10);
$basedb = new Basedb();
$basedb->createAndIntializeTables($pdo,",",0,"Euro","Europe/Berlin");
$updResult = Version::runUpdateProcess($pdo, "os_", "ordersprinter",null,false);
if ($updResult["status"] != "OK") {
echo json_encode("Fehler beim Update: " . $updResult["msg"]);
return;
}
$companyinfo = "Musterrestaurant\nMusterstrasse 123\n12345 Musterstadt";
$restaurantmode = 1;
$cancelcode = "123";
$printpass = md5("123");
$defaultview = 0;
$basedb->changeInitialConfig($pdo,$restaurantmode,$companyinfo,$defaultview,$cancelcode,$printpass);
$admin->signLastBillId();
$roleid = Roles::insertAdminRole($pdo);
$admin->insertUser("admin", "123", $roleid, 0, 1);
$admin->writeConfigFile("localhost","ordersprinter","os","dbpass","os_");
if(session_id() == '') {
session_start();
}
session_destroy();
$ok = Admin::optimizeCore($pdo);
if ($ok["status"] == "OK") {
echo json_encode("OK");
} else {
echo json_encode("Fehler beim Update: " . $ok["msg"]);
}
} else if ($command == 'install') { } else if ($command == 'install') {
DbUtils::overrulePrefix($_POST['prefix']); DbUtils::overrulePrefix($_POST['prefix']);
DbUtils::overruleDbName($_POST['db']); DbUtils::overruleDbName($_POST['db']);
@ -380,6 +425,21 @@ echo json_encode("OK");
catch (PDOException $e) { catch (PDOException $e) {
echo json_encode("ERROR: $e"); echo json_encode("ERROR: $e");
} }
} else if ($command == 'defaultinsertsamplecontent') {
try {
DbUtils::overrulePrefix("os_");
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo("localhost","ordersprinter","os","dbpass");
$admin->setPdo($pdo);
$admin->setPrefix("os_");
$admin->setTimeZone("Europe/Berlin");
$admin->insertSample(3,0,"123",0,"Europe/Berlin");
echo json_encode("OK");
}
catch (PDOException $e) {
echo json_encode("ERROR: $e");
}
} else if ($command == 'gettimezones') { } else if ($command == 'gettimezones') {
$timezone_identifiers = DateTimeZone::listIdentifiers(); $timezone_identifiers = DateTimeZone::listIdentifiers();
$zones = array(); $zones = array();
@ -389,7 +449,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones); echo json_encode($zones);
} else if ($command == 'update') { } else if ($command == 'update') {
set_time_limit(60*30); set_time_limit(60*30);
$installerVersion = "1.5.23"; $installerVersion = "1.5.24";
$admin = new InstallAdmin(); $admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']); $pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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" /> <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-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.23"></script> <script src="utilities.js?v=1.5.24"></script>
<script src="kitchenbar.js?v=1.5.23"></script> <script src="kitchenbar.js?v=1.5.24"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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" /> <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-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.23"></script> <script src="utilities.js?v=1.5.24"></script>
<script src="elements/tablemap.js?v=1.5.23"></script> <script src="elements/tablemap.js?v=1.5.24"></script>
<script src="elements/roommap.js?v=1.5.23"></script> <script src="elements/roommap.js?v=1.5.24"></script>
<script src="elements/groundplan.js?v=1.5.23"></script> <script src="elements/groundplan.js?v=1.5.24"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -470,7 +470,7 @@ var MAN_DAYNAMES_START_SUNDAY = [
var MAN_CATEGORY = ["Kategorie","Category","Categoria"]; var MAN_CATEGORY = ["Kategorie","Category","Categoria"];
var MAN_FOOD_CAT = ["Speisen","Food","Comidas"]; var MAN_FOOD_CAT = ["Speisen","Food","Comidas"];
var MAN_DRINKS_CAT = ["Getränke","Drinks","Bebidas"]; var MAN_DRINKS_CAT = ["Getränke","Drinks","Bebidas"];
var MAN_CHANGE_ROLE_AREA = ["Rolle und Tischbereich ändern","Change role and area","Cambiar region y role"]; var MAN_CHANGE_ROLE_AREA = ["Name, Rolle, Tischbereich ändern","Change name, role, area","Cambiar nombre, region y role"];
var MAN_PRINTPICKUPS = ["Drucke Abholbons","Pickup receipts","Imprimir tickets de recogidos"]; var MAN_PRINTPICKUPS = ["Drucke Abholbons","Pickup receipts","Imprimir tickets de recogidos"];
var MAN_PRINTPICKUPS_ALWAYS = ["Immer","Always","Siempre"]; 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_PRINTPICKUPS_TOGO = ["Nur für Außer-Haus-Bestellungen","Only für to-go orders","Solo para To go"];
@ -1591,7 +1591,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.5.23"; document.location.href = "index.html?v=1.5.24";
},250); },250);
} }
}, },
@ -2262,7 +2262,7 @@ function updateOneSingleFile() {
setTimeout(function(){ setTimeout(function(){
$("#sliderarea").hide(); $("#sliderarea").hide();
var millis=getMillis(); var millis=getMillis();
document.location.href = "install.html?v=1.5.23&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.5.24&mode=onlyupdate&n=" + millis;
},250); },250);
} }
} }
@ -2894,6 +2894,8 @@ function createCollapsibeOfUser(id,username,roleid,area,forNewUser,roles) {
if (forNewUser) { if (forNewUser) {
collapsiblePart += createLabelWithTextField("userlabel_username_new",MAN_USER_NAME[lang],MAN_USER_NAME[lang]); collapsiblePart += createLabelWithTextField("userlabel_username_new",MAN_USER_NAME[lang],MAN_USER_NAME[lang]);
collapsiblePart += createLabelWithTextField("userlabel_password_new",MAN_USER_PASS[lang],MAN_USER_PASS[lang]); collapsiblePart += createLabelWithTextField("userlabel_password_new",MAN_USER_PASS[lang],MAN_USER_PASS[lang]);
} else {
collapsiblePart += createLabelWithTextFieldWithContent("userlabel_username_" + id,MAN_USER_NAME[lang],MAN_USER_NAME[lang],username);
} }
var rolesArr = createRolesArr(roles); var rolesArr = createRolesArr(roles);
@ -3172,10 +3174,12 @@ function dynamicUserBinding() {
e.preventDefault(); e.preventDefault();
var userid = this.id.split("_")[2]; var userid = this.id.split("_")[2];
var username = $("#userlabel_username_userid_" + userid).val();
var roleid = $("#userlabel_userrole_userid_" + userid).val(); var roleid = $("#userlabel_userrole_userid_" + userid).val();
var area = $("#userlabel_userarea_userid_" + userid).val(); var area = $("#userlabel_userarea_userid_" + userid).val();
var data = { var data = {
userid: userid, userid: userid,
username: username,
roleid: roleid, roleid: roleid,
area: area area: area
}; };
@ -4328,6 +4332,12 @@ $(document).on("pageinit", "#admin-page", function () {
<ul> <ul>
<li>Stück: Die Preisangaben beziehen sich auf ein Stück dieses Artikels (in diesem Fall muss diese Eigenschaft nicht angegeben werden.) <li>Stück: Die Preisangaben beziehen sich auf ein Stück dieses Artikels (in diesem Fall muss diese Eigenschaft nicht angegeben werden.)
<li>Eingabe: Preis des Produktes wird bei der Bestellaufnahme abgefragt. <li>Eingabe: Preis des Produktes wird bei der Bestellaufnahme abgefragt.
<li>kg: Gewicht (kg)
<li>mg: Gewicht (g)
<li>mg: Gewicht (mg)
<li>l: Volumen (Liter)
<li>ml: Volumen (ml)
<li>m: Länge (m)
</ul> </ul>
<li><b>Tage</b>: Man kann die Tage einschränken, an denen ein Produkt bestellt werden kann. 0=Sonntag, 1=Montag, usw. bis 6=Samstag. Wird ein Produkt an allen Tagen verkauft, ist keine Angabe erforderlich. Ein Produkt, welches nur an Wochenenden verkauft wird, muss mit '06' oder '60' ausgezeichnet werden. <li><b>Tage</b>: Man kann die Tage einschränken, an denen ein Produkt bestellt werden kann. 0=Sonntag, 1=Montag, usw. bis 6=Samstag. Wird ein Produkt an allen Tagen verkauft, ist keine Angabe erforderlich. Ein Produkt, welches nur an Wochenenden verkauft wird, muss mit '06' oder '60' ausgezeichnet werden.
<li><b>Bildnr</b>: Produkte können mit Bildern versehen werden. Jedes Bild in der Bilddatenbank besitzt eine eindeutige ID. Über die Angabe der Bildnummer können Bilder mehreren Produkten zugeordnet werden. Bilder, die keine Referenz mehr besitzen, werden regelmäßig aus der Datenbank entfernt. <li><b>Bildnr</b>: Produkte können mit Bildern versehen werden. Jedes Bild in der Bilddatenbank besitzt eine eindeutige ID. Über die Angabe der Bildnummer können Bilder mehreren Produkten zugeordnet werden. Bilder, die keine Referenz mehr besitzen, werden regelmäßig aus der Datenbank entfernt.

File diff suppressed because one or more lines are too long

View File

@ -1411,7 +1411,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.5.23"); echo json_encode($view . "?v=1.5.24");
} }
} }
@ -1632,31 +1632,31 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) { if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.23"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.24"); }
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.23"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.24"); }
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.23"); } if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.24"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.23"); } if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.24"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.23"); } if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.24"); }
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.23"); } if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.24"); }
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.23"); } if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.24"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.23"); } if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.24"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.23"); } if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.24"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.23"); } if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.24"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.23"); } if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.24"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.23"); } if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.24"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.23"); } if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.24"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.23"); } if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.24"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.23"); } if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.24"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.23"); } if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.24"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.23"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.24");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.23"); } if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.24"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.23"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.24");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.23"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.24");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -2416,6 +2416,7 @@ class Admin {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$theUserId = $_POST['userid']; $theUserId = $_POST['userid'];
$username = $_POST['username'];
$roleid = $_POST['roleid']; $roleid = $_POST['roleid'];
$area = $_POST['area']; $area = $_POST['area'];
if ($area == 0) { if ($area == 0) {
@ -2428,8 +2429,8 @@ class Admin {
if (!$this->isCurrentUserAdmin() && ($is_admin_role || $isRoleOfUserAdmin)) { if (!$this->isCurrentUserAdmin() && ($is_admin_role || $isRoleOfUserAdmin)) {
echo json_encode("noadmin"); echo json_encode("noadmin");
} else { } else {
$sql = "UPDATE %user% SET roleid=?,area=? WHERE id=?"; $sql = "UPDATE %user% SET username=?,roleid=?,area=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($roleid,$area,$theUserId)); CommonUtils::execSql($pdo, $sql, array($username,$roleid,$area,$theUserId));
HistFiller::updateUserInHist($pdo,$theUserId); HistFiller::updateUserInHist($pdo,$theUserId);
echo json_encode("OK"); echo json_encode("OK");
} }
@ -3160,6 +3161,7 @@ class Admin {
} }
foreach($tablecontent as $row) { foreach($tablecontent as $row) {
set_time_limit(60*60);
$cols = array(); $cols = array();
$vals = array(); $vals = array();
$quests = array(); $quests = array();
@ -3261,6 +3263,7 @@ class Admin {
} }
foreach($tablecontent as $row) { foreach($tablecontent as $row) {
set_time_limit(60*60);
$cols = array(); $cols = array();
$vals = array(); $vals = array();
$quests = array(); $quests = array();

View File

@ -397,11 +397,15 @@ class Bill {
$billtranslations = $this->createBillTranslations($language); $billtranslations = $this->createBillTranslations($language);
} }
$sql = "select productname,price,%pricelevel%.name as pricelevelname,togo,count(%queue%.productname) as count,%prodtype%.kind as kind from %queue%,%pricelevel%,%billproducts%,%prodtype%,%products% where %billproducts%.billid=? AND %billproducts%.queueid=%queue%.id AND %queue%.pricelevel = %pricelevel%.id AND %queue%.productid = %products%.id AND %products%.category = %prodtype%.id group by kind, productname,price,pricelevelname,togo"; $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = "select CONCAT($unit,productname) as productname,price,%pricelevel%.name as pricelevelname,togo,count(Q.productname) as count,%prodtype%.kind as kind ";
$sql .= " FROM %queue% Q,%pricelevel%,%billproducts%,%prodtype%,%products% where %billproducts%.billid=? AND %billproducts%.queueid=Q.id ";
$sql .= " AND Q.pricelevel = %pricelevel%.id AND Q.productid = %products%.id AND %products%.category = %prodtype%.id ";
$sql .= " GROUP BY kind, CONCAT($unit,productname),price,pricelevelname,togo";
if ($printExtras) { if ($printExtras) {
$sql = "SELECT $sql = "SELECT
productname, CONCAT($unit,productname) as productname,
price, price,
PL.name as pricelevelname, PL.name as pricelevelname,
togo, togo,
@ -428,7 +432,7 @@ class Bill {
P.category = PT.id P.category = PT.id
GROUP BY GROUP BY
kind, kind,
productname, CONCAT($unit,productname),
price, price,
pricelevelname, pricelevelname,
togo, togo,
@ -1196,6 +1200,8 @@ class Bill {
$payment_lang = array("name","name_en","name_esp"); $payment_lang = array("name","name_en","name_esp");
$payment_col = $payment_lang[$l]; $payment_col = $payment_lang[$l];
$unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = " $sql = "
SELECT * FROM ( SELECT * FROM (
SELECT B.billdate as billdate,B.id as billid, SELECT B.billdate as billdate,B.id as billid,
@ -1208,7 +1214,7 @@ class Bill {
(IF(B.host = '1','x','-')) as host, (IF(B.host = '1','x','-')) as host,
IFNULL(B.ref,'') as reference, IFNULL(B.ref,'') as reference,
B.status as status, B.status as status,
productname, CONCAT($unit,productname) as productname,
productid, productid,
IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode, IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode,
P.$payment_col as payment, P.$payment_col as payment,
@ -1230,7 +1236,7 @@ class Bill {
'-' as host, '-' as host,
'' as reference, '' as reference,
'd' as status, 'd' as status,
productname, CONCAT($unit,productname) as productname,
productid, productid,
IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode, IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode,
'' as payment, '' as payment,

View File

@ -703,15 +703,15 @@ if ($doCsvExport || $onlyresultreturn) {
$csv .= "$aBillId; \"$billdate\" ; \"$tablename\" ; \"" . $this->t['cashaction'][$l] . "\" ; - ; \"\" ; \"$brutto\" ; \"$netto\" ; \"$tax\" ; \"$paymentArray[$paymentid]\";$userid; \"$username\"; \"$statusTxt\"; $ref\n"; $csv .= "$aBillId; \"$billdate\" ; \"$tablename\" ; \"" . $this->t['cashaction'][$l] . "\" ; - ; \"\" ; \"$brutto\" ; \"$netto\" ; \"$tax\" ; \"$paymentArray[$paymentid]\";$userid; \"$username\"; \"$statusTxt\"; $ref\n";
} }
} else { } else {
$unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = "SELECT DISTINCT productname,price,Q.tax as tax,anoption,kind FROM %queue% Q,%billproducts%,%prodtype%,%products% P WHERE %billproducts%.billid=? AND %billproducts%.queueid=Q.id AND Q.productid=P.id AND P.category=%prodtype%.id"; $sql = "SELECT DISTINCT CONCAT($unit,productname) as productname,price,Q.tax as tax,anoption,kind FROM %queue% Q,%billproducts%,%prodtype%,%products% P WHERE %billproducts%.billid=? AND %billproducts%.queueid=Q.id AND Q.productid=P.id AND P.category=%prodtype%.id";
if ($status == 'x') { if ($status == 'x') {
$statusTxt = $this->t["laterCancelled"][$l]; $statusTxt = $this->t["laterCancelled"][$l];
} else if ($status == 's') { } else if ($status == 's') {
$statusTxt = $this->t["storno"][$l]; $statusTxt = $this->t["storno"][$l];
} else { } else {
$statusTxt = ""; $statusTxt = "";
$sql = "SELECT productname,anoption,paidtime,price,Q.tax as tax,kind FROM %queue% Q,%prodtype%,%products% P WHERE billid=? AND Q.productid=P.id AND P.category=%prodtype%.id"; $sql = "SELECT CONCAT($unit,productname) as productname,anoption,paidtime,price,Q.tax as tax,kind FROM %queue% Q,%prodtype%,%products% P WHERE billid=? AND Q.productid=P.id AND P.category=%prodtype%.id";
} }
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));

View File

@ -25,6 +25,22 @@ class CommonUtils {
self::$plugins = $plugins; self::$plugins = $plugins;
} }
public static $g_units_arr =
array(
array("text" => "Stück","value" => 0,"id" => "piece"),
array("text" => "Eingabe","value" => 1,"id" => "piece"),
array("text" => "kg","value" => 2,"id" => "kg"),
array("text" => "gr","value" => 3,"id" => "gr"),
array("text" => "mg","value" => 4,"id" => "mg"),
array("text" => "l","value" => 5,"id" => "l"),
array("text" => "ml","value" => 6,"id" => "ml"),
array("text" => "m","value" => 7,"id" => "m")
);
public static function g_units_export_arr() {
return array();
}
function verifyLastBillId($pdo,$nextIdToUse) { function verifyLastBillId($pdo,$nextIdToUse) {
if ($nextIdToUse == 1) { if ($nextIdToUse == 1) {
return true; return true;
@ -412,4 +428,17 @@ class CommonUtils {
return $needle === "" || strpos($aText, $needle) === 0; return $needle === "" || strpos($aText, $needle) === 0;
} }
public static function caseOfSqlUnitSelection($pdo) {
$decpoint = htmlspecialchars(CommonUtils::getConfigValue($pdo, "decpoint", "."));
$unit = "CASE ";
foreach(CommonUtils::$g_units_arr as $aUnit) {
if ($aUnit["value"] > 1) {
$unit .= " WHEN Q.unit='" . $aUnit["value"] . "' THEN CONCAT(REPLACE(unitamount,'.','$decpoint'),'" . $aUnit["text"] . "',' ') ";
}
}
$unit .= " ELSE '' ";
$unit .= "END";
return $unit;
}
} }

View File

@ -853,7 +853,7 @@ class Customers {
$txt = "<head>"; $txt = "<head>";
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>"; $txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $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.23">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.24">';
$txt .= "</head>"; $txt .= "</head>";
return $txt; return $txt;
} }

View File

@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) { if (strlen($status) > 150) {
$status = substr($status, 0,149); $status = substr($status, 0,149);
} }
$version = "1.5.23"; $version = "1.5.24";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion); $arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else { } else {

View File

@ -197,7 +197,18 @@ class Products {
array("id" => "priceB", "get" => "priceB","histid" => "priceB","histget" => "priceB","histexportname" => "Preis (Stufe B)","isnumber" => "1"), array("id" => "priceB", "get" => "priceB","histid" => "priceB","histget" => "priceB","histexportname" => "Preis (Stufe B)","isnumber" => "1"),
array("id" => "priceC", "get" => "priceC","histid" => "priceC","histget" => "priceC","histexportname" => "Preis (Stufe C)","isnumber" => "1"), array("id" => "priceC", "get" => "priceC","histid" => "priceC","histget" => "priceC","histexportname" => "Preis (Stufe C)","isnumber" => "1"),
array("id" => "barcode", "get" => "barcode","histid" => "barcode","histget" => "barcode","histexportname" => "Barcode","isnumber" => "0"), array("id" => "barcode", "get" => "barcode","histid" => "barcode","histget" => "barcode","histexportname" => "Barcode","isnumber" => "0"),
array("id" => "unit", "get" => "unit","histid" => "unit","histget" => "unit","histexportname" => "Einheit","isnumber" => "0", "exportvals" => array("default" => "Stück","1" => "Preiseingabe bei Bestellung")), array("id" => "unit", "get" => "unit","histid" => "unit","histget" => "unit","histexportname" => "Einheit","isnumber" => "0", "exportvals" => array(
"default" => "Stück",
"0" => "Stück",
"1" => "Preiseingabe bei Bestellung",
"2" => "Gewicht (kg)",
"3" => "Gewicht (gr)",
"4" => "Gewicht (mg)",
"5" => "Volimen (l)",
"6" => "Volumen (ml)",
"7" => "Länge (m)"
)
),
array("id" => "days", "get" => "days","histid" => "days","histget" => "days","histexportname" => "Tage","isnumber" => "0"), array("id" => "days", "get" => "days","histid" => "days","histget" => "days","histexportname" => "Tage","isnumber" => "0"),
array("id" => "tax", "get" => "IF(tax is not null, tax, 'null') as tax","histid" => "tax","histget" => "tax","histexportname" => "Steuer","isnumber" => "1"), array("id" => "tax", "get" => "IF(tax is not null, tax, 'null') as tax","histid" => "tax","histget" => "tax","histexportname" => "Steuer","isnumber" => "1"),
array("id" => "taxaustria", "get" => "IF(taxaustria is not null, taxaustria, 'null') as taxaustria","histid" => "","histget" => "","histexportname" => "","isnumber" => "0"), array("id" => "taxaustria", "get" => "IF(taxaustria is not null, taxaustria, 'null') as taxaustria","histid" => "","histget" => "","histexportname" => "","isnumber" => "0"),

View File

@ -215,43 +215,45 @@ class QueueContent {
$unit = CommonUtils::caseOfSqlUnitSelection($pdo);
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT %queue%.id as id,%resttables%.id as tableid,tablenr,longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue%,%products%,%prodtype%,%resttables%,%bill% "; $sql = "SELECT DISTINCT Q.id as id,%resttables%.id as tableid,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% ";
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,%resttables%.id as tableid,tablenr,longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue%,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT Q.id as id,%resttables%.id as tableid,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %queue% Q,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime IS NULL AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= "%queue%.toremove='0' AND "; $sql .= "Q.toremove='0' AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "Q.productid=%products%.id AND ";
$sql .= "%queue%.tablenr = %resttables%.id AND "; $sql .= "Q.tablenr = %resttables%.id AND ";
$sql .= "%products%.category=%prodtype%.id AND "; $sql .= "%products%.category=%prodtype%.id AND ";
$sql .= "%prodtype%.kind=? AND "; $sql .= "%prodtype%.kind=? AND ";
$sql .= "%queue%.isclosed is null AND "; $sql .= "Q.isclosed is null AND ";
$sql .= "%queue%.workprinted='0') "; $sql .= "Q.workprinted='0') ";
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR ("; $sql .= "AND (Q.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) "; $sql .= "Q.billid=%bill%.id AND %bill%.closingid is null)) ";
} }
$sql .= "ORDER BY ordertime,longname,anoption,cooking DESC,%queue%.id"; $sql .= "ORDER BY ordertime,longname,anoption,cooking DESC,Q.id";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($currentTime,$kind)); $stmt->execute(array($currentTime,$kind));
$result1 = $stmt->fetchAll(); $result1 = $stmt->fetchAll();
$sql = "SELECT DISTINCT q.id as id,'-' as tableid,'-' as tablenr,longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%queue% q LEFT OUTER JOIN %bill% b "; $sql = "SELECT DISTINCT Q.id as id,'-' as tableid,'-' as tablenr,CONCAT($unit,Q.productname) as longname,anoption,'-' as tableno,date_format(ordertime,'%Y-%m-%d %H:%i:00') as ordertime,cooking,TIMESTAMPDIFF(MINUTE,ordertime,?) AS waittime FROM %products%,%prodtype%,%queue% Q LEFT OUTER JOIN %bill% b ";
$sql .= " ON q.billid=b.id "; $sql .= " ON Q.billid=b.id ";
$sql .= "WHERE (readytime IS NULL AND "; $sql .= "WHERE (readytime IS NULL AND ";
$sql .= "q.toremove='0' AND "; $sql .= "Q.toremove='0' AND ";
$sql .= "q.productid=%products%.id AND "; $sql .= "Q.productid=%products%.id AND ";
$sql .= "q.tablenr is null AND "; $sql .= "Q.tablenr is null AND ";
$sql .= "%products%.category=%prodtype%.id AND "; $sql .= "%products%.category=%prodtype%.id AND ";
$sql .= "%prodtype%.kind=? AND "; $sql .= "%prodtype%.kind=? AND ";
$sql .= "q.isclosed is null AND "; $sql .= "Q.isclosed is null AND ";
$sql .= "q.workprinted='0') "; $sql .= "Q.workprinted='0') ";
$sql .= "AND (q.billid is null OR ( "; $sql .= "AND (Q.billid is null OR ( ";
$sql .= "b.closingid is null)) "; $sql .= "b.closingid is null)) ";
$sql .= "ORDER BY ordertime,longname,anoption,cooking DESC"; $sql .= "ORDER BY ordertime,longname,anoption,cooking DESC";
@ -413,7 +415,10 @@ class QueueContent {
$groupworkitems = 1; $groupworkitems = 1;
} }
$sql = "SELECT %queue%.id as id,%queue%.tablenr as tableid, %queue%.productid,%queue%.productname as longname,%queue%.price as price,%queue%.togo as togo,anoption,%prodtype%.kind as kind,%prodtype%.printer as printer,fixbind FROM %queue%,%products%,%prodtype% WHERE %prodtype%.kind=? AND %queue%.id IN ($queueStr) AND productid=%products%.id AND %products%.category=%prodtype%.id ORDER BY longname"; $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql = "SELECT Q.id as id,Q.tablenr as tableid, Q.productid,CONCAT($unit,Q.productname) as longname,Q.price as price,Q.togo as togo,";
$sql .= "anoption,%prodtype%.kind as kind,%prodtype%.printer as printer,fixbind FROM %queue% Q,%products%,%prodtype% ";
$sql .= "WHERE %prodtype%.kind=? AND Q.id IN ($queueStr) AND productid=%products%.id AND %products%.category=%prodtype%.id ORDER BY longname";
$queueItems = CommonUtils::fetchSqlAll($pdo, $sql, array($kind)); $queueItems = CommonUtils::fetchSqlAll($pdo, $sql, array($kind));
$jobs = array(); $jobs = array();
@ -654,24 +659,25 @@ class QueueContent {
private function getJsonLastMadeItems($kind) { private function getJsonLastMadeItems($kind) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
$unit = CommonUtils::caseOfSqlUnitSelection($pdo);
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT %queue%.id as id,tablenr,longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables%,%bill% "; $sql = "SELECT DISTINCT Q.id as id,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables%,%bill% ";
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,tablenr,longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%resttables% "; $sql = "SELECT DISTINCT Q.id as id,tablenr,CONCAT($unit,Q.productname) as longname,anoption,tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%resttables% ";
} }
$sql .= "WHERE (readytime IS NOT NULL AND "; $sql .= "WHERE (readytime IS NOT NULL AND ";
$sql .= "delivertime IS NULL AND "; $sql .= "delivertime IS NULL AND ";
$sql .= "%queue%.toremove = '0' AND "; $sql .= "Q.toremove = '0' AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "Q.productid=%products%.id AND ";
$sql .= "%queue%.tablenr = %resttables%.id AND "; $sql .= "Q.tablenr = %resttables%.id AND ";
$sql .= "%products%.category=%prodtype%.id AND "; $sql .= "%products%.category=%prodtype%.id AND ";
$sql .= "%prodtype%.kind=? AND "; $sql .= "%prodtype%.kind=? AND ";
$sql .= "%queue%.isclosed is null AND "; $sql .= "Q.isclosed is null AND ";
$sql .= "%queue%.workprinted='0') "; $sql .= "Q.workprinted='0') ";
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR ("; $sql .= "AND (Q.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) "; $sql .= "Q.billid=%bill%.id AND %bill%.closingid is null)) ";
} }
$sql .= "ORDER BY readytime DESC LIMIT 10;"; $sql .= "ORDER BY readytime DESC LIMIT 10;";
@ -680,24 +686,24 @@ class QueueContent {
$result1 = $stmt->fetchAll(); $result1 = $stmt->fetchAll();
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql = "SELECT DISTINCT %queue%.id as id,0 as tablenr,longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype%,%bill% "; $sql = "SELECT DISTINCT Q.id as id,0 as tablenr,CONCAT($unit,Q.productname) as longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype%,%bill% ";
} else { } else {
$sql = "SELECT DISTINCT %queue%.id as id,0 as tablenr,longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue%,%products%,%prodtype% "; $sql = "SELECT DISTINCT Q.id as id,0 as tablenr,CONCAT($unit,Q.productname) as longname,anoption,'-' as tableno,readytime,%products%.id as prodid FROM %queue% Q,%products%,%prodtype% ";
} }
$sql .= "WHERE (readytime IS NOT NULL AND "; $sql .= "WHERE (readytime IS NOT NULL AND ";
$sql .= "delivertime IS NULL AND "; $sql .= "delivertime IS NULL AND ";
$sql .= "%queue%.toremove = '0' AND "; $sql .= "Q.toremove = '0' AND ";
$sql .= "%queue%.productid=%products%.id AND "; $sql .= "Q.productid=%products%.id AND ";
$sql .= "%queue%.tablenr is null AND "; $sql .= "Q.tablenr is null AND ";
$sql .= "%products%.category=%prodtype%.id AND "; $sql .= "%products%.category=%prodtype%.id AND ";
$sql .= "%prodtype%.kind=? AND "; $sql .= "%prodtype%.kind=? AND ";
$sql .= "%queue%.isclosed is null AND "; $sql .= "Q.isclosed is null AND ";
$sql .= "%queue%.workprinted='0') "; $sql .= "Q.workprinted='0') ";
if ($this->areBillExisting($pdo)) { if ($this->areBillExisting($pdo)) {
$sql .= "AND (%queue%.billid is null OR ("; $sql .= "AND (Q.billid is null OR (";
$sql .= "%queue%.billid=%bill%.id AND %bill%.closingid is null)) "; $sql .= "Q.billid=%bill%.id AND %bill%.closingid is null)) ";
} }
$sql .= "ORDER BY readytime DESC LIMIT 10;"; $sql .= "ORDER BY readytime DESC LIMIT 10;";
@ -731,16 +737,17 @@ class QueueContent {
} }
private function appendProdsForBarKitchenAndAutoDelivery($pdo,$kind,$resultarray) { private function appendProdsForBarKitchenAndAutoDelivery($pdo,$kind,$resultarray) {
$sql = "SELECT DISTINCT q.id as id,tableno as tablename,longname,delivertime,anoption,p.id as prodid "; $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
$sql .= "FROM %queue% q "; $sql = "SELECT DISTINCT Q.id as id,tableno as tablename,CONCAT($unit,Q.productname) as longname,delivertime,anoption,p.id as prodid ";
$sql .= "LEFT JOIN %bill% b ON q.billid=b.id "; $sql .= "FROM %queue% Q ";
$sql .= "LEFT JOIN %bill% b ON Q.billid=b.id ";
$sql .= "INNER JOIN %products% p ON q.productid=p.id "; $sql .= "INNER JOIN %products% p ON Q.productid=p.id ";
$sql .= "INNER JOIN %prodtype% t ON p.category=t.id AND t.kind=? AND t.usesupplydesk='0' AND t.usekitchen='1' "; $sql .= "INNER JOIN %prodtype% t ON p.category=t.id AND t.kind=? AND t.usesupplydesk='0' AND t.usekitchen='1' ";
$sql .= "LEFT JOIN %resttables% r ON q.tablenr=r.id "; $sql .= "LEFT JOIN %resttables% r ON Q.tablenr=r.id ";
$sql .= "WHERE q.workprinted='0' AND toremove <> '1' AND q.readytime IS NOT NULL AND q.toremove='0' "; $sql .= "WHERE Q.workprinted='0' AND toremove <> '1' AND Q.readytime IS NOT NULL AND Q.toremove='0' ";
$sql .= " AND (q.billid is null OR (q.billid=b.id AND b.closingid is null)) "; $sql .= " AND (Q.billid is null OR (Q.billid=b.id AND b.closingid is null)) ";
$sql .= "ORDER BY q.delivertime DESC LIMIT 50"; $sql .= "ORDER BY Q.delivertime DESC LIMIT 50";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(array($kind)); $stmt->execute(array($kind));
@ -1143,8 +1150,9 @@ class QueueContent {
$theOption = $aProd["option"]; $theOption = $aProd["option"];
$theChangedPrice = $aProd["changedPrice"]; $theChangedPrice = $aProd["changedPrice"];
$theChangedPrice = str_replace(',','.',$theChangedPrice); $theChangedPrice = str_replace(',','.',$theChangedPrice);
$unitamount = $aProd["unitamount"];
$getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount FROM %products% where id=?"; $getPriceSql = "SELECT priceA,priceB,priceC,longname,tax,taxaustria,amount,IFNULL(unit,0) as unit FROM %products% where id=?";
$row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid)); $row = CommonUtils::getRowSqlObject($pdo, $getPriceSql, array($productid));
if ($row == null) { if ($row == null) {
echo "Fehler: Preise nicht vorhanden"; // error echo "Fehler: Preise nicht vorhanden"; // error
@ -1162,6 +1170,7 @@ class QueueContent {
} }
$productname = $row->longname; $productname = $row->longname;
$unit = intval($row->unit);
if (($theChangedPrice == "NO") || (!is_numeric($theChangedPrice))) { if (($theChangedPrice == "NO") || (!is_numeric($theChangedPrice))) {
$price_for_level_A = $row->priceA; $price_for_level_A = $row->priceA;
$price_for_level_B = $row->priceB; $price_for_level_B = $row->priceB;
@ -1232,16 +1241,25 @@ class QueueContent {
} }
} }
if (is_numeric($unit) && ($unit > 1)) {
if (!is_numeric($unitamount)) {
$pdo->rollBack();
echo json_encode(array("status" => "ERROR", "msg" => "Mengenangabe nicht numerisch"));
} else {
$price = $price * $unitamount;
}
}
if (is_null($theTableid) || (is_numeric($theTableid) && is_numeric($productid))) { if (is_null($theTableid) || (is_numeric($theTableid) && is_numeric($productid))) {
$useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid); $useConditions = $this->getUseKitchenAndSupplyForProdWithPdo($pdo,$productid);
$insertSql = "INSERT INTO `%queue%` ( $insertSql = "INSERT INTO `%queue%` (
`id` , `tablenr`,`productid`,`pricelevel`,`price`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`) `id` , `tablenr`,`productid`,`pricelevel`,`price`,`unit`,`unitamount`,`tax`,`taxaustria`,`productname`,`ordertime`,`orderuser`,`anoption`,`pricechanged`,`togo`,`readytime`,`delivertime`,`paidtime`,`billid`,`toremove`,`cooking`,`workprinted`)
VALUES ( VALUES (
NULL , ?,?,?,?,?,?,?,?,?,?,?,?, null, null, NULL,NULL,'0',NULL,'0');"; NULL , ?,?,?,?,?,?,?,?,?,?,?,?,?,?, null, null, NULL,NULL,'0',NULL,'0');";
$stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($insertSql));
$stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo)); $stmt->execute(array($theTableid,$productid,$currentPriceLevelId,$price,$unit,$unitamount,$tax,$taxaustrianumber,$productname,$ordertime,$_SESSION['userid'],$theOption,($theChangedPrice == "NO" ? 0 : 1),$togo));
$queueid = $pdo->lastInsertId(); $queueid = $pdo->lastInsertId();
$sql = "INSERT INTO %recordsqueue% (recordid,queueid) VALUES(?,?)"; $sql = "INSERT INTO %recordsqueue% (recordid,queueid) VALUES(?,?)";
@ -1559,7 +1577,7 @@ class QueueContent {
} }
$prods = array(); $prods = array();
$sql = "SELECT productid,readytime,paidtime,cooking,productname,anoption,productname,togo,pricechanged,price FROM %queue% WHERE id=? ORDER BY productid "; $sql = "SELECT productid,readytime,paidtime,cooking,productname,anoption,productname,togo,pricechanged,price,unit,unitamount FROM %queue% WHERE id=? ORDER BY productid ";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
foreach ($resultids as $anId) { foreach ($resultids as $anId) {
$stmt->execute(array($anId)); $stmt->execute(array($anId));
@ -1588,6 +1606,8 @@ class QueueContent {
"pricechanged" => $row->pricechanged, "pricechanged" => $row->pricechanged,
"togo" => $row->togo, "togo" => $row->togo,
"price" => $row->price, "price" => $row->price,
"unit" => $row->unit,
"unitamount" => $row->unitamount,
"extras" => $extras["extrasnames"], "extras" => $extras["extrasnames"],
"extrasids" => $extras["extrasids"], "extrasids" => $extras["extrasids"],
"isready" => $isReady, "isready" => $isReady,
@ -1686,17 +1706,19 @@ class QueueContent {
function getJsonProductsOfTableToPay($tableid) { function getJsonProductsOfTableToPay($tableid) {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $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,IFNULL(printjobid,0) as printjobid $unit = CommonUtils::caseOfSqlUnitSelection($pdo);
FROM %queue%
INNER JOIN %products% ON %queue%.productid = %products%.id $sql = "SELECT Q.id as id,CONCAT($unit,Q.productname) as longname,Q.price as price,Q.tax,%prodtype%.kind as kind,%pricelevel%.name as pricelevelname,%products%.id as prodid,Q.togo as togo, ordertime,IFNULL(prodimageid,0) as prodimageid,IFNULL(printjobid,0) as printjobid
INNER JOIN %pricelevel% ON %queue%.pricelevel = %pricelevel%.id FROM %queue% Q
INNER JOIN %products% ON Q.productid = %products%.id
INNER JOIN %pricelevel% ON Q.pricelevel = %pricelevel%.id
INNER JOIN %prodtype% ON %products%.category = %prodtype%.id "; INNER JOIN %prodtype% ON %products%.category = %prodtype%.id ";
if ($tableid == 0) { if ($tableid == 0) {
$sql .= "WHERE tablenr is null "; $sql .= "WHERE tablenr is null ";
} else { } else {
$sql .= "WHERE tablenr = $tableid "; $sql .= "WHERE tablenr = $tableid ";
} }
$sql .= "AND paidtime is null AND %queue%.toremove='0' AND isclosed is null ORDER BY kind,ordertime, id;"; $sql .= "AND paidtime is null AND Q.toremove='0' AND isclosed is null ORDER BY kind,ordertime, id;";
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
$stmt->execute(); $stmt->execute();

View File

@ -194,8 +194,10 @@ class ProductEntry {
} }
if (!is_null($unit)) { if (!is_null($unit)) {
if ($unit == 1) { foreach(CommonUtils::$g_units_arr as $u) {
$extArr[] = self::$UNIT . ":Eingabe"; if ($u["value"] == $unit) {
$extArr[] = self::$UNIT . ":" . $u["text"];
}
} }
} }
@ -266,8 +268,14 @@ class ProductEntry {
} else if ($identifier == self::$UNIT) { } else if ($identifier == self::$UNIT) {
if ($value == "Stück") { if ($value == "Stück") {
$this->unit = null; $this->unit = null;
} else if ($value == "Eingabe") { } else {
$this->unit = 1; $vlower = strtolower($value);
foreach(CommonUtils::$g_units_arr as $u) {
if (strtolower($u["text"]) == $vlower) {
$this->unit = $u["value"];
break;
}
}
} }
} else if ($identifier == self::$DAYS) { } else if ($identifier == self::$DAYS) {
$this->days = $value; $this->days = $value;

View File

@ -755,15 +755,7 @@ class Version {
} }
public static function upd_1403_1404($pdo, $prefix, $dbname) { public static function upd_1403_1404($pdo, $prefix, $dbname) {
try {
$sql = "OPTIMIZE TABLE %queue%";
$stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix));
$stmt->execute();
return array(true); return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
} }
public static function upd_1404_1405($pdo, $prefix, $dbname) { public static function upd_1404_1405($pdo, $prefix, $dbname) {
@ -783,9 +775,6 @@ class Version {
$sql = "OPTIMIZE TABLE %products%"; $sql = "OPTIMIZE TABLE %products%";
$stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix)); $stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix));
$stmt->execute(); $stmt->execute();
$sql = "OPTIMIZE TABLE %queue%";
$stmt = $pdo->prepare(DbUtils::substTableAliasCore($sql, $prefix));
$stmt->execute();
return array(true); return array(true);
} catch (PDOException $e) { } catch (PDOException $e) {
@ -1197,6 +1186,20 @@ class Version {
} }
} }
public static function upd_1523_1524($pdo, $prefix, $dbname) {
try {
self::execSql($pdo, "ALTER TABLE %queue% ADD unit INT(1) NULL AFTER price");
self::execSql($pdo, "ALTER TABLE %queue% ADD unitamount decimal(15,2) NULL AFTER unit");
self::execSql($pdo, "UPDATE %queue% SET unitamount='1'");
$sql = "UPDATE %queue% SET unit=(SELECT IFNULL(unit,0) FROM %products% P WHERE productid=P.id)";
self::execSql($pdo, $sql);
self::execSql($pdo, "OPTIMIZE TABLE %queue%");
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"), "1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1267,7 +1270,8 @@ class Version {
"1.5.19" => array("upd_1519_1520","1.5.20"), "1.5.19" => array("upd_1519_1520","1.5.20"),
"1.5.20" => array("upd_1520_1521","1.5.21"), "1.5.20" => array("upd_1520_1521","1.5.21"),
"1.5.21" => array("upd_1521_1522","1.5.22"), "1.5.21" => array("upd_1521_1522","1.5.22"),
"1.5.22" => array("upd_1522_1523","1.5.23") "1.5.22" => array("upd_1522_1523","1.5.23"),
"1.5.23" => array("upd_1523_1524","1.5.24")
); );
public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) { public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) {

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.23"></script> <script src="utilities.js?v=1.5.24"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <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> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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 http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -15,8 +15,8 @@
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <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="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js"></script> <script src="utilities.js"></script>
<script src="elements/product.js?v=1.5.23"></script> <script src="elements/product.js?v=1.5.24"></script>
<script src="elements/extra.js?v=1.5.23"></script> <script src="elements/extra.js?v=1.5.24"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head> </head>

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="css/ospage.css" /> <link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" /> <link rel="stylesheet" href="css/tablepanel.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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 http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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 name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razón"];
var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"]; var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"];
var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."]; var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."];
var nextpage = "paydesk.html?version=1.5.23"; var nextpage = "paydesk.html?version=1.5.24";
var lang; var lang;
@ -84,10 +84,10 @@ function setLanguage(language) {
if (nextPage == "p") { if (nextPage == "p") {
$("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]); $("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]);
nextpage = "paydesk.html?t=" + tableid + "&version=1.5.23"; nextpage = "paydesk.html?t=" + tableid + "&version=1.5.24";
} else { } else {
$("#nextpagebtntxt").html(SUM_TO_ORDER[lang]); $("#nextpagebtntxt").html(SUM_TO_ORDER[lang]);
nextpage = "waiter.html?version=1.5.23"; nextpage = "waiter.html?version=1.5.24";
} }
var txt = "<table class='viewtable'>"; var txt = "<table class='viewtable'>";

View File

@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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 name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <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-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.23"></script> <script src="utilities.js?v=1.5.24"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <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> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.23"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.24">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" /> <link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -291,6 +291,13 @@ function createLabelWithTextField(labelid,displayedName,defaultText) {
text += '</div>'; text += '</div>';
return text; return text;
} }
function createLabelWithTextFieldWithContent(labelid,displayedName,defaultText,content) {
var text = '<div class="ui-field-contain">';
text += '<label for="' + labelid + '">' + displayedName + '</label>';
text += '<input type="text" id="' + labelid + '" value="' + toHtml(content) + '" data-mini="true" placeholder="' + defaultText + '" style="background-color:white;color:black;" />';
text += '</div>';
return text;
}
function createLabelWithTextFieldWithValue(labelid,displayedName,content) { function createLabelWithTextFieldWithValue(labelid,displayedName,content) {
var text = '<div class="ui-field-contain">'; var text = '<div class="ui-field-contain">';
text += '<label for="' + labelid + '">' + displayedName + '</label>'; text += '<label for="' + labelid + '">' + displayedName + '</label>';
@ -337,3 +344,14 @@ function createLabelWithOption(prefix,id,aLabel,displayedName,allValues,theValue
return text; return text;
} }
var g_units_arr = [
{ text: "Stück", value: 0, id: "piece", longtext: "Stück"},
{ text: "Eingabe", value: 1, id: "input", longtext: "Preiseingabe"},
{ text: "kg", value: 2, id: "kg", longtext: "Gewicht (kg)"},
{ text: "gr", value: 3, id: "gr", longtext: "Gewicht (gr)"},
{ text: "mg", value: 4, id: "mg", longtext: "Gewicht (mg)"},
{ text: "l", value: 5, id: "l", longtext: "Volumen (l)"},
{ text: "ml", value: 6, id: "ml", longtext: "Volumen (ml)"},
{ text: "m", value: 7, id: "m", longtext: "Länge (m)"}
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long