From: Kilian Saffran Date: Sun, 24 Mar 2019 17:37:46 +0000 (+0100) Subject: account set X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=e400faa38b6b45abf05d967917cf001b177db6ed;p=cashbox.git account set --- diff --git a/db/cashbox.sqlite.schema.sql b/db/cashbox.sqlite.schema.sql index 09fcdf6..14c9d30 100644 Binary files a/db/cashbox.sqlite.schema.sql and b/db/cashbox.sqlite.schema.sql differ diff --git a/index.html b/index.html index 189d072..fc37cdc 100644 --- a/index.html +++ b/index.html @@ -23,8 +23,8 @@ Kasse Übersicht Produkte - Kunden - Tische + Konten + Geräte Transaktionen Verkäufe diff --git a/modules/tables/index.html b/modules/accounts/form_account.html similarity index 51% rename from modules/tables/index.html rename to modules/accounts/form_account.html index 34f2f6f..ba35738 100644 --- a/modules/tables/index.html +++ b/modules/accounts/form_account.html @@ -8,34 +8,38 @@ -Rechnungen +Konto
- - - - - - - - - - - -
NameSitzplätzeStandortStatusFreie PlätzeBetrag
+ +
+ +
+
+ + +
+
+
+
+ + +
+
+
@@ -44,7 +48,7 @@ - + \ No newline at end of file diff --git a/modules/accounts/form_account.js b/modules/accounts/form_account.js new file mode 100644 index 0000000..16a8163 --- /dev/null +++ b/modules/accounts/form_account.js @@ -0,0 +1,15 @@ +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 diff --git a/modules/clients/index.html b/modules/accounts/index.html similarity index 85% rename from modules/clients/index.html rename to modules/accounts/index.html index 8ec6aab..44cd7c1 100644 --- a/modules/clients/index.html +++ b/modules/accounts/index.html @@ -23,15 +23,13 @@
- +
- - - - - + + +
NameAddresseTelE-MailStatusOffener BetragTypInfo
diff --git a/modules/clients/index.js b/modules/accounts/index.js similarity index 60% rename from modules/clients/index.js rename to modules/accounts/index.js index 488cc5b..91d8ade 100644 --- a/modules/clients/index.js +++ b/modules/accounts/index.js @@ -2,29 +2,25 @@ var winh = Math.max(document.documentElement.clientHeight, window.innerHeight || 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 = ''+ '' + + ''+ data.sqldata[i].name +'' + + ''+ data.sqldata[i].type +'' + ''+ data.sqldata[i].prename + ' ' + data.sqldata[i].surname + '' + ''+ data.sqldata[i].address + '
' + data.sqldata[i].zip + ' ' + data.sqldata[i].city + '
' + data.sqldata[i].country +'' + - '' + data.sqldata[i].phone+ '' + - '' + data.sqldata[i].email+ '' + - '' + '' + - '' + '' + + '' + data.sqldata[i].phone+ '
' + data.sqldata[i].email+ '' + ''; - $("#tbl_clients").append(row); + $("#tbl_accounts").append(row); } - $('#tbl_clients').bootstrapTable({ + $('#tbl_accounts').bootstrapTable({ pagination: false, search: false, height: tblh, @@ -36,25 +32,25 @@ function loadtable(){ -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; } @@ -63,7 +59,7 @@ function getTableSelectionID(){ } function getTableSelectionIDs(){ - var sel = $('#tbl_clients').bootstrapTable('getSelections'); + var sel = $('#tbl_accounts').bootstrapTable('getSelections'); var ids = []; if (sel){ for (var s in sel){ diff --git a/modules/accounts/lib/accounts.js b/modules/accounts/lib/accounts.js new file mode 100644 index 0000000..beab1ab --- /dev/null +++ b/modules/accounts/lib/accounts.js @@ -0,0 +1,14 @@ +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 diff --git a/modules/tables/index.js b/modules/tables/index.js deleted file mode 100644 index 94ca376..0000000 --- a/modules/tables/index.js +++ /dev/null @@ -1,77 +0,0 @@ -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 = ''+ - '' + - '' + data.sqldata[i].name+ '' + - '' + data.sqldata[i].seats+ '' + - '' + data.sqldata[i].location+ '' + - '' + 'unbekannt' +'' + - '' + 0+ '' + - '' + 0.00+ ' €' + - - ''; - $("#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