fix the bill replacement with discounts #8028
This commit is contained in:
parent
bc7bd77cea
commit
4874d08062
@ -539,6 +539,15 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
$newinvoiceline->fk_parent_line=$fk_parent_line;
|
||||
|
||||
if($newinvoiceline->fk_remise_except){
|
||||
$discount = new DiscountAbsolute($this->db);
|
||||
$discount->fetch($newinvoiceline->fk_remise_except);
|
||||
|
||||
$discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx);
|
||||
$newinvoiceline->fk_remise_except = $discountId;
|
||||
}
|
||||
|
||||
$result=$newinvoiceline->insert();
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
|
||||
Loading…
Reference in New Issue
Block a user