<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('paywindow');">Kasse</a>
<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('overview');">Übersicht</a>
<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('products');">Produkte</a>
- <a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('clients');">Kunden</a>
- <a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('tables');">Tische</a>
+ <a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('accounts');">Konten</a>
+
<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('stations');">Geräte</a>
<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('transactions');">Transaktionen</a>
<a class="list-group-item list-group-item-action bg-light" href="javascript:browserapp.loadmodule('sales');">Verkäufe</a>
<link rel="stylesheet" href="../../node_modules/@fortawesome/fontawesome-free/css/fontawesome.min.css">
<link rel="stylesheet" href="../../css/cashbox.epic.css">
<link rel="stylesheet" href="../../css/app.css">
-<title>Rechnungen</title>
+<title>Konto</title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
- <a class="navbar-brand" href="#">Tische</a>
+ <a class="navbar-brand" href="#">Konto</a>
<div class="ml-auto">
- <div class="btn-group" role="group" aria-label="Basic example">
- <button class="btn btn-primary" onclick="table_new();"><i class="fas fa-plus"></i><br/>New</button>
- <button class="btn btn-primary" onclick="table_edit();"><i class="fas fa-edit"></i><br/>Edit</button>
- <button class="btn btn-primary" onclick="table_delete();"><i class="fas fa-trash"></i><br/>Delete</button>
- <button class="btn btn-primary" onclick="table_clone();"><i class="fas fa-clone"></i><br/>Dupl.</button>
-
- </div>
- </div>
+ <div class="btn-group" role="group" aria-label="Basic example">
+
+ </div>
</nav>
<div class="cotainer-fluid" style="margin-top: 52px;">
- <table id="tbl_tables" class="table table-bordered table-hover table-striped">
- <thead class="thead-dark">
- <th data-checkbox="true"></th>
- <th data-sortable="true">Name</th>
- <th data-sortable="true">Sitzplätze</th>
- <th data-sortable="true">Standort</th>
- <th data-sortable="true">Status</th>
- <th data-sortable="true">Freie Plätze</th>
- <th data-sortable="true" data-align="right" data-width="100">Betrag</th>
- <tfoot></tfoot>
- <tbody></tbody>
- </table>
+ <input type="hidden" value="" id="id" name="id" />
+ <div class="row">
+
+ <div class="col-md-4">
+ <div class="form-group">
+ <label for="name">Name</label>
+ <input type="text" class="form-control" id="name" name="name" />
+ </div>
+ </div>
+ <div class="col-md-2">
+ <div class="form-group">
+ <label for="name">Typ</label>
+ <select class="form-control" id="type" name="type" >
+ <option value="table">Tisch</option>
+ <option value="client">Kunde</option>
+ <option value="seat">Sitzplatz</option>
+ <option value="account">Konto</option>
+ </select>
+ </div>
+ </div>
+ </div>
</div>
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../../node_modules/@fortawesome/fontawesome-free/js/all.min.js"></script>
<script src="../../js/moduleglobal.js"></script>
<script src="../../js/database.js"></script>
-<script src="index.js"></script>
+<script src="account.js"></script>
<script>if (window.module) module = window.module;</script>
</body>
</html>
\ No newline at end of file
--- /dev/null
+var winh = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
+var tblh = winh-54;
+
+function initpage(){
+ if (mpref.cfg.id){
+ getaccountdata(mpref.cfg.id);
+ } else {
+ //load default new invoice data
+ }
+ console.log("invoice ID:",mpref.cfg.id);
+}
+
+function getaccountdata(){
+
+}
\ No newline at end of file
</div>
</nav>
<div class="cotainer-fluid" style="margin-top: 52px;">
- <table id="tbl_clients" class="table table-bordered table-hover table-striped">
+ <table id="tbl_accounts" class="table table-bordered table-hover table-striped">
<thead class="thead-dark">
<th data-checkbox="true"></th>
<th data-sortable="true">Name</th>
- <th data-sortable="true">Addresse</th>
- <th data-sortable="true">Tel</th>
- <th data-sortable="true">E-Mail</th>
- <th data-sortable="true">Status</th>
- <th data-sortable="true">Offener Betrag</th>
+ <th data-sortable="true">Typ</th>
+ <th data-sortable="true">Info</th>
+
<tfoot></tfoot>
<tbody></tbody>
</table>
var tblh = winh-54;
function initpage(){
-
loadtable();
}
-
-
function loadtable(){
- var sql = 'SELECT id, prename,surname, address, zip, city, country, clientnumber, email, phone FROM clients;'
+ var sql = 'SELECT id, name,type,prename,surname, address, zip, city, country, clientnumber, email, phone FROM accounts;'
var data = appdb.dbquery(sql);
// //console.log(data.sqldata);
for (var i in data.sqldata){
var row = '<tr id="' +data.sqldata[i].id + '">'+
'<td></td>' +
+ '<td>'+ data.sqldata[i].name +'</td>' +
+ '<td>'+ data.sqldata[i].type +'</td>' +
'<td>'+ data.sqldata[i].prename + ' ' + data.sqldata[i].surname + '</td>' +
'<td>'+ data.sqldata[i].address + '<br/>' + data.sqldata[i].zip + ' ' + data.sqldata[i].city + '<br/>' + data.sqldata[i].country +'</td>' +
- '<td>' + data.sqldata[i].phone+ '</td>' +
- '<td>' + data.sqldata[i].email+ '</td>' +
- '<td>' + '</td>' +
- '<td>' + '</td>' +
+ '<td>' + data.sqldata[i].phone+ '<br/>' + data.sqldata[i].email+ '</td>' +
'</tr>';
- $("#tbl_clients").append(row);
+ $("#tbl_accounts").append(row);
}
- $('#tbl_clients').bootstrapTable({
+ $('#tbl_accounts').bootstrapTable({
pagination: false,
search: false,
height: tblh,
-function client_edit(){
+function account_edit(){
var cl_id= getTableSelectionID();
if (cl_id){
- parent.browserapp.loadmodulepage('clients','client',{"id":cl_id});
+ parent.browserapp.loadmodulepage('accounts','account',{"id":cl_id});
}
}
-function client_delete(){
+function delete_delete(){
}
-function client_duplicate(){
+function account_duplicate(){
}
function getTableSelectionID(){
- var sel = $('#tbl_clients').bootstrapTable('getSelections');
+ var sel = $('#tbl_accounts').bootstrapTable('getSelections');
var id = null;
if (sel){ id=sel[0]._id; }
}
function getTableSelectionIDs(){
- var sel = $('#tbl_clients').bootstrapTable('getSelections');
+ var sel = $('#tbl_accounts').bootstrapTable('getSelections');
var ids = [];
if (sel){
for (var s in sel){
--- /dev/null
+var account = {
+ new: function(){
+ parent.browserapp.loadmodulepage('accounts','form_account',{"id":""});
+ },
+ edit: function(id){
+ parent.browserapp.loadmodulepage('accounts','form_account',{"id":id});
+ },
+ duplicate: function(id){
+
+ },
+ delete: function(id){
+
+ }
+}
\ No newline at end of file
+++ /dev/null
-var winh = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
-var tblh = winh-54;
-
-function initpage(){
- console.log(appdb.url);
- loadtable();
-}
-
-
-
-function loadtable(){
- var sql = 'SELECT id, name, seats,location FROM tables;';
- var data = appdb.dbquery(sql);
- //console.log(data.sqldata);
- for (var i in data.sqldata){
-
- var row = '<tr id="' +data.sqldata[i].id + '">'+
- '<td></td>' +
- '<td>' + data.sqldata[i].name+ '</td>' +
- '<td>' + data.sqldata[i].seats+ '</td>' +
- '<td>' + data.sqldata[i].location+ '</td>' +
- '<td>' + 'unbekannt' +'</td>' +
- '<td >' + 0+ '</td>' +
- '<td class="'+ acolor +'">' + 0.00+ ' €</td>' +
-
- '</tr>';
- $("#tbl_tables").append(row);
- }
- $('#tbl_tables').bootstrapTable({
- pagination: false,
- search: false,
- height: tblh,
- clickToSelect: true
- });
-
-
-}
-
-
-
-function table_edit(){
- var tbl_id= getTableSelectionID();
- if (tbl_id){
- parent.browserapp.loadmodulepage('tables','table',{"id":tbl_id});
- }
-
-}
-
-function table_delete(){
-
-}
-
-function table_clone(){
-
-}
-
-
-
-function getTableSelectionID(){
- var sel = $('#tbl_tables').bootstrapTable('getSelections');
- var id = null;
-
- if (sel){ id=sel[0]._id; }
- console.log("Selected ID:" + id);
- return id;
-}
-
-function getTableSelectionIDs(){
- var sel = $('#tbl_tables').bootstrapTable('getSelections');
- var ids = [];
- if (sel){
- for (var s in sel){
- ids.push(s._id);
- }
- }
- return ids;
-}
\ No newline at end of file