FIX - Box
This commit is contained in:
parent
67e523de20
commit
cd46f8b3b9
@ -150,6 +150,11 @@ class box_produits extends ModeleBoxes
|
|||||||
$productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export;
|
$productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export;
|
||||||
$productstatic->date_modification = $datem;
|
$productstatic->date_modification = $datem;
|
||||||
|
|
||||||
|
$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'lire');
|
||||||
|
if ($productstatic->isService()) {
|
||||||
|
$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'lire');
|
||||||
|
}
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
|
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
|
||||||
'text' => $productstatic->getNomUrl(1),
|
'text' => $productstatic->getNomUrl(1),
|
||||||
@ -162,6 +167,7 @@ class box_produits extends ModeleBoxes
|
|||||||
);
|
);
|
||||||
$price = '';
|
$price = '';
|
||||||
$price_base_type = '';
|
$price_base_type = '';
|
||||||
|
if ($usercancreadprice) {
|
||||||
if (empty($conf->dynamicprices->enabled) || empty($objp->fk_price_expression)) {
|
if (empty($conf->dynamicprices->enabled) || empty($objp->fk_price_expression)) {
|
||||||
$price_base_type = $langs->trans($objp->price_base_type);
|
$price_base_type = $langs->trans($objp->price_base_type);
|
||||||
$price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc);
|
$price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc);
|
||||||
@ -180,6 +186,7 @@ class box_produits extends ModeleBoxes
|
|||||||
$price = price($price_result);
|
$price = price($price_result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="nowraponall right amount"',
|
'td' => 'class="nowraponall right amount"',
|
||||||
'text' => $price,
|
'text' => $price,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user