ordersprinter/webapp/reports.html

578 lines
25 KiB
HTML

<html>
<head>
<title>Ansicht Statistik</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.6.5">
<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-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="elements/rating.js"></script>
</head>
<body>
<script>
var REP_USERSUM = ["Kassenbestände ","Open paydesks", "Cajas" ];
var REP_TABLE_REPORTS = ["Tischprotokolle","Table reports","Records of tables","Historia de las mesas"];
var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchungen und Stornierungen für alle Tische seit der letzten Tageserfassung angezeigt.",
"This area displays all postings, transfers, and cancellations for all tables since the last closing.",
"Esta área visualiza todas las contabilizaciones, traslados y anulaciones de todas las tablas desde la última cerra de día."];
var REP_ORDER_REPORTS = ["Aktuelle Bestellungen","Current orders","Ordenes de momento"];
var REP_ORDER_REPORTS_INFO = ["In diesem Bereich werden alle Bestellungen seit der letzten Tageserfassung aufgeführt. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus als bezahlt betrachtet.","In this area yu can see all orders since the last closing.","En esta area puede ver todas las ordenes desde la última cerrada"];
var REP_USER = ["Benutzer","User","Usario"];
var REP_USER_TXT = ["Diese Übersicht umfasst den derzeitigen Brutto-Kassenbestand pro Kasse inkl. aller Zahlungswege und Ein-/Auslagen. Auf Gäste ausgestellt Rechnungen werden unabh. von ihrem Bezahlstatus eingerechnet.",
"This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs and guest bills.",
"Esta table contiene todos las cajas incluyendo todas los tipos the pagamientos"];
var REP_TODAY = ["Heute","Today","Hoy"];
var REP_YESTERDAY = ["Gestern","Yesterday","Ayer"];
var REP_HOUR = ["Uhrzeit","Time","Hora"];
var REP_DAY = ["Tag","Day","Día"];
var REP_PROD = ["Produkt","Product","Producto"];
var REP_SUM = ["Summe","Sum","Total"];
var REP_TODAY_TXT = ["Diese Übersicht umfasst alle Kassenbons, die bisher heute gedruckt wurden.",
"This overview shows all receipts that have been printed today.",
"Este parte contiene todos los tiques de este día."];
var REP_YEST_TXT = ["Diese Übersicht umfasst die gestrigen Einnahmen, die in Tagesabschlüssen erfasst wurden.",
"This overview shows all revenues of yesterday that are part of a closing.",
"Este parte muestra todo el cobro de tiques cerrados de ayer."];
var REP_THIS_MONTH_TXT = ["Diese Übersicht umfasst alle Einnahmen dieses Monats, die in Tagesabschlüssen erfasst sind.",
"This overview shows all revenues of this month that are part of a closing.",
"Este parte muestra todo el cobro de tiques cerrados de este mes."];
var REP_LAST_MONTH_TXT = ["Diese Übersicht umfasst Einnahmen des letzten Monats.",
"This overview shows all revenues of the last month.",
"Este parte muestra todo el cobro del mes pasado."];
var REP_PROD_LAST30_TXT = ["Diese Übersicht zeigt die Einnahmen, die mit den in den letzten Tagen verkauften Produkten erzielt wurden.",
"This overview displays the revenue that could be achieved with all sold products in the last days.",
"Este parte muestra el cobro con el productos vendido en los últimos días."];
var REP_NO_DATA = ["Es liegen keine Daten vor.", "There is no data.", "No hay ningún datos."];
var REP_PRODREP = ["Produktstatistik","Product report","Estadistica de productos"];
var REP_TITLE = ["Statistik","Statistics","Estadisticas"];
var REP_RATINGS = ["Bewertungen","Ratings","Valoraciones"];
var REP_RATINFO = ["Übersicht der Bewertung der letzten 30 Tage","Overview of all ratings in the last 30 days","Valoraciones de los últimos 30 dias"];
var REP_SERVICE = ["Bedienung und Service","Service","Servicio"];
var REP_KITCHEN = ["Küche","Kitchen","Cocina"];
var REP_GOOD = ["Zufriedener Kunde","Customer is happy","Cliente esta contento"];
var REP_OK = ["Passabel","ok","Pues..."];
var REP_BAD = ["Kunde ist unzufrieden","Customer is not satisfied","Cliente no esta contento"];
var REP_COUNT = ["Anzahl","Number","Número"];
var REP_REMARKS = ["Kundenmeinungen","Customer remarks","Notas de los clientes"];
var REP_RECORD_ACTION = [
["Bestellung","Ordering","Ordenar"],
["Rechnung","Bill","Pagar"],
["Produktstorno","Discard product","Descartar producto"],
["Rechnungsstorno","Discard bill","Descartar pago"],
["Rechnungs- und Produktstorno","Discard bill and product","Descrtar pago y producto"],
["Tischwechsel Produktentfernung","Move products to other table","Productos a otra mesa"],
["Tischwechsel Produktbuchung","Received moved products","Recibo productos de otra mesa"]
];
var REP_NO_ENTRIES = ["Keine Einträge","No entries","Ningún data"];
var REP_PRODSLIDER_LABEL = ["Seit wievielen Tagen","Since how many days","Desce hace cuantos dias"];
var lang = 0;
var allorders = [];
var filterOnlyUnpaidOrdersSelection = 0;
var filterCancelledOrders = 0;
var currency = "";
function setLanguage(language) {
lang = language;
$("#reportttitletxt").html(REP_TITLE[lang]);
}
function fillPageWithStats() {
var htmlTableReports = createStub("table_reports_section",REP_TABLE_REPORTS[lang],REP_TABLE_REPORTS_INFO[lang],"","");
var search = '<p><input id="searchfieldorders" style="background-color:white;color:black;" placeholder="Suche" />';
var selBoxForOrdersPaid = "<div id='selBoxForOrdersFilter'>" + createSelBoxForOrderFilter() + "</div>";
var selBoxForOrdersCancelled = "<div id='selBoxForOrdersCancelled'>" + createSelBoxForCancelledFilter() + "</div>";
var updateBtn = "<button id='updateordersbtn' data-theme='f'>Aktualisieren</button>";
var htmlTodaySums = createStub("today_section",REP_TODAY[lang],REP_TODAY_TXT[lang],"","");
var htmlYesterdaySums = createStub("yesterday_section",REP_YESTERDAY[lang],REP_YEST_TXT[lang],"","");
var htmlThismonthSums = createStub("thismonth_section",'',REP_THIS_MONTH_TXT[lang],"","");
var htmlLastmonthSums = createStub("lastmonth_section",'',REP_LAST_MONTH_TXT[lang],"","");
var htmlProdSums = createStub("prods_section",REP_PRODREP[lang],REP_PROD_LAST30_TXT[lang],"","");
var htmlRatingSums = createStub("ratings_section",REP_RATINGS[lang],REP_RATINFO[lang],"","");
var htmlUsersums = createStub("usersums_section",REP_USERSUM[lang],REP_USER_TXT[lang],"","");
var htmlOrderReports = createStub("order_reports_section",REP_ORDER_REPORTS[lang],REP_ORDER_REPORTS_INFO[lang],search + selBoxForOrdersPaid + selBoxForOrdersCancelled,updateBtn);
$("#content").html(htmlTodaySums + htmlYesterdaySums + htmlThismonthSums + htmlLastmonthSums + htmlProdSums + htmlRatingSums + htmlUsersums + htmlTableReports + htmlOrderReports);
$("#content").trigger("create");
bindExpandAreas();
bindUpdateBtns();
bindSelBoxChange();
requestMonthNamesAndInsert();
}
function createSelBoxForOrderFilter() {
var sel = "<select data-theme='f' id='showOnlyUnpaidOrders'>";
if (filterOnlyUnpaidOrdersSelection == 0) {
sel += "<option value='0' selected>Nur unbezahlte Bestellungen</option>";
} else {
sel += "<option value='0'>Nur unbezahlte Bestellungen</option>";
}
if (filterOnlyUnpaidOrdersSelection == 1) {
sel += "<option value='1' selected>Alle Bestellungen</option>";
} else {
sel += "<option value='1'>Alle Bestellungen</option>";
}
sel += "</select>";
return sel;
}
function createSelBoxForCancelledFilter() {
var sel = "<select data-theme='f' id='filterForCancelledOrders'>";
if (filterCancelledOrders == 0) {
sel += "<option value='0' selected>Stornostatus ignorieren</option>";
} else {
sel += "<option value='0'>Stornostatus ignorieren</option>";
}
if (filterCancelledOrders == 1) {
sel += "<option value='1' selected>Nur unstornierte Produkte</option>";
} else {
sel += "<option value='1'>Nur unstornierte Produkte</option>";
}
if (filterCancelledOrders == 2) {
sel += "<option value='2' selected>Nur stornierte Produkte</option>";
} else {
sel += "<option value='2'>Nur stornierte Produkte</option>";
}
sel += "</select>";
return sel;
}
function requestMonthNamesAndInsert() {
doAjax("GET", "php/contenthandler.php?module=reports&command=getMonthNames", null, insertMonthNames, "Fehler keine Monatsnamen");
}
function insertMonthNames(answer) {
if (answer.status == "OK") {
$("#header_thismonth_section").html(answer.thismonth);
$("#header_lastmonth_section").html(answer.lastmonth);
};
}
function bindExpandAreas() {
$("#today_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getToday", null, fillToday, "Fehler keine Heute-Verkäufe",true);
});
$("#yesterday_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getYesterday", null, fillYesterday, "Fehler keine Gestern-Verkäufe",true);
});
$("#thismonth_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getThismonth", null, fillThismonth, "Fehler keine Daten für diesen Monat",true);
});
$("#lastmonth_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getLastmonth", null, fillLastmonth, "Fehler keine Daten für letzten Monat",true);
});
$("#prods_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getProds", null, fillProds, "Fehler keine Daten für Produktverkäufe",true);
});
$("#ratings_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getRatings", null, fillRatings, "Fehler keine Bewertungsdaten",true);
});
$("#usersums_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=reports&command=getUsersums", null, fillUsersums, "Fehler keine Kassenbestände",true);
});
$("#table_reports_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=queue&command=getAllTableRecords", null, fillTableRecords, "Fehler keine Tischprotokolle",true);
});
$("#order_reports_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
requestAllOrders();
});
$("#searchfieldorders").off("keyup").on("keyup", function (e) {
displayAllOrdersDueToFilter();
});
}
function getProdsSlider() {
var txt = '<div id="prodsliderarea">';
txt += '<label for="prodsslider" id="prodssliderlabel"><span id="prodssliderlabeltxt">' + REP_PRODSLIDER_LABEL[lang] + '</span>:</label>';
txt += '<input type="range" name="prodsslider" id="prodsslider" value="30" min="1" max="731" data-theme="b" data-track-theme="e" /><br>';
txt += '</div><p />';
return txt;
}
function bindProdsSlider() {
$("#prodsslider").off("slidestop").on("slidestop", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
requestNewProdStat();
});
}
function requestNewProdStat() {
var days = $("#prodsslider").val();
$("#content_prods_section .divaroundtable").html('<img id="progressimginprodsstattable" src="php/3rdparty/images/ajax-loader.gif" />');
doAjax("GET", "php/contenthandler.php?module=reports&command=getProds&days=" + days, null, updateProdsStat, "Fehler keine Daten für Produktverkäufe",true);
}
function fillUsersums(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_USER[lang],"center",15,10,75);
$("#content_usersums_section").html(htmlTable);
}
}
function fillToday(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_HOUR[lang],"center",10,10,80);
$("#content_today_section").html(htmlTable);
}
}
function fillYesterday(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_HOUR[lang],"center",10,10,80);
$("#content_yesterday_section").html(htmlTable);
}
}
function fillThismonth(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_DAY[lang],"center",10,10,80);
$("#content_thismonth_section").html(htmlTable);
}
}
function fillLastmonth(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_DAY[lang],"center",10,10,80);
$("#content_lastmonth_section").html(htmlTable);
}
}
function fillProds(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_PROD[lang],"left",30,10,60);
var prodsSlider = getProdsSlider();
$("#content_prods_section").html(prodsSlider + htmlTable);
$("#prodsliderarea").trigger("create");
bindProdsSlider();
}
}
function updateProdsStat(answer) {
if (answer.status == "OK") {
var htmlTable = createTableWithData(answer.msg,REP_PROD[lang],"left",30,10,60);
$("#content_prods_section .divaroundtable").html(htmlTable);
}
}
function fillRatings(answer) {
if (answer.status == "OK") {
var htmlPart = createRatingsPartCore(answer.msg,REP_DAY[lang],10,10,40,40);
$("#content_ratings_section").html(htmlPart);
}
}
function bindUpdateBtns() {
$("#updateordersbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
requestAllOrders();
});
}
function requestAllOrders() {
doAjax("GET", "php/contenthandler.php?module=queue&command=getAllOrders", null, fillOrdersArea, "Fehler keine Bestellprotokolle",true);
}
function bindSelBoxChange() {
$("#showOnlyUnpaidOrders").off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
filterOnlyUnpaidOrdersSelection = $("#showOnlyUnpaidOrders").val();
$("#selBoxForOrdersFilter").html(createSelBoxForOrderFilter());
$("#selBoxForOrdersFilter").trigger("create");
displayAllOrdersDueToFilter();
bindSelBoxChange();
});
// filterCancelledOrders
$("#filterForCancelledOrders").off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
filterCancelledOrders = $("#filterForCancelledOrders").val();
$("#selBoxForOrdersCancelled").html(createSelBoxForCancelledFilter());
$("#selBoxForOrdersCancelled").trigger("create");
displayAllOrdersDueToFilter();
bindSelBoxChange();
});
}
function fillOrdersArea(answer) {
if (answer.status == "OK") {
allorders = answer.msg;
displayAllOrdersDueToFilter();
}
}
function displayAllOrdersDueToFilter() {
var decpoint = $("#info-page").data("decpoint");
var filterText = $("#searchfieldorders").val().trim().toLowerCase();
var txt = "<table class='reporttable'>";
txt += "<tr><th>Anzahl<th>Produkt<th>Information</tr>";
allorders.list.forEach(function(entry) {
var countid = toHtml(entry.countid);
var productname = toHtml(entry.productname);
var ordertime = toHtml(entry.ordertime);
var username = toHtml(entry.username);
var ispaid = entry.ispaid;
var tablename = toHtml(entry.tablename);
var toremove = entry.toremove;
var price = toHtml(entry.price);
var priceStr = price.replace(".",decpoint) + " " + currency;
var show = true;
if (filterText != "") {
if ((productname.toLowerCase().indexOf(filterText) == -1) &&
(username.toLowerCase().indexOf(filterText) == -1) &&
(tablename.toLowerCase().indexOf(filterText) == -1)) {
show = false;
}
}
if ((filterOnlyUnpaidOrdersSelection == 0) && (ispaid == 1)) {
show = false;
}
if ((filterCancelledOrders == 1) && (toremove == 1)) {
show = false;
}
if ((filterCancelledOrders == 2) && (toremove == 0)) {
show = false;
}
if (show) {
txt += '<tr><td>' + countid + "<td>" + productname + "<td>";
txt += ordertime + "<br>";
txt += username + "<br>";
txt += priceStr + "<br>";
txt += (ispaid == 1 ? "bezahlt<br>" : "noch unbezahlt<br>");
txt += tablename;
if (toremove == 1) {
txt += "<br>(storniert)";
}
txt += "</tr>";
}
});
txt += "</table>";
var sumall = allorders.sumall.replace(".",decpoint) + " " + currency;
var sumunpaid = allorders.sumunpaid.replace(".",decpoint) + " " + currency;
var sumpaid = allorders.sumpaid.replace(".",decpoint) + " " + currency;
var sumcancelled = allorders.sumcancelled.replace(".",decpoint) + " " + currency;
txt += "<p><table class='reporttable'>";
txt += "<tr><th>Summe<th>Betrag</tr>";
txt += "<tr><td>Unbezahlt<td>" + sumunpaid + "</tr>";
txt += "<tr><td>Bezahlt<td>" + sumpaid + "</tr>";
txt += "<tr><td>Bezahlt und unbezahlt<td>" + sumall + "</tr>";
txt += "<tr><td>Stornierungen<td>" + sumcancelled + "</tr>";
txt += "</table>";
$("#content_order_reports_section").html(txt);
}
function fillTableRecords(answer) {
if (answer.status == "OK") {
var txt = "";
var rooms = answer.msg;
$.each(rooms, function (i, aRoom) {
var roomname = toHtml(aRoom["roomname"]);
var tables = aRoom["tables"];
var tablesTxt = "";
$.each(tables, function (j, aTable) {
var tablename = toHtml(aTable["tablename"]);
var tablesRecordTxt = recordsOfTableAsTxt(aTable["records"]);
tablesTxt += "<h2>" + tablename + "</h2>" + tablesRecordTxt;
});
txt += "<h1>" + roomname + "<h1>";
txt += tablesTxt;
txt += "<hr>";
});
$("#content_table_reports_section").html(txt);
}
}
function recordsOfTableAsTxt(answer) {
var txt = "";
if (answer.status == "OK") {
var entries = answer.msg;
if (entries.length == 0) {
txt += REP_NO_ENTRIES[lang];
return txt;
}
txt += "<ul>";
entries.forEach(function(entry, index) {
var time = toHtml(entry.time);
var username = toHtml(entry.username);
var action = toHtml(entry.action);
var actionStr = REP_RECORD_ACTION[action][lang];
txt += "<li>" + time + " " + username + " - <b>" + actionStr + "</b>:<br>";
var prods = entry.prods;
txt += "<ul>";
prods.forEach(function(prod,i) {
var name = toHtml(prod.name);
var extras = toHtml(prod.extras);
txt += "<li>" + name;
if (extras != "") {
txt += " (" + extras + ")";
}
});
txt += "</ul>";
});
txt += "</ul>";
}
return txt;
}
function getLegend (good,ok,bad) {
var goodTxt = "<img src=img/green.png style='height:20px;width:40px;' />: " + good + "<br>";
var okTxt = "<img src=img/yellow.png style='height:20px;width:40px;' />: " + ok + "<br>";
var badTxt = "<img src=img/red.png style='height:20px;width:40px;' />: " + bad + "<br>";
return goodTxt + okTxt + badTxt;
}
function createRatingsPartCore(ratingReport,iterObjName,width1,width2,width3,width4) {
var ratings = ratingReport.statistics;
var legend = getLegend(REP_GOOD[lang],REP_OK[lang],REP_BAD[lang]) + "</p><p>";
var content = "<table width=100% class='reporttable'>";
content += aTableRatingHeader(iterObjName,REP_COUNT[lang],REP_SERVICE[lang],REP_KITCHEN[lang],width1,width2,width3,width4);
var i=0;
for (i=0;i<ratings.length;i++) {
var aRating = ratings[i];
var aRatingEl = new Rating(aRating.day,aRating.service,aRating.kitchen,aRating.total);
content += "<tr><td style='text-align:center;'>" + aRating.day
+ "<td style='text-align:center;'>" + aRatingEl.getTotal()
+ "<td>" + aRatingEl.getServiceInfo() + "<td>" + aRatingEl.getKitchenInfo() + "</tr>";
}
content += "</table>";
var remarks = ratingReport.remarks;
if (remarks.length > 0) {
content += "</p><p><b>" + REP_REMARKS[lang] + "</b><br>";
var i=0;
for (i=0;i<remarks.length;i++) {
var aRemark = remarks[i];
content += "<i>" + aRemark.date + "</i>: " + aRemark.remark + "<br>";
}
}
var html = legend + content + "</p></div>";
return html;
}
function createStub(id,aName,infoText,additionalFirstElement,additionalLastEl) {
var collapse_elem = '<div id="' + id + '" data-role="collapsible" data-content-theme="e" data-collapsed="true" data-theme="c">';
var header = '<h3><span id="header_' + id + '">'+aName + '</span></h3><p><i>' + infoText + '</i></p><p>';
var content = additionalFirstElement + '<div id="content_' + id + '">';
content += '<p /><img id="progressimginpopup" src="php/3rdparty/images/ajax-loader.gif" /></div>';
var html = collapse_elem + header + content + additionalLastEl + "</p></div>";
return html;
}
function createTableWithData(values,iterObjName,iterAlignment,width1,width2,width3) {
var maxValue = values.max;
var content = "<div class='divaroundtable'>" + REP_NO_DATA[lang] + "</div>";
if (maxValue != 0.0) {
var content = "<div class='divaroundtable'>";
content += "<table width=100% class='reporttable'>";
content += aTableHeader(iterObjName,REP_SUM[lang],"Graph",width1,width2,width3);
var contentValues = values.content;
var decpoint = $("#info-page").data("decpoint");
$.each(contentValues, function (i, aStatValue) {
var hourOrDay = aStatValue.iter;
var sum = aStatValue.sum;
content += aTableLine(hourOrDay,sum.toString().replace(".",decpoint),sum/maxValue*98.0,iterAlignment,
width1,width2,width3);
});
content += "</table></div>";
}
return content;
}
function aTableHeader(val1,val2,val3,width1,width2,width3) {
var text = "<tr><th width=" + width1 + "%>" + val1 + "<th width=" + width2 + "%>" + val2 + "<th width=" + width3 + "%>" + val3;
return text;
}
function aTableRatingHeader(val1,val2,val3,val4,width1,width2,width3,width4) {
var text = "<tr><th width=" + width1 + "%>" + val1 + "<th width=" + width2 + "%>" + val2 + "<th width=" + width3 + "%>" + val3 + "<th width=" + width4 + "%>" + val4;
return text;
}
function aTableLine(val1,val2,porcent,iterAlignment,width1,width2,width3) {
var text = "<tr><td width=" + width1 + "% style='text-align:" + iterAlignment + ";'>" + toHtml(val1) + "<td width=" + width2 + "% style='text-align:right;'>" + val2;
text += "<td width=" + width3 + "%><img src=img/green.png width=" + porcent + "% height=20px />";
return text;
}
function getGeneralConfigItems() {
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertDecPointStartRest, "Fehler Konfigurationsdaten");
}
function insertDecPointStartRest(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
var decpoint = values.decpoint;
currency = values.currency;
$("#info-page").data("decpoint",values.decpoint);
setLanguage(values.userlanguage);
fillPageWithStats();
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
}
}
$(document).on("pageinit", "#info-page", function () {
initializeMainMenu("#modulemenu");
hideMenu();
getGeneralConfigItems();
});
</script>
<div data-role="page" id="info-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-role="list-divider" 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="reportttitletxt">Statistik</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">Hauptmenü</a>
</div>
</div>
<div data-role="content" id="content">
<h3>Kein Inhalt</h3>
</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>
</body>
</html>