From ade1f451ee04e036afc8d0f942bceba83241c434 Mon Sep 17 00:00:00 2001 From: Kilian Saffran Date: Tue, 12 Mar 2019 08:08:41 +0100 Subject: [PATCH] accounting corrections --- app_v3/chrome/content/js/init.js | 22 +++------- .../modules/accounting/accounting.html | 13 +++++- .../modules/accounting/accountingchild.html | 11 ++++- .../accounting/accountingopeninvoice.html | 23 +++++----- .../modules/accounting/js/accounting.js | 42 +++++++++---------- .../modules/accounting/js/accountingchild.js | 24 ----------- .../accounting/js/accountingopeninvoice.js | 24 +---------- install/create_setup_windows.pl | 6 +-- 8 files changed, 65 insertions(+), 100 deletions(-) diff --git a/app_v3/chrome/content/js/init.js b/app_v3/chrome/content/js/init.js index 4905411..b794ccc 100644 --- a/app_v3/chrome/content/js/init.js +++ b/app_v3/chrome/content/js/init.js @@ -5,29 +5,17 @@ var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime); xulRuntime.invalidateCachesOnRestart(); var todaydate = new Date(); -//var lic = apppref.getpreference("support.license"); -//var expiration = apppref.getpreference("support.expiration"); + var today = new Date(); -// var licmatch = /(\w{4,})\-(\w{4,})\-(\w{4,})\-(\w{4,})\-(\w{4,})/; -// var test = today.toLocaleFormat("%Y-%m-%d"); -// if ((expiration) && (test > expiration)){ -// //dump("License expired\n"); -// navigation.load_deck(1); -// } else if (!apppref.getpreference("support.database.currentdb.num")) { navigation.load_deck(1); - //dump("No Database configuration\n"); + } -// else if ( !lic || !expiration || !lic.match(licmatch)){ -// //dump("no License Key\n"); -// navigation.load_deck(1); -// } + else { - // if (system.fileexists(system.profilerootdir() + "/checkschema.txt")){ - // appdb.check_schema(); - // } + if (system.fileexists(system.profilerootdir() + "/vpncfg.txt")){ //dump("current loadtimeout:" + loadtimeout + "\n"); if (system.os == "WINNT") { @@ -50,7 +38,7 @@ else { apppref.setpreference("pageconfig.lastpage", nx); } - //license.checklicense(lic,license.setactiveview); + navigation.load_deck(2); } diff --git a/app_v3/chrome/content/modules/accounting/accounting.html b/app_v3/chrome/content/modules/accounting/accounting.html index 8aacdb1..f99c500 100644 --- a/app_v3/chrome/content/modules/accounting/accounting.html +++ b/app_v3/chrome/content/modules/accounting/accounting.html @@ -50,7 +50,18 @@
- + + + + + + + + + + + +
No. ClientNo. Check ServiceEnfantRéférencefacturé €payé €prestation €
diff --git a/app_v3/chrome/content/modules/accounting/accountingchild.html b/app_v3/chrome/content/modules/accounting/accountingchild.html index 989bb4f..31afc11 100644 --- a/app_v3/chrome/content/modules/accounting/accountingchild.html +++ b/app_v3/chrome/content/modules/accounting/accountingchild.html @@ -49,7 +49,16 @@
- + + + + + + + + + +
MoisRéférencefacturé €payé €prestation €
diff --git a/app_v3/chrome/content/modules/accounting/accountingopeninvoice.html b/app_v3/chrome/content/modules/accounting/accountingopeninvoice.html index 2b8876b..06f2684 100644 --- a/app_v3/chrome/content/modules/accounting/accountingopeninvoice.html +++ b/app_v3/chrome/content/modules/accounting/accountingopeninvoice.html @@ -12,27 +12,30 @@ - - - - - +
- + + + + + + + + + + + +
MoisNo. ClientEnfantNo. Check ServiceRéférencefacturé €payé €
diff --git a/app_v3/chrome/content/modules/accounting/js/accounting.js b/app_v3/chrome/content/modules/accounting/js/accounting.js index 7114f27..8ed17da 100644 --- a/app_v3/chrome/content/modules/accounting/js/accounting.js +++ b/app_v3/chrome/content/modules/accounting/js/accounting.js @@ -88,27 +88,27 @@ function load_accounting_table(){ //var hrow = []; //hrow = headerdata; //var tdclass= new Array(); - var tblheader = ''; - //dump("Headerdata:" + JSON.stringify(headerdata) + "\n") - for (var h in headerdata){ - if ((headerdata[h].keyname == 'act') && (headerdata[h].class.indexOf('action1btn') == -1)){ - headerdata[h].class +=" action1btn"; - } - //if ((pconfig.hidden_columns) && (pconfig.hidden_columns.indexOf(headerdata[h].keyname) != -1)) { - // if (headerdata[h].class.indexOf('colhidden') == -1) { - // headerdata[h].class += " colhidden"; - // } - //}else { - headerdata[h].class.replace("colhidden",""); - //} - tblheader += ''+ headerdata[h].title+''; - - } - tblheader += ''; - //tblh0 += ''; - tblacc = null; - //dump("\n\nTBL header: " + tblheader + "\n\n\n"); - $("#tbl_accounting > thead").append(tblheader); + // var tblheader = ''; + // //dump("Headerdata:" + JSON.stringify(headerdata) + "\n") + // for (var h in headerdata){ + // if ((headerdata[h].keyname == 'act') && (headerdata[h].class.indexOf('action1btn') == -1)){ + // headerdata[h].class +=" action1btn"; + // } + // //if ((pconfig.hidden_columns) && (pconfig.hidden_columns.indexOf(headerdata[h].keyname) != -1)) { + // // if (headerdata[h].class.indexOf('colhidden') == -1) { + // // headerdata[h].class += " colhidden"; + // // } + // //}else { + // headerdata[h].class.replace("colhidden",""); + // //} + // tblheader += ''+ headerdata[h].title+''; + + // } + // tblheader += ''; + // //tblh0 += ''; + // tblacc = null; + //jsdump("\n\nTBL header: " + tblheader + "\n\n\n"); + // $("#tbl_accounting > thead").append(tblheader); //$("#tbl_accounting").append(""); diff --git a/app_v3/chrome/content/modules/accounting/js/accountingchild.js b/app_v3/chrome/content/modules/accounting/js/accountingchild.js index d641851..a1604c8 100644 --- a/app_v3/chrome/content/modules/accounting/js/accountingchild.js +++ b/app_v3/chrome/content/modules/accounting/js/accountingchild.js @@ -64,35 +64,11 @@ function load_accounting_table(){ " '' || " + " CASE WHEN acc.invoicefile IS NOT NULL and acc.invoicefile != '' THEN '' else '' end || '' AS act " + " from accounting acc where childuuid='"+ pconfig.accchild+"' and strftime('%Y',acc.invoicedate) = '" + pconfig.accyear +"' order by invoicedate;"; - - //jsdump("accsql"); - //jsdump("--ACCSQL:\n" + accsql); - var accdata = appdb.dbquery(accsql); - var headerdata = getlabels("calmonth,reference,invoiced,payement,benefitamount,act"); - - - $("#tbl_accounting > tbody").html(""); - - var tblheader = ''; - - for (var h in headerdata){ - if ((headerdata[h].keyname == 'act') && (headerdata[h].class.indexOf('action1btn') == -1)){ - headerdata[h].class +=" action1btn"; - } - headerdata[h].class.replace("colhidden",""); - tblheader += ''+ headerdata[h].title+''; - - } - tblheader += ''; - - - $("#tbl_accounting > thead").append(tblheader); - var curchld = ""; for (var i in accdata.sqldata){ diff --git a/app_v3/chrome/content/modules/accounting/js/accountingopeninvoice.js b/app_v3/chrome/content/modules/accounting/js/accountingopeninvoice.js index f476348..a502000 100644 --- a/app_v3/chrome/content/modules/accounting/js/accountingopeninvoice.js +++ b/app_v3/chrome/content/modules/accounting/js/accountingopeninvoice.js @@ -42,31 +42,11 @@ function load_accounting_table(){ var accdata = appdb.dbquery(accsql); - var headerdata = getlabels("calmonth,clientnumber,childname,checkservicenumber,reference,invoiced,payement,act"); $("#tbl_accounting > tbody").html(""); - var hrow = headerdata; - var tdclass= new Array(); - var tblheader = ''; - - for (var h=0;h'+ headerdata[h].title+''; - - } - tblheader += ''; - $("#tbl_accounting > thead").append(tblheader); - // $("#tbl_accounting").append("" + tblheader + ""); - // $("#tbl_accounting").append(""); - var curchld = ""; for (var i in accdata.sqldata){ var row = accdata.sqldata[i]; @@ -96,9 +76,7 @@ function dlg_accounting(myuuid){ var acc1sql = "SELECT acc.uuid as uuid,acc.accmonth,ch.prename || ' ' || ch.surname as childname,acc.childuuid,case when acc.invoicedate is not null then strftime('%d.%m.%Y',acc.invoicedate) else null end as invoicedate, case when acc.payeddate is not null then strftime('%d.%m.%Y',acc.payeddate) else null end as payeddate, acc.payedamount,acc.benefitamount, acc.invoiceamount, acc.reference, case when acc.reminderdate1 is not null then strftime('%d.%m.%Y',acc.reminderdate1) else null end as reminderdate1, case when acc.reminderdate2 is not null then strftime('%d.%m.%Y',acc.reminderdate2) else null end as reminderdate2, case when acc.reminderdate3 is not null then strftime('%d.%m.%Y',acc.reminderdate3) else null end as reminderdate3,case when acc.invoicefile is not null and acc.invoicefile != '' then '"+ importpath.path + system.sep() +"' || acc.invoicefile else null end as invoicefile,'upd' as action FROM accounting acc join childs ch on (acc.childuuid=ch.uuid) where acc.uuid='"+myuuid+"';"; - - //jsdump("acc1sql"); - //jsdump(acc1sql); + var acc1data = appdb.dbquery(acc1sql); if (!acc1data.sqldata) { diff --git a/install/create_setup_windows.pl b/install/create_setup_windows.pl index e57497b..44e3000 100644 --- a/install/create_setup_windows.pl +++ b/install/create_setup_windows.pl @@ -165,7 +165,7 @@ for my $vv (@x){ } make_path("$releasepath\\dist\\Tools"); chdir("$releasepath\\tag\\Tools"); - system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\ovpn.exe" ovpn.pl'); + system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\ovpn.exe" --tempcache "ovpn" ovpn.pl'); #if (($setup eq "director")){ copy("$reppath\\Tools\\pdftotext.exe","$releasepath\\dist\\Tools\\pdftotext.exe"); @@ -176,8 +176,8 @@ for my $vv (@x){ # unlink("$releasepath\\tag\\app_v3\\Tools\\vpncfg.txt"); #compile executeables chdir("$releasepath\\tag\\Tools"); - system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\creorgadb.exe" creorgadb.pl'); - system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\pdfextract.exe" --module="XML::Simple" --compress 6 pdfextract.pl'); + system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\creorgadb.exe" --tempcache "creorgadb" creorgadb.pl'); + system('"C:\\Strawberry\\perl\\site\\bin\\pp" -o "'.$releasepath.'\\dist\\Tools\\pdfextract.exe" --tempcache "pdfextract" --module="XML::Simple" --compress 6 pdfextract.pl'); #} -- 2.39.5