Fix: navigation on tab notes for shipment was not working.

This commit is contained in:
Laurent Destailleur 2014-05-06 13:51:22 +02:00
parent 647d431857
commit 215ff25ddd
2 changed files with 25 additions and 1 deletions

View File

@ -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.

View File

@ -47,7 +47,30 @@ if ($user->societe_id) $socid=$user->societe_id;
$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);
}
}
/******************************************************************************/