phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4502 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4502 - phpcompta/trunk/include
Date: Mon, 28 Nov 2011 22:04:19 +0100 (CET)

Author: danydb
Date: 2011-11-28 22:04:18 +0100 (Mon, 28 Nov 2011)
New Revision: 4502

Modified:
   phpcompta/trunk/include/class_acc_ledger_fin.php
   phpcompta/trunk/include/class_print_ledger_simple.php
   phpcompta/trunk/include/compta_fin_saldo.inc.php
Log:
 
Fix small bugs when computing TVA_ND, warning if a fin. ledger misconfigured




Modified: phpcompta/trunk/include/class_acc_ledger_fin.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_fin.php    2011-11-28 19:49:56 UTC 
(rev 4501)
+++ phpcompta/trunk/include/class_acc_ledger_fin.php    2011-11-28 21:04:18 UTC 
(rev 4502)
@@ -265,6 +265,12 @@
         // retrieve bank name, code and account from the jrn_def.jrn_def_bank
 
         $f_bank='<span id="bkname">'.$this->get_bank_name().'</span>';
+               if ( $this->bank_id == "" )
+               {
+                       echo h2("Journal de banque non configuré 
".$this->get_name(),' class="error"');
+                       echo '<span class="error"> vous devez donner à ce 
journal un compte en banque (fiche), modifiez dans CFGLEDGER</span>';
+                       alert ("Journal de banque non configuré 
".$this->get_name());
+               }
 
         $f_legend_detail='Opérations financières';
         //--------------------------------------------------
@@ -973,9 +979,9 @@
      */
     function get_bank_name()
     {
-        $bank_id=$this->db->get_value('select jrn_def_bank from jrn_def where 
jrn_def_id=$1',
+               $this->bank_id=$this->db->get_value('select jrn_def_bank from 
jrn_def where jrn_def_id=$1',
                                       array($this->id));
-        $fBank=new Fiche($this->db,$bank_id);
+        $fBank=new Fiche($this->db,$this->bank_id);
         $e_bank_account=" : ".$fBank->strAttribut(ATTR_DEF_BQ_NO);
         $e_bank_name=" : ".$fBank->strAttribut(ATTR_DEF_NAME);
         $e_bank_qcode=": ".$fBank->strAttribut(ATTR_DEF_QUICKCODE);

Modified: phpcompta/trunk/include/class_print_ledger_simple.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple.php       2011-11-28 
19:49:56 UTC (rev 4501)
+++ phpcompta/trunk/include/class_print_ledger_simple.php       2011-11-28 
21:04:18 UTC (rev 4502)
@@ -257,6 +257,7 @@
                        }
 
            $l_tvac=bcadd($other['price'],$other['vat']);
+           $l_tvac=bcadd($l_tvac,$other['tva_nd']);
             $this->Cell(15,5,nbm($l_tvac),0,0,'R');
             $this->Ln(5);
         }

Modified: phpcompta/trunk/include/compta_fin_saldo.inc.php
===================================================================
--- phpcompta/trunk/include/compta_fin_saldo.inc.php    2011-11-28 19:49:56 UTC 
(rev 4501)
+++ phpcompta/trunk/include/compta_fin_saldo.inc.php    2011-11-28 21:04:18 UTC 
(rev 4502)
@@ -48,6 +48,12 @@
     // for each account
     for ( $i = 0; $i < count($array);$i++)
     {
+               if ( $array[$i]->id==0) {
+                       echo '<tr >';
+                       echo td(h2("Journal mal configuré",' class="error" '),' 
colspan="5" style="width:auto" ');
+                       echo '</tr>';
+                       continue;
+               }
         // get the saldo
         $m=$array[$i]->get_solde_detail($filter_year);
 




reply via email to

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