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 [email protected] /*! \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 ) _______________________________________________ Phpcompta-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/phpcompta-dev
