WAP alway decimal 2 digits

This commit is contained in:
fappels 2017-06-30 10:52:54 +02:00
parent e3f7402e07
commit 7d4a093d9e

View File

@ -699,12 +699,13 @@ class ProductFournisseur extends Product
/**
* Display price of product
*
* @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
* @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
*/
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array())
{
@ -713,12 +714,14 @@ class ProductFournisseur extends Product
$out = '';
$langs->load("suppliers");
if (count($productFournList) > 0) {
$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>';
$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>';
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>';
}