FIX : manage error
This commit is contained in:
parent
5b69357233
commit
0a033f4cfd
@ -61,6 +61,7 @@ NoProductToShipFoundIntoStock=Aucun produit à expédier n'a été trouver dans
|
||||
WeightVolShort=Poids/vol.
|
||||
ValidateOrderFirstBeforeReception=Vous devez d'abord valider la commande pour pouvoir créer une réception.
|
||||
CreateInvoiceForThisSupplier=Facturer réceptions
|
||||
ErrorRefAlreadyExists = La référence fournisseur existe déjà
|
||||
|
||||
# Reception methods
|
||||
# ModelDocument
|
||||
|
||||
@ -181,7 +181,8 @@ if (empty($reshook))
|
||||
$object = new FactureFournisseur($db);
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$rcp->socid])){
|
||||
$object = $TFactThird[$rcp->socid]; // If option "one bill per third" is set, we use already created reception.
|
||||
$object->fetchObjectLinked();
|
||||
if(empty($object->rowid)&&$object->id != null)$object->rowid = $object->id;
|
||||
if(!empty($object->rowid))$object->fetchObjectLinked();
|
||||
$rcp->fetchObjectLinked();
|
||||
|
||||
if (count($rcp->linkedObjectsIds['order_supplier']) > 0)
|
||||
@ -234,7 +235,7 @@ if (empty($reshook))
|
||||
$nb_bills_created++;
|
||||
$object->id = $res;
|
||||
}else {
|
||||
$errors[]=$object->error;
|
||||
$errors[]=$rcp->ref.' : '.$langs->trans($object->error);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user