Add minimum qty column

This commit is contained in:
fappels 2017-06-30 10:55:45 +02:00
parent d0599cd952
commit 574590a598

View File

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