Do not convert invoiced quantity if sale has not unit when computing credit amount
Closes #13715
This commit is contained in:
1 parent
89f5385b70
commit
1a835acf6d
1 file changed
+7
-3
@@ -44,9 +44,13 @@ class Party(metaclass=PoolMeta):
|
||||
continue
|
||||
invoice = invoice_line.invoice
|
||||
if invoice and invoice.move:
|
||||
quantity -= Uom.compute_qty(
|
||||
invoice_line.unit, invoice_line.quantity,
|
||||
line.unit, round=False)
|
||||
if line.unit:
|
||||
quantity -= Uom.compute_qty(
|
||||
invoice_line.unit or line.unit,
|
||||
invoice_line.quantity,
|
||||
line.unit, round=False)
|
||||
else:
|
||||
quantity -= invoice_line.quantity
|
||||
if quantity > 0:
|
||||
amount += Currency.compute(
|
||||
sale.currency,
|
||||
|
||||
Reference in new issue
Block a user