OrderSprinter 1.5.8

This commit is contained in:
Geno 2020-11-19 23:11:52 +01:00
parent eb6b2232a8
commit 67362a8038
36 changed files with 577 additions and 101 deletions

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" href="css/gueststyle.css?v=1.5.7" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.7" />
<link rel="stylesheet" href="css/gueststyle.css?v=1.5.8" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.8" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
@ -105,7 +105,7 @@
<div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.7&nbsp;&nbsp;</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.8&nbsp;&nbsp;</div>
</div><!-- /grid-a -->
</div>
</div>

View File

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

Binary file not shown.

View File

@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.5.7");
Database::setVersion($pdo,$prefix,"1.5.8");
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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="kitchenbar.js?v=1.5.7"></script>
<script src="utilities.js?v=1.5.8"></script>
<script src="kitchenbar.js?v=1.5.8"></script>
<style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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

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

View File

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

View File

@ -414,7 +414,7 @@ $zones[] = $timezone_identifiers[$i];
echo json_encode($zones);
} else if ($command == 'update') {
set_time_limit(60*30);
$installerVersion = "1.5.7";
$installerVersion = "1.5.8";
$admin = new InstallAdmin();
$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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,8 +13,8 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="kitchenbar.js?v=1.5.7"></script>
<script src="utilities.js?v=1.5.8"></script>
<script src="kitchenbar.js?v=1.5.8"></script>
<style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,10 +13,10 @@
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="elements/tablemap.js?v=1.5.7"></script>
<script src="elements/roommap.js?v=1.5.7"></script>
<script src="elements/groundplan.js?v=1.5.7"></script>
<script src="utilities.js?v=1.5.8"></script>
<script src="elements/tablemap.js?v=1.5.8"></script>
<script src="elements/roommap.js?v=1.5.8"></script>
<script src="elements/groundplan.js?v=1.5.8"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -72,6 +72,7 @@ var MAN_RESERVATION = ["Reservierung","Reservation","Reserva"];
var MAN_RATING = ["Bewertung","Rating","Valoración"];
var MAN_CHANGEPRICE = ["Preisänderung während Bestellung","Change price during ordering","Modificar precio durante ordenar"];
var MAN_CUSTOMERS = ["Gäste","Guests","Clientes"];
var MAN_PICKUPS = ["Abholanzeige","Pickup Display","Vista de Recogido"];
var MAN_MANAGER = ["Verwaltung","Administration","Administración"];
var MAN_CLOSINGRIGHT = ["Tageserfassung","Closing","Cerrar día"];
var MAN_DASHRIGHT = ["Dashboard","Dashboard","Dashboard"];
@ -257,6 +258,9 @@ var MAN_CLOSTEMPLATE_HINT = ["Hinweis: Die Vorlage bezieht sich nur auf die html
"Note: The template only refers to the html display of the closing, not to receipt printing. The adjustment is described in the manual.",
"Nota: La plantilla sólo se refiere a la visualización html de la entrada del día, no a la impresión de recibos. El ajuste se describe en el manual."
];
var MAN_PICKUPTEMPLATE_HINT = ["Hinweis: Die Anpassung der Bonvorlage ist in der Anleitung und auf der Produktwebseite beschrieben.",
"Hint: The customization of the receipt template is described in the manual and on the product home page.",
"Nota: La adapción del template esta explicada en la página web y el manual."];
var MAN_NO_ADMIN = ["Um Admin-Rechte zu bearbeiten, muss der Benutzer selbst Adminrechte besitzen.", "Modifying admin rights require that the changing user has also admin rights.", "Necesitas derecho de admin para modificar derecho de admin para otros usarios."];
var MAN_NO_ADMIN_CREATE = ["Nur Admin-Benutzer können andere Admin-Benutzer anlegen",
"Only admin users can create other admin users",
@ -275,6 +279,7 @@ var MAN_PRINTJOBS = ["Druckerwarteschlangen","Print queues","Cola de impresión"
var MAN_PRINTER = ["Kassenbon-Drucker","Receipts Printer","Impresora de tiques"];
var MAN_FOOD_PRINTER = ["Speisearbeitsbon-Drucker","Food work ticket printer","Impreso de tiques de comida"];
var MAN_DRINK_PRINTER = ["Getränkearbeitsbon-Drucker","Drinks work ticket printer","Impreso de tiques de bebidas"];
var MAN_PICKUP_PRINTER = ["Abholbon-Drucker","Pickup ticket printer","Impreso de tiques de recigidos"];
var MAN_UPDATE_PRINTJOBS = ["Aktualisieren","Update","Actualizar"];
var MAN_CLEAR_PRINTJOBS = ["Alle Druckjobs löschen","Clear all print jobs","Remover todo"];
var MAN_PRINT_JOBS_COUNT = ["Druckaufträge","print jobs","tareas de impresión"];
@ -306,6 +311,8 @@ var MAN_POLLBILLS = ["Rechnungsbons (Sek.)","Bills (sec.)","Facturas"];
var MAN_POLLWORKSF = ["Speisearbeitsbons (Sek.)","Food work receipts (sec.)","Tiquets de trabajo de comidas"];
var MAN_POLLWORKSD = ["Getränkearbeitsbons (Sek.)","Drinks work receipts (sec.)","tiquets de trabajo de bebidas"];
var MAN_POLLCLOSINGS = ["Tageserfassungen (Sek.)","closings (sec.)","Resumen del dia"];
var MAN_POLLPICKUPS = ["Abholbons (Sek.)","Pickup receipts (sec.)","Recogidos"];
var MAN_SHOWPICKUPSNO = ["Zeige maximale Anzahl fertige Abholjobs","Show max number of pickups","Mostrar max. numero de recogidos"];
var MAN_POLL_HINT = ["Einstellungen der Abfrageintervalle wirken erst ab Printserverversion 1.5.6. Der Printserver muss neu gestartet werden, damit Änderungen appliziert werden. Erlaubter Bereich: 2 bis 30 Sekunden.",
"The settings of the poll interval only work for print server version 1.5.6 and higher. The settings will be applied after a restart of the print server. Valid range: 2-30 seconds",
"Los datos de los intervalos son para printserver 1.5.6 y despues."];
@ -422,7 +429,8 @@ var MAN_PRINT_INSTANCE = ["Druckerinstanz","Printer instance","Impresora"];
var MAN_RECEIPT_TXT = ["Kasse","Receipts","Recibos"];
var MAN_DRINKS_REC_TXT = ["Getränke","Drinks","Bebidas"];
var MAN_FOOD_REC_TXT = ["Speisen","Food","Comidas"];
var MAN_PRINSTANCE_HINT = ["Die Zuordnungen wirken erst ab Printserverversion 1.3.14 oder höher!","The assignments only work with print server versions 1.3.14 and higher!","Esta configuración sólo funciona con printservers de una version 1.3.14 o despues!"];
var MAN_PICKUPQUEUE_TXT = ["Abholbons","Pickup receips","Tiquets de recogidos"];
var MAN_PRINSTANCE_HINT = ["Alle Zuordnungen wirken erst ab Printserverversion 1.5.8 oder höher!","All the assignments only work with print server versions 1.5.8 and higher!","Esta configuración sólo funciona con printservers de una version 1.5.8 o despues!"];
var MAN_DASHSLOT1 = ["Dashboard Slot 1","Dashboard Slot 1","Dashboard Slot 1"];
var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"];
var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"];
@ -444,9 +452,11 @@ var MAN_CATEGORY = ["Kategorie","Category","Categoria"];
var MAN_FOOD_CAT = ["Speisen","Food","Comidas"];
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_PRINTPICKUPS = ["Drucke Abholbons","Pickup receipts","Imprimir tickets de recogidos"];
var MAN_PRINTPICKUP_HINT = ["Abholbons funktionieren nur in Kombination mit Arbeitsbons!","Pickup receipts only work with work receipts!","Tiquets de recogidos solo on tickets de trabajo!"];
var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1];
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0];
var numberOfClosings = 0;
@ -471,11 +481,12 @@ var generalValuesSettings = [
["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"],
["companyinfo","Betriebsinfo","i",0],
["hosttext","Bewirtungsbeleg","i",0],
["rectemplate","Bonvorlage ","i",0],
["rectemplate","Kassenbonvorlage ","i",0],
["foodtemplate","Arb.bonvorlage Speisen","i",0],
["drinktemplate","Arb.bonvorlage Getränke","i",0],
["canceltemplate","Storno Arb.bonvorlage","i",0],
["clostemplate","Tageserfassung html-Vorlage","i",0],
["pickuptemplate","Abholbon Vorlage","i",0],
["serverUrl","Serveradresse","i",0],
["guesturl","Gastsystem-URL","i",0],
["guestcode","Gastsystem-Zugriffscode","i",0],
@ -579,7 +590,10 @@ var generalValuesSettings = [
["pollbills",MAN_POLLBILLS[lang],"i",0,""],
["pollworksf",MAN_POLLWORKSF[lang],"i",0,""],
["pollworksd",MAN_POLLWORKSD[lang],"i",0,""],
["pollclosings",MAN_POLLCLOSINGS[lang],"i",0,""]
["pollclosings",MAN_POLLCLOSINGS[lang],"i",0,""],
["pollpickups",MAN_POLLPICKUPS[lang],"i",0,""],
["printpickups",MAN_PRINTPICKUPS[lang],"s",55],
["showpickupsno",MAN_SHOWPICKUPSNO[lang],"i",0,""]
];
var predef = "";
@ -710,6 +724,7 @@ function setLanguage(l) {
$("#drinktemplatehint").html(MAN_DRINKTEMPLATE_HINT[l]);
$("#canceltemplatehint").html(MAN_CANCELTEMPLATE_HINT[l]);
$("#clostemplatehint").html(MAN_CLOSTEMPLATE_HINT[l]);
$("#pickuptemplatehint").html(MAN_PICKUPTEMPLATE_HINT[l]);
$("#digiprinthint").html(MAN_DIGI_PRINTWORK_HINT[l]);
$("#generalsectiontxt").html(MAN_GENSECTION_TXT[l]);
@ -740,6 +755,7 @@ function setLanguage(l) {
$(".pia_f_txt").html(MAN_FOOD_REC_TXT[l]);
$(".pia_d_txt").html(MAN_DRINKS_REC_TXT[l]);
$(".pia_c_txt").html(MAN_PRINT_ON_CLOSINGS[l]);
$(".pia_p_txt").html(MAN_PICKUPQUEUE_TXT[l]);
$("#applyPrinterInstances").html(MAN_APPLY[l]);
$("#printerInstanceHint").html(MAN_PRINSTANCE_HINT[l]);
@ -753,6 +769,9 @@ function setLanguage(l) {
$("#pollworksftxt").html(MAN_POLLWORKSF[l]);
$("#pollworksdtxt").html(MAN_POLLWORKSD[l]);
$("#pollclosingstxt").html(MAN_POLLCLOSINGS[l]);
$("#pollpickupstxt").html(MAN_POLLPICKUPS[l]);
$("#printpickupthint").html(MAN_PRINTPICKUP_HINT[l]);
$("#showpickupsnotxt").html(MAN_SHOWPICKUPSNO[l]);
}
function createMonthSelection(label) {
@ -832,6 +851,7 @@ function insertGeneralConfigItems(configResult) {
$("#drinktemplate").val(values.drinktemplate);
$("#canceltemplate").val(values.canceltemplate);
$("#clostemplate").val(values.clostemplate);
$("#pickuptemplate").val(values.pickuptemplate);
$("#reservationnote").val(values.reservationnote);
@ -884,6 +904,7 @@ function insertGeneralConfigItems(configResult) {
$("#partOfBeepOrdered").html(createYesNo("beepordered",MAN_BEEP_ORDERED, values.beepordered));
$("#partOfRestaurantmode").html(createYesNo("restaurantmode",MAN_RESTAURANT_MODE, values.restaurantmode));
$("#partOfDblog").html(createYesNo("dblog",MAN_DBLOG, values.dblog));
$("#partOfPrintpickups").html(createYesNo("printpickups",MAN_PRINTPICKUPS, values.printpickups));
$("#partOfForceprint").html(createYesNo("forceprint",MAN_FORCE_PRINT, values.forceprint));
$("#partOfPrintextras").html(createYesNo("printextras",MAN_PRINT_EXTRAS, values.printextras));
$("#partOfPriceinlist").html(createYesNo("priceinlist",MAN_PRICE_IN_LIST, values.priceinlist));
@ -990,6 +1011,7 @@ function insertGeneralConfigItems(configResult) {
generalVals[52] = values.taskifempty;
generalVals[53] = values.showtogo;
generalVals[54] = values.showprepinwaiter;
generalVals[55] = values.printpickups;
defaulttmp = values.defaulttmp;
@ -1025,6 +1047,8 @@ function insertGeneralConfigItems(configResult) {
$("#pollworksf").val(values.pollworksf);
$("#pollworksd").val(values.pollworksd);
$("#pollclosings").val(values.pollclosings);
$("#pollpickups").val(values.pollpickups);
$("#showpickupsno").val(values.showpickupsno);
$("#partOfHotelInterface").html(createHotelInterfacePart(values.hotelinterface));
@ -1397,7 +1421,7 @@ function initRestoreFileUpload() {
} else {
alert("Import war erfolgreich.");
setTimeout(function(){
document.location.href = "index.html?v=1.5.7";
document.location.href = "index.html?v=1.5.8";
},250);
}
},
@ -1951,9 +1975,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis();
setTimeout(function(){
document.location.href = "install.html?v=1.5.7&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.5.8&mode=onlyupdate&n=" + millis;
},250);
document.location.href = "install.html?v=1.5.7&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.5.8&mode=onlyupdate&n=" + millis;
}
function handleUpdateReplace(answer) {
@ -1994,6 +2018,8 @@ function insertPrinterInstance(answer) {
setPrinterInstance("pia_d1",answer.msg.d1);
setPrinterInstance("pia_d2",answer.msg.d2);
setPrinterInstance("pia_p1",answer.msg.p1);
renderPrinterInstancesTable();
bindPrinterInstanceClick();
@ -2035,6 +2061,8 @@ function bindPrinterInstanceClick() {
var d1 = $("#pia_d1").data("instance");
var d2 = $("#pia_d2").data("instance");
var p1 = $("#pia_p1").data("instance");
var data = {
k1: k1,
k2: k2,
@ -2047,7 +2075,9 @@ function bindPrinterInstanceClick() {
f2: f2,
d1: d1,
d2: d2
d2: d2,
p1: p1
};
doAjax("POST","php/contenthandler.php?module=admin&command=setprinterinstances",data,handleResultOfDbAction,null,true);
@ -2059,6 +2089,7 @@ function renderPrinterInstancesTable() {
renderPrinterInstanceRow("k",6);
renderPrinterInstanceRow("f",2);
renderPrinterInstanceRow("d",2);
renderPrinterInstanceRow("p",1);
}
function renderPrinterInstanceRow(type,typeCount) {
@ -2570,7 +2601,7 @@ function createCollapsibeOfUser(id,username,roleid,area,forNewUser,roles) {
return collapsiblePart;
}
function createCollapsibeOfRole(id,name,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rCustomers,rClosing, rDash, rTimetracking, rTimeManager, rTasks, rTasksManagement, rManager,forNewRole) {
function createCollapsibeOfRole(id,name,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rCustomers,rPickups,rClosing, rDash, rTimetracking, rTimeManager, rTasks, rTasksManagement, rManager,forNewRole) {
var collapsiblePart = '<div data-role="collapsible" id="' + id + '"';
if (forNewRole) {
collapsiblePart += ' data-theme="d" data-content-theme="d">';
@ -2596,6 +2627,7 @@ function createCollapsibeOfRole(id,name,isAdmin,rWaiter,rKitchen,rBar,rSupply,rP
collapsiblePart += createLabelWithOption("rolelabel_",id,"rating",MAN_RATING[lang],possibleValues,rRating);
collapsiblePart += createLabelWithOption("rolelabel_",id,"changeprice",MAN_CHANGEPRICE[lang],possibleValues,rChangeprice);
collapsiblePart += createLabelWithOption("rolelabel_",id,"customers",MAN_CUSTOMERS[lang],possibleValues,rCustomers);
collapsiblePart += createLabelWithOption("rolelabel_",id,"pickups",MAN_PICKUPS[lang],possibleValues,rPickups);
collapsiblePart += createLabelWithOption("rolelabel_",id,"closingright",MAN_CLOSINGRIGHT[lang],possibleValues,rClosing);
collapsiblePart += createLabelWithOption("rolelabel_",id,"dash",MAN_DASHRIGHT[lang],possibleValues,rDash);
collapsiblePart += createLabelWithOption("rolelabel_",id,"timetracking",MAN_TIMETRACKINGRIGHT[lang],possibleValues,rTimetracking);
@ -2678,6 +2710,7 @@ function fillRoleListIntoGui(answer) {
aRole.right_rating,
aRole.right_changeprice,
aRole.right_customers,
aRole.right_pickups,
aRole.right_closing,
aRole.right_dash,
aRole.right_timetracking,
@ -2690,7 +2723,7 @@ function fillRoleListIntoGui(answer) {
}
rolesPart += createCollapsibeOfRole(
"roleid_newrole",MAN_NEW_ROLE[lang],
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,true);
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,true);
$("#rolescontentpart").html(rolesPart);
$("#rolescontentpart").trigger("create");
@ -2741,6 +2774,7 @@ function collectRoleInfo(roleid) {
["rRating", "#rolelabel_rating", true,true],
["rChangeprice", "#rolelabel_changeprice", true,true],
["rCustomers", "#rolelabel_customers", true,true],
["rPickups", "#rolelabel_pickups", true,true],
["rManager", "#rolelabel_manager", true,true],
["rClosing", "#rolelabel_closingright", true,true],
["rDash", "#rolelabel_dash", true,true],
@ -3226,6 +3260,8 @@ function insertPrintQueue(queue) {
printertxt = MAN_FOOD_PRINTER[lang];
} else if (printer == 8) {
printertxt = MAN_DRINK_PRINTER[lang];
} else if (printer == 9) {
printertxt = MAN_PICKUP_PRINTER[lang];
}
li += '<ul id="printqueue_' + i + '" data-role="listview" data-divider-theme="a" data-inset="true">';
@ -3462,7 +3498,7 @@ $(document).on("pageinit", "#admin-page", function () {
<textarea cols="40" rows="8" name="companyinfo" id="companyinfo" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
</div>
<div data-role="fieldcontain">
<label for="rectemplate">Bonvorlage:</label>
<label for="rectemplate">Kassenbonvorlage:</label>
<textarea cols="40" rows="8" name="rectemplate" id="rectemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
<i id=rectemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
@ -3485,6 +3521,11 @@ $(document).on("pageinit", "#admin-page", function () {
<textarea cols="40" rows="8" name="canceltemplate" id="canceltemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
<i id=canceltemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain">
<label for="pickuptemplate">Vorlage Abholbon:</label>
<textarea cols="40" rows="8" name="pickuptemplate" id="pickuptemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
<i id=pickuptemplatehint style="padding-left: 50px;padding-right: 50px;">Hinweis: siehe Anleitung</i>
</div>
<div data-role="fieldcontain">
<label for="clostemplate">Vorlage html-Tageserfassung:</label>
<textarea cols="40" rows="8" name="clostemplate" id="clostemplate" class="genConfigEl" style="background-color:#FFFFFF;color:black;"></textarea>
@ -3547,6 +3588,12 @@ $(document).on("pageinit", "#admin-page", function () {
<div id="partOfReceiptFontSize"></div>
<div id="partOfPaymentConfig" style="display:none;"></div>
<div id="partOfWorkflowConfig"></div>
<div id="partOfPrintpickups"></div>
<i id=printpickupthint style="padding-left: 50px;padding-right: 50px;">Hinweis: nu bei Arbeitsbons</i>
<div data-role="fieldcontain">
<label for="showpickupsno"><span id="showpickupsnotxt">Max Abholjobs</span></label>
<input type="text" value="" data-mini="true" placeholder="2" id="showpickupsno" data-theme="c" class="genConfigEl"/>
</div>
<div id="partIfDigiWorkflow">
<div id="partOfDigigopaysetready"></div>
<span id=digigopaysetreadyhint></span>
@ -3800,6 +3847,10 @@ $(document).on("pageinit", "#admin-page", function () {
<label for="pollclosings"><span id="pollclosingstxt">Abfrageintervall TE</span></label>
<input type="text" value="" data-mini="true" placeholder="2" id="pollclosings" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="pollpickups"><span id="pollpickupstxt">Abfrageintervall Abh.bons</span></label>
<input type="text" value="" data-mini="true" placeholder="2" id="pollpickups" data-theme="c" class="genConfigEl"/>
</div>
<p>&nbsp;
@ -3837,6 +3888,7 @@ $(document).on("pageinit", "#admin-page", function () {
<tr id="pia_f2" class="prinstancerow"><td class="rowname"><span class="pia_f_txt">Speise</span> 2<td id="pia_f2_1"><td id="pia_f2_2"><td id="pia_f2_3"><td id="pia_f2_4"><td id="pia_f2_5"><td id="pia_f2_6"><td id="pia_f2_7"><td id="pia_f2_8"><td id="pia_f2_9"><td id="pia_f2_10"></tr>
<tr id="pia_d1" class="prinstancerow"><td class="rowname"><span class="pia_d_txt">Getränke</span> 1<td id="pia_d1_1"><td id="pia_d1_2"><td id="pia_d1_3"><td id="pia_d1_4"><td id="pia_d1_5"><td id="pia_d1_6"><td id="pia_d1_7"><td id="pia_d1_8"><td id="pia_d1_9"><td id="pia_d1_10"></tr>
<tr id="pia_d2" class="prinstancerow"><td class="rowname"><span class="pia_d_txt">Getränke</span> 2<td id="pia_d2_1"><td id="pia_d2_2"><td id="pia_d2_3"><td id="pia_d2_4"><td id="pia_d2_5"><td id="pia_d2_6"><td id="pia_d2_7"><td id="pia_d2_8"><td id="pia_d2_9"><td id="pia_d2_10"></tr>
<tr id="pia_p1" class="prinstancerow"><td class="rowname"><span class="pia_p_txt">Abholung</span><td id="pia_p1_1"><td id="pia_p1_2"><td id="pia_p1_3"><td id="pia_p1_4"><td id="pia_p1_5"><td id="pia_p1_6"><td id="pia_p1_7"><td id="pia_p1_8"><td id="pia_p1_9"><td id="pia_p1_10"></tr>
</table>
<span id="printerInstanceHint" id=printandqueuehint style="padding-left: 50px;padding-right: 50px;">Hinweis: Printserver ab 1.3.14</span>

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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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

@ -377,7 +377,7 @@ class Admin {
} else if ($command == 'getprinterinstances') {
$this->getPrinterInstances();
} else if ($command == 'setprinterinstances') {
$this->setprinterinstances($_POST["k1"],$_POST["k2"],$_POST["k3"],$_POST["k4"],$_POST["k5"],$_POST["k6"],$_POST["f1"],$_POST["f2"],$_POST["d1"],$_POST["d2"]);
$this->setprinterinstances($_POST["k1"],$_POST["k2"],$_POST["k3"],$_POST["k4"],$_POST["k5"],$_POST["k6"],$_POST["f1"],$_POST["f2"],$_POST["d1"],$_POST["d2"],$_POST["p1"]);
} else if ($command == 'getdashreports') {
$this->getdashreports();
} else if ($command == 'getDailycode') {
@ -563,7 +563,7 @@ class Admin {
$rights = array($zeile['is_admin'],$zeile['right_waiter'],$zeile['right_kitchen'],
$zeile['right_bar'],$zeile['right_supply'],$zeile['right_paydesk'],
$zeile['right_statistics'],$zeile['right_bill'],$zeile['right_products'],
$zeile['right_reservation'],$zeile['right_changeprice'],$zeile['right_customers'],$zeile['right_manager'],
$zeile['right_reservation'],$zeile['right_changeprice'],$zeile['right_customers'],$zeile['right_pickups'],$zeile['right_manager'],
$zeile['right_closing'],$zeile['right_dash'],$zeile['right_timetracking'],$zeile['right_timemanager'],
$zeile['right_tasks'],$zeile['right_tasksmanagement']);
$right_rating = $zeile['right_rating'];
@ -583,6 +583,7 @@ class Admin {
$_SESSION['right_reservation'] = false;
$_SESSION['right_changeprice'] = false;
$_SESSION['right_customers'] = false;
$_SESSION['right_pickups'] = false;
$_SESSION['right_manager'] = false;
$_SESSION['right_closing'] = false;
$_SESSION['right_dash'] = false;
@ -611,6 +612,7 @@ class Admin {
$_SESSION['right_rating'] = ($zeile['right_rating'] == 1 ? true : false);
$_SESSION['right_changeprice'] = ($zeile['right_changeprice'] == 1 ? true : false);
$_SESSION['right_customers'] = ($zeile['right_customers'] == 1 ? true : false);
$_SESSION['right_pickups'] = ($zeile['right_pickups'] == 1 ? true : false);
$_SESSION['right_manager'] = ($zeile['right_manager'] == 1 ? true : false);
$_SESSION['right_closing'] = ($zeile['right_closing'] == 1 ? true : false);
$_SESSION['right_dash'] = ($zeile['right_dash'] == 1 ? true : false);
@ -625,7 +627,7 @@ class Admin {
$this->userrights->setSession($_SESSION['is_admin'], $_SESSION['right_waiter'], $_SESSION['right_kitchen'],
$_SESSION['right_bar'], $_SESSION['right_supply'], $_SESSION['right_paydesk'], $_SESSION['right_statistics'],
$_SESSION['right_bill'], $_SESSION['right_products'], $_SESSION['right_reservation'], $_SESSION['right_rating'],
$_SESSION['right_changeprice'], $_SESSION['right_customers'],$_SESSION['right_manager'], $_SESSION['right_closing'],
$_SESSION['right_changeprice'], $_SESSION['right_customers'],$_SESSION['right_pickups'],$_SESSION['right_manager'], $_SESSION['right_closing'],
$_SESSION['right_dash'],$_SESSION['right_timetracking'],$_SESSION['right_timemanager']);
$assoc = array ("0" => "roombtnsize","1" => "tablebtnsize","2" => "prodbtnsize");
@ -1063,6 +1065,7 @@ class Admin {
array("drinktemplate",null,false),
array("canceltemplate",null,false),
array("clostemplate",null,false),
array("pickuptemplate",null,false),
array("decpoint",null,false),
array("version",null,false),
array("payprinttype",null,false),
@ -1143,6 +1146,7 @@ class Admin {
array("restaurantmode",1,false),
array("defaultview",0,false),
array("dblog",1,false),
array("printpickups",0,false),
array("printextras",0,false),
array("forceprint",0,false),
array("priceinlist",0,false),
@ -1169,7 +1173,9 @@ class Admin {
array("pollbills",2,false),
array("pollworksf",2,false),
array("pollworksd",2,false),
array("pollclosings",2,false)
array("pollclosings",2,false),
array("pollpickups",2,false),
array("showpickupsno",20,false)
);
if (is_null($pdo)) {
@ -1294,7 +1300,7 @@ class Admin {
$rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'],
$_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'],
$_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'],
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],$_SESSION['right_pickups'],
$_SESSION['right_manager'],$_SESSION['right_closing'],$_SESSION['right_dash']);
$right_rating = $_SESSION['right_rating'];
@ -1341,6 +1347,7 @@ class Admin {
"reservation.html" => 'right_reservation',
"rating.html" => 'right_rating',
"customers.html" => 'right_customers',
"pickups.html" => 'right_pickups',
"waiterdesktop.php" => 'right_waiter',
"dash.php" => 'right_dash',
"timetracking.html" => 'right_timetracking',
@ -1363,7 +1370,7 @@ class Admin {
$view = "preferences.html";
}
echo json_encode($view . "?v=1.5.7");
echo json_encode($view . "?v=1.5.8");
}
}
@ -1564,13 +1571,14 @@ class Admin {
$stattxt = array("Statistik","Statistics","Estadisticas");
$ratingtxt = array("Bewertung","Rating","Valoración");
$customerstxt = array("Gäste","Guests","Clientes");
$pickupstxt = array("Abholanzeige","Pickup display","Vista de recogidos");
$dashtxt = array("Dashboard","Dashboard","Dashboard");
$logout = array("Abmelden","Log out","Adios");
$rights = array($_SESSION['is_admin'],$_SESSION['right_waiter'],$_SESSION['right_kitchen'],
$_SESSION['right_bar'],$_SESSION['right_supply'],$_SESSION['right_paydesk'],
$_SESSION['right_statistics'],$_SESSION['right_bill'],$_SESSION['right_products'],
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],
$_SESSION['right_reservation'],$_SESSION['right_changeprice'],$_SESSION['right_customers'],$_SESSION['right_pickups'],
$_SESSION['right_manager'],$_SESSION['right_closing'],$_SESSION['right_dash'],
$_SESSION['right_timetracking'],$_SESSION['right_timemanager'],
$_SESSION['right_tasks'],$_SESSION['right_tasksmanagement']);
@ -1578,30 +1586,31 @@ class Admin {
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.7"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.8"); }
} else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.7"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.8"); }
}
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.7"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.7"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.7"); }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.8"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.8"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.8"); }
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.7"); }
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.8"); }
}
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.7"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.7"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.7"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.7"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.7"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.7"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.7"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.7"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.7"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.7");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.7"); }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.8"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.8"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.8"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.8"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.8"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.8"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.8"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.8"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.8"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.8"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.8");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.8"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.7");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.7");
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.8");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.8");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1633,17 +1642,18 @@ class Admin {
$f2 = CommonUtils::getConfigValue($pdo, 'f2prinstance', 1);
$d1 = CommonUtils::getConfigValue($pdo, 'd1prinstance', 1);
$d2 = CommonUtils::getConfigValue($pdo, 'd2prinstance', 1);
$p1 = CommonUtils::getConfigValue($pdo, 'p1prinstance', 1);
$ret = array("k1" => $k1,"k2" => $k2,"k3" => $k3, "k4" => $k4,"k5" => $k5,"k6" => $k6,"d1" => $d1,"d2" => $d2,"f1" => $f1,"f2" => $f2);
$ret = array("k1" => $k1,"k2" => $k2,"k3" => $k3, "k4" => $k4,"k5" => $k5,"k6" => $k6,"d1" => $d1,"d2" => $d2,"f1" => $f1,"f2" => $f2,"p1" => $p1);
echo json_encode(array("status" => "OK","msg" => $ret));
} catch (Exception $ex) {
echo json_encode(array("status" => "ERROR","msg" => "Error: $e"));
echo json_encode(array("status" => "ERROR","msg" => "Error: " . $ex->getMessage()));
return;
}
}
private function setprinterinstances($k1,$k2,$k3,$k4,$k5,$k6,$f1,$f2,$d1,$d2) {
private function setprinterinstances($k1,$k2,$k3,$k4,$k5,$k6,$f1,$f2,$d1,$d2,$p1) {
try {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "UPDATE %config% SET setting=? WHERE name=?";
@ -1661,6 +1671,8 @@ class Admin {
$stmt->execute(array($d1,"d1prinstance"));
$stmt->execute(array($d2,"d2prinstance"));
$stmt->execute(array($p1,"p1prinstance"));
echo json_encode(array("status" => "OK"));
} catch (Exception $ex) {
@ -2071,6 +2083,7 @@ class Admin {
"drinktemplate" => array("dbcol" => "drinktemplate","checknum" => 0),
"canceltemplate" => array("dbcol" => "canceltemplate","checknum" => 0),
"clostemplate" => array("dbcol" => "clostemplate","checknum" => 0),
"pickuptemplate" => array("dbcol" => "pickuptemplate","checknum" => 0),
"serverUrl" => array("dbcol" => "serverurl","checknum" => 0),
"guesturl" => array("dbcol" => "guesturl","checknum" => 0),
"guestcode" => array("dbcol" => "guestcode","checknum" => 0),
@ -2140,6 +2153,7 @@ class Admin {
"restaurantmode" => array("dbcol" => "restaurantmode","checknum" => 0),
"defaultview" => array("dbcol" => "defaultview", "checknum" => 0),
"dblog" => array("dbcol" => "dblog","checknum" => 0),
"printpickups" => array("dbcol" => "printpickups","checknum" => 0),
"printextras" => array("dbcol" => "printextras","checknum" => 0),
"forceprint" => array("dbcol" => "forceprint","checknum" => 0),
"priceinlist" => array("dbcol" => "priceinlist","checknum" => 0),
@ -2169,6 +2183,8 @@ class Admin {
"pollworksf" => array("dbcol" => "pollworksf","checknum" => 0),
"pollworksd" => array("dbcol" => "pollworksd","checknum" => 0),
"pollclosings" => array("dbcol" => "pollclosings","checknum" => 0),
"pollpickups" => array("dbcol" => "pollpickups","checknum" => 0),
"showpickupsno" => array("dbcol" => "showpickupsno","checknum" => 0),
"paydeskid" => array("dbcol" => "paydeskid","checknum" => 0),
"aeskey" => array("dbcol" => "aeskey","checknum" => 0),
@ -2226,10 +2242,13 @@ class Admin {
}
if (($name == "pollbills") || ($name == "pollworksf") || ($name == "pollworksd") || ($name == "pollclosings")) {
if (($name == "pollbills") || ($name == "pollworksf") || ($name == "pollworksd") || ($name == "pollclosings") || ($name == "pollpickups")) {
$aVal = self::returnInRange($aVal, 1, 30, 2);
}
if ($name == "showpickupsno") {
$aVal = self::returnInRange($aVal, 1, 200, 20);
}
if ($name == "minbeforecome") {
$aVal = trim($aVal);
if ($aVal != "-1") {
@ -2559,11 +2578,11 @@ class Admin {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$this->writeCsvHeader("datenexport-benutzer.csv");
echo("Eintragsid; Datum ; Benutzerid; Benutzername; Adminrechte; Kellnerrechte;Kuechenrechte; Barrechte; Bereitstellungsrechte; Kassenrechte; Reportrechte; Kassenbonrechte; Angebotsrechte; Beurteilungsrechte; Preisänderungsrechte; Gästerechte; Tageserfassungsrecht; Dashboardrechte; Zeiterfassung; Zeitmanagement; Aufgaben; Aufgabenmanagement; Managerrechte; Tischbereich; Aktiviert\n");
echo("Eintragsid; Datum ; Benutzerid; Benutzername; Adminrechte; Kellnerrechte;Kuechenrechte; Barrechte; Bereitstellungsrechte; Kassenrechte; Reportrechte; Kassenbonrechte; Angebotsrechte; Beurteilungsrechte; Preisänderungsrechte; Gästerechte; Abholanzeige; Tageserfassungsrecht; Dashboardrechte; Zeiterfassung; Zeitmanagement; Aufgaben; Aufgabenmanagement; Managerrechte; Tischbereich; Aktiviert\n");
$sql = "SELECT DISTINCT %hist%.id as id,date,";
$sql .= "IFNULL(userid,'') as userid,IFNULL(username,'') as username,is_admin,right_waiter,right_kitchen,right_bar,right_supply,";
$sql .= "right_paydesk,right_statistics,right_bill,right_products,right_rating,right_changeprice,right_customers,right_closing,right_dash,right_timetracking,right_timemanager,right_tasks,right_tasksmanagement,right_manager,active,";
$sql .= "right_paydesk,right_statistics,right_bill,right_products,right_rating,right_changeprice,right_customers,right_pickups,right_closing,right_dash,right_timetracking,right_timemanager,right_tasks,right_tasksmanagement,right_manager,active,";
$sql .= "IFNULL(area,'-') as area,";
$sql .= "description ";
$sql .= " FROM %hist%, %histuser%, %histactions% ";
@ -2593,6 +2612,7 @@ class Admin {
$vals[] = ($zeile['right_rating'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_changeprice'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_customers'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_pickups'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_closing'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_dash'] == '1' ? "Ja" : "Nein");
$vals[] = ($zeile['right_timetracking'] == '1' ? "Ja" : "Nein");

View File

@ -25,6 +25,7 @@ require_once ('utilities/clostemplater.php');
require_once ('guestsync.php');
require_once ('timetracking.php');
require_once ('tasks.php');
require_once ('pickup.php');
$module = $_GET["module"];
$command = $_GET["command"];
@ -88,6 +89,8 @@ if ($module == 'admin') {
Timetracking::handleCommand($command);
} else if ($module == 'tasks') {
Tasks::handleCommand($command);
} else if ($module == 'pickup') {
Pickup::handleCommand($command);
}

View File

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

View File

@ -171,6 +171,7 @@ class DbUtils {
array("col" => 'right_rating', "hist" => 1, "new" => 'rRating', "update" => 'rRating'),
array("col" => 'right_changeprice', "hist" => 1, "new" => 'rChangeprice', "update" => 'rChangeprice'),
array("col" => 'right_customers', "hist" => 1, "new" => 'rCustomers', "update" => 'rCustomers'),
array("col" => 'right_pickups', "hist" => 1, "new" => 'rPickups', "update" => 'rPickups'),
array("col" => 'right_manager', "hist" => 1, "new" => 'rManager', "update" => 'rManager'),
array("col" => 'right_closing', "hist" => 1, "new" => 'rClosing', "update" => 'rClosing'),
array("col" => 'right_dash', "hist" => 1, "new" => 'rDash', "update" => 'rDash'),

View File

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

103
webapp/php/pickup.php Normal file
View File

@ -0,0 +1,103 @@
<?php
require_once ('dbutils.php');
require_once ('commonutils.php');
require_once ('admin.php');
class Pickup {
public static function handleCommand($command) {
if (!in_array($command, array("getjobs","getmodus","declarepickready","declarepicknotready"))) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_COMMAND_NOT_FOUND, "msg" => ERROR_COMMAND_NOT_FOUND_MSG));
return false;
}
if(session_id() == '') {
session_start();
}
$pdo = DbUtils::openDbAndReturnPdoStatic();
if($command == 'getmodus') {
$ret = self::getmodus($pdo);
} else if ($command == "getjobs") {
$ret = self::getjobs($pdo);
} else if ($command == "declarepickready") {
$ret = self::declarepickready($pdo,$_POST["id"]);
} else if ($command == "declarepicknotready") {
$ret = self::declarepicknotready($pdo,$_POST["id"]);
}
echo json_encode($ret);
}
private static function hasRightToRequestIncompleteJobs() {
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
return false;
} else {
return ($_SESSION['right_pickups'] && ($_SESSION['right_kitchen'] || $_SESSION['right_bar']));
}
}
private static function hasRightToRequestCompleteJobs() {
if (!isset($_SESSION['angemeldet']) || !$_SESSION['angemeldet']) {
return false;
} else {
return ($_SESSION['right_pickups']);
}
}
private static function getmodus($pdo) {
if (self::hasRightToRequestIncompleteJobs()) {
return array("status" => "OK","msg" => 2);
}
if (self::hasRightToRequestCompleteJobs()) {
return array("status" => "OK","msg" => 1);
}
return array("status" => "OK","msg" => 0);
}
private static function getjobsoftype($pdo,$pickready) {
if ($pickready == false) {
$where = " pickready is null ";
$limit = "";
} else {
$where = " pickready = '1' ";
$showpickno = CommonUtils::getConfigValue($pdo, "showpickupsno", 20);
$limit = " LIMIT $showpickno";
}
$sql = "SELECT id,content FROM %printjobs% WHERE type=? AND $where ORDER BY id DESC $limit";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array(7));
$outNumbers = array();
for ($i=count($result)-1;$i>=0;$i--) {
$entry = $result[$i];
$entryDecoded = json_decode($entry["content"],true);
$outNumbers[] = array("id" => $entry["id"], "workid" => $entryDecoded["workid"]);
}
return $outNumbers;
}
private static function getjobs($pdo) {
$incompletes = array();
$completes = array();
if (self::hasRightToRequestIncompleteJobs()) {
$incompletes = self::getjobsoftype($pdo, false);
$completes = self::getjobsoftype($pdo, true);
} else if (self::hasRightToRequestCompleteJobs()) {
$completes = self::getjobsoftype($pdo, true);
}
return array("status" => "OK","msg" => array("incompletes" => $incompletes,"completes" => $completes));
}
private static function declarepickready($pdo,$id) {
if (self::hasRightToRequestIncompleteJobs()) {
$sql = "UPDATE %printjobs% SET pickready=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array(1,$id));
}
return self::getjobs($pdo);
}
private static function declarepicknotready($pdo,$id) {
if (self::hasRightToRequestIncompleteJobs()) {
$sql = "UPDATE %printjobs% SET pickready = null WHERE id=?";
CommonUtils::execSql($pdo, $sql, array($id));
}
return self::getjobs($pdo);
}
}

View File

@ -19,6 +19,7 @@ class PrintQueue {
private static $CLOSING = 4;
public static $CANCELFOOD = 5;
public static $CANCELDRINK = 6;
public static $PICKUP = 7;
public static $FOOD_PRINTSERVER = 0;
public static $DRINK_PRINTSERVER = 1;
@ -62,7 +63,12 @@ class PrintQueue {
} else {
$this->getNextDrinkWorkPrintJobs(null,$pass,$fl);
}
} else if ($command == 'getNextPickupPrintJobs') {
if (isset($_GET['printer'])) {
$this->getNextPickupPrintPrintJobs($_GET['printer'],$pass,$fl);
} else {
$this->getNextPickupPrintPrintJobs(null,$pass,$fl);
}
} else if ($command == 'getNextCancelFoodWorkPrintJobs') {
if (isset($_GET['printer'])) {
$this->getNextCancelFoodWorkPrintJobs($_GET['printer'],$pass,$fl);
@ -173,9 +179,8 @@ class PrintQueue {
$content = json_encode(array("workid" => $workId,"table" => $table, "time" => $timestamp, "products" => $prods));
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
$stmt->execute(array($content,intval($kind) + 1,$printer));
$printInsertSql = "INSERT INTO `%printjobs%` (`content`,`type`,`printer`) VALUES (?,?,?)";
CommonUtils::execSql($pdo, $printInsertSql, array($content,intval($kind) + 1,$printer));
$idOfWorkJob = $pdo->lastInsertId();
@ -192,6 +197,12 @@ class PrintQueue {
}
CommonUtils::log($pdo,"QUEUE","Create work job with id=$idOfWorkJob for tableid $table from user $username of kind $kind for printer=$printer");
$printpickups = CommonUtils::getConfigValue($pdo, "printpickups", 0);
if ($printpickups == 1) {
$sql = "INSERT INTO `%printjobs%` (`content`,`type`,`printer`) VALUES (?,?,?)";
CommonUtils::execSql($pdo, $sql, array($content,self::$PICKUP,1));
}
}
function getPrintJobOverview($pdo) {
@ -204,11 +215,11 @@ class PrintQueue {
$jobs = array();
for ($printer=1;$printer<7;$printer++) {
$sql = "SELECT J.id as id,B.id as billid,billdate,brutto,R.tableno as tablename,type FROM %printjobs% J,%bill% B,%resttables% R WHERE printer=? AND type = '3' AND content=B.id AND B.tableid=R.id";
$sql = "SELECT J.id as id,B.id as billid,billdate,brutto,R.tableno as tablename,type FROM %printjobs% J,%bill% B,%resttables% R WHERE printer=? AND type = '" . self::$RECEIPT . "' AND content=B.id AND B.tableid=R.id";
$sql .= " UNION ";
$sql .= "SELECT J.id as id,B.id as billid,billdate,brutto,'To-Go' as tablename,type FROM %printjobs% J,%bill% B WHERE printer=? AND type = '3' AND content=B.id AND B.tableid='0'";
$sql .= "SELECT J.id as id,B.id as billid,billdate,brutto,'To-Go' as tablename,type FROM %printjobs% J,%bill% B WHERE printer=? AND type = '" . self::$RECEIPT . "' AND content=B.id AND B.tableid='0'";
$resultBills = CommonUtils::fetchSqlAll($pdo, $sql, array($printer,$printer));
$sql = "SELECT %printjobs%.id as id,%closing%.id as closingid,type,closingdate FROM %printjobs%,%closing% WHERE printer=? AND type = '4' AND content=%closing%.id";
$sql = "SELECT %printjobs%.id as id,%closing%.id as closingid,type,closingdate FROM %printjobs%,%closing% WHERE printer=? AND type = '" . self::$CLOSING . "' AND content=%closing%.id";
$resultClosings = CommonUtils::fetchSqlAll($pdo, $sql, array($printer));
$result = array_merge($resultBills,$resultClosings);
@ -231,6 +242,13 @@ class PrintQueue {
$works[] = array("id" => $r['id'],"content" => json_decode($r['content']));
}
$jobs[] = array("printer" => 8, "count" => count($result),"jobs" => $works);
$stmt->execute(array(self::$PICKUP));
$result = $stmt->fetchAll();
$works = array();
foreach($result as $r) {
$works[] = array("id" => $r['id'],"content" => json_decode($r['content']));
}
$jobs[] = array("printer" => 9, "count" => count($result),"jobs" => $works);
echo json_encode(array("status" => "OK", "msg" => $jobs));
@ -282,7 +300,7 @@ class PrintQueue {
if ($row->countid == 1) {
$printInsertSql = "INSERT INTO `%printjobs%` (`id` , `content`,`type`,`printer`) VALUES ( NULL,?,?,?)";
$stmt = $pdo->prepare(DbUtils::substTableAlias($printInsertSql));
$stmt->execute(array($jobId,'3',$printer));
$stmt->execute(array($jobId,'" . self::$RECEIPT . "',$printer));
}
}
echo json_encode(array("status" => "OK"));
@ -512,6 +530,10 @@ class PrintQueue {
$retArray["pollclosings"] = CommonUtils::getConfigValue($pdo, "pollclosings", 2);
}
if (!is_null($fl) && ($fl >= 13)) {
$retArray["pollpickups"] = CommonUtils::getConfigValue($pdo, "pollpickups", 2);
}
echo json_encode($retArray);
}
@ -637,20 +659,75 @@ class PrintQueue {
}
}
function getNextPickupPrintPrintJobs($printer,$md5pass,$fl) {
$pdo = $this->dbutils->openDbAndReturnPdo();
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
if ($isCorrect) {
CommonUtils::log($pdo,"PRINTQUEUE", "getNextPickupPrintPrintJobs: type = " . self::$PICKUP . " , printer = $printer, fl= $fl");
if (!$this->checkForPrinterInstance($pdo, "p" . $printer)) {
echo json_encode(array());
return;
}
$this->saveLastPrintServerAccess($pdo);
$template = $this->getTemplate($pdo, "pickuptemplate");
if (is_null($printer)) {
$sql = "SELECT id,content,type FROM %printjobs% WHERE type=? AND removed is null ORDER BY id";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array(self::$PICKUP));
} else {
$sql = "SELECT id,content,type FROM %printjobs% WHERE type=? AND removed is null AND printer=? ORDER BY id";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array(self::$PICKUP,$printer));
}
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
CommonUtils::log($pdo,"PRINTQUEUE", "getNextPickupPrintPrintJobs: retrieve " . count($result) . " jobs");
$workarray = array();
foreach($result as $aWorkJob) {
$aWork = (array) json_decode($aWorkJob["content"]); // is in json format
$ps = (array) ($aWork["products"]);
foreach($ps as $p) {
if (isset($p->singleprod)) {
unset($p->singleprod);
}
if (isset($p->allqueueids)) {
unset($p->allqueueids);
}
}
CommonUtils::log($pdo,"PRINTQUEUE", "getNextPickupPrintPrintJobs: collect pickupreceipt with id=" . $aWorkJob["id"] . " for printer=$printer");
$workid = $aWork["workid"];
unset($aWork["workid"]);
$workarray[] = array("workid" => $workid,"id" => $aWorkJob["id"],"content" => $aWork, "bigfontworkreceipt" => 0, "template" => $template);
}
CommonUtils::log($pdo,"PRINTQUEUE", "getNextPickupPrintPrintJobs: sent data to caller");
echo json_encode($workarray);
} else {
CommonUtils::log($pdo,"PRINTQUEUE", "getNextPickupPrintPrintJobs: wrong printcode");
echo json_encode(array());
}
}
function getNextFoodWorkPrintJobs($printer,$md5pass,$fl) {
$this->getNextWorkPrintJobs($md5pass,self::$FOOD,$printer,$fl);
$this->getNextWorkPrintJobs($md5pass,self::$FOOD,$printer,$fl,"getNextFoodWorkPrintJobs");
}
function getNextDrinkWorkPrintJobs($printer,$md5pass,$fl) {
$this->getNextWorkPrintJobs($md5pass,self::$DRINK,$printer,$fl);
$this->getNextWorkPrintJobs($md5pass,self::$DRINK,$printer,$fl,"getNextDrinkWorkPrintJobs");
}
function getNextWorkPrintJobs($md5pass,$theType,$printer,$fl) {
function getNextWorkPrintJobs($md5pass,$theType,$printer,$fl,$logmsg) {
$pdo = $this->dbutils->openDbAndReturnPdo();
$isCorrect = $this->isPasswordCorrect($pdo,$md5pass,false);
if ($isCorrect) {
CommonUtils::log($pdo,"PRINTQUEUE", "getNextWorkPrintJobs: type = $theType, printer = $printer, fl= $fl");
CommonUtils::log($pdo,"PRINTQUEUE", "$logmsg: type = $theType, printer = $printer, fl= $fl");
$checkType = "f";
if ($theType == 2) {
@ -841,7 +918,7 @@ class PrintQueue {
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($id));
if (count($result) > 0) {
$type = $result[0]['type'];
if (($type == self::$FOOD) || ($type == self::$DRINK) || ($type == self::$CANCELFOOD) || ($type == self::$CANCELDRINK)) {
if (($type == self::$FOOD) || ($type == self::$DRINK) || ($type == self::$CANCELFOOD) || ($type == self::$CANCELDRINK) || ($type == self::$PICKUP)) {
$sql = "UPDATE %printjobs% SET removed=? WHERE id=?";
CommonUtils::execSql($pdo, $sql, array(1,$id));
} else {

View File

@ -584,6 +584,7 @@ class QueueContent {
if ($aJob['togo'] == 1) {
$togo = "To-Go";
}
$arr = array("id" => $queueId,
"longname" => $aJob['longname'],
"singleprod" => $aJob['singleprod'],
@ -593,9 +594,11 @@ class QueueContent {
"extras" => $extras,
"ordertime" => $germanTime,
"kind" => $kind,
"printer" => $printer,
"allqueueids" => $aJob["allqueueids"]
"printer" => $printer
);
if (isset($aJob["allqueueids"])) {
$arr["allqueueids"] = $aJob["allqueueids"];
}
$resultarray[] = $arr;
}

View File

@ -65,7 +65,8 @@ class Roles {
'right_timetracking',
'right_timemanager',
'right_tasks',
'right_tasksmanagement');
'right_tasksmanagement',
'right_pickups');
self::setPermission($pdo, $roleid, $permissionsYes);
return $roleid;
}
@ -88,7 +89,8 @@ class Roles {
'right_timetracking',
'right_timemanager',
'right_tasks',
'right_tasksmanagement');
'right_tasksmanagement',
'right_pickups');
self::setPermission($pdo, $roleid, $permissionsYes);
return $roleid;
}
@ -138,7 +140,8 @@ class Roles {
'right_bar',
'right_supply',
'right_timetracking',
'right_tasks'
'right_tasks',
'right_pickups'
);
self::setPermission($pdo, $roleid, $permissionsYes);
return $roleid;

View File

@ -69,6 +69,17 @@ class Version {
return $rect;
}
public static function getDefaultPickupTemplate() {
$rect = "S:Abholbon\n\nII_ID:v\n";
$rect .= "START_WORK\n";
$rect .= "f:-;\n";
$rect .= "N:v;\ns: ;b:v;\n";
$rect .= "e:v\n";
$rect .= "END_WORK\n";
$rect .= "f:-";
return $rect;
}
public static function genSampleHostText() {
$hosttext = "\n\nAngaben zum Nachweis der Höhe\nund der betrieblichen\nVeranlassung von\nBewirtungsaufwendungen\n(Par. 4 Abs. 5 Ziff. 2 EStG)\n\n";
$hosttext .= "Tag der Bewirtung:\n\n\n";
@ -989,6 +1000,31 @@ class Version {
}
}
public static function upd_1507_1508($pdo, $prefix, $dbname) {
try {
self::insertOrUpdateConfigItem($pdo, 'printpickups', 0);
self::insertOrUpdateConfigItem($pdo, 'pollpickups', 2);
$pickuptemplate = self::getDefaultPickupTemplate();
self::insertOrUpdateConfigItem($pdo, 'pickuptemplate', $pickuptemplate);
self::insertOrUpdateConfigItem($pdo, 'p1prinstance', 1);
self::insertOrUpdateConfigItem($pdo, 'showpickupsno', 20);
self::execSql($pdo, "ALTER TABLE %roles% ADD right_pickups INT(1) NULL AFTER right_customers");
self::execSql($pdo, "ALTER TABLE %histuser% ADD right_pickups INT(1) NULL AFTER right_customers");
self::execSqlWithParam($pdo, "UPDATE %roles% SET right_pickups=?", array(00));
self::execSqlWithParam($pdo, "UPDATE %histuser% SET right_pickups=?", array(0));
self::execSql($pdo, "OPTIMIZE TABLE %roles%");
self::execSql($pdo, "OPTIMIZE TABLE %histuser%");
self::execSql($pdo, "ALTER TABLE %printjobs% ADD pickready INT(1) NULL AFTER removed");
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1043,7 +1079,8 @@ class Version {
"1.5.3" => array("upd_1503_1504","1.5.4"),
"1.5.4" => array("upd_1504_1505","1.5.5"),
"1.5.5" => array("upd_1505_1506","1.5.6"),
"1.5.6" => array("upd_1506_1507","1.5.7")
"1.5.6" => array("upd_1506_1507","1.5.7"),
"1.5.7" => array("upd_1507_1508","1.5.8")
);
// RE;* also for install process no check is required

177
webapp/pickups.html Normal file
View File

@ -0,0 +1,177 @@
<html>
<head>
<title>Ansicht Abholung</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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/jquery.mobile-1.4.0.min.css" type="text/css" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.8"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui-i18n.min.js"></script>
</head>
<body>
<script>
var PICK_PICKUP_TITLE = ["Abholung","Pickup","Recogido"];
var PICK_INCOMPLETE_TITLE = ["In Arbeit","In progress","Procesando"];
var PICK_COMPLETE_TITLE = ["Abholbereit","Finished","Completado"];
var lang = 0;
var modus = 0;
function setLanguage(language) {
lang = language;
$("#timetitletxt").html(PICK_PICKUP_TITLE[lang]);
$("#incompletetitle").html(PICK_INCOMPLETE_TITLE[lang]);
$("#completetitle").html(PICK_COMPLETE_TITLE[lang]);
}
function getGeneralConfigItems() {
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItemsAndUsers", null, insertGenConfigStartRest, "Fehler Konfigurationsdaten");
}
function insertGenConfigStartRest(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
setLanguage(values.userlanguage);
requestModus();
} else {
setTimeout(function(){document.location.href = "index.html";},250); // not logged in
}
}
function requestModus() {
doAjax("GET", "php/contenthandler.php?module=pickup&command=getmodus", null, insertModus, "Fehler Modus");
}
function insertModus(answer) {
if (answer.status == "OK") {
modus = answer.msg;
if (modus == 2) {
$("#incompleteregion").show();
}
}
startUpdates();
}
function requestUpdateFromServer() {
doAjax("GET", "php/contenthandler.php?module=pickup&command=getjobs", null, insertJobs, null);
}
function insertJobs(answer) {
if (answer.status != "OK") {
return;
}
var completes = createItems(answer.msg.completes,"pickupitemcomplete");
$("#completeitemarea").html(completes);
if (modus == 2) {
var txt = createItems(answer.msg.incompletes,"pickupitemincomplete");
$("#incompleteitemarea").html(txt);
binding();
}
}
function createItems(numbers,theclass) {
var txt = "";
for (var i=0;i<numbers.length;i++) {
var item = numbers[i];
var id = item.id;
var workid = item.workid;
txt += createItem("item_" + id,workid,100,70,theclass);
}
return txt;
}
function startUpdates() {
requestUpdateFromServer();
var refreshId = setInterval(function() {
requestUpdateFromServer();
}, 5000);
$.ajaxSetup({ cache: false });
}
function createItem(id,title,sizew, sizeh, itemclass) {
var txt = "";
txt += "<div id='" + id + "' class='" + itemclass + " pickitemfont' style='width:" + sizew + "px;height:" + sizeh + "px;'>" + title + "</div>";
return txt;
}
function binding() {
$(".pickupitemincomplete").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var id = this.id.split("_")[1];
doAjax("POST", "php/contenthandler.php?module=pickup&command=declarepickready", {id:id}, requestUpdateFromServer, null);
});
$(".pickupitemcomplete").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var id = this.id.split("_")[1];
doAjax("POST", "php/contenthandler.php?module=pickup&command=declarepicknotready", {id:id}, requestUpdateFromServer, null);
});
}
$(document).on("pageinit", "#time-page", function () {
initializeMainMenu("#modulemenu");
hideMenu();
$.ajaxSetup({ cache: false });
getGeneralConfigItems();
});
</script>
<div data-role="page" id="time-page" data-theme="c">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-theme="b" data-role="heading">Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" style="background-color:black;">
<h1><span id="timetitletxt">Abholung</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /> <img src="img/tasksstatus.png" class="tasksstatus" style="display:none;" /></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
</div>
</div>
<div data-role="content" id="fullcontent">
<div id="incompleteregion" class="pickuparea pickuparea_incomplete" style="display:none;">
<div><span id="incompletetitle" class="picksections">Unfertig</span></div>
<div id="incompleteitemarea" class="incompleteitemarea"></div>
</div>
<div class="pickuparea pickuparea_complete">
<div><span id="completetitle" class="picksections">Abholbereit</span></div>
<div id="completeitemarea" class="completeitemarea"></div>
</div>
</div>
<div data-role="footer" data-theme="b" id="thefooterr" style="background-color:black;">
<div class="ui-grid-a">
<div class="ui-block-a userinfo" id="loggedinuser"></div>
<div class="ui-block-b grid_right" id="versioninfo"></div>
</div><!-- /grid-a -->
</div> <!-- footer -->
</div> <!-- first page -->
</body>
</html>

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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<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.5.7">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.8">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.7"></script>
<script src="utilities.js?v=1.5.8"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

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