From 3a09f83576e67fbd185cae06941be6565c04476f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 11 Apr 2005 08:31:48 +0000 Subject: [PATCH] GEstion des addons dans llxHeader --- htdocs/fourn/facture/fiche.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 00353678624..d91ff28b6d9 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -182,9 +182,7 @@ if ($_GET["action"] == 'add_ligne') /* * */ -llxHeader(); -if ($mesg) { print "
$mesg
"; } /* @@ -195,6 +193,10 @@ if ($mesg) { print "
$mesg
"; } if ($_GET["action"] == 'create' or $_GET["action"] == 'copy') { + + llxHeader(); + if ($mesg) { print "
$mesg
"; } + if ($_GET["action"] == 'copy') { $fac_ori = new FactureFournisseur($db); @@ -301,6 +303,17 @@ else $fac = new FactureFournisseur($db); $fac->fetch($_GET["facid"]); + $societe = new Fournisseur($db); + + if ( $societe->fetch($fac->socidp) ) + { + $addons[0][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$fac->socidp; + $addons[0][1] = $societe->nom; + } + llxHeader('','', $addons); + + if ($mesg) { print "
$mesg
"; } + if ($_GET["action"] == "edit") { @@ -603,14 +616,11 @@ else print "id&action=copy&socid=$fac->socidp\">".$langs->trans('Copy').""; } - if ($fac->statut == 0 && $user->societe_id == 0) + if ($_GET["action"] != "edit" && $fac->statut == 0 && $user->rights->fournisseur->facture->creer) { - if ($_GET["action"] != "edit") - { print ''.$langs->trans("Delete").''; - } } - + print ""; }