Prevented operations with 0 debit/credit.
This commit is contained in:
parent
9bf674ac4b
commit
cfcb51d7b6
2 changed files with 12 additions and 2 deletions
|
|
@ -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 <sparkyx@eleven>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 "<script> alert('$msg'); </script>";
|
||||
return null;
|
||||
}
|
||||
|
||||
// Verify that we have a non-null operation
|
||||
if ($view_only==true and $sum_cred == 0)
|
||||
{
|
||||
$msg=sprintf("Montant null");
|
||||
echo "<script> alert('$msg'); </script>";
|
||||
return null;
|
||||
}
|
||||
|
||||
return $r;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue