ordersprinter/webapp/manager.html

2280 lines
97 KiB
HTML
Raw Normal View History

2020-11-19 22:47:44 +01:00
<html>
<head>
<title>Ansicht Verwaltungs</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
2020-11-19 22:48:24 +01:00
<meta name="author" content="Stefan Pichel">
2020-11-19 22:47:44 +01:00
2020-11-19 22:56:23 +01:00
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.18">
2020-11-19 22:47:44 +01:00
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
2020-11-19 22:48:24 +01:00
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
2020-11-19 22:47:44 +01:00
<script src="utilities.js"></script>
<script src="elements/tablemap.js"></script>
<script src="elements/roommap.js"></script>
<style>
@media all
{
.printpart {display: none;}
}
@media print
{
.printpart {display: inline;};
}
@media print
{
.noprint {display: none;};
}
</style>
</head>
<body>
<script>
var MAN_CANCEL = ["Abbrechen","Cancel","Cancelar"];
var MAN_APPLY = ["Anwenden","Apply","Aplicar"];
var MAN_DO_AUTO_NUM = ["Nummerierung","Numbering","Numeración"];
var MAN_ACCOUNT_EXPORT = ["Abrechnung und Datenexport","Accounting and Data Export","Calculo y export de datos"];
var MAN_CLOSING = ["Tagesabschluss","Closing","Conclusión"];
var MAN_CLOSING2 = ["Tageslosung ","Closing ","Conclusión "];
var MAN_INFO_ACCOUNT_EXPORT = ["Hier finden sich die Menüpunkte zum Tagesabschluss oder Datenexport.",
"Here you can handle the closings and the data export.",
"Aquí hay los punto para administrar las conclusiones y el export de datos"];
var MAN_USER = ["Benutzer","Users","Usarios"];
var MAN_CONFIG = ["Konfiguration","Configuration","Configuración"];
var MAN_DB = ["Datenbank","Data base","Base de datos"];
var MAN_NEW_USER = ["Neuer Benutzer","New user","Nuevo usario"];
var MAN_ADMIN = ["Administrator","Administrator","Administrador"];
var MAN_WAITER = ["Kellner","Waiter","Camarero"];
var MAN_KITCHEN = ["Küche","Kitchen","Cocina"];
var MAN_BAR = ["Bar","Bar","Bar"];
var MAN_SUPPLY = ["Bereitstellung","Supplydesk","Preparados"];
var MAN_PAYDESK = ["Kasse","Paydesk","Caja"];
var MAN_STAT = ["Statistik","Statistics","Estadisticas"];
var MAN_BILLS = ["Kassenbons","Receipts","Tiques"];
var MAN_PRODUCTS = ["Angebot","Products","Productos"];
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_MANAGER = ["Verwaltung","Administration","Administración"];
var MAN_USER_NAME = ["Benutzername","User name","Nombre de usario"];
var MAN_USER_PASS = ["Passwort","Password","Contraseña"];
var MAN_YES = ["Ja","Yes","Si"];
var MAN_NO = ["Nein","No","No"];
var MAN_CREATE = ["Erstellen","Create","Crear"];
var MAN_SPEISEKARTE = ["Speisekarte","Menu","Menú"];
var MAN_ROOMPLAN = ["Raumplan","Plan of rooms","Mapa de espacio"];
var MAN_DATAEXPORT = ["Datenexport","Data export","Grabar datos"];
var MAN_CLOSINGDET_TXT = ["Hier können Sie die seit dem letzten <i>Abschluss</i> getätigten neuen Transaktionen zu einem neuen Abschluss führen. Anschließend sind alle bis zu diesem Zeitpunkt erstellten Transaktionen/Kassenbons nicht mehr stornierbar!",
"Here you can create a closing of all new transactions since the last closing. All transactions that are part of a closing cannot be cancelled later on.",
"En este parte se puede cerrar todas las transacciones despues de la última cerramiento. Después las transacciones cerradas no se puede anular ya no."];
var MAN_MONTH = ["Monat:","Month:","Mes:"];
var MAN_JAN = ["Januar","January","Enero"];
var MAN_FEB = ["Februar","February","Febrero"];
var MAN_MAR = ["März","March","Marzo"];
var MAN_APR = ["April","April","Abril"];
var MAN_MAY = ["Mai","May","Mayo"];
var MAN_JUN = ["Juni","June","Junio"];
var MAN_JUL = ["Juli","July","Julio"];
var MAN_AUG = ["August","August","Agosto"];
var MAN_SEP = ["September","September","Septiembre"];
var MAN_OCT = ["Oktober","October","Octubre"];
var MAN_NOV = ["November","November","Noviembre"];
var MAN_DEC = ["Dezember","December","Diciembre"];
var MAN_CLOSING_INCOME = ["Tageseinnahme","Day takings","Ingreso diario"];
var MAN_CLOSING_INCOME_CASH = ["Bareinnahme","Cash day takings","Ingreso diario de contado"];
var MAN_CLOSING_DET_TXT = ["Ein Export im CSV-Format lässt sich mit Tabellenverarbeitungs-Programmen wie beispielsweise Excel verarbeiten.",
"An export in the format CSV can be used in spreadsheet applications like Excel.",
"Una grabación en el formato CSV se puede usar con programas como Excel."];
var MAN_CSV_EXP_RECEIPTS = ["CSV-Export Bons","CSV export of Receipts","Grabar tiques en CSV"];
2020-11-19 22:52:25 +01:00
var MAN_XLSX_EXP_RECEIPTS = ["... Excel","... Excel","... Excel"];
2020-11-19 22:47:44 +01:00
var MAN_CSV_EXP_ALL = ["CSV-Export komplett","CSV export all","Grabar todo en CSV"];
var MAN_PRINT_ALL = ["Drucken Komplettbericht","Print all","Imprimir todo"];
var MAN_PRINT_RECEIPT = ["Drucken Zusammenfassung auf Bon","Print summary on receipt","Imprimir resumen en tique"];
var MAN_OF = [" vom "," of "," de "];
var MAN_PERIOD = ["Zeitraum: ","Period: ","Período: "];
var MAN_1ST_CLOSING = ["Erste Erstellung einer Tageslosung","First creation of a closing","Primer acción de cerrar"];
var MAN_ID = ["Bon-ID","ID","Nú."];
var MAN_DATE = ["Zahlungsdatum","Pay date","Fecha de pago"];
var MAN_PROD = ["Produkt","Product","Producto"];
var MAN_BRUTTO = ["Bruttopreis","Gross","Bruto"];
var MAN_NETTO = ["Nettopreis","Net","Neto"];
var MAN_MWST = ["MwSt (%)","Tax (%)","IVA (%)"];
var MAN_PAYWAY = ["Zahlungsart","Method of payment","Modo de pago"];
var MAN_USER_ID = ["Benutzer-ID","User id","Id del usario"];
var MAN_STATE = ["Status","State","Estado"];
var MAN_REF = ["Referenz-Bon-ID","Reference Receipt id","Tique referenciado"];
var MAN_CHANGE = ["Ändern","Change","Modificar"];
var MAN_CONFIG_CHANGED = ["Konfiguration geändert","Configuration saved","Configuración modificado"];
var MAN_CONFIG_CHANGE_ERROR = ["Falsches Zahlenformat oder Serverproblem","Error","Error"];
var MAN_DATEXPDETTXT = ["Hier können Sie eine csv-Datei erzeugen lassen, die <ul><li>alle abgerechneten und in Tagesabschlüssen enthaltenen Bonabrechungen im unten auswählbaren Zeitraum beinhaltet.</li><li>alle Stammdaten (Produkte) und deren Änderungen seit der Installation aufführt.</li></ul>",
"In this control field you can create a csv file with <ul><li>all receipts transactions of the specified period that are part of a closing.</li><li>all product data and their changes in history since the installation.</li></ul>",
"En esta parte se puede crear un fichero con <ul><li>todos los tiques en un período que estan ya cerrados.</li><li>todos los productos y sus modificaciones desde la instalación."];
var MAN_NO_OF_ROOMS = ["Anzahl Räume: ","Number of rooms: ","Número de espacios: "];
var MAN_MAX_NO_OF_TABLES = ["Max. Anzahl Tische pro Raum: ","Max. number of tables in a room: ","Max. número de mesas en un espacio: "];
var MAN_CHANGE_ROOM_SIZE = ["Raumgröße ändern","Change room size","Cambiar dimensión de espacio"];
var MAN_ROOM_LABEL = ["Räume","Rooms","Espacios"];
var MAN_TABLE_LABEL = ["Tische","Tables","Mesas"];
var MAN_LANG_OF_RECEIPT = ["Bonsprache","Receipt language","Idioma de tique"];
var MAN_PRINT_CONCEPT = ["Druckkonzept","Print concept","Concepto de impresión"];
var MAN_PAYMENT_CONFIG = ["Menü Zahlungsweg","Menu Payment Type","Selección tipo de pagar"];
2020-11-19 22:48:24 +01:00
var MAN_WORKFONT_CONFIG = ["Arbeitsbon Schriftgröße","Font size work receipt","Tamaño de letras en tiques de trabajo"];
2020-11-19 22:52:25 +01:00
var MAN_PROMINENT_SEARCH = ["Prominente Produktsuche","Prominent Product search","Buscar de productos ariba"];
2020-11-19 22:53:50 +01:00
var MAN_GROUP_WORK_ITEMS = ["Artikelzusammenfassung Arbeitsbon","Summary articels on work receipt", "Agrupación articulos tique d. tr." ];
2020-11-19 22:47:44 +01:00
var MAN_RES_NOTE = ["Reservierungsbestätigung","Confirmation reservation","Text de email para reservación"];
var MAN_CHANGE_CONFIG_HEAD = ["Konfiguration ändern?","Change configuration?","Modificar configuración?"];
var MAN_CHANGE_CONFIG_CONTENT = ["Sollen folgende Werte geändert werden? ","Do you want to change these values? ","Debe ser cambiado estos datos? "];
var MAN_RECEIPT_FONTSIZE = ["Schriftgröße Bon","Font size receipt","Tamaño de letra en tiques"];
var MAN_EMAIL_DATA = ["Email senden","Send email","Enviar email"];
var MAN_EMAIL_WRONG_FORMAT = ["Keine gültige Email-Adresse angegeben.","No valid email address.","Dirección de email invalida."];
var MAN_EMAIL_EMPTY = ["Keine Email-Adresse angegeben.","No email address given.","No hay ningún dirección de email."];
var MAN_EMAIL_SENDER_TXT = ["Email-Absender:","Email sender:","Remitente de email:"];
var MAN_DEFAULT_EMAIL_TO = ["Standard-Email-Empfänger:","Standard email receiver","Destinario estandard de emails"];
var MAN_NEW_VERSION_AVAIL = ["Neue Version verfügbar", "New version available", "Hay una versión nueva"];
var MAN_BAK_REST_INFO = ['Die Datensicherung sichert die aktuelle Konfiguration. Beim Import kann diese wieder zurückimportiert '
+ 'werden. Dabei werden alle anderen Daten gelöscht.<br><br>',
'The backup functionality saves the current configuration. With the import functionality the configuration can be re-imported. '
+ 'During the import all other data is deleted.<br><br>',
'Exportar guarda la configuración. Con "Importar" la configuración se puede re-importado. '
+ 'Durante la importación todo el resto de los datos va a ser borrado.'];
var MAN_BAK_REST_INFO_ALL = ['Die Datensicherung kann auch die gesamte Datenbank sichern. Beim Import kann diese wieder zurückimportiert '
+ 'werden. Die Aktionen werden protokolliert und sind für Betriebsprüfer einsehbar.<br><br>',
'The backup functionality can also save the complete data base. With the import functionality the data can be re-imported. '
+ 'All actions are logged and can be controlled by authorized people.<br><br>',
'Exportar puede guarda la base de datos completamente. Con "Importar" este data se puede re-importado. '
+ 'Las acciones estan escritos en un log.'];
var MAN_REST_INFO = ["Der Import dauert eine Weile...","The import takes a while...","Importar necesita un rato..."];
var MAN_UPLOAD_FILE = ["Diese Datei hochladen: ", "Upload this file: ","Importar este file: "];
var MAN_BAK_REST_HEAD = ["Sicherung und Import","Backup and Restore","Exportar y Importar"];
var MAN_BAK_BTN = ["Sicherung (Konfiguration)","Backup (Configuration)","Exportar (configuración)"];
var MAN_BAK_BTN_ALL = ["Sicherung (Alles)","Backup (all)","Exportar (todo)"];
var MAN_RESTORE_BTN = ["Importieren","Restore","Importar"];
var MAN_SHUTDOWN = ["Server herunterfahren","Shutdown server","Apagar servidor"];
var MAN_SHUTDOWN_HINT = ["(Herunterfahren nur möglich, wenn Webserver die erforderlichen Rechte besitzt).",
"(Shutdown only possible if web server has the required privileges to do so.)",
"(Apagar el servidor sólo es posible si webserver tiene el derecho para hacerlo.)"];
var MAN_UPLOAD_LOGO = ["Logo-Datei hochladen","Upload Logo image","Leer imagen de logo"];
var MAN_NO_LOGO_BTN = ["Kein Logo","No logo","No imagen"];
var MAN_WORKFLOW = ["Arbeitsablauf","Workflow","Modo de trabajar"];
var MAN_WORKFLOW_BOTH = ["Digital und Arbeitsbons","Digital and work receipts","Digital y tiques de trabajar"];
var MAN_WORKFLOW_ONLY_DIGI = ["Nur digital","Only digital","Solo digital"];
var MAN_WORKFLOW_ONLY_WR = ["Nur Arbeitsbons","Only work receipts","Solo tiques de trabajar"];
2020-11-19 22:55:30 +01:00
var MAN_WORKFLOW_WR_AND_TRANSFER = ["Arbeitsbons mit Serverübermittlung", "Work receipts and server transmit","Tiques de trabajar y enviar a servidor"];
var MAN_WORKFLOW_WR_AND_TRANSFER_HLP = ["Hinweis: 'Arbeitsbons mit Serverübermittlung': In der Bestellansicht werden die Artikel bei Druck auf 'Bestellung senden' an den Server übermittelt, durchlaufen aber nicht die Ansichten Küche/Bar und Bereitstellung und es wird in diesem Fall kein Arbeitsbon gedruckt.",
"Hint: 'Work receipts and server transmit': In the waiter's view the orders can be sent to the server without printining a work receipt. In this case the items won't pass the modules kitchen/bar and supplydesk.",
"Información: 'Tiques de trabajar y enviar a servidor': El camarero puede enviar las ordenes al servidor sin imprimir un tique de trabajo."];
2020-11-19 22:47:44 +01:00
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",
"Solo usarios con derecho de admin pueden crear otros usarios de admin"];
var MAN_NO_ADMIN_DEL = ["Benutzer ohne Admin-Rechte können keine Admin-Benutzer löschen",
"Users without admin rights cannot delete admin users",
"Usarios sin derecho de admin no estan permitidos remover usarios con derecho de admin"];
var MAN_LAST_ADMIN = ["Letzter Benutzer mit Admin-Rechten kann nicht gelöscht werden!",
"Last user with admin rights cannot be deleted",
"No se puede remover el último usario can derecho de admin"];
var MAN_SAMPLE_MENU = ["Beispielspeisekarte","Sample menu","Ejemplo de menú"];
var MAN_EMAIL_BAD_RATING = ["Email für schlechte Bewertungen:","Email for bad ratings:","Email para valoraciones malas:"];
var MAN_EMAIL_RATING_CONTACT = ["Email für Kundenkontaktwunsch:","Email if customers request contact:","Email si clientes quieren contacto:"];
var MAN_REMOTE_ACCESS = ["Fernzugriffscode","Remote access code","Contrasueña Control remoto"];
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_UPDATE_PRINTJOBS = ["Aktualisieren","Update","Actualizar"];
var MAN_PRINT_JOBS_COUNT = ["Druckaufträge","print jobs","tareas de impresión"];
var MAN_PARSE_ERROR = ["Speisekarte konnte nicht erfolgreich eingelesen werden. Stimmt die Syntax, z.B. die korrekte Einrückung?",
"Menu could not be parsed - is the intendation correct?",
"Menú no se puede leido - esta correcto la intendación?"];
var MAN_PARSE_ERROR_LINE = ["Lesefehler nahe Zeile oder Element","Read error close to line or element","Problema de leer texto o elemento"];
var MAN_TM_DEL = ["Löschen","Delete","Removar"];
var MAN_TM = ["Laden","Load","Leer"];
var MAN_TM_HINT = ["<b>Bildauswahl:</b> Wählen Sie ein Bild, welches nicht zu groß ist! <b>Tischzuweisung:</b> Klicken Sie zunächst den Tisch an, dann legen Sie die Position im Bild fest. Für die restlichen Tische genauso verfahren.",
"<b>Selection of image:</b> Load an image which size is not too big! <b>Table assignment:</b> Click on the table button, then on the position in image. Assign the next table with the same mechanism.",
"<b>El imagen:</b> El imagen no debe ser tan grande! <b>Asignar las mesas:</b> Click en un boton de mesa, después en la imagen para la posición. El mismo para otras mesas."];
var MAN_NO_CLOSINGS = ["Es sind noch keine Tagesabschlüsse durchgeführt worden.","You have not performed any closings.","No hay ningún cerramientos"];
var MAN_SMTPHOST = ["SMTP-Host","SMTP-Host","SMTP-Host"];
var MAN_SMTPAUTH = ["SMTP-Authentifizierung","SMTP Authentication","SMTP Authentification"];
var MAN_SMTPUSER = ["SMTP-Benutzername","SMTP User name","SMTP usario"];
var MAN_SMTPPASS = ["SMTP-Passwort","SMTP password","SMTP contraseña"];
var MAN_SMTPSECURE = ["SMTP-Protokoll","SMTP Protocol","SMTP Seguridad"];
var MAN_SMTPPORT = ["SMTP-Port","SMTP Port","SMTP Port"];
var MAN_WEBIMPRESSUM = ["Webimpressum","Web company info","www café info"];
var MAN_TAX_ASSIGN = ["Umsatzsteuer-Zuweisung","Taxes assigment","Asignar impuestos"];
var MAN_TAX_ASS_DESC = ["An dieser Stelle können pauschal zwei unterschiedliche Steuersätze den Speisen und den Getränken zugewiesen werden. Das ist vor allem für die Nutzung der Software in Ländern wie Österreich interessant.",
"At this place it is possible to assign two different taxes to the foods and to the drinks. This is of interest for the use of this software in countries like Austria",
"En esta locación se puede asignar impuestos diferentes a comidas y a bebidas"
];
var MAN_TAX_ASS_DESC2 = ["Wenn den Produkten kein spezifischer Steuersatz zugeordnet ist, wird für Tischbestellungen der normale Steuersatz und für Außer-Haus-Bestellungen der ToGo-Steuersatz verwendet.",
"If you do not assign a specific tax to products the normal tax (table order) or togo tax is applied.",
"Si no ha asignado un IVA a productos, la IVA normal (order a la mesa) or la IVA para llevar esta aplicada."];
var MAN_FOOD = ["Speisen/Küche","Food/Kitchen","Comidas/Cocina"];
var MAN_DRINKS = ["Getränke/Bar","Beverage/Bar","Bebidas/Bar"];
var MAN_WRONG_NUMBER_FORMAT = ["Zuweisung unmöglich. Stimmt das Zahlenformat?","Assignment impossible. Is the number format correct?","Asignar no es posible. Es corecto el formato de los numeros?"];
var MAN_TAX_USE = ["Wenn kein Steuersatz beim Produkt angegeben ist: MwSt/Tax/IVA für Tischbestellungen, -Togo für Außer-Haus-Verkauf.",
"If no tax is specified for a product, these tax settings are used.",
"Si no un producto no tiene un IVA asignado, se usa estas IVAs"];
var MAN_CANCEL_UNPAID_CODE = ["Stornierungscode unbez. Best.", "Cancel code unpaid items","Codigo para cancelor productos impagados"];
var MAN_ROOM_PRINTER_NO = ["Kategorieeinstellung","Category setting","Configuración/categoria"];
var MAN_ROOM_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"];
var MAN_ROOM_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"];
var MAN_ROOM_PRINTER_TXT = ["Arbeitsdrucker","Work printer","Imprimadora de trabajo"];
2020-11-19 22:55:09 +01:00
var MAN_ROOM_ABBR_TXT = ["Kürzel","Abbr.","Abbr."];
2020-11-19 22:47:44 +01:00
2020-11-19 22:51:21 +01:00
var MAN_USERNAME = ["Benutzer","User","Usario"];
var MAN_BILLSUMALL = ["Gesamtbrutto","Total (brutto)","Todo (brutto)"];
var MAN_BILLSUMBAR = ["In bar","Cash only","Todo de contado"];
var MAN_BILLSUMCASH = ["Ein-/Auslagen","Cash inserts","Entradas"];
2020-11-19 22:48:24 +01:00
var MAN_SIZE_NORMAL = ["normal","normal","normal"];
var MAN_SIZE_BIG = ["groß","big","grande"];
2020-11-19 22:55:43 +01:00
var MAN_UNPAID1 = ["Es wurden folgende Tische noch nicht abgerechnet: ",
"These tables have unpaid products: ",
"Estas mesas tienen productos que no son pagados: "];
var MAN_UNPAID2 = ["Soll die Tageserfassung vorgenommen werden? In diesem Fall wird die Tisch-Zuweisung der unbezahlten Artikel gelöscht!",
"Do you want to continue create the closing? In this case these products will be unassigned from the tables!",
"Quieres continuar y removar estos productos?"];
2020-11-19 22:47:44 +01:00
var lang = 0;
2020-11-19 22:53:50 +01:00
var generalVals = [12,2,0,3,0,1,1,0,0,1];
2020-11-19 22:47:44 +01:00
var numberOfClosings = 0;
2020-11-19 22:55:43 +01:00
var unpaidTables = "";
2020-11-19 22:47:44 +01:00
var generalValuesSettings = [
["usstval","MwSt","i",2,"Mehrwertsteuer ist kein Zahlenwert"],
["togotaxval","ToGo-MwSt","i",2,"Togo-Mehrwertsteuer ist kein Zahlenwert"],
["stornocode","Stornocode","i",1,"Stornocode wurde nicht angegeben!"],
["printpass","Printcode","i",1,"Printcode wurde nicht angegeben"],
["companyinfo","Betriebsinfo","i",0],
["serverUrl","Serveradresse","i",0],
["email","Emailadresse","i",0],
["emailbadrating","Emailadresse schlechte Bewertung","i",0],
["emailratingcontact","Emailadresse Kontaktwunsch","i",0],
["receiveremail","Empfänger-Emailadresse","i",0],
["payprinttype",MAN_PRINT_CONCEPT[lang],"s",1],
["paymentconfig",MAN_PAYMENT_CONFIG[lang],"s",3],
2020-11-19 22:48:24 +01:00
["bigfontworkreceipt",MAN_WORKFONT_CONFIG[lang],"s",7],
2020-11-19 22:52:25 +01:00
["prominentsearch",MAN_PROMINENT_SEARCH[lang],"s",8],
2020-11-19 22:53:50 +01:00
["groupworkitems",MAN_GROUP_WORK_ITEMS[lang],"s",9],
2020-11-19 22:47:44 +01:00
["workflowconfig",MAN_WORKFLOW[lang],"s",4],
["receiptfontsize",MAN_RECEIPT_FONTSIZE[lang],"s",0],
["billlanguage",MAN_LANG_OF_RECEIPT[lang],"s",2],
["reservationnote",MAN_RES_NOTE[lang],"i",0],
["remoteaccesscode",MAN_REMOTE_ACCESS[lang],"i",0,""],
["cancelunpaidcode",MAN_CANCEL_UNPAID_CODE[lang],"i",0,""],
// REM SMTP settings
["smtphost",MAN_SMTPHOST[lang],"i",0,""],
["smtpauth",MAN_SMTPAUTH[lang],"s",5],
["smtpuser",MAN_SMTPUSER[lang],"i",0,""],
["smtppass",MAN_SMTPPASS[lang],"i",0,""],
["smtpsecure",MAN_SMTPSECURE[lang],"s",6],
["smtpport",MAN_SMTPPORT[lang],"i",0,""],
// // REM Web setting
["webimpressum",MAN_WEBIMPRESSUM[lang],"i",0,""]
];
var predef = "";
function setLanguage(l) {
lang = l;
$("#closingtxt").html(MAN_CLOSING[l]);
$("#acc_exporttxt").html(MAN_ACCOUNT_EXPORT[l]);
$("#info_acc_exporttxt").html(MAN_INFO_ACCOUNT_EXPORT[l]);
$("#usertxt").html(MAN_USER[l]);
$("#configtxt").html(MAN_CONFIG[l]);
$("#dbtxt").html(MAN_DB[l]);
$("#speisekarte").html(MAN_SPEISEKARTE[l]);
$("#roomplantxt").html(MAN_ROOMPLAN[l]);
$("#dataexporttxt").html(MAN_DATAEXPORT[l]);
$("#closingdetailstxt").html(MAN_CLOSINGDET_TXT[l]);
var monthHtml = createMonthSelection("select-month");
$("#monthpart").html(monthHtml);
$("#monthpart").trigger("create");
monthHtml = createMonthSelection("select-month-export-start");
$("#datexportstartmonthpart").html(monthHtml);
$("#datexportstartmonthpart").trigger("create");
monthHtml = createMonthSelection("select-month-export-end");
$("#datexportendmonthpart").html(monthHtml);
$("#datexportendmonthpart").trigger("create");
$("#createclosing").html(MAN_CREATE[l]);
$("#changeConfig").html(MAN_CHANGE[l]);
$("#dataexportdettxt").html(MAN_DATEXPDETTXT[l]);
$("#numberofrooms").html(MAN_NO_OF_ROOMS[l]);
$("#maxnumberoftables").html(MAN_MAX_NO_OF_TABLES[l]);
$("#changeroomsizetxt").html(MAN_CHANGE_ROOM_SIZE[l]);
$("#cancel_roomchange").html(MAN_CANCEL[l]);
$("#roomfield_apply").html(MAN_APPLY[l]);
$("#roomfield_prefill").html(MAN_DO_AUTO_NUM[l]);
$("#readspeisekarte").html(MAN_APPLY[l]);
$("#fromemailtxt").html(MAN_EMAIL_SENDER_TXT[l]);
$("#toemailtxt").html(MAN_DEFAULT_EMAIL_TO[l]);
$("#smtphosttxt").html(MAN_SMTPHOST[l]);
$("#smtpusertxt").html(MAN_SMTPUSER[l]);
$("#smtppasstxt").html(MAN_SMTPPASS[l]);
$("#smtpporttxt").html(MAN_SMTPPORT[l]);
$("#emailbadratingtxt").html(MAN_EMAIL_BAD_RATING[l]);
$("#emailratingcontacttxt").html(MAN_EMAIL_RATING_CONTACT[l]);
$("#bakresinfotxt").html(MAN_BAK_REST_INFO[l]);
$("#bakresinfotxtall").html(MAN_BAK_REST_INFO_ALL[l]);
$("#uplfiletxt").html(MAN_UPLOAD_FILE[l]);
$("#bakrestxt").html(MAN_BAK_REST_HEAD[l]);
$("#backupbtntxt").html(MAN_BAK_BTN[l]);
$("#backupbtntxtall").html(MAN_BAK_BTN_ALL[l]);
$("#restorebtntxt").html(MAN_RESTORE_BTN[l]);
$("#shutdownbtntxt").html(MAN_SHUTDOWN[l]);
$("#shutdownhinttxt").html(MAN_SHUTDOWN_HINT[l]);
$("#upllogotxt").html(MAN_UPLOAD_LOGO[l]);
$("#dellogobtn").html(MAN_NO_LOGO_BTN[l]);
$("#samplemenutxt").html(MAN_SAMPLE_MENU[l]);
$("#printjobsheader").html(MAN_PRINTJOBS[l]);
$("#updateprintqueue").html(MAN_UPDATE_PRINTJOBS[l]);
$("#tmimgdelbtntxt").html(MAN_TM_DEL[l]);
$("#tmimgbtntxt").html(MAN_TM[l]);
$("#tmhint").html(MAN_TM_HINT[l]);
$("#webimpressum").html(MAN_WEBIMPRESSUM[l]);
$("#taxestxt").html(MAN_TAX_ASSIGN[l]);
$("#taxesassdescr").html(MAN_TAX_ASS_DESC[l]);
$("#taxesassdescr2").html(MAN_TAX_ASS_DESC2[l]);
$("#taxesfoodtxt").html(MAN_FOOD[l]);
$("#taxesdrinkstxt").html(MAN_DRINKS[l]);
$("#taxapplytxt").html(MAN_APPLY[l]);
$("#taxusage").html("<i>(" + MAN_TAX_USE[l] + ")</i>");
}
function createMonthSelection(label) {
var monthHtml = '<label for="' + label + '">' + MAN_MONTH[lang] + '</label>'
+ '<select name="' + label + '" id="' + label + '" data-theme="e">'
+ '<option value="1">' + MAN_JAN[lang] + '</option>'
+ '<option value="2">' + MAN_FEB[lang] + '</option>'
+ '<option value="3">' + MAN_MAR[lang] + '</option>'
+ '<option value="4">' + MAN_APR[lang] + '</option>'
+ '<option value="5">' + MAN_MAY[lang] + '</option>'
+ '<option value="6">' + MAN_JUN[lang] + '</option>'
+ '<option value="7">' + MAN_JUL[lang] + '</option>'
+ '<option value="8">' + MAN_AUG[lang] + '</option>'
+ '<option value="9">' + MAN_SEP[lang] + '</option>'
+ '<option value="10">' + MAN_OCT[lang] + '</option>'
+ '<option value="11">' + MAN_NOV[lang] + '</option>'
+ '<option value="12">' + MAN_DEC[lang] + '</option></select>';
return monthHtml;
}
function hideElementsForNonAdminUser(jsonAnswer) {
if (jsonAnswer != "Yes") {
$("#dbactionui").hide();
}
}
function hideElementsForNonAdminManagerUser(jsonAnswer) {
if (jsonAnswer != "Yes") {
$("#allpagecontent").hide();
}
}
function getSpeisekarte() {
doAjax("GET", "php/contenthandler.php?module=products&command=getSpeisekarte", null, insertSpeisekarte, "Fehler Insert Speisekarte");
}
function getGeneralConfigItems() {
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGeneralConfigItems, "Fehler Konfigurationsdaten");
}
function insertGeneralConfigItems(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
setLanguage(values.userlanguage);
var decpoint = values.decpoint;
$("#admin-page").data("decpoint",values.decpoint);
var taxval = values.tax;
var usstGerVal = taxval.replace(".", decpoint);
$("#usstval").val(usstGerVal);
taxval = values.togotax;
usstGerVal = taxval.replace(".", decpoint);
$("#togotaxval").val(usstGerVal);
$("#companyinfo").val(values.companyinfo);
$("#reservationnote").val(values.reservationnote);
var payPrintType = values.payprinttype;
if (payPrintType == "l") {
payPrintType = 1;
generalVals[1] = 1;
}
if (payPrintType == "s") {
payPrintType = 2;
generalVals[1] = 2;
}
generalVals[3] = values.paymentconfig;
generalVals[4] = values.workflowconfig;
$("#partOfPayPrintType").html(createPayPrintTypePart(payPrintType));
$("#partOfPaymentConfig").html(createPaymentConfigPart(values.paymentconfig));
$("#partOfWorkflowConfig").html(createWorkflowConfigPart(values.workflowconfig));
2020-11-19 22:48:24 +01:00
$("#partOfBigFontWorkReceipt").html(createBigFontWorkReceiptPart(values.bigfontworkreceipt));
2020-11-19 22:52:25 +01:00
$("#partOfProminentSearch").html(createProminentSearchPart(values.prominentsearch));
2020-11-19 22:53:50 +01:00
$("#partOfGroupWorkItems").html(createGroupWorkItemsPart(values.groupworkitems));
2020-11-19 22:47:44 +01:00
var language = values.billlanguage;
generalVals[2] = language;
$("#partOfBillLanguage").html(createBillLanguagePart(language));
generalVals[0] = parseInt(values.receiptfontsize);
$("#partOfReceiptFontSize").html(createReceiptFontPart());
$("#partOfBillLanguage").data("originalBillLanguage",language);
$("#admin-page").data("currency",values.currency);
$("#serverUrl").val(values.serverurl);
$("#email").val(values.email);
$("#emailbadrating").val(values.emailbadrating);
$("#emailratingcontact").val(values.emailratingcontact);
$("#receiveremail").val(values.receiveremail);
$("#webimpressum").val(values.webimpressum);
$("#cancelunpaidcode").val(values.cancelunpaidcode);
generalVals[5] = values.smtpauth;
generalVals[6] = values.smtpsecure;
2020-11-19 22:48:24 +01:00
generalVals[7] = values.bigfontworkreceipt;
2020-11-19 22:52:25 +01:00
generalVals[8] = values.prominentsearch;
2020-11-19 22:53:50 +01:00
generalVals[9] = values.groupworkitems;
2020-11-19 22:47:44 +01:00
$("#smtphost").val(values.smtphost);
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
$("#smtpuser").val(values.smtpuser);
$("#smtppass").val(values.smtppass);
$("#partOfSmtpsecure").html(createSMTPSecure(values.smtpsecure));
$("#smtpport").val(values.smtpport);
$("#configpart").trigger("create");
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
}
}
function insertSpeisekarte(speisekarte) {
if (speisekarte.status != "ERROR") {
predef = speisekarte.predef;
$("#speiseninfo").textinput( "option", "autogrow", true );
$("#speiseninfo").val(speisekarte.msg);
$("#speiseninfo").trigger('change');
}
}
function isSelectedOption(optionNo,option) {
if (optionNo == option) {
return " selected";
} else {
return "";
}
}
function createReceiptFontPart() {
var html = '<div class="ui-field-contain">';
html += '<label for="receiptfontsize">' + MAN_RECEIPT_FONTSIZE[lang] + ':</label>';
html += '<select name="receiptfontsize" id="receiptfontsize" data-theme="e">';
for($i=7;$i<=14;$i++) {
html += '<option value="' + $i + '"' + isSelectedOption($i,generalVals[0]) + '>' + $i + '</option>';
}
html += '</select></div>';
return html;
}
function createPaymentConfigPart(payment) {
var html = '<div class="ui-field-contain">';
html += '<label for="paymentconfig">' + MAN_PAYMENT_CONFIG[lang] + ':</label>';
html += '<select name="paymentconfig" id="paymentconfig" data-theme="e">';
if (payment == 0) {
html += '<option value="0" selected>Maxi</option>';
html += '<option value="1">Mini</option>';
} else {
html += '<option value="0">Maxi</option>';
html += '<option value="1" selected>Mini</option>';
}
html += '</select></div>';
return html;
}
2020-11-19 22:48:24 +01:00
function createBigFontWorkReceiptPart(theValue) {
var html = '<div class="ui-field-contain">';
html += '<label for="bigfontworkreceipt">' + MAN_WORKFONT_CONFIG[lang] + ':</label>';
html += '<select name="bigfontworkreceipt" id="bigfontworkreceipt" data-theme="e">';
if (theValue == 0) {
html += '<option value="0" selected>' + MAN_SIZE_NORMAL[lang] + '</option>';
html += '<option value="1">' + MAN_SIZE_BIG[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_SIZE_NORMAL[lang] + '</option>';
html += '<option value="1" selected>' + MAN_SIZE_BIG[lang] + '</option>';
}
html += '</select></div>';
return html;
}
2020-11-19 22:52:25 +01:00
function createProminentSearchPart(theValue) {
var html = '<div class="ui-field-contain">';
html += '<label for="prominentsearch">' + MAN_PROMINENT_SEARCH[lang] + ':</label>';
html += '<select name="prominentsearch" id="prominentsearch" data-theme="e">';
if (theValue == 0) {
html += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
html += '<option value="1">' + MAN_YES[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_NO[lang] + '</option>';
html += '<option value="1" selected>' + MAN_YES[lang] + '</option>';
}
html += '</select></div>';
return html;
}
2020-11-19 22:53:50 +01:00
function createGroupWorkItemsPart(theValue) {
var html = '<div class="ui-field-contain">';
html += '<label for="groupworkitems">' + MAN_GROUP_WORK_ITEMS[lang] + ':</label>';
html += '<select name="groupworkitems" id="groupworkitems" data-theme="e">';
if (theValue == 0) {
html += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
html += '<option value="1">' + MAN_YES[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_NO[lang] + '</option>';
html += '<option value="1" selected>' + MAN_YES[lang] + '</option>';
}
html += '</select></div>';
return html;
}
function createWorkflowConfigPart(workflow) {
2020-11-19 22:47:44 +01:00
var html = '<div class="ui-field-contain">';
html += '<label for="workflowconfig">' + MAN_WORKFLOW[lang] + ':</label>';
html += '<select name="workflowconfig" id="workflowconfig" data-theme="e">';
if (workflow == 0) {
html += '<option value="0" selected>' + MAN_WORKFLOW_BOTH[lang] + '</option>';
html += '<option value="1">' + MAN_WORKFLOW_ONLY_DIGI[lang] + '</option>';
html += '<option value="2">' + MAN_WORKFLOW_ONLY_WR[lang] + '</option>';
2020-11-19 22:55:30 +01:00
html += '<option value="3">' + MAN_WORKFLOW_WR_AND_TRANSFER[lang] + '</option>';
2020-11-19 22:47:44 +01:00
} else if (workflow == 1) {
html += '<option value="0">' + MAN_WORKFLOW_BOTH[lang] + '</option>';
html += '<option value="1" selected>' + MAN_WORKFLOW_ONLY_DIGI[lang] + '</option>';
html += '<option value="2">' + MAN_WORKFLOW_ONLY_WR[lang] + '</option>';
2020-11-19 22:55:30 +01:00
html += '<option value="3">' + MAN_WORKFLOW_WR_AND_TRANSFER[lang] + '</option>';
} else if (workflow == 2){
2020-11-19 22:47:44 +01:00
html += '<option value="0">' + MAN_WORKFLOW_BOTH[lang] + '</option>';
html += '<option value="1">' + MAN_WORKFLOW_ONLY_DIGI[lang] + '</option>';
html += '<option value="2" selected>' + MAN_WORKFLOW_ONLY_WR[lang] + '</option>';
2020-11-19 22:55:30 +01:00
html += '<option value="3">' + MAN_WORKFLOW_WR_AND_TRANSFER[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_WORKFLOW_BOTH[lang] + '</option>';
html += '<option value="1">' + MAN_WORKFLOW_ONLY_DIGI[lang] + '</option>';
html += '<option value="2">' + MAN_WORKFLOW_ONLY_WR[lang] + '</option>';
html += '<option value="3" selected>' + MAN_WORKFLOW_WR_AND_TRANSFER[lang] + '</option>';
2020-11-19 22:47:44 +01:00
}
html += '</select></div>';
2020-11-19 22:55:30 +01:00
html += "<p style='padding-left: 50px;padding-right: 50px;'><i>" + MAN_WORKFLOW_WR_AND_TRANSFER_HLP[lang] + "</i></p>";
return html;
2020-11-19 22:47:44 +01:00
}
function createSMTPAuth(smtpauth) {
var html = '<div class="ui-field-contain">';
html += '<label for="smtpauth">' + MAN_SMTPAUTH[lang] + ':</label>';
html += '<select name="smtpauth" id="smtpauth" data-theme="e">';
if (smtpauth == '0') {
html += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
html += '<option value="1">' + MAN_YES[lang] + '</option>';
} else {
html += '<option value="0">' + MAN_NO[lang] + '</option>';
html += '<option value="1" selected>' + MAN_YES[lang] + '</option>';
}
html += '</select></div>';
return html;
}
function createSMTPSecure(smtpauth) {
var html = '<div class="ui-field-contain">';
html += '<label for="smtpsecure">' + MAN_SMTPSECURE[lang] + ':</label>';
html += '<select name="smtpsecure" id="smtpsecure" data-theme="e">';
if (smtpauth == '0') {
html += '<option value="0" selected>SSL</option>';
html += '<option value="1">TLS</option>';
} else {
html += '<option value="0">SSL</option>';
html += '<option value="1" selected>TLS</option>';
}
html += '</select></div>';
return html;
}
function createPayPrintTypePart(localOrServer) {
var html = '<div class="ui-field-contain">';
html += '<label for="payprinttype">' + MAN_PRINT_CONCEPT[lang] + ':</label>';
html += '<select name="payprinttype" id="payprinttype" data-theme="e">';
if ((localOrServer == 'l') || (localOrServer == '1')) {
html += '<option value="1" selected>Lokal</option>';
html += '<option value="2">Server</option>';
} else {
html += '<option value="1">Lokal</option>';
html += '<option value="2" selected>Server</option>';
}
html += '</select></div>';
return html;
}
function createBillLanguagePart(language) {
var html = '<div class="ui-field-contain">';
html += '<label for="billlanguage">' + MAN_LANG_OF_RECEIPT[lang] + ':</label>';
html += '<select name="billlanguage" id="billlanguage" data-theme="e">';
if (language == '0') {
html += '<option value="0" selected>Deutsch</option>';
html += '<option value="1">English</option>';
html += '<option value="2">Español</option>';
} else if (language == '1'){
html += '<option value="0">Deutsch</option>';
html += '<option value="1" selected>English</option>';
html += '<option value="2">Español</option>';
} else {
html += '<option value="0">Deutsch</option>';
html += '<option value="1">English</option>';
html += '<option value="2" selected>Español</option>';
}
html += '</select></div>';
return html;
}
function changeConfig(changedEntries) {
doAjax("POST","php/contenthandler.php?module=admin&command=changeConfig",{changed:changedEntries},reactOnConfigChange,"Fehler");
}
function reactOnConfigChange(result) {
if (result == "OK") {
alert(MAN_CONFIG_CHANGED[lang]);
} else {
alert(MAN_CONFIG_CHANGE_ERROR[lang]);
}
}
$(document).ready(function() {
$.ajaxSetup({ cache: false });
2020-11-19 22:55:43 +01:00
requestUnpaidTables();
var refreshId = setInterval(function() {
requestUnpaidTables();
}, 5000);
2020-11-19 22:47:44 +01:00
});
2020-11-19 22:55:43 +01:00
function requestUnpaidTables() {
doAjaxAsync("GET","php/contenthandler.php?module=queue&command=getUnpaidTables",null,insertUnpaidTables,null);
}
function insertUnpaidTables(answer) {
if (answer.status == "OK") {
unpaidTables = answer.msg;
}
}
2020-11-19 22:47:44 +01:00
function areYouSure(text1, text2, button, callback) {
$("#sure .sure-1").text(text1);
$("#sure .sure-2").text(text2);
$("#sure .sure-do").text(button).off("click.sure").on("click.sure", function() {
callback();
$(this).off("click.sure");
});
$.mobile.changePage("#sure");
}
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
2020-11-19 22:55:43 +01:00
function startCreateClosing(remark) {
if (unpaidTables.length == "") {
doAjax("POST","php/contenthandler.php?module=closing&command=createClosing",{ remark: remark },createClosing,"Tagesabschluss");
} else {
areYouSure("Tageserfassung", MAN_UNPAID1[lang] + unpaidTables + ". " + MAN_UNPAID2[lang], MAN_YES[lang], function() {
doAjax("POST","php/contenthandler.php?module=closing&command=createClosing",{ remark: remark },createClosing,"Tagesabschluss");
});
}
}
2020-11-19 22:47:44 +01:00
function binding() {
$("#createclosing").off("click").on("click", function (e) {
var remarkText =$('#remarkfield').val();
$('#remarkfield').val("");
var filteredRemark = remarkText.replace(/\f/g,"").replace(/\n/g,"").replace(/\r/g,"").replace(/\t/g,"").replace(/\v/g,"");
2020-11-19 22:55:43 +01:00
startCreateClosing(filteredRemark);
2020-11-19 22:47:44 +01:00
});
$(".csvExportButton").off("click").on("click", function (e) {
var button_id = this.id;
var pos_underscore = button_id.indexOf("_");
var closingid = button_id.substr(pos_underscore+1,button_id.length-1);
window.location.href = "php/contenthandler.php?module=bill&command=exportCsvOfClosing&closingid=" + closingid;
});
2020-11-19 22:52:25 +01:00
$(".xlsxExportButton").off("click").on("click", function (e) {
var button_id = this.id;
var pos_underscore = button_id.indexOf("_");
var closingid = button_id.substr(pos_underscore+1,button_id.length-1);
window.location.href = "php/contenthandler.php?module=bill&command=exportXlsxOfClosing&closingid=" + closingid;
});
2020-11-19 22:47:44 +01:00
$(".csvExportAllButton").off("click").on("click", function (e) {
var button_id = this.id;
var pos_underscore = button_id.indexOf("_");
var closingid = button_id.substr(pos_underscore+1,button_id.length-1);
window.location.href = "php/contenthandler.php?module=closing&command=exportCsv&closingid=" + closingid;
});
$(".csvEmailAllButton").off("click").on("click", function (e) {
var button_id = this.id;
var pos_underscore = button_id.indexOf("_");
var closingid = button_id.substr(pos_underscore+1,button_id.length-1);
var emailaddr = $("#email_" + closingid).val();
if (emailaddr == "") {
alert(MAN_EMAIL_EMPTY[lang]);
} else if (emailaddr.indexOf('@') < 0) {
alert(MAN_EMAIL_WRONG_FORMAT[lang]);
} else {
doAjax("GET","php/contenthandler.php?module=closing&command=emailCsv",{closingid: closingid,emailaddress:emailaddr,topic:MAN_CLOSING[lang]},handleResultOfDbAction,"Emailproblem");
}
});
$(".printButton").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var button_id = this.id;
//this.id = "printexport_id"
var pos_underscore = button_id.indexOf("_");
var closingid = button_id.substr(pos_underscore+1,button_id.length-1);
doAjax("GET","php/contenthandler.php?module=closing&command=getClosing",{closingid: closingid},doPrinting,"Druckproblem");
});
$(".printsummary").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var closingid = this.id.split("_")[1];
if (generalVals[1] == 2) {
doAjax("GET","php/contenthandler.php?module=printqueue&command=queueClosingSummary",{closingid: closingid},null,"Druckproblem");
} else {
doAjax("GET","php/contenthandler.php?module=closing&command=getClosingSummary",{closingid: closingid},doPrintClosingSummary,"Druckproblem");
}
});
$("#select-year").change(function() {
getClosingsOfSelectedDate();
});
$("#select-month").change(function() {
getClosingsOfSelectedDate();
});
$( ".genConfigEl" ).keyup(function(e) {
$(this).data("changed",true);
});
$("#changeConfig").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var changeInfoText = "";
var changedEntries = [];
var i=0;
var aGenConfigEntry = "";
var isChanged = false;
var atLeatOneChange = false;
var entryName = "";
var type = "i";
for (i=0;i<generalValuesSettings.length;i++) {
aGenConfigEntry = generalValuesSettings[i];
type = aGenConfigEntry[2];
entryName = aGenConfigEntry[0];
if (type == "i") {
isChanged = hasChangedData("#" + entryName);
if (isChanged) {
var valueElToChange = {
name: entryName,
value: $("#" + entryName).val(),
needsCheck : aGenConfigEntry[3],
checkTxt : (aGenConfigEntry[3] ? aGenConfigEntry[4] : "")
};
changedEntries[changedEntries.length] = valueElToChange;
}
} else if (type == "s") {
var selectedVal = $("#" + entryName).find(":selected").val();
if (generalVals[aGenConfigEntry[3]] != selectedVal) {
isChanged = true;
var valueElToChange = {
name: entryName,
value: selectedVal,
needsCheck : aGenConfigEntry[3],
checkTxt : (aGenConfigEntry[3] ? aGenConfigEntry[4] : "")
};
changedEntries[changedEntries.length] = valueElToChange;
} else {
isChanged = false;
}
}
if (isChanged) {
atLeatOneChange = true;
if (changeInfoText == "") {
changeInfoText += " " + aGenConfigEntry[1];
} else {
changeInfoText += ", " + aGenConfigEntry[1];
}
}
}
if (!atLeatOneChange) {
$( "#nochangeddata" ).popup( "open", {transition: 'flip'} );
} else {
areYouSure(MAN_CHANGE_CONFIG_HEAD[lang], MAN_CHANGE_CONFIG_CONTENT[lang] + changeInfoText, MAN_YES[lang], function() {
// test for validity
var isValid = true;
for (i=0;i<changedEntries.length;i++) {
var anEntryToChange = changedEntries[i];
var needsCheck = anEntryToChange.needsCheck;
var theVal = anEntryToChange.value;
if (needsCheck > 0) {
if ((typeof theVal == 'undefined') || (theVal == null)){
isValid = false;
alert(anEntryToChange.checkTxt);
return;
}
}
if (needsCheck == 1) {
// test for empty string
if (theVal.trim() == "") {
isValid = false;
alert(anEntryToChange.checkTxt);
}
} else if (needsCheck == 2) {
// test for double value
anEntryToChange.value = theVal.replace(",",".");
if (!isNumeric(theVal.replace(",","."))) {
isValid = false;
alert(anEntryToChange.checkTxt);
}
}
};
if (isValid) {
changeConfig(changedEntries);
setTimeout(function(){document.location.href = "manager.html"},500);
}
});
}
});
$(".exportbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var selectedMonthStart = $("#select-month-export-start").find(":selected").val();
var selectedYearStart = $("#select-year-export-start").find(":selected").val();
var selectedMonthEnd = $("#select-month-export-end").find(":selected").val();
var selectedYearEnd = $("#select-year-export-end").find(":selected").val();
var dateparams = "lang=" + lang + "&";
dateparams += "startMonth=" + selectedMonthStart + "&";
dateparams += "startYear=" + selectedYearStart + "&";
dateparams += "endMonth=" + selectedMonthEnd + "&";
dateparams += "endYear=" + selectedYearEnd;
var theId = this.id;
if (theId == "createprodexport") {
window.location.href = "php/contenthandler.php?module=products&command=exportCsv";
} else if (theId == "createuserexport") {
window.location.href = "php/contenthandler.php?module=admin&command=exportUserCsv";
} else if (theId == "createconfigexport") {
window.location.href = "php/contenthandler.php?module=admin&command=exportConfigCsv";
} else if (theId == "createdbexport") {
window.location.href = "php/contenthandler.php?module=bill&command=exportCsv&" + dateparams;
2020-11-19 22:52:25 +01:00
} else if (theId == "createdbexportxlsx") {
window.location.href = "php/contenthandler.php?module=bill&command=exportXlsx&" + dateparams;
2020-11-19 22:47:44 +01:00
} else if (theId == "createpdfexport") {
2020-11-19 22:55:09 +01:00
window.location.href = "php/contenthandler.php?module=bill&command=exportPdfReport&" + dateparams;
2020-11-19 22:47:44 +01:00
} else if (theId == "createpdfsummary") {
2020-11-19 22:55:09 +01:00
window.location.href = "php/contenthandler.php?module=bill&command=exportPdfSummary&" + dateparams;
2020-11-19 22:47:44 +01:00
}
});
$("#changeroomsize").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
resizeRoomField();
});
$("#cancel_roomchange").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
askForCurrentRoomField();
});
$("#roomfield_prefill").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
roomfield_prefill();
});
$("#roomfield_apply").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
areYouSure("Raumdefinition", "Alten Raumplan löschen und neuen festlegen", "Ja", function() {
roomfield_apply();
});
});
$("#readspeisekarte").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var text = $("#speiseninfo").val();
doAjaxSuppressError("POST", "php/contenthandler.php?module=admin&command=fillSpeisekarte", {speisekarte:text}, confirmMsg, "Fehler");
});
$("#backup_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=configuration";
});
$("#backup_btnall").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=all";
});
$("#restorebtntxt").off("click").on("click", function (e) {
$("#restinfoafterclick").html(MAN_REST_INFO[lang]);
});
$("#shutdown_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=shutdown",null,handleAnswerShutdown,"Skriptproblem");
});
$("#dellogobtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=admin&command=deletelogo",null,handleDelLogo,"Skriptproblem");
});
$("#readsamplemenu").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
$("#speiseninfo").val(predef);
});
$("#updateprintqueue").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
});
$("#taxass_apply").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var foodTax = $("#taxesassfood").val().trim();
if (foodTax == "") {
foodTax = -1;
}
var drinksTax = $("#taxesassdrinks").val().trim();
if (drinksTax == "") {
drinksTax = -1;
}
var data = {
food: foodTax,
drinks: drinksTax
};
doAjax("POST","php/contenthandler.php?module=admin&command=assignTaxes",data,confirmMsg,"Problem Steuersatzzuweisung");
});
}
function confirmMsg (result) {
if (result.status != 'OK') {
var code = result.code;
if (code == 26) {
alert(MAN_PARSE_ERROR_LINE[lang] + ":\n" + result.line + "\n" + MAN_PARSE_ERROR[lang]);
} else if (code == 27) {
alert(MAN_WRONG_NUMBER_FORMAT[lang]);
} else {
alert (MAN_PARSE_ERROR[lang]);
}
} else {
alert("Aktion durchgeführt");
window.location.reload();
}
}
function handleDelLogo() {
// force reload of image
d = new Date();
$("#logoimgpart").attr("src", "php/contenthandler.php?module=printqueue&command=getLogoAsPng&"+d.getTime());
}
function handleAnswerShutdown(result) {
if (result.status == "OK") {
alert("Der Server wird in Kürze heruntergefahren.");
} else {
alert("Fehler " + result.code + ": " + result.msg);
}
}
function hasChangedData(idOfElem) {
var fieldChangedAttr = $("" + idOfElem).data("changed");
if (typeof fieldChangedAttr != 'undefined') {
if (fieldChangedAttr == null) {
fieldChangedAttr = false;
}
} else {
return false;
}
return fieldChangedAttr;
}
function createClosing(closingresult) {
setMonthYearSelection();
getLastClosings();
if (closingresult.status == "OK") {
var decpoint = $("#admin-page").data("decpoint");
var msg = closingresult.msg;
var closingid = msg.closingid;
alert("Summe des Tagesabschlusses (" + $("#admin-page").data("currency") + "): " + (msg.result.toString()).replace(".", decpoint));
if (generalVals[1] == 2) {
doAjax("GET","php/contenthandler.php?module=printqueue&command=queueClosingSummary",{closingid: closingid},null,"Druckproblem");
} else {
doAjax("GET","php/contenthandler.php?module=closing&command=getClosingSummary",{closingid: closingid},doPrintClosingSummary,"Druckproblem");
}
} else {
alert("Fehler " + closingresult.code + ": " + closingresult.msg);
}
}
function doPrintClosingSummary(closingdata) {
if (closingdata.status == "OK") {
var msg = closingdata.msg;
if (msg != null) {
var closing = msg.closing;
var overview = msg.overview;
var details = msg.details;
var currency = $("#admin-page").data("currency");
var decpoint = $("#admin-page").data("decpoint");
var html = "<i>Tageslosung Nr.</i> " + closing.id + "<br>";
html += "<i>Datum:</i> " + closing.closingdate + "<br>";
var remark = closing.remark;
if ((remark != null) && (remark != "")) {
html += "<i>Bemerkung: " + remark + "<br>";
}
html += "<i>Brutto-Summe: " + closing.billsum + " " + currency + "<br><br>";
html += "<br><i>Übersicht:</i><br>";
html += "<table><tr><th>Summe<th>Netto<th>Zahl.weg<th>Status</tr>";
var i=0;
for (i=0;i<overview.length;i++) {
// sum | tax | name | status
var entry = overview[i];
var sum=parseFloat(entry.sum).toFixed(2).replace(".", decpoint);
var tax=parseFloat(entry.netto).toFixed(2).replace(".", decpoint);
var name = entry.name;
var status = entry.status;
if (status == null) {
status = "";
} else if (status == "c") {
status = "Barein-/auslage";
} else if ((status == "x") || (status == "s")) {
status = "Stornovorg.";
}
html += "<tr><td>" + sum + "<td>" + tax + "<td>" + name + "<td>" + status + "</tr>";
}
html += "</table><br><br>Nach Produkten:<br>";
// count | productname | price | tax | sumprice |
html += "<table><tr><th>Anzahl<th>Prod.<th>Preis<th>Steuer<th>Summe</tr>";
for (i=0;i<details.length;i++) {
var entry = details[i];
var count = entry.count;
var prodname = entry.productname;
var price = parseFloat(entry.price).toFixed(2).replace(".", decpoint);
var tax = parseFloat(entry.tax).toFixed(2).replace(".", decpoint);
var sum = parseFloat(entry.sumprice).toFixed(2).replace(".", decpoint);
html += "<tr><td>" + count + "<td>" + prodname + "<td>" + price + "<td>" + tax + "<td>" + sum + "</tr>";
}
html += "</table>";
$("#tableforprint").html(html);
window.print();
}
} else {
alert("Fehler " + closingdata.code + ": " + closingdata.msg);
}
}
function doPrinting(closingdata) {
if (closingdata.status == "OK") {
var currency = $("#admin-page").data("currency");
var styleTxt5td = "<td style='width:5%; overflow: hidden;text-overflow: ellipsis; font-size:8px;'>";
var styleTxt9td = "<td style='width:9%; overflow: hidden;text-overflow: ellipsis; font-size:8px;'>";
var styleTxt7td = "<td style='width:7%; overflow: hidden;text-overflow: ellipsis; font-size:8px;'>";
var styleTxt13td = "<td style='width:13%; overflow: hidden;text-overflow: ellipsis; font-size:8px;'>";
var styleTxt18td = "<td style='width:18%; overflow: hidden;text-overflow: ellipsis; font-size:8px; white-space:nowrap'>";
var styleTxt27td = "<td style='width:27%; overflow: hidden;text-overflow: ellipsis; font-size:8px;'>";
var styleTxt5th = "<th style='width:5%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var styleTxt9th = "<th style='width:9%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var styleTxt7th = "<th style='width:7%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var styleTxt13th = "<th style='width:13%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var styleTxt18th = "<th style='width:18%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var styleTxt27th = "<th style='width:27%; overflow: hidden;text-overflow: ellipsis;word-wrap:break-word;font-size:8px;'>";
var closingid = closingdata.closingid;
var closingdate = closingdata.closingdate;
var previousClosingDate = closingdata.previousClosingDate;
var tableText = "";
tableText = "<h2>" + MAN_CLOSING2[lang] + closingid + MAN_OF[lang] + closingdate + "</h2>";
if (previousClosingDate != null) {
tableText += MAN_PERIOD[lang] + previousClosingDate + " - " + closingdate + '<br>';
} else {
tableText += MAN_1ST_CLOSING + '<br>';
}
tableText += '<table class="closingtable" style="table-layout:fixed; width:100%;" border=1 >';
tableText += "<tr>" + styleTxt5th + MAN_ID[lang];
tableText += styleTxt27th + MAN_DATE[lang];
tableText += styleTxt18th + MAN_PROD[lang];
tableText += styleTxt7th + MAN_BRUTTO[lang] + " (" + currency + ")";
tableText += styleTxt7th + MAN_NETTO[lang] + " (" + currency + ")";
tableText += styleTxt7th + MAN_MWST[lang];
tableText += styleTxt18th + MAN_PAYWAY[lang];
tableText += styleTxt5th + MAN_USER_ID[lang];
tableText += styleTxt9th + MAN_USER_NAME[lang];
tableText += styleTxt13th + MAN_STATE[lang];
tableText += styleTxt5th + MAN_REF[lang] + "</tr>";
$.each(closingdata.msg, function (i, aClosing) {
var billid = aClosing.billid;
var price = aClosing.price;
var netto = aClosing.netto;
var tax = aClosing.tax;
var productname = aClosing.productname;
var paidtime = aClosing.paidtime;
var payment = aClosing.payment;
var userid = aClosing.userid;
var username = aClosing.username;
var ref = aClosing.ref;
ref = ((ref != '') && (ref != null) ? ref : '&nbsp;');
var status = aClosing.status;
status = ((status != '') && (status != null) ? status : '&nbsp;');
tableText += "<tr>";
tableText += styleTxt5td + billid;
tableText += styleTxt27td + paidtime;
tableText += styleTxt18td + productname;
tableText += styleTxt9td + price;
tableText += styleTxt9td + netto;
tableText += styleTxt9td + tax;
tableText += styleTxt18td + payment;
tableText += styleTxt5td + userid;
tableText += styleTxt9td + username;
tableText += styleTxt13td + status;
tableText += styleTxt5td + ref;
tableText += "</tr>";
});
tableText += "</table>";
$("#tableforprint").html(tableText);
window.print();
} else {
alert("Fehler " + closingdata.code + ": " + closingdata.msg);
}
}
function getClosingsOfSelectedDate() {
var selectedYear = $("#select-year").find(":selected").val();
var selectedMonth = $("#select-month").find(":selected").val();
getClosings(selectedMonth,selectedYear);
}
function getLastClosings() {
var today = new Date();
var yyyy = today.getFullYear();
var month = today.getMonth()+1;
getClosings(month,yyyy);
}
function displayReceivedClosings(closingresult) {
if (closingresult.status == "OK") {
var closingParts = "";
numberOfClosings = closingresult.msg.length;
$.each(closingresult.msg, function (i, aClosing) {
var id = aClosing.id;
var closingDate = aClosing.closingDate;
var remark = aClosing.remark;
var totalsum = aClosing.totalsum;
var cashsum = aClosing.cashsum;
2020-11-19 22:51:21 +01:00
var usersums = aClosing.usersums;
2020-11-19 22:47:44 +01:00
if (remark != "") {
2020-11-19 22:51:21 +01:00
closingParts += createClosingPart(id + ": " + closingDate + ": " + remark,id,totalsum,cashsum,usersums);
2020-11-19 22:47:44 +01:00
} else {
2020-11-19 22:51:21 +01:00
closingParts += createClosingPart(id + ": " + closingDate,id,totalsum,cashsum,usersums);
2020-11-19 22:47:44 +01:00
}
});
$("#partofclosings").html(closingParts);
$('#partofclosings').trigger('create');
binding();
}
}
function getClosings(month,year) {
var data = {
month: month,
year: year
};
doAjax("GET","php/contenthandler.php?module=closing&command=getClosings",data,displayReceivedClosings,"Keine Abschluesse erhalten");
}
function createLabelWithTextField(aLabel,displayedName,defaultText) {
var labelid = 'userlabel_' + aLabel;
var text = '<div class="ui-field-contain">';
text += '<label for="' + labelid + '">' + displayedName + '</label>';
text += '<input type="text" id="' + labelid + '" value="" data-mini="true" placeholder="' + defaultText + '" />';
text += '</div>';
return text;
}
function createButtonWithTextField(aLabel,displayedName,defaultText) {
var labelid = 'userlabel_' + aLabel;
var text = '<div class="ui-field-contain">';
text += '<input type="text" class="' + labelid + '" value="" data-mini="true" placeholder="' + defaultText + '" />';
text += '<button data-theme="f" data-icon="check" class="changepassword">' + displayedName + '</button>';
text += '</div>';
return text;
}
function createLabelWithOption(aLabel,displayedName,hasTheRight) {
var labelid = 'userlabel_' + aLabel;
var text = '<div class="ui-field-contain">';
text += '<label for="' + labelid + '">' + displayedName + '</label>';
if (hasTheRight) {
text += '<select name="' + labelid + '" id="' + labelid + '" data-theme="f">';
text += '<option value="1" selected>' + MAN_YES[lang] + '</option>';
text += '<option value="0">' + MAN_NO[lang] + '</option>';
} else {
text += '<select name="' + labelid + '" id="' + labelid + '" data-theme="d">';
text += '<option value="1">' + MAN_YES[lang] + '</option>';
text += '<option value="0" selected>' + MAN_NO[lang] + '</option>';
}
text += '</select></div>';
return text;
}
/*
* Creates a table for a user with the info about the user, i.e.
* the username and the rights that the user has to work in the
* various modules.
*/
function createCollapsibeOfUser(id,username,isAdmin,rWaiter,rKitchen,rBar,rSupply,rPay,rStat,rBill,rProd,rReservation,rRating,rChangeprice,rManager,forNewUser) {
var collapsiblePart = '<div data-role="collapsible" id="' + id + '"';
if (forNewUser) {
collapsiblePart += ' data-theme="d" data-content-theme="d">';
} else {
collapsiblePart += ' data-theme="c" data-content-theme="c">';
}
collapsiblePart += '<h3>'+ username + '</h3>';
collapsiblePart += '<form>';
if (forNewUser) {
collapsiblePart += createLabelWithTextField("username",MAN_USER_NAME[lang],MAN_USER_NAME[lang]);
collapsiblePart += createLabelWithTextField("password",MAN_USER_PASS[lang],MAN_USER_PASS[lang]);
}
collapsiblePart += createLabelWithOption("admin",MAN_ADMIN[lang],isAdmin);
collapsiblePart += createLabelWithOption("waiter",MAN_WAITER[lang],rWaiter);
collapsiblePart += createLabelWithOption("kitchen",MAN_KITCHEN[lang],rKitchen);
collapsiblePart += createLabelWithOption("bar",MAN_BAR[lang],rBar);
collapsiblePart += createLabelWithOption("supplydesk",MAN_SUPPLY[lang],rSupply);
collapsiblePart += createLabelWithOption("paydesk",MAN_PAYDESK[lang],rPay);
collapsiblePart += createLabelWithOption("stat",MAN_STAT[lang],rStat);
collapsiblePart += createLabelWithOption("bill",MAN_BILLS[lang],rBill);
collapsiblePart += createLabelWithOption("products",MAN_PRODUCTS[lang],rProd);
collapsiblePart += createLabelWithOption("reservation",MAN_RESERVATION[lang],rReservation);
collapsiblePart += createLabelWithOption("rating",MAN_RATING[lang],rRating);
collapsiblePart += createLabelWithOption("changeprice",MAN_CHANGEPRICE[lang],rChangeprice);
collapsiblePart += createLabelWithOption("manager",MAN_MANAGER[lang],rManager);
if (forNewUser) {
collapsiblePart += '<button data-theme="f" data-icon="plus" id="CreateNewUser">' + MAN_CREATE[lang] + '</button>';
} else {
collapsiblePart += '<button data-theme="f" data-icon="check" class="userUpdateButton">Rechte ändern</button>';
collapsiblePart += createButtonWithTextField("newpassword", "Passwort ändern", "Anderes Passwort");
collapsiblePart += '<button data-theme="d" data-icon="minus" class="userDeleteButton">Löschen</button>';
}
collapsiblePart += '<form>';
collapsiblePart += '</div>';
return collapsiblePart;
}
function fillUserListIntoGui(userinfo) {
var userPart = "";
$.each(userinfo, function (i, aUser) {
var userid = aUser.id;
var username = aUser.username;
userPart += createCollapsibeOfUser(
"userid_" + userid,
username,
aUser.is_admin == 1,
aUser.right_waiter == 1,
aUser.right_kitchen == 1,
aUser.right_bar == 1,
aUser.right_supply == 1,
aUser.right_paydesk == 1,
aUser.right_statistics == 1,
aUser.right_bill == 1,
aUser.right_products == 1,
aUser.right_reservation == 1,
aUser.right_rating == 1,
aUser.right_changeprice == 1,
aUser.right_manager == 1,
false
);
});
userPart += createCollapsibeOfUser(
"userid_newuser",
MAN_NEW_USER[lang],
false,false,false,false,false,false,false,false,false,false,false,false,false,true);
$("#userlist").html(userPart);
$('#userpart').trigger('create');
// now set the data for each user to the buttons - that makes life easier... :)
$.each(userinfo, function (i, aUser) {
var userid = aUser.id;
var deleteButtonElem = $("#userlist").find("#userid_" + userid).find(".userDeleteButton");
deleteButtonElem.data("userid",userid);
var updateButtonElem = $("#userlist").find("#userid_" + userid).find(".userUpdateButton");
updateButtonElem.data("userid",userid);
var passwdButtonElem = $("#userlist").find("#userid_" + userid).find(".changepassword");
passwdButtonElem.data("userid",userid);
});
// now put the bindings to the user actions that are all (incl the NewUser part) dynamic
dynamicUserBinding();
}
function askAndFillUserList() {
doAjax("GET","php/contenthandler.php?module=admin&command=getUserList",null, fillUserListIntoGui,"no user data received");
}
function dynamicUserBinding() {
$("#CreateNewUser").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var newUserInfoContainer = $(this).closest(".ui-collapsible");
var username = newUserInfoContainer.find("#userlabel_username").val();
var password = newUserInfoContainer.find("#userlabel_password").val();
var isAdmin = newUserInfoContainer.find("#userlabel_admin").val();
var rWaiter = newUserInfoContainer.find("#userlabel_waiter").val();
var rKitchen = newUserInfoContainer.find("#userlabel_kitchen").val();
var rBar = newUserInfoContainer.find("#userlabel_bar").val();
var rSupply = newUserInfoContainer.find("#userlabel_supplydesk").val();
var rPayDesk = newUserInfoContainer.find("#userlabel_paydesk").val();
var rStat = newUserInfoContainer.find("#userlabel_stat").val();
var rBill = newUserInfoContainer.find("#userlabel_bill").val();
var rProducts = newUserInfoContainer.find("#userlabel_products").val();
var rReservation = newUserInfoContainer.find("#userlabel_reservation").val();
var rRating = newUserInfoContainer.find("#userlabel_rating").val();
var rChangeprice = newUserInfoContainer.find("#userlabel_changeprice").val();
var rManager = newUserInfoContainer.find("#userlabel_manager").val();
if ((username.length == 0) || (password.length == 0)) {
alert ("Benutzername oder Passwort sind nicht gesetzt");
} else {
var data = {
username: username,
password: password,
isAdmin: isAdmin,
rWaiter: rWaiter,
rKitchen: rKitchen,
rBar: rBar,
rSupply: rSupply,
rPayDesk: rPayDesk,
rStat: rStat,
rBill: rBill,
rProducts: rProducts,
rReservation: rReservation,
rRating: rRating,
rChangeprice : rChangeprice,
rManager: rManager
};
doAjax("POST","php/contenthandler.php?module=admin&command=createNewUser",data,doCreateNewUser,"Anlegen neuer Benutzer");
}
});
$(".userUpdateButton").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var userid = $(this).data("userid");
var userInfoContainer = $(this).closest(".ui-collapsible");
var isAdmin = userInfoContainer.find("#userlabel_admin").val();
var rWaiter = userInfoContainer.find("#userlabel_waiter").val();
var rKitchen = userInfoContainer.find("#userlabel_kitchen").val();
var rBar = userInfoContainer.find("#userlabel_bar").val();
var rSupply = userInfoContainer.find("#userlabel_supplydesk").val();
var rPayDesk = userInfoContainer.find("#userlabel_paydesk").val();
var rStat = userInfoContainer.find("#userlabel_stat").val();
var rBill = userInfoContainer.find("#userlabel_bill").val();
var rProducts = userInfoContainer.find("#userlabel_products").val();
var rReservation = userInfoContainer.find("#userlabel_reservation").val();
var rRating = userInfoContainer.find("#userlabel_rating").val();
var rChangeprice = userInfoContainer.find("#userlabel_changeprice").val();
var rManager = userInfoContainer.find("#userlabel_manager").val();
var data = {
userid: userid,
isAdmin: isAdmin,
rWaiter: rWaiter,
rKitchen: rKitchen,
rBar: rBar,
rSupply: rSupply,
rPayDesk: rPayDesk,
rStat: rStat,
rBill: rBill,
rProducts: rProducts,
rReservation: rReservation,
rRating: rRating,
rChangeprice: rChangeprice,
rManager: rManager
};
doAjax("POST","php/contenthandler.php?module=admin&command=updateUser",data,askAndFillUserListNoData,"Benutzerdaten");
});
$(".userDeleteButton").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var data = {
userid: $(this).data("userid")
};
doAjax("POST","php/contenthandler.php?module=admin&command=deleteUser",data,handleDelUser,"Benutzer entfernen");
});
$(".changepassword").off("click").on("click", function (e) {
var userid = $(this).data("userid");
var userInfoContainer = $(this).closest(".ui-collapsible");
var newPassword = userInfoContainer.find(".userlabel_newpassword").val();
if (newPassword.length == 0) {
alert ("Passwort ist leer!");
} else {
var data = {
userid: userid,
password: newPassword
};
doAjax("POST","php/contenthandler.php?module=admin&command=changepassword",data,askAndFillUserListNoData,"Neues Passwort");
}
});
}
function handleDelUser(result) {
if (result == "noadmin") {
alert(MAN_NO_ADMIN_DEL[lang]);
} else if (result == "lastadmin") {
alert(MAN_LAST_ADMIN[lang]);
} else {
setTimeout(function(){document.location.href = "manager.html"},250);
}
}
// only a wrapper to remove argument
function askAndFillUserListNoData(data) {
if (data == "noadmin") {
alert (MAN_NO_ADMIN[lang]);
} else {
setTimeout(function(){document.location.href = "manager.html"},250);
}
}
function reloadPage(dummyData) {
location.reload();
}
function doCreateNewUser(result) {
if (result == "exists") {
alert ("Benutzer existiert bereits");
}
else if (result == "noadmin") {
alert (MAN_NO_ADMIN_CREATE[lang]);
} else {
askAndFillUserList("OK");
}
}
function handleResultOfDbAction(jsonText) {
if (jsonText.status == "OK") {
alert("Kommando ausgeführt");
} else {
alert("Fehler " + jsonText.code + ": " + jsonText.msg);
}
}
function invokeCmd(theCommand) {
doAjax("GET","php/contenthandler.php?module=admin&command=" + theCommand,null,handleResultOfDbAction,"Problemkommando " . theCommand);
}
2020-11-19 22:51:21 +01:00
function createClosingPart (aText,id,totalsum,cashsum,usersums) {
2020-11-19 22:47:44 +01:00
var decpoint = $("#admin-page").data("decpoint");
var currency = $("#admin-page").data("currency");
var closingPart = '<div data-role="collapsible" data-theme="e" data-content-theme="d">';
closingPart += '<h3>' + aText + '</h3>';
2020-11-19 22:51:21 +01:00
if (usersums.length > 0) {
var decpoint = $("#admin-page").data("decpoint");
closingPart += '<br><table class="usersums">';
closingPart += '<tr><th>' + MAN_USERNAME[lang] + '<th>' + MAN_BILLSUMALL[lang] + '<th>' + MAN_BILLSUMBAR[lang] + '<th>' + MAN_BILLSUMCASH[lang] + '</tr>';
for (var i=0;i<usersums.length;i++) {
var aUserSum = usersums[i];
closingPart += '<tr><td>' + aUserSum.username;
closingPart += '<td>' + aUserSum.billsumall.replace(".", decpoint);
closingPart += '<td>' + aUserSum.sumonlybar.replace(".", decpoint);
closingPart += '<td>' + aUserSum.sumcash.replace(".", decpoint);
closingPart += '</tr>';
}
closingPart += '</table><br>';
}
2020-11-19 22:47:44 +01:00
closingPart += '<i>' + MAN_CLOSING_INCOME[lang] + ' (' + currency + '):</i> <b>' + (parseFloat(Math.round(totalsum * 100) / 100).toFixed(2)).replace(".", decpoint) + "</b><br>";
closingPart += '<i>' + MAN_CLOSING_INCOME_CASH[lang] + ' (' + currency + '):</i> <b>' + (parseFloat(Math.round(cashsum * 100) / 100).toFixed(2)).replace(".", decpoint) + "</b><br>";
closingPart += '<p>' + MAN_CLOSING_DET_TXT[lang] + '</p>';
2020-11-19 22:51:21 +01:00
2020-11-19 22:47:44 +01:00
closingPart += '<p>';
2020-11-19 22:52:25 +01:00
closingPart += '<div class="ui-grid-a" class="noprint">';
closingPart += ' <div class="ui-block-a">';
closingPart += ' <button type="submit" data-theme="f" class="csvExportButton" data-icon="check" id="csvexport_' + id + '">' + MAN_CSV_EXP_RECEIPTS[lang] + '</button>';
closingPart += ' </div>';
closingPart += ' <div class="ui-block-b">';
closingPart += ' <button type="submit" data-theme="f" class="xlsxExportButton" data-icon="check" id="xlsxexport_' + id + '">' + MAN_XLSX_EXP_RECEIPTS[lang] + '</button>';
closingPart += ' </div>';
closingPart += '</div>';
2020-11-19 22:47:44 +01:00
closingPart += '<button type="submit" data-theme="f" class="csvExportAllButton" data-icon="check" id="csvallexport_' + id + '">' + MAN_CSV_EXP_ALL[lang] + '</button>';
// email buttons
var receiverEmail = $("#receiveremail").val();
closingPart += '<fieldset class="ui-grid-a" id="emailfieldset' + id + '">';
closingPart += '<div class="ui-block-a">';
closingPart += '<input type="text" name="email_' + id + '" id="email_' + id + '" value="' + receiverEmail + '" /></div>';
closingPart += '<div class="ui-block-b"><button type="submit" data-theme="c" class="csvEmailAllButton" data-icon="arrow-r" id="csvallemail_' + id + '">' + MAN_EMAIL_DATA[lang] + '</button></div>';
closingPart += '<button type="submit" data-theme="f" class="printButton" data-icon="check" id="printexport_' + id + '">' + MAN_PRINT_ALL[lang] + '</button>';
closingPart += '<button type="submit" data-theme="f" class="printsummary" data-icon="check" id="printsummary_' + id + '">' + MAN_PRINT_RECEIPT[lang] + '</button>';
closingPart += '</p>';
closingPart += '</div>';
return closingPart;
}
function createYearPartFor(label,selectionid,container) {
var today = new Date();
var yyyy = today.getFullYear();
var htmlText = '<form><div class="ui-field-contain"><label for="' + label + '">Jahr:</label>';
htmlText += '<select name="' + label + '" id="' + label + '" data-theme="e">';
for (var i=2013;i<=yyyy;i++)
{
htmlText += '<option value="' + i + '">' + i + '</option>';
}
htmlText += '</select></div>';
$(selectionid).html(htmlText);
$(container).trigger('create');
$("#" + label).val(yyyy).attr('selected', true).siblings('option').removeAttr('selected');
$("#" + label).selectmenu("refresh", true);
}
function setMonthYearSelection() {
var today = new Date();
var month = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
$("#select-month").val(month).attr('selected', true).siblings('option').removeAttr('selected');
$("#select-year").val(yyyy).attr('selected', true).siblings('option').removeAttr('selected');
$("#select-month-export-end").val(month).attr('selected', true).siblings('option').removeAttr('selected');
$("#select-year-export-end").val(yyyy).attr('selected', true).siblings('option').removeAttr('selected');
$("#select-month").selectmenu("refresh", true);
$("#select-year").selectmenu("refresh", true);
$("#select-month-export-end").selectmenu("refresh", true);
$("#select-year-export-end").selectmenu("refresh", true);
}
//
// Functions for room plans
//
function tablelist(no,rowId) {
var i=0;
var text = "";
for (i=0;i<no;i++) {
text += '<td><input style="background:white;" type="text" size="3" id="t_' + rowId.toString() + '_' + i.toString() + '"/>';
}
return text;
}
function askForCurrentRoomField() {
doAjax("GET","php/contenthandler.php?module=roomtables&command=getRoomfield",null,initroomfield,"Raumplan");
}
function resizeRoomField() {
var n = $("#maxrooms_val").val();
var m = $("#maxtables_val").val();
try {
n = parseInt(n);
m = parseInt(m);
if ((n>0) && (n<30) && (m>0) && (m<30)) {
createEmptyRoomField(n,m);
} else {
alert("Größe außerhalb des zulässigen Bereichs");
}
} catch(e) {
alert ("Falsches Zahlenformat");
}
}
function createRoomPrinterSelection(roomid,selectedPrinter) {
var txt = '<select data-theme="e" name="roomprinter_' + roomid + '" id="roomprinter_' + roomid + '">';
if (selectedPrinter == 0) {
txt += '<option value=0 selected>' + MAN_ROOM_PRINTER_NO[lang] + '</option>';
txt += '<option value=1>' + MAN_ROOM_PRINTER_1[lang] + '</option>';
txt += '<option value=2>' + MAN_ROOM_PRINTER_2[lang] + '</option>';
} else if (selectedPrinter == 1) {
txt += '<option value=0>' + MAN_ROOM_PRINTER_NO[lang] + '</option>';
txt += '<option value=1 selected>' + MAN_ROOM_PRINTER_1[lang] + '</option>';
txt += '<option value=2>' + MAN_ROOM_PRINTER_2[lang] + '</option>';
} else {
txt += '<option value=0>' + MAN_ROOM_PRINTER_NO[lang] + '</option>';
txt += '<option value=1>' + MAN_ROOM_PRINTER_1[lang] + '</option>';
txt += '<option value=2 selected>' + MAN_ROOM_PRINTER_2[lang] + '</option>';
}
txt += '</select>';
return txt;
}
function createEmptyRoomField(n,m) {
var i=0;
var text = "<table>";
2020-11-19 22:55:09 +01:00
text += '<tr><th>' + MAN_ROOM_LABEL[lang] + '<th>' + MAN_ROOM_ABBR_TXT[lang] + '<th>' + MAN_ROOM_PRINTER_TXT[lang] + '<th colspan=' + m + '>' + MAN_TABLE_LABEL[lang] + '</tr>';
2020-11-19 22:47:44 +01:00
for (i=0;i<n;i++) {
text += '<tr><td><input style="background:white;" type="text" id="r_' + i.toString() + '"' + ' size="10" />';
2020-11-19 22:55:09 +01:00
text += '<td><input style="background:white;" type="text" id="rabbr_' + i.toString() + '"' + ' size="10" />';
2020-11-19 22:47:44 +01:00
text += '<td id=roomprintercol_' + i + '>' + createRoomPrinterSelection(i,0);
text += tablelist(m,i);
}
text += "</table>";
$("#roomfield").html(text);
$("#roomfield").trigger("create");
}
function initroomfield(roomfield_json) {
if (roomfield_json.status == "ERROR") {
return;
}
var n = roomfield_json.noOfRooms;
var m = roomfield_json.maxTables;
$("#maxrooms_val").val(n);
$("#maxtables_val").val(m);
createEmptyRoomField(n,m);
var room_index, table_index, r_id, t_id;
var roomfield = roomfield_json.roomfield;
for (room_index = 0; room_index < n; room_index++) {
var aRoom = roomfield[room_index];
r_id = "#r_" + room_index.toString();
$(r_id).val(aRoom.roomname);
2020-11-19 22:55:09 +01:00
$("#rabbr_" + room_index).val(aRoom.abbreviation);
2020-11-19 22:47:44 +01:00
var noOfTables = aRoom.noOfTables;
var roomPrinter = aRoom.printer;
$("#roomprintercol_" + room_index).html(createRoomPrinterSelection(room_index,roomPrinter));
var tablesOfRoom = aRoom.tables;
for (table_index = 0; table_index < noOfTables; table_index++) {
t_id = "#t_" + room_index.toString() + "_" + table_index.toString();
var aTable = tablesOfRoom[table_index];
$(t_id).val(aTable.tablename);
}
}
$("#roomfield").trigger("create");
var roomMap = new Roommap("#tablemaps");
}
function roomfield_prefill() {
var n = $("#maxrooms_val").val();
var m = $("#maxtables_val").val();
try {
var i=0;
var j=0;
if (m>10) {
m=10;
}
var id = "";
for (i=0;i<n;i++) {
id = "#r_" + i.toString();
var startNumber = parseInt(i.toString() + '1');
var endNumber = startNumber + parseInt(m) - 1;
$(id).val(MAN_TABLE_LABEL[lang] + " " + startNumber + "-" + endNumber);
2020-11-19 22:55:09 +01:00
$("#rabbr_" + i).val('');
2020-11-19 22:47:44 +01:00
for (j=0;j<m;j++) {
var t = (i + parseInt((j+1)/10)).toString() + ((j+1)%10).toString();
id = "#t_" + i.toString() + "_" + j.toString();
$(id).val(t);
}
}
} catch (e) {}
}
function roomfield_apply() {
var n = $("#maxrooms_val").val();
var m = $("#maxtables_val").val();
try {
n = parseInt(n);
m = parseInt(m);
if ((n>0) && (n<30) && (m>0) && (m<30)) {
// collect data now!
var room_index, table_index, r_id, t_id;
var rooms = [];
for (room_index = 0; room_index < n; room_index++) {
r_id = "#r_" + room_index.toString();
var roominfo = [];
var roomname = $(r_id).val();
2020-11-19 22:55:09 +01:00
var roomabbr = $("#rabbr_" + room_index).val();
2020-11-19 22:47:44 +01:00
var selectedPrinter = $("#roomprinter_" + room_index).find(":selected").val();
if ((roomname.replace(/ /,"")) != "") {
roominfo[0] = roomname;
2020-11-19 22:55:09 +01:00
roominfo[1] = roomabbr.trim();
roominfo[2] = selectedPrinter;
2020-11-19 22:47:44 +01:00
var tablesOfRoom = [];
for (table_index = 0; table_index < m; table_index++) {
t_id = "#t_" + room_index.toString() + "_" + table_index.toString();
var aTableName = $(t_id).val();
if ((aTableName.replace(/ /,"")) != "") {
tablesOfRoom.push(aTableName);
}
}
if (tablesOfRoom.length > 0) {
2020-11-19 22:55:09 +01:00
roominfo[3] = tablesOfRoom;
2020-11-19 22:47:44 +01:00
} else {
continue;
}
rooms.push(roominfo);
}
}
// setRoomInfo
doAjax("POST","php/contenthandler.php?module=roomtables&command=setRoomInfo",{rooms:rooms},askForCurrentRoomField,"Raumplan nicht änderbar");
}
} catch(e) {}
}
function insertPrintQueue(queue) {
if (queue.status == "OK") {
var jobs = queue.msg;
var li = "";
for (var i=0;i<jobs.length;i++) {
var printer = parseInt(jobs[i].printer);
var number = jobs[i].jobs;
var printertxt = MAN_PRINTER[lang] + " #" + printer;
if (printer == 7) {
printertxt = MAN_FOOD_PRINTER[lang];
} else if (printer == 8) {
printertxt = MAN_DRINK_PRINTER[lang];
}
li += '<ul id="printqueue_' + i + '" data-role="listview" data-divider-theme="a" data-inset="true">';
li += '<li data-role="list-divider" data-theme="b" data-role="heading">' + printertxt + '</li>';
li += '<li data-role="list-divider" data-theme="d" data-role="heading">' + number + " " + MAN_PRINT_JOBS_COUNT[lang] + '</li>';
li += '</ul>';
}
$("#printjobsarea").html(li);
$("#printjobsarea").trigger("create");
}
}
$(document).on("pageinit", "#admin-page", function () {
initializeMainMenu("#modulemenu");
getGeneralConfigItems();
doAjax("GET","php/contenthandler.php?module=admin&command=isLoggedinUserAdminOrManager",null,hideElementsForNonAdminManagerUser,"Fehler");
askAndFillUserList();
hideMenu();
doAjax("GET","php/contenthandler.php?module=admin&command=isLoggedinUserAdmin",null,hideElementsForNonAdminUser,"Pruefe Adminberechtigung");
createYearPartFor("select-year","#yearselection",'#closinglist');
createYearPartFor("select-year-export-start","#yearselectionexportstart",'#dataexport');
createYearPartFor("select-year-export-end","#yearselectionexportend",'#dataexport');
setMonthYearSelection();
getLastClosings();
getSpeisekarte();
binding();
askForCurrentRoomField();
$("#userfile").val('');
doAjax("GET","php/contenthandler.php?module=printqueue&command=getPrintJobOverview",null,insertPrintQueue,null);
});
</script>
<div data-role="page" id="admin-page">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay" class="noprint">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
<h1>Administration</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">Module</a>
</div>
</div>
<div data-role="content" id="allpagecontent">
<div data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="acc_exporttxt">Abrechnung und Datenexport</span></h3>
<p><span id="info_acc_exporttxt">Hier finden sich die Menüpunkte zum Tagesabschluss oder Datenexport.</span></p>
<div id="closinglist" data-role="collapsible" data-theme="c" data-content-theme="c">
<h3><span id="closingtxt">Tagesabschluss</span></h3>
<p><span id="closingdetailstxt">Hier können Sie die seit dem letzten <i>Abschluss</i> getätigten neuen Transaktionen
zu einem neuen Abschluss führen. Anschließend sind alle bis zu diesem Zeitpunkt
erstellten Transaktionen/Kassenbons nicht mehr stornierbar!</span></p>
<form>
<div class="ui-field-contain" id="monthpart">
</div>
</form>
<div id=yearselection>
<form>
<div class="ui-field-contain">
<label for="select-native-1">Jahr:</label>
<select name="select-year" id="select-year">
<option value="2014">2014</option>
</select>
</div>
</div> <!-- yearselection -->
<input type="text" id="remarkfield" value="" data-mini="true" placeholder="Bemerkung" />
<button type="submit" data-theme="f" class="cancelButton" data-icon="plus" id="createclosing">Erstellen</button>
<div id=partofclosings>
<div data-role="collapsible" data-theme="d" data-content-theme="d">
<h3>Tagesabschlussbeispiel</h3>
<p>Dieser Eintrag sollte hier nicht mehr stehen...</p>
</div><!-- /section 1A -->
</div>
</div><!-- closinglist -->
<div id="dataexport" data-role="collapsible" data-content-theme="c">
<h3><span id="dataexporttxt">Datenexport</span></h3>
<p><span id="dataexportdettxt">Hier können Sie eine csv-Datei erzeugen lassen, die ...
</span>
</p>
<form>
<b>Startdatum Umsätze:</b>
<div class="ui-field-contain" id="datexportstartmonthpart"></div>
<div id=yearselectionexportstart>
<form>
<div class="ui-field-contain">
<label for="select-year-export-start">Jahr:</label>
<select name="select-year-export-start" id="select-year-export-start">
<option value="2014">2014</option>
</select>
</div>
</div>
<b>Enddatum Umsätze</b>:
<div class="ui-field-contain" id="datexportendmonthpart"></div>
<div id=yearselectionexportend>
<div class="ui-field-contain">
<label for="select-year-export-end">Jahr:</label>
<select name="select-year-export-end" id="select-year-export-end">
<option value="2014">2014</option>
</select>
</div>
</div>
2020-11-19 22:52:25 +01:00
<div class="ui-grid-a" class="noprint">
<div class="ui-block-a"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexport">Export Umsätze CSV</button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createdbexportxlsx">... Excel</button></div>
</div><!-- /grid-a -->
2020-11-19 22:47:44 +01:00
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfexport">PDF-Umsatzbericht</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createpdfsummary">PDF-Zusammenfassung</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createprodexport">Export Produktdaten</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createuserexport">Export Benutzerdaten</button>
<button type="submit" data-theme="f" class="cancelButton exportbtn" data-icon="check" id="createconfigexport">Export Konfiguration</button>
</form>
</div><!-- Datenexport -->
</div> <!-- collapsible Abrechnung und Datenexport -->
<div id="userpart" data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="usertxt">Benutzer</span></h3>
<div id="userlist" data-role="collapsible" data-theme="c" data-content-theme="c">
</div> <!-- userlist -->
</div> <!-- Benutzer -->
<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint" id="configpart">
<h3><span id="configtxt">Konfiguration</span></h3>
<form action="#" method="get">
<div data-role="fieldcontain">
<label for="usstval">MwSt/Tax/IVA:</label>
<input type="text" value="" data-mini="true" placeholder="19,0" id="usstval" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="togotaxval">MwSt/Tax/IVA (ToGo):</label>
<input type="text" value="" data-mini="true" placeholder="7,0" id="togotaxval" data-theme="c" class="genConfigEl"/>
</div>
<div id=taxusage></div>
<div data-role="fieldcontain">
<label for="stornocode">Stornocode:</label>
<input type="password" value="" data-mini="true" id="stornocode" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="cancelunpaidcode">Stornocode unbez. Bestellungen:</label>
<input type="password" value="" data-mini="true" id="cancelunpaidcode" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="printpass">Printcode:</label>
<input type="password" value="" data-mini="true" id="printpass" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="remoteaccesscode">Fernzugriffscode:</label>
<input type="password" value="" data-mini="true" id="remoteaccesscode" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="companyinfo">Betriebsinfo:</label>
<textarea cols="40" rows="8" name="companyinfo" id="companyinfo" class="genConfigEl"></textarea>
</div>
<div data-role="fieldcontain">
<label for="reservationnote">Reservierungstemplate Email:</label>
<textarea cols="40" rows="8" name="reservationnote" id="reservationnote" class="genConfigEl"></textarea>
</div>
<div data-role="fieldcontain">
<label for="serverUrl">Webserver:</label>
<textarea cols="40" rows="1" name="serverUrl" id="serverUrl" class="genConfigEl">localhost</textarea>
</div>
<div data-role="fieldcontain">
<label for="webimpressum">Webimpressum:</label>
<textarea cols="40" rows="1" name="webimpressum" id="webimpressum" class="genConfigEl"></textarea>
</div>
<div data-role="fieldcontain">
<label for="email"><span id="fromemailtxt">Sender-Email:</span></label>
<input type="text" value="" data-mini="true" placeholder="gastwirt@anbieter.de" id="email" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="emailbadrating"><span id="emailbadratingtxt">Sender-Email:</span></label>
<input type="text" value="" data-mini="true" placeholder="gastwirt@anbieter.de" id="emailbadrating" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="emailratingcontact"><span id="emailratingcontacttxt">Sender-Email:</span></label>
<input type="text" value="" data-mini="true" placeholder="gastwirt@anbieter.de" id="emailratingcontact" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="receiveremail"><span id="toemailtxt">Standard Emailempfänger:</span></label>
<input type="text" value="" data-mini="true" placeholder="gastwirt@anbieter.de" id="receiveremail" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="smtphost"><span id="smtphosttxt">SMTP Host:</span></label>
<input type="text" value="" data-mini="true" placeholder="beispiel.email.provider.de" id="smtphost" data-theme="c" class="genConfigEl"/>
</div>
<div id="partOfSmtpauth"></div>
<div data-role="fieldcontain">
<label for="smtpuser"><span id="smtpusertxt">SMTP Benutzer:</span></label>
<input type="text" value="" data-mini="true" placeholder="Benutzer" id="smtpuser" data-theme="c" class="genConfigEl"/>
</div>
<div data-role="fieldcontain">
<label for="smtppass"><span id="smtppasstxt">SMTP Passwort:</span></label>
<input type="password" value="" data-mini="true" placeholder="password" id="smtppass" data-theme="c" class="genConfigEl"/>
</div>
<div id="partOfSmtpsecure"></div>
<div data-role="fieldcontain">
<label for="smtpport"><span id="smtpporttxt">SMTP Port:</span></label>
<input type="text" value="" data-mini="true" placeholder="587" id="smtpport" data-theme="c" class="genConfigEl"/>
</div>
<div id="partOfPayPrintType"></div>
<div id="partOfBillLanguage"></div>
<div id="partOfReceiptFontSize"></div>
<div id="partOfPaymentConfig"></div>
<div id="partOfWorkflowConfig"></div>
2020-11-19 22:48:24 +01:00
<div id="partOfBigFontWorkReceipt"></div>
2020-11-19 22:52:25 +01:00
<div id="partOfProminentSearch"></div>
2020-11-19 22:53:50 +01:00
<div id="partOfGroupWorkItems"></div>
2020-11-19 22:47:44 +01:00
<button type="submit" data-theme="f" data-icon="check" id="changeConfig">Ändern</button>
</form><!-- Konfiguration -->
<img id="logoimgpart" height="70px" src=php/contenthandler.php?module=printqueue&command=getLogoAsPng />
<form id="logoform" enctype="multipart/form-data" action="php/contenthandler.php?module=admin&command=readlogo" method="POST" data-ajax="false">
<input type="hidden" name="MAX_FILE_SIZE" value="16777210" />
<span id=upllogotxt>Logo-Datei hochladen:</span>
<input name="logofile" id="logofile" type="file" />
<div id=logoinfoafterclick></div>
<input type="submit" data-theme="f" value="Laden" id="logobtntxt" formaction="php/contenthandler.php?module=admin&command=readlogo"/>
</form>
<form>
<a href="#" data-theme="d" data-role="button" data-icon="delete" data-ajax="false" id="dellogobtn">Kein Logo</a>
</form>
</div> <!-- Konfiguration -->
<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint" id="printerqueue">
<h3><span id="printjobsheader">Druckerwarteschlangen</span></h3>
<p><div id=printjobsarea>Daten</div></p>
<div><button type="submit" data-theme="f" data-icon="check" id="updateprintqueue">Refresh</button></div>
</div> <!-- Druckerwarteschlangen -->
<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="c" class="noprint" id="dbactionui">
<h3><span id="dbtxt">Datenbank</span></h3>
<div data-role="collapsible" data-collapsed="true" data-theme="f" data-content-theme="c" class="noprint" id="dbactionspeisenconfig">
<p><h3><span id="speisekarte">Speisekarte</span></h3></p>
<div class="ui-grid-a" class="noprint">
<div class="ui-block-a"><button data-theme="e" data-icon="plus" id="readsamplemenu"><span id=samplemenutxt>Beispielkarte</span></button></div>
<div class="ui-block-b grid_right"><button type="submit" data-theme="f" class="applySpeisekarte" data-icon="check" id="readspeisekarte">Anwenden</button></div>
</div><!-- /grid-a -->
<textarea cols="40" rows="8" name="speiseninfo" id="speiseninfo" data-theme="a" style='font-family:"monospace"'></textarea>
</div> <!-- Speisekarte -->
<p>
<div data-role="collapsible" data-collapsed="true" data-theme="f" data-content-theme="c" class="noprint">
<p><h3><span id="taxestxt">Umsatzsteuer-Zuw.</span></h3></p>
<p id="taxesassdescr"></p>
<p id="taxesassdescr2"></p>
<p>
<table>
<tr><td><span id=taxesfoodtxt></span> (%): <td><input type="text" id="taxesassfood" size="3" data-theme="a" placeholder="10" /></tr>
<tr><td><span id=taxesdrinkstxt></span> (%): <td><input type="text" id="taxesassdrinks" size="3" data-theme="a" placeholder="20" /></tr>
<tr><td colspan=2><button type="submit" data-theme="e" id="taxass_apply"><span id=taxapplytxt>Anwenden</span></button></tr>
</table>
</p>
</div>
</p>
<div data-role="collapsible" data-collapsed="true" data-theme="f" data-content-theme="c" class="noprint" id="dbactionroomconfig">
<p><h3><span id="roomplantxt">Raumplan</span></h3></p>
<form>
<div>
<table>
<tr>
<td><b><span id="numberofrooms">Anzahl Räume:</span></b>
<td><input type="text" id="maxrooms_val" size="3" placeholder="20" data-theme="a">
</tr><tr>
<td><b><span id="maxnumberoftables">Max. Anzahl Tische pro Raum: </span></b>
<td><input type="text" id="maxtables_val" size="3" placeholder="10" data-theme="a">
</tr><tr><td colspan=2><button type="submit" data-theme="f" id="changeroomsize"><span id="changeroomsizetxt">Raumgröße ändern</span></button>
</tr>
</table>
</div>
<div id=roomfield>
</div>
<div>
<table>
<tr>
<td><button type="submit" data-theme="d" id="cancel_roomchange" data-icon="back">Abbrechen</button>
<td><button type="submit" data-theme="e" id="roomfield_prefill">Nummerierung</button>
<td><button type="submit" data-theme="f" id="roomfield_apply">Anwenden</button>
</tr>
</table>
</div>
</form>
<div id="tablemap" class="tmcontainer noprint" style="background-color:white;border-radius: 25px;border: 2px solid #8AC007;padding: 20px;width:95%; ">
<div id="tablemaps">Inhalt</div>
<hr>
<div id=tablenav></div>
<form id="tablemapimgform" enctype="multipart/form-data" method="POST" data-ajax="false">
<input name="tmimgfile" id="tmimgfile" type="file" />
<div class="ui-grid-a" class="noprint">
<div class="ui-block-a"><button type="submit" data-theme="f" id="tmimgbtn"><span id=tmimgbtntxt>Laden</span></button></div>
<div class="ui-block-b grid_right"><button type="submit" data-theme="d" id="tmimgdelbtn"><span id=tmimgdelbtntxt>Löschen</span></button></div>
</div><!-- /grid-a -->
</form>
<p id=tmhint></p>
<p>
<img id="mapimgpart" style="width:100%;" src=img/empty-room.png />
</p>
</div>
</div>
</p>
<p>
<div data-role="collapsible" data-collapsed="true" data-theme="f" data-content-theme="c" class="noprint" id="dbactionbakrest">
<p><h3><span id="bakrestxt">Sicherung und Import</span></h3></p>
<span id='bakresinfotxt'>Die Datensicherung und -wiederherstellung erfordert...</span>
<div id=backuparea>
<form action='dummy'>
<button type="submit" data-theme="f" id="backup_btn"><span id="backupbtntxt">Sicherung</span></button>
</form>
</div>
<span id='bakresinfotxtall'>Die Datensicherung und -wiederherstellung erfordert...</span>
<div id=backuparea>
<form action='dummy'>
<button type="submit" data-theme="f" id="backup_btnall"><span id="backupbtntxtall">Sicherung</span></button>
</form>
</div>
<div id=restorearea>
<form id="restoreform" enctype="multipart/form-data" action="php/contenthandler.php?module=admin&command=restore" method="POST" data-ajax="false">
<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />
<span id=uplfiletxt>Diese Datei hochladen:</span>
<input name="userfile" id="userfile" type="file" />
<div id=restinfoafterclick></div>
<input type="submit" data-theme="d" value="Importieren" id="restorebtntxt" formaction="php/contenthandler.php?module=admin&command=restore"/>
</form>
</div>
</div>
</p>
<p>
<form action="dummy" method="GET">
<button type="submit" data-theme="d" id="shutdown_btn"><span id="shutdownbtntxt">Shutdown</span></button>
</form>
<div id="shutdownhinttxt"></div>
</p>
</div> <!-- collapsible Datenbank -->
<div id="tableforprint" class="printpart">Wenn dieser Text dargestellt wird, liegt ein Fehler vor!</div>
<a class="noprint" href="OrderSprinterPrintserver.exe" data-role="button" data-icon="arrow-d" data-ajax="false">Download Printserver</a>
<div data-role="footer" data-theme="b" id="thefooterr" class="noprint">
<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>
<div data-role="popup" id="nochangeddata" name="nochangeddata" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="header" class="ui-corner-top">
<h1>Keine Datenänderung</h1>
</div>
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right"></a>
<div data-role="content" class="ui-corner-bottom ui-content">
<p>Es wurden keine Daten geändert.</p>
</div>
</div> <!-- popup for reading sample queue data -->
</div>
<!-- Dialog page -->
<div data-role="dialog" id="sure" data-title="Aktion">
<div data-role="content">
<h3 class="sure-1">?</h3>
<p class="sure-2">?</p>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back">Ja</a>
<a href="#" data-role="button" data-theme="c" data-rel="back">Nein</a>
</div>
</div>
</body>
</html>