phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4127 - in phpcompta/trunk: . include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4127 - in phpcompta/trunk: . include
Date: Tue, 24 May 2011 22:24:50 +0200 (CEST)

Author: danydb
Date: 2011-05-24 22:24:49 +0200 (Tue, 24 May 2011)
New Revision: 4127

Modified:
   phpcompta/trunk/
   phpcompta/trunk/include/class_acc_ledger.php
Log:
Merged revisions 4102,4125-4126 via svnmerge from 
svn+ssh://address@hidden/svn/phpcompta/branches/rel550

........
  r4102 | danydb | 2011-05-16 00:00:31 +0200 (Mon, 16 May 2011) | 1 line
  
  Fix bug import bank 
........
  r4125 | danydb | 2011-05-24 22:19:17 +0200 (Tue, 24 May 2011) | 1 line
  
  0000270: Fiche sans poste comptable dans les OP Diverses
........
  r4126 | danydb | 2011-05-24 22:19:55 +0200 (Tue, 24 May 2011) | 1 line
  
  remove debug
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/branches/rel550:1-4035,4037-4051,4053-4068
   + /phpcompta/branches/rel550:1-4035,4037-4051,4053-4126

Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php        2011-05-24 20:19:55 UTC 
(rev 4126)
+++ phpcompta/trunk/include/class_acc_ledger.php        2011-05-24 20:24:49 UTC 
(rev 4127)
@@ -1299,6 +1299,7 @@
                       ${'qc_'.$i}.' - '.
                       
$oqc->strAttribut(ATTR_DEF_NAME).HtmlInput::hidden('qc_'.$i,${'qc_'.$i}).
                       '</td>';
+
             }
 
             if ( trim(${'qc_'.$i})=="" && trim(${'poste'.$i}) != "")
@@ -1667,6 +1668,12 @@
                 if ( strlen(trim(${'qc_'.$i}))!=0 &&  isNumber(${'amount'.$i} 
) == 0 )
                     throw new Exception('Montant invalide',3);
 
+               $strPoste=$f->strAttribut(ATTR_DEF_ACCOUNT);
+               if ($strPoste=='') throw new Exception(sprintf(_("La fiche %s 
n'a pas de poste comptable"),${"qc_".$i}));
+
+               $p=new Acc_Account_Ledger($this->db,$strPoste);
+               if ($p->do_exist() == 0 )
+                 throw new Exception(_('Poste Inexistant pour la fiche 
['.${'qc_'.$i}.']'),4);
             }
 
             // Check if the account is permitted
@@ -1770,6 +1777,7 @@
                     else
                     {
                         $poste=$sposte;
+                       if ($poste=='') throw new Exception(sprintf(_("La fiche 
%s n'a pas de poste comptable"),${"qc_".$i}));
                     }
                     $quick_code=${'qc_'.$i};
                 }
@@ -1777,6 +1785,7 @@
                 {
                     $poste=${'poste'.$i};
                 }
+
                 $acc_op->date=$e_date;
                 // compute the periode is do not check it
                 if ($check_periode == false ) $acc_op->periode=$oPeriode->p_id;




reply via email to

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