Fix #3515 Bug: Creating an invoice from a shipment links to wrong customer order
This commit is contained in:
parent
9aec4d554b
commit
1deb77896f
@ -923,7 +923,11 @@ if (empty($reshook))
|
||||
$exp = new Expedition($db);
|
||||
$exp->fetch($object->origin_id);
|
||||
$exp->fetchObjectLinked();
|
||||
if (count($exp->linkedObjectsIds['commande']) > 0) $object->linked_objects['commande'] = $exp->linkedObjectsIds['commande'][0];
|
||||
if (count($exp->linkedObjectsIds['commande']) > 0) {
|
||||
foreach ($exp->linkedObjectsIds['commande'] as $key => $value){
|
||||
$object->linked_objects['commande'] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects']))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user