commit
9efc1e2d36
@ -2354,14 +2354,6 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$info_bits = 0;
|
$info_bits = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($idproduct) {
|
|
||||||
$product = new Product($this->db);
|
|
||||||
$result = $product->fetch($idproduct);
|
|
||||||
$product_type = $product->type;
|
|
||||||
} else {
|
|
||||||
$product_type = $type;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Fetch current line from the database and then clone the object and set it in $oldline property
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$line = new SupplierInvoiceLine($this->db);
|
$line = new SupplierInvoiceLine($this->db);
|
||||||
$line->fetch($id);
|
$line->fetch($id);
|
||||||
@ -2369,6 +2361,15 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
|
|
||||||
$staticline = clone $line;
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
if ($idproduct) {
|
||||||
|
$product = new Product($this->db);
|
||||||
|
$result = $product->fetch($idproduct);
|
||||||
|
$product_type = $product->type;
|
||||||
|
} else {
|
||||||
|
$idproduct = $staticline->fk_product;
|
||||||
|
$product_type = $type;
|
||||||
|
}
|
||||||
|
|
||||||
$line->oldline = $staticline;
|
$line->oldline = $staticline;
|
||||||
$line->context = $this->context;
|
$line->context = $this->context;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user