Fix: UPDATE Total descuento
This commit is contained in:
parent
c2b590b052
commit
cd199fbaa0
3
sale.py
3
sale.py
@ -100,7 +100,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
(line.amount for line in sale.lines
|
(line.amount for line in sale.lines
|
||||||
if line.type == 'line'), Decimal(0)),2)
|
if line.type == 'line'), Decimal(0)),2)
|
||||||
total_discount[sale.id] = round(sum(
|
total_discount[sale.id] = round(sum(
|
||||||
(line.discount_amount for line in sale.lines
|
(line.discount_amount * Decimal(line.quantity) for line in sale.lines
|
||||||
if line.discount_amount and line.type == 'line'), Decimal(0)), 2)
|
if line.discount_amount and line.type == 'line'), Decimal(0)), 2)
|
||||||
total_tip[sale.id] = round(sum((line.amount for line in sale.lines if line.product and line.product.tip and line.type == 'line'), Decimal(0)), 2)
|
total_tip[sale.id] = round(sum((line.amount for line in sale.lines if line.product and line.product.tip and line.type == 'line'), Decimal(0)), 2)
|
||||||
if compute_taxes:
|
if compute_taxes:
|
||||||
@ -350,7 +350,6 @@ class Line(metaclass=PoolMeta):
|
|||||||
},
|
},
|
||||||
depends=['type', 'sale_state'])
|
depends=['type', 'sale_state'])
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_rate(cls):
|
def default_rate(cls):
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user