noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 199/218: Merge with dev7109


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 199/218: Merge with dev7109
Date: Thu, 12 Sep 2019 15:59:09 -0400 (EDT)

sparkyx pushed a commit to branch entreprise
in repository noalyss.

commit 6d51017528de2e59ab75155eabb666c7e7a57f41
Merge: 1370259 3b22021
Author: Dany De Bontridder <address@hidden>
Date:   Mon Jul 29 11:53:39 2019 +0200

    Merge with dev7109

 html/ajax_misc.php                                 |   4 --
 html/do.php                                        |  11 ++-
 html/fid_card.php                                  |  19 ++---
 html/image/fontello/fontello.eot                   | Bin 24888 -> 32768 bytes
 html/image/fontello/fontello.svg                   |  52 +++++++++++++-
 html/image/fontello/fontello.ttf                   | Bin 24720 -> 32600 bytes
 html/image/fontello/fontello.woff                  | Bin 15328 -> 20020 bytes
 html/image/fontello/fontello.woff2                 | Bin 12980 -> 16944 bytes
 html/index.php                                     |   2 +-
 html/js/anc_script.js                              |  12 ++--
 html/js/infobulle.js                               |   2 +-
 html/js/scripts.js                                 |  30 +++++++-
 html/js/smoke.js                                   |   2 +-
 html/style-classic7.css                            |   2 +-
 include/cfgfiche.inc.php                           |   3 +-
 include/class/acc_plan_mtable.class.php            |   4 +-
 include/class/document_export.class.php            |   9 +--
 include/class/fiche.class.php                      |  55 +++++++++-----
 include/config.inc.example                         |   6 +-
 include/fiche.inc.php                              |  57 ++++++++-------
 include/lib/ac_common.php                          |  22 ++++++
 include/lib/config_file.php                        |   5 +-
 include/lib/html_input.class.php                   |   2 +-
 include/lib/icard.class.php                        |   8 ++-
 include/lib/icon_action.class.php                  |  43 ++++++++++-
 include/lib/itva_popup.class.php                   |   2 +-
 include/lib/message_javascript.php                 |   2 +
 include/lib/pdf.class.php                          |  24 +++++++
 include/lib/select_box.class.php                   |   2 +-
 include/lib/sendmail.class.php                     |   2 +-
 include/sql/mod1/data.sql                          |   4 +-
 include/template/param_jrn.php                     |   7 ++
 include/template/result_cat_card_summary.php       |   9 +--
 scenario/icon_actionTest.php                       |  79 +++++++++++++++++++++
 scenario/select-box-test.php                       |  14 ++--
 sql/upgrade.sql                                    |   1 +
 unit-test/include/class/acc_account.classTest.php  |   3 +-
 .../include/class/acc_account_ledgerTest.class.php |   3 +-
 unit-test/include/class/acc_balanceTest.class.php  |   3 +-
 unit-test/include/class/acc_bilanTest.class.php    |  12 +++-
 unit-test/include/class/acc_computeTest.class.php  |   3 +-
 unit-test/include/class/acc_ledgerTest.class.php   |   3 +-
 .../include/class/acc_ledger_finTest.class.php     |   3 +-
 .../class/acc_ledger_purchaseTest.class.php        |   3 +-
 .../include/class/acc_ledger_soldTest.class.php    |   3 +-
 .../include/class/acc_operationTest.class.php      |   3 +-
 .../include/class/acc_parm_codeTest.class.php      |   3 +-
 .../include/class/anc_grandlivreTest.class.php     |   3 +-
 unit-test/include/class/anc_keyTest.class.php      |   3 +-
 unit-test/include/class/anc_key_sqlTest.class.php  |   3 +-
 .../include/class/anc_operationTest.class.php      |   3 +-
 unit-test/include/class/dossierTest.class.php      |   5 +-
 unit-test/include/class/ficheTest.class.php        |   3 +-
 unit-test/include/class/userTest.class.php         |   5 +-
 54 files changed, 443 insertions(+), 120 deletions(-)

diff --cc html/ajax_misc.php
index d0d3b20,39371f2..493e92d
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@@ -245,12 -245,8 +245,8 @@@ $path = array
      'update_comment_followUp'=>'ajax_follow_up',
      // TVA param
      "tva_parameter"=>"ajax_tva_parameter",
 -    // Display all cards using an accounting
 -    "display_all_card"=>"ajax_display_all_card"
 +    // Currency  , delete a rate
 +    "CurrencyRateDelete"=>"ajax_currency",
