accounting corrections 3.29.1
authorKilian Saffran <ksaffran@dks.lu>
Tue, 12 Mar 2019 07:08:41 +0000 (08:08 +0100)
committerKilian Saffran <ksaffran@dks.lu>
Tue, 12 Mar 2019 07:08:41 +0000 (08:08 +0100)
app_v3/chrome/content/js/init.js
app_v3/chrome/content/modules/accounting/accounting.html
app_v3/chrome/content/modules/accounting/accountingchild.html
app_v3/chrome/content/modules/accounting/accountingopeninvoice.html
app_v3/chrome/content/modules/accounting/js/accounting.js
app_v3/chrome/content/modules/accounting/js/accountingchild.js
app_v3/chrome/content/modules/accounting/js/accountingopeninvoice.js
install/create_setup_windows.pl

index 4905411..b794ccc 100644 (file)
@@ -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);
   }
 
index 8aacdb1..f99c500 100644 (file)
     </div>
     <div>
       <table class="table table-bordered table-hover table-striped" data-style="width: 100%;" id="tbl_accounting" style="margin-top: -40px;">
-        <thead></thead>
+        <thead>
+          <tr>
+            <th data-sortable="true">No. Client</th>
+            <th data-sortable="true">No. Check Service</th>
+            <th data-sortable="true">Enfant</th>
+            <th data-sortable="true">Référence</th>
+            <th class="alignright" data-sortable="true">facturé €</th>
+            <th class="alignright" data-sortable="true">payé €</th>
+            <th class="alignright" data-sortable="true">prestation €</th>
+            <th class="noprint action1btn"></th>
+          </tr>
+          </thead>
         <tbody></tbody>
         <tfoot></tfoot>
       </table>
index 989bb4f..31afc11 100644 (file)
    </div>
    <div>
     <table class="table table-bordered table-hover table-striped" data-style="width: 100%;" id="tbl_accounting" style="margin-top: -40px;">
-      <thead></thead>
+      <thead>
+        <tr>
+          <th data-sortable="true">Mois</th>
+          <th data-sortable="true">Référence</th>
+          <th class="alignright"  data-sortable="true">facturé €</th>
+          <th class="alignright"  data-sortable="true">payé €</th>
+          <th class="alignright"  data-sortable="true">prestation €</th>
+          <th class="noprint"  data-sortable="true"></th>
+        </tr>
+      </thead>
       <tbody></tbody>
       <tfoot></tfoot>
     </table>
index 2b8876b..06f2684 100644 (file)
   <meta http-equiv="expires" content="Tue, 01 Jan 1970 1:00:00 GMT" />
   <meta http-equiv="pragma" content="no-cache" />
   <link href="../../web/css/bootstrap.min.css" rel="stylesheet" type="text/css">
-  <!--<link href="../../web/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">-->
-  <!-- <link href="../../web/css/datatables.min.css" rel="stylesheet" type="text/css"> -->
-  <!-- <link href="../../web/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css"> -->
   <link href="../../web/vendor/bootstrap-table/bootstrap-table.css" rel="stylesheet" type="text/css">
   <link href="../../web/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
-  <!-- <link href="../../web/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css"> -->
   <link href="../../web/css/bootstrap-multiselect.css" rel="stylesheet" type="text/css">
   <link href="../../web/css/glyphicons.css" rel="stylesheet" type="text/css">
   <link href="../../web/css/creorga.css" rel="stylesheet" type="text/css">
-  <!-- <style type="text/css">
-    .dataTables_filter {
-      margin-top: 15px;
-    }
-  </style> -->
+
 </head>
 
 <body>
    <div class="container-fluid"  style="padding-top: 5px;">
     <div>
       <table class="table table-bordered table-hover table-striped" data-style="width: 100%;" id="tbl_accounting">
-        <thead></thead>
+        <thead>
+          <tr>
+            <th data-sortable="true">Mois</th>
+            <th data-sortable="true">No. Client</th>
+            <th data-sortable="true">Enfant</th>
+            <th data-sortable="true">No. Check Service</th>
+            <th data-sortable="true">Référence</th>
+            <th class="alignright"  data-sortable="true">facturé €</th>
+            <th class="alignright"  data-sortable="true">payé €</th>
+            <th class="noprint"></th>
+          </tr>
+        </thead>
         <tbody></tbody>
         <tfoot></tfoot>
       </table>
index 7114f27..8ed17da 100644 (file)
@@ -88,27 +88,27 @@ function load_accounting_table(){
   //var hrow = [];
   //hrow = headerdata;
   //var tdclass= new Array();
-  var tblheader = '<tr>';
-  //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 += '<th class="' + headerdata[h].class +'" data-sortable="true">'+ headerdata[h].title+'</th>';
-
-  }
-  tblheader += '</tr>';
-  //tblh0 += '</tr>';
-  tblacc = null;
-  //dump("\n\nTBL header: " + tblheader + "\n\n\n");
-  $("#tbl_accounting > thead").append(tblheader);
+  // var tblheader = '<tr>';
+  // //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 += '<th class="' + headerdata[h].class +'" data-sortable="true">'+ headerdata[h].title+'</th>';
+
+  // }
+  // tblheader += '</tr>';
+  // //tblh0 += '</tr>';
+  // tblacc = null;
+  //jsdump("\n\nTBL header: " + tblheader + "\n\n\n");
+  // $("#tbl_accounting > thead").append(tblheader);
   
 
   //$("#tbl_accounting").append("<tbody>");
index d641851..a1604c8 100644 (file)
@@ -64,35 +64,11 @@ function load_accounting_table(){
    " '<button type=\"button\" class=\"btn btn-primary\" onclick=\"dlg_accounting(''' || acc.uuid || ''');\" title=\"editer\"><span class=\"glyphicon glyphicon-pencil\"></span></button>' || " +
    " CASE WHEN acc.invoicefile IS NOT NULL and acc.invoicefile != '' THEN '<button type=\"button\" class=\"btn btn-primary\" onclick=\"openfile(''' || acc.invoicefile || ''');\"  title=\"editer\"><span class=\"glyphicon glyphicon-open\"></span></button>' else '' end || '<button type=\"button\" class=\"btn btn-danger\" onclick=\" confirm_delete_accounting(''' || acc.uuid || ''');\" title=\"supprimer\"><span class=\"glyphicon glyphicon-remove\"></span></button>' 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 = '<tr>';
-
-  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 += '<th class="' + headerdata[h].class +'"  data-sortable="true">'+ headerdata[h].title+'</th>';
-
-  }
-  tblheader += '</tr>';
-
-  
-  $("#tbl_accounting > thead").append(tblheader);
   var curchld = "";
 
   for (var i in accdata.sqldata){
index f476348..a502000 100644 (file)
@@ -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 = '<tr>';
-
-  for (var h=0;h<hrow.length;h++){
-    if (hrow[h] == 'act') {
-      headerdata[h].class =headerdata[h].class + " action1btn";
-    }
-
-    tdclass.push(headerdata[h].class);
-
-    tblheader += '<th class="' + headerdata[h].class +'"  data-sortable="true">'+ headerdata[h].title+'</th>';
-
-  }
-  tblheader += '</tr>';
   
-  $("#tbl_accounting > thead").append(tblheader);
-  // $("#tbl_accounting").append("<tfoot>" + tblheader + "</tfoot>");
-  // $("#tbl_accounting").append("<tbody>");
   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) {
index e57497b..44e3000 100644 (file)
@@ -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');
   
 #}