phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r4228 - phpcompta/trunk/include
Date: Sat, 22 Oct 2011 22:37:49 +0200 (CEST)

Author: danydb
Date: 2011-10-22 22:37:48 +0200 (Sat, 22 Oct 2011)
New Revision: 4228

Modified:
   phpcompta/trunk/include/class_acc_account.php
   phpcompta/trunk/include/param_pcmn.inc.php
Log:
#120 alphanumeric accounting


Modified: phpcompta/trunk/include/class_acc_account.php
===================================================================
--- phpcompta/trunk/include/class_acc_account.php       2011-10-22 20:19:19 UTC 
(rev 4227)
+++ phpcompta/trunk/include/class_acc_account.php       2011-10-22 20:37:48 UTC 
(rev 4228)
@@ -19,7 +19,7 @@
 /* $Revision$ */
 // Copyright Author Dany De Bontridder address@hidden
 /*! \file
- * \brief Manage the account 
+ * \brief Manage the account
  */
 /*!
  * \brief Manage the account from the table tmp_pcmn
@@ -117,16 +117,10 @@
             // otherwise we check only the value
             if ( strcmp ($p_member,'pcm_val') == 0 )
             {
-                if (is_numeric($p_value) ==0 )
-                    throw new Exception('Poste comptable incorrect '.$p_value);
-                else
                     return true;
             }
             else if ( strcmp ($p_member,'pcm_val_parent') == 0 )
             {
-                if ( is_numeric($p_value) == 0 || ($this->count($p_value) == 0 
&& $p_value !=0))
-                    throw new Exception('Poste comptable parent incorrect 
'.$p_value);
-                else
                     return true;
             }
             else if ( strcmp ($p_member,'pcm_lib') == 0 )
@@ -147,7 +141,7 @@
 
     }
     /*!\brief Get all the value for this object from the database
-     *        the data member are set 
+     *        the data member are set
      * \return false if this account doesn't exist otherwise true
      */
     function load()

Modified: phpcompta/trunk/include/param_pcmn.inc.php
===================================================================
--- phpcompta/trunk/include/param_pcmn.inc.php  2011-10-22 20:19:19 UTC (rev 
4227)
+++ phpcompta/trunk/include/param_pcmn.inc.php  2011-10-22 20:37:48 UTC (rev 
4228)
@@ -194,10 +194,10 @@
     $p_val=trim($p_val);
     $p_parent=trim($p_parent);
 
-    if ( isset ( $p_val) && isset ( $p_lib ) && isNumber($p_val) && 
isNumber($p_parent) )
+    if ( isset ( $p_val) && isset ( $p_lib )  )
     {
-        $p_val=trim($p_val);
-        $p_parent=$_POST["p_parent"];
+        $p_val=$cn->get_value('select format_account($1)',array($p_val));
+        $p_parent=$cn->get_value('select 
format_account($1)',array($_POST["p_parent"]));
         if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 )
         {
             if (strlen ($p_val) == 1 )




reply via email to

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