-     // Display all cards using an accounting
-     "display_all_card"=>"ajax_display_all_card",
-     // Currency , add / remove / update currency 
-     "CurrencyManage"=>"ajax_currency"
  )    ;
  
  if (array_key_exists($op, $path)) {
diff --cc html/fid_card.php
index 57577bb,c5525df..52fe5f9
--- a/html/fid_card.php
+++ b/html/fid_card.php
@@@ -45,6 -45,8 +45,9 @@@ require_once NOALYSS_INCLUDE.'/class/do
  $http=new HttpInput();
  
  $jrn= $http->request("j","number",-1); 
+ $limit=$http->request("limit","number",12);
+ 
++$jrn= $http->request("j","number",-1); 
  $filter_card="";
  $cn=Dossier::connect();
  $d=$http->request('e');
@@@ -130,6 -129,6 +130,7 @@@ $sql_str="select distinct f_i
  
  $fid=$http->request("FID");
  
++
  $sql=$cn->get_array($sql_str              ,array($fid));
  
  if ($sql != false && sizeof($sql) != 0 )
diff --cc html/js/scripts.js
index 6ac7d63,ec64b84..f2161d2
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@@ -3524,16 -3521,25 +3524,40 @@@ function updatePeriode(p_dossier,p_exer
  }
  /**
   * 
+  * @param {string} p_domid DOM id of the span containing the padlock icon
+  * @returns none
+  */
+ function toggle_lock(p_domid)
+ {
+     var padlock=document.getElementById(p_domid);
+     if ( padlock == null) {
+         console.error("domid invalid");
+     }
+     var status = padlock.getAttribute("is_locked");
+     if ( status == 1 ) {
+         padlock.innerHTML="&#xe832;";
+         padlock.setAttribute("is_locked",0);
+     } else if (status == 0) {
+         padlock.innerHTML="&#xe831;";
+         padlock.setAttribute("is_locked",1);
+     } else {
+         throw "toggle_lock failed";
+     }
+         
+     
++}
++/**
++ * 
 + * @returns {undefined}
 + */
 +function show_ledger_fin_currency()
 +{
 +    var ledger=$('p_jrn').value;
 +    var dossier=$('gDossier').value;
 +    // $('ledger_currency').
 +    var a=new Ajax.Updater("ledger_currency",
 +                    "ajax_misc.php",
 +                    { 
 +                        parameters: 
{"op":"currencyCode","gDossier":dossier,"ledger":ledger}
 +                    });
  }
diff --cc include/class/fiche.class.php
index 0bc8e09,e3ad8ef..b4f2d53
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@@ -802,7 -802,8 +803,8 @@@ class Fich
                  {
                      if (strlen(trim($value))==0)
                          $value="pas de nom";
 -                    $account_name=$value;
 +                  $account_name=$value;
+ 
                  }
                  // account
                  if ($id==ATTR_DEF_ACCOUNT)
@@@ -828,18 -826,19 +830,21 @@@
                                      $parent=$acc_account->find_parent();
                                      
$acc_account->set_parameter("pcm_val_parent",$parent);
                                      $acc_account->save();
-                             } else {
-                                 // Check that the accounting can be used 
directly
-                                 if ( 
$acc_account->get_parameter('pcm_direct_use') == 'N') {
+                                 } 
+                                 else
+                                 {
+                                     // Check that the accounting can be used 
directly
                                      
-                                     throw new Exception(_("Utilisation 
directe interdite du poste comptable $v"));
-                                 }
+                                     if 
($acc_account->get_parameter('pcm_direct_use') == 'N') {
+                                         throw new Exception(_("Utilisation 
directe interdite du poste comptable $v"));
+                                     }
 +
 +                            }
 +                            
-                             }
+                                 }
 -                            }
                              else
                              {
+                                                               
                                  $ac_array=explode(",", $value);
                                  if (count($ac_array)<>2)
                                      throw new Exception(_('Désolé, il y a 
trop de virgule dans le poste comptable ').h($value));
@@@ -877,7 -870,8 +882,8 @@@
                                  } else if 
($acc_account2->get_parameter('pcm_direct_use') == 'N') {
                                      throw new Exception(_("Utilisation 
directe interdite du poste comptable $part2"));
                                  }
 -
 +                                $v=$part1.','.$part2;
+ 
                              }
                              $parameter=array($this->id, $v);
                          }
@@@ -999,14 -993,12 +1005,17 @@@
                                  throw new Exception('Désolé, il y a trop de 
virgule dans le poste comptable '.h($v));
                              $part1=$ac_array[0];
                              $part2=$ac_array[1];
 -                            if ( mb_strlen($part1)>40) throw new Exception 
(_("Poste comptable trop long"), 1);
 +                          $part1=$this->cn->get_value('select 
format_account($1)',
 +                                    array($part1));
 +                            $part2=$this->cn->get_value('select 
format_account($1)',
 +                                    array($part2));
 +
 +                          if ( mb_strlen($part1)>40) throw new Exception 
(_("Poste comptable trop long"), 1);
                              if ( mb_strlen($part2)>40) throw new Exception 
(_("Poste comptable trop long"), 1);
+                             
+                             $part1=$this->cn->get_value('select 
format_account($1)',    array($part1));
                              $acc_account1=new Acc_Account($this->cn,$part1);
+                             
                              if ($acc_account1->get_parameter("id")== -1 ) {
                                  
$account_name=$this->strAttribut(ATTR_DEF_NAME);
                                  $acc_account1->set_parameter("pcm_lib", 
$account_name);
@@@ -1050,8 -1046,10 +1063,9 @@@
                                      
$acc_account->set_parameter("pcm_val_parent",$parent);
                                      $acc_account->save();
                                  }
 -                            
 -                            // Check that the accounting can be used directly
 +                           
+                             $acc_account=new Acc_Account($this->cn,$v);
 -                            if ($acc_account->get_parameter('pcm_direct_use') 
== 'N') {
 +                           if ($acc_account->get_parameter('pcm_direct_use') 
== 'N') {
                                  throw new Exception(_("Utilisation directe 
interdite du poste comptable $v"));
                              }
                          }
@@@ -1527,8 -1510,10 +1541,10 @@@
                        $side="&nbsp;".$this->get_amount_side($progress);
                    echo "<TR class=\"highlight\">".
                       "<TD>$old_exercice</TD>".
 -                    td('').
++                   td('').
+                     td('').
                      td('').
-                     "<TD></TD>".td("").td("").td().td().
+                     "<TD></TD>".td().
                      "<TD>Totaux</TD>".
                              td().
                      "<TD style=\"text-align:right\">".nbm($sum_deb)."</TD>".
@@@ -1585,10 -1560,8 +1601,11 @@@
                 td().
                 td().
                 td().
+                td().
          td(_('Totaux')).
 +               td().
 +               td().
 +        "<TD></TD>".
         "<TD  style=\"text-align:right\">".nbm($sum_deb)."</TD>".
         "<TD  style=\"text-align:right\">".nbm($sum_cred)."</TD>".
          "<TD style=\"text-align:right\">".nbm($diff)."</TD>".
diff --cc include/template/param_jrn.php
index 757b994,4e9e505..b3cf6e7
--- a/include/template/param_jrn.php
+++ b/include/template/param_jrn.php
@@@ -1,14 -1,14 +1,21 @@@
  <?php
  //This file is part of NOALYSS and is under GPL 
  //see licence.txt
 -?><TABLE style="width: auto">
 +?><TABLE style="width: auto" class="nowrap">
 +<TR>
 +<TD><?php echo _('Type de journal')?> </TD>
 +<TD>
 +<?php echo $type;?>
 +</TD>
 +</TR>
 +
+     <TR>
+ <TD><?php echo _('Type de journal')?> </TD>
+ <TD>
+ <?php echo $type;?>
+ </TD>
+ </TR>
+ 
  <TR>
  
                <TD><?php echo _('Nom journal')?> </TD>
diff --cc sql/upgrade.sql
index e8af5a3,2abcfb5..d9c22d1
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@@ -1,13 -1,1 +1,14 @@@
 +begin;
+ update attr_def set ad_extra = '[sql] fd_id in (select fd_id from fiche_def 
where frd_id in (4,8,9,14))' where ad_id=25;
 +insert into "parameter" (pr_id ) values ('MY_DEFAULT_ROUND_ERROR_DEB');
 +insert into "parameter" (pr_id ) values ('MY_DEFAULT_ROUND_ERROR_CRED');
 +drop view if exists v_all_card_currency;
 +
 +create or replace view v_all_card_currency as 
 +select sum(oc_amount) as sum_oc_amount,sum(oc_vat_amount) as 
sum_oc_vat_amount,f_id,j_id
 +from 
 +operation_currency
 +join jrnx using (j_id)
 +group by f_id,j_id;
 +
 +commit ;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]