Do not try to compute promotion quantity for lines without type line
Closes #12351
This commit is contained in:
@@ -225,6 +225,8 @@ class Promotion(
|
||||
if self.unit:
|
||||
quantity = 0
|
||||
for line in sale.lines:
|
||||
if line.type != 'line':
|
||||
continue
|
||||
if self.is_valid_sale_line(line):
|
||||
quantity += Uom.compute_qty(line.unit, line.quantity,
|
||||
self.unit)
|
||||
|
||||
Reference in New Issue
Block a user