From 89d8eb19c084ed01d19c15aa9fd9255c4df86be4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Jul 2013 01:29:26 +0200 Subject: [PATCH] Fix: navigation fails --- htdocs/fourn/facture/contact.php | 2 +- htdocs/fourn/facture/document.php | 3 ++- htdocs/fourn/facture/note.php | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 8221037703ef3..004e5cbb64896 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -51,7 +51,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) { - $result = $object->fetch($id); + $result = $object->fetch($id, $ref); if ($result > 0 && $id > 0) { diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 155f73108bd61..2ddebb916da1c 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -39,6 +39,7 @@ $id = GETPOST('facid','int')?GETPOST('facid','int'):GETPOST('id','int'); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); +$ref = GETPOST('ref','alpha'); // Security check if ($user->societe_id) $socid=$user->societe_id; @@ -58,7 +59,7 @@ if (! $sortfield) $sortfield="name"; $object = new FactureFournisseur($db); -if ($object->fetch($id)) +if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); $ref=dol_sanitizeFileName($object->ref); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index b6611f8fda0c9..d114396601073 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -41,7 +41,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); -$object->fetch($id,$ref); +$object->fetch($id, $ref); @@ -71,13 +71,13 @@ /* * View -*/ + */ $form = new Form($db); llxHeader(); -if ($id) +if ($object->id > 0) { $object->fetch_thirdparty();