diff --git a/Changelog b/Changelog index aa75b5d78..61e0fa38a 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ * include/form_input.php: Solved OD jrn problem: variable e_accountX were empty after form save, and before form submit. + Prevented operations with 0 debit/credit. 2005-07-04 sparkyx diff --git a/include/form_input.php b/include/form_input.php index efd127f54..c4437130e 100644 --- a/include/form_input.php +++ b/include/form_input.php @@ -1472,8 +1472,8 @@ function FormODS($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p return null; else $e_date=substr($l_date_start,2,8); - } - + } + $e_ech=(isset($e_ech))?$e_ech:""; $e_comment=(isset($e_comment))?$e_comment:""; // Save old value and set a new one @@ -1600,6 +1600,15 @@ function FormODS($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p echo ""; return null; } + + // Verify that we have a non-null operation + if ($view_only==true and $sum_cred == 0) + { + $msg=sprintf("Montant null"); + echo ""; + return null; + } + return $r;