Skip to content

Commit

Permalink
NEW display supplier in objectline if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Aug 11, 2019
1 parent 3351a16 commit b06bfef
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions htdocs/core/tpl/objectline_view.tpl.php
Expand Up @@ -163,6 +163,23 @@
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
}
}

if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
{
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$productfourn = new ProductFournisseur($this->db);
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
echo '<div class="clearboth"></div><span class="opacitymedium">' . $langs->trans('Supplier') . ' : </span>' . $productfourn->getSocNomUrl(1, 'supplier') . ' - <span class="opacitymedium">' . $langs->trans('Ref') . ' : </span>';
// Supplier ref
if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here
{
echo $productfourn->getNomUrl();
}
else
{
echo $productfourn->ref_supplier;
}
}

if (! empty($conf->accounting->enabled) && $line->fk_accounting_account > 0)
{
Expand Down

0 comments on commit b06bfef

Please sign in to comment.