Fix bad constructor
This commit is contained in:
parent
7275ac1511
commit
da519f3ab5
@ -1871,7 +1871,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
// Predefine quantity according to packaging
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
$prod = new Product($this->db);
|
||||
$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid));
|
||||
|
||||
if ($qty < $prod->packaging) {
|
||||
|
||||
@ -2074,7 +2074,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) {
|
||||
// Check quantity is enough
|
||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
$prod = new Product($this->db);
|
||||
if ($prod->fetch($fk_product) > 0) {
|
||||
$product_type = $prod->type;
|
||||
$label = $prod->label;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user