Skip to content
Snippets Groups Projects
Commit 1deb7789 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Fix #3515 Bug: Creating an invoice from a shipment links to wrong customer order

parent 9aec4d55
No related branches found
No related tags found
No related merge requests found
......@@ -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']))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment