From 4227abb2b05f07d02e9f23eea18fba836bc414fa Mon Sep 17 00:00:00 2001 From: sparkyx Date: Fri, 13 Apr 2007 00:27:37 +0000 Subject: [PATCH] Fix problem with long account --- include/class_fiche.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/class_fiche.php b/include/class_fiche.php index 7d59e449a..2aa4a7da5 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -457,17 +457,16 @@ class fiche { $v=FormatString($value); if ( isNumber($v) == 1 ) { - $sql=sprintf("select account_insert(%d,%d)", + $sql=sprintf("select account_insert(%d,%f)", $this->id,$v); - $Ret=ExecSql($this->cn,$sql); } - if ( strlen(trim($v))==0 ) + else { $sql=sprintf("select account_insert(%d,null)", $this->id); - $Ret=ExecSql($this->cn,$sql); } - + $Ret=ExecSql($this->cn,$sql); + print "$sql $Ret"; continue; } // TVA @@ -493,7 +492,7 @@ class fiche { " and av_text='".FormatString($value)."'"); if ( $exist == 0 && FormatString($value) != null ) { - $value="Attention : pas de société "; + $value=""; } } // Normal traitement