Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
thersane-john committed Dec 20, 2024
1 parent 41309e3 commit 42974ce
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions htdocs/core/tpl/objectline_view.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,29 +286,24 @@
}
}



$parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
$reshook = $hookmanager->executeHooks('objectLineView_ProductSupplier', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
if ($user->hasRight('fournisseur', 'lire') && isset($line->fk_fournprice) && $line->fk_fournprice > 0 && !getDolGlobalString('SUPPLIER_HIDE_SUPPLIER_OBJECTLINES')) {
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$productfourn = new ProductFournisseur($this->db);
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
print '<div class="clearboth"></div>';
print '<span class="opacitymedium">'.$langs->trans('Supplier').' : </span>'.$productfourn->getSocNomUrl(1, 'supplier').' - <span class="opacitymedium">'.$langs->trans('Ref').' : </span>';
// Supplier ref
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { // change required right here
print $productfourn->getNomUrl();
} else {
print $productfourn->ref_supplier;
}
$parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];

Check failure on line 289 in htdocs/core/tpl/objectline_view.tpl.php

View workflow job for this annotation

GitHub Actions / phpstan / php-stan (8.2)

Variable $i might not be defined.
$reshook = $hookmanager->executeHooks('objectLineView_ProductSupplier', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
if ($user->hasRight('fournisseur', 'lire') && isset($line->fk_fournprice) && $line->fk_fournprice > 0 && !getDolGlobalString('SUPPLIER_HIDE_SUPPLIER_OBJECTLINES')) {
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$productfourn = new ProductFournisseur($this->db);
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
print '<div class="clearboth"></div>';
print '<span class="opacitymedium">'.$langs->trans('Supplier').' : </span>'.$productfourn->getSocNomUrl(1, 'supplier').' - <span class="opacitymedium">'.$langs->trans('Ref').' : </span>';
// Supplier ref
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { // change required right here
print $productfourn->getNomUrl();
} else {
print $productfourn->ref_supplier;
}
}



}

if (isModEnabled('accounting') && !empty($line->fk_accounting_account) && $line->fk_accounting_account > 0) {
$accountingaccount = new AccountingAccount($this->db);
Expand Down

0 comments on commit 42974ce

Please sign in to comment.