parent
7d4a093d9e
commit
d0599cd952
@ -699,13 +699,12 @@ class ProductFournisseur extends Product
|
||||
/**
|
||||
* Display price of product
|
||||
*
|
||||
* @param int $showunitprice Show "Unit price" into output string
|
||||
* @param int $showsuptitl Show "Supplier" into output string
|
||||
* @param int $maxlen Max length of name
|
||||
* @param integer $notooltip 1=Disable tooltip
|
||||
* @param array $productFournList list of ProductFournisseur objects
|
||||
* to display in table format.
|
||||
* @return string String with supplier price
|
||||
* @param int $showunitprice Show "Unit price" into output string
|
||||
* @param int $showsuptitle Show "Supplier" into output string
|
||||
* @param int $maxlen Max length of name
|
||||
* @param integer $notooltip 1=Disable tooltip
|
||||
* @param array $productFournList list of ProductFournisseur objects to display in table format.
|
||||
* @return string String with supplier price
|
||||
*/
|
||||
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array())
|
||||
{
|
||||
@ -714,18 +713,16 @@ class ProductFournisseur extends Product
|
||||
$out = '';
|
||||
$langs->load("suppliers");
|
||||
if (count($productFournList) > 0) {
|
||||
$out .= '<table class="nobordernopadding" width="100%">';
|
||||
$out .= '<tr><td class="liste_titre" align="right">'.($showunitprice?$langs->trans("Price").' '.$langs->trans("HT"):'').'</td>';
|
||||
$out .= '<td class="liste_titre" align="right">'.($showunitprice?$langs->trans("QtyMin"):'').'</td>';
|
||||
$out .= '<td class="liste_titre">'.$langs->trans("Supplier").'</td>';
|
||||
$out .= '<td class="liste_titre">'.$langs->trans("SupplierRef").'</td></tr>';
|
||||
$out .= '<table>';
|
||||
$out .= '<tr><td align="right">'.($showunitprice?$langs->trans("Price").' '.$langs->trans("HT"):'').'</td>';
|
||||
$out .= '<td>'.$langs->trans("Supplier").'</td>';
|
||||
$out .= '<td>'.$langs->trans("SupplierRef").'</td></tr>';
|
||||
foreach ($productFournList as $productFourn) {
|
||||
$out.= '<tr><td align="right">'.($showunitprice?price($productFourn->fourn_unitprice * (1 -$productFourn->fourn_remise_percent/100) + $productFourn->fourn_unitcharges - $productFourn->fourn_remise):'').'</td>';
|
||||
$out.= '<td align="right">'.($showunitprice?$productFourn->fourn_qty:'').'</td>';
|
||||
$out.= '<td>'.$productFourn->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).'</td>';
|
||||
$out.= '<td>'.$productFourn->fourn_ref.'<td></tr>';
|
||||
}
|
||||
$out .= '</table>';
|
||||
$out .= '</table>';
|
||||
} else {
|
||||
$out=($showunitprice?price($this->fourn_unitprice * (1 - $this->fourn_remise_percent/100) + $this->fourn_unitcharges - $this->fourn_remise).' '.$langs->trans("HT").' (':'').($showsuptitle?$langs->trans("Supplier").': ':'').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice?')':'');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user