GEstion des addons dans llxHeader
This commit is contained in:
parent
e2db10f384
commit
3a09f83576
@ -182,9 +182,7 @@ if ($_GET["action"] == 'add_ligne')
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
if ($mesg) { print "<br>$mesg<br>"; }
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -195,6 +193,10 @@ if ($mesg) { print "<br>$mesg<br>"; }
|
|||||||
|
|
||||||
if ($_GET["action"] == 'create' or $_GET["action"] == 'copy')
|
if ($_GET["action"] == 'create' or $_GET["action"] == 'copy')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
if ($mesg) { print "<br>$mesg<br>"; }
|
||||||
|
|
||||||
if ($_GET["action"] == 'copy')
|
if ($_GET["action"] == 'copy')
|
||||||
{
|
{
|
||||||
$fac_ori = new FactureFournisseur($db);
|
$fac_ori = new FactureFournisseur($db);
|
||||||
@ -301,6 +303,17 @@ else
|
|||||||
$fac = new FactureFournisseur($db);
|
$fac = new FactureFournisseur($db);
|
||||||
$fac->fetch($_GET["facid"]);
|
$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 "<br>$mesg<br>"; }
|
||||||
|
|
||||||
if ($_GET["action"] == "edit")
|
if ($_GET["action"] == "edit")
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -603,13 +616,10 @@ else
|
|||||||
print "<a class=\"butAction\" href=\"fiche.php?facid=$fac->id&action=copy&socid=$fac->socidp\">".$langs->trans('Copy')."</a>";
|
print "<a class=\"butAction\" href=\"fiche.php?facid=$fac->id&action=copy&socid=$fac->socidp\">".$langs->trans('Copy')."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
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 '<a class="butActionDelete" href="index.php?facid='.$fac->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
print '<a class="butActionDelete" href="index.php?facid='.$fac->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user