Author: danydb
Date: 2012-04-12 00:15:30 +0200 (Thu, 12 Apr 2012)
New Revision: 4802

Modified:
   phpcompta/tags/rel600/include/class_acc_reconciliation.php
Log:
Reconciliation check that jr_id does exist

Modified: phpcompta/tags/rel600/include/class_acc_reconciliation.php
===================================================================
--- phpcompta/tags/rel600/include/class_acc_reconciliation.php  2012-03-31 
17:09:51 UTC (rev 4801)
+++ phpcompta/tags/rel600/include/class_acc_reconciliation.php  2012-04-11 
22:15:30 UTC (rev 4802)
@@ -108,6 +108,11 @@
         if ( $this->jr_id==$jr_id2)
             return true;
 
+               if ( $this->db->count_sql("select jr_id from jrn where 
jr_id=".$this->jr_id)==0 )
+                               return false;
+               if ( $this->db->count_sql("select jr_id from jrn where 
jr_id=".$jr_id2)==0 )
+                               return false;
+
         // verify if exists
         if ( $this->db->count_sql(
                     "select jra_id from jrn_rapt where 
jra_concerned=".$this->jr_id.



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu

_______________________________________________
Phpcompta  est un logiciel libre de comptabilité en ligne 
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to