task 5026 Add more check for the account
This commit is contained in:
parent
cc3977bda3
commit
9346524d2f
5 changed files with 60 additions and 69 deletions
|
|
@ -348,6 +348,9 @@ for ($o = 0;$o < $p_number; $o++) {
|
|||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
return null;
|
||||
}
|
||||
// Check if the card has a valid account
|
||||
if ( CheckPoste($p_cn,$e_client) == null )
|
||||
return null;
|
||||
|
||||
// check if all e_march are in fiche
|
||||
for ($i=0;$i<$p_number;$i++) {
|
||||
|
|
@ -364,23 +367,9 @@ for ($o = 0;$o < $p_number; $o++) {
|
|||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
return null;
|
||||
}
|
||||
// check if the ATTR_DEF_ACCOUNT is set
|
||||
$poste=GetFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_ACCOUNT);
|
||||
if ( $poste == null )
|
||||
{
|
||||
$msg="La fiche ".${"e_march$i"}." n\'a pas de poste comptable";
|
||||
echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
// Check if the card has a valid account
|
||||
if ( CheckPoste($p_cn,${"e_march$i"}) == null )
|
||||
return null;
|
||||
|
||||
}
|
||||
if ( strlen(trim($poste))==0 )
|
||||
{
|
||||
$msg="La fiche ".$tiers." n\'a pas de poste comptable";
|
||||
echo_error($msg); echo_debug('user_form_ven.php',__LINE__,$msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
}
|
||||
|
||||
}
|
||||
// Verify the userperiode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue