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.
|
WeightVolShort=Poids/vol.
|
||||||
ValidateOrderFirstBeforeReception=Vous devez d'abord valider la commande pour pouvoir créer une réception.
|
ValidateOrderFirstBeforeReception=Vous devez d'abord valider la commande pour pouvoir créer une réception.
|
||||||
CreateInvoiceForThisSupplier=Facturer réceptions
|
CreateInvoiceForThisSupplier=Facturer réceptions
|
||||||
|
ErrorRefAlreadyExists = La référence fournisseur existe déjà
|
||||||
|
|
||||||
# Reception methods
|
# Reception methods
|
||||||
# ModelDocument
|
# ModelDocument
|
||||||
|
|||||||
@ -181,7 +181,8 @@ if (empty($reshook))
|
|||||||
$object = new FactureFournisseur($db);
|
$object = new FactureFournisseur($db);
|
||||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$rcp->socid])){
|
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 = $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();
|
$rcp->fetchObjectLinked();
|
||||||
|
|
||||||
if (count($rcp->linkedObjectsIds['order_supplier']) > 0)
|
if (count($rcp->linkedObjectsIds['order_supplier']) > 0)
|
||||||
@ -234,7 +235,7 @@ if (empty($reshook))
|
|||||||
$nb_bills_created++;
|
$nb_bills_created++;
|
||||||
$object->id = $res;
|
$object->id = $res;
|
||||||
}else {
|
}else {
|
||||||
$errors[]=$object->error;
|
$errors[]=$rcp->ref.' : '.$langs->trans($object->error);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user