diff --git a/ChangeLog b/ChangeLog index 4db0861edb996..256b92bb912fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ Fix: [ bug #1341 ] Lastname not added by file or direct input in mass e-mailing. Fix: [ bug #1357 ] Invoice creator state not printed in generated invoice documents. Fix: Suppliers invoice mask fails using {tttt} in numbering. Fix: pdf template name for typhon was not correctly et when enabling module. +Fix: Navigation on notes for shipments was not working. ***** ChangeLog for 3.5.2 compared to 3.5.1 ***** Fix: Can't add user for a task. diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 4d4c30b55a49b..252e6f922bf0c 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -47,7 +47,30 @@ $result=restrictedArea($user, $origin, $origin_id); $object = new Expedition($db); -$object->fetch($id); +if ($id > 0 || ! empty($ref)) +{ + $object->fetch($id, $ref); + $object->fetch_thirdparty(); + + if (!empty($object->origin)) + { + $typeobject = $object->origin; + $origin = $object->origin; + $object->fetch_origin(); + } + + // Linked documents + if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) + { + $objectsrc=new Commande($db); + $objectsrc->fetch($object->$typeobject->id); + } + if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled)) + { + $objectsrc=new Propal($db); + $objectsrc->fetch($object->$typeobject->id); + } +} /******************************************************************************/