phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4153 - phpcompta/branches/rel560/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4153 - phpcompta/branches/rel560/include
Date: Sat, 4 Jun 2011 12:40:37 +0200 (CEST)

Author: danydb
Date: 2011-06-04 12:40:37 +0200 (Sat, 04 Jun 2011)
New Revision: 4153

Modified:
   phpcompta/branches/rel560/include/class_acc_operation.php
   phpcompta/branches/rel560/include/class_database.php
Log:
Better error message 

Modified: phpcompta/branches/rel560/include/class_acc_operation.php
===================================================================
--- phpcompta/branches/rel560/include/class_acc_operation.php   2011-06-04 
10:39:20 UTC (rev 4152)
+++ phpcompta/branches/rel560/include/class_acc_operation.php   2011-06-04 
10:40:37 UTC (rev 4153)
@@ -87,7 +87,7 @@
 
     function insert_jrnx()
     {
-        if ( $this->poste == "") return false;
+      if ( $this->poste == "") { return false; throw new  Exception 
(__FILE__.':'.__LINE__.' Poste comptable vide');}
         /* for negative amount the operation is reversed */
         if ( $this->amount < 0 )
         {
@@ -109,7 +109,7 @@
                                      $this->periode, //$8
                                      $this->qcode, // $9
                                      $this->desc)); //$10
-        if ( $Res==false) return $Res;
+        if ( $Res===false) return $Res;
         $this->jrnx_id=$this->db->get_current_seq('s_jrn_op');
         return $this->jrnx_id;
 

Modified: phpcompta/branches/rel560/include/class_database.php
===================================================================
--- phpcompta/branches/rel560/include/class_database.php        2011-06-04 
10:39:20 UTC (rev 4152)
+++ phpcompta/branches/rel560/include/class_database.php        2011-06-04 
10:40:37 UTC (rev 4153)
@@ -125,13 +125,16 @@
          
             $this->sql=$p_string;
             $this->array=$p_array;
+
             if ( $p_array==null )
             {
-             $this->address@hidden($this->db,$p_string);
+             $PG_QUERY=(DEBUG==false)?'@pg_query':'pg_query';
+             $this->ret=$PG_QUERY($this->db,$p_string);
             }
             else
             {
-                $this->address@hidden($this->db,$p_string,$p_array);
+             $PG_QUERY=(DEBUG==false)?'@pg_query_params':'pg_query_params';
+                $this->ret=$PG_QUERY($this->db,$p_string,$p_array);
             }
             if ( ! $this->ret )
             {




reply via email to

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