Fix warning

This commit is contained in:
Laurent Destailleur 2020-12-16 19:10:37 +01:00
parent 5681aeee0f
commit b7876f54cf

View File

@ -132,6 +132,8 @@ class ProductFournisseur extends Product
*/
public $supplier_fk_barcode_type;
public $packaging;
/**
* Constructor
@ -299,7 +301,7 @@ class ProductFournisseur extends Product
$charges = price2num($charges, 'MU');
$qty = price2num($qty, 'MS');
$unitBuyPrice = price2num($buyprice / $qty, 'MU');
$packaging = price2num((($this->packaging < $qty) ? $qty : $this->packaging), 'MS');
$packaging = price2num(((empty($this->packaging) || $this->packaging < $qty) ? $qty : $this->packaging), 'MS');
$error = 0;
$now = dol_now();