Fix: navigation fails
This commit is contained in:
parent
ada3df4245
commit
89d8eb19c0
@ -51,7 +51,7 @@ $object = new FactureFournisseur($db);
|
||||
|
||||
if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
|
||||
@ -39,6 +39,7 @@ $langs->load("companies");
|
||||
$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 (! $sortorder) $sortorder="ASC";
|
||||
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);
|
||||
|
||||
@ -41,7 +41,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
|
||||
|
||||
$object = new FactureFournisseur($db);
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
|
||||
|
||||
@ -71,13 +71,13 @@ if ($action == 'setlabel' && $user->rights->fournisseur->facture->creer)
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($id)
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user