PEP8 fixes
This commit is contained in:
parent
8311e518b7
commit
f84eed597a
6
sale.py
6
sale.py
|
@ -80,7 +80,7 @@ class SaleLine:
|
|||
cost = Decimal(str(self.quantity or '0.0')) * \
|
||||
(self.cost_price or Decimal('0.0'))
|
||||
if self.amount:
|
||||
return Decimal(self.amount-cost)
|
||||
return Decimal(self.amount - cost)
|
||||
return Decimal('0.0')
|
||||
|
||||
def get_margin(self, name):
|
||||
|
@ -89,7 +89,9 @@ class SaleLine:
|
|||
'''
|
||||
Currency = Pool().get('currency.currency')
|
||||
if self.type == 'line':
|
||||
cost = Decimal(str(self.quantity)) * (self.cost_price or Decimal('0.0'))
|
||||
cost = Decimal(str(self.quantity)) * (self.cost_price or
|
||||
Decimal('0.0'))
|
||||
return Currency.round(self.sale.currency, self.amount - cost)
|
||||
|
||||
else:
|
||||
return Decimal('0.0')
|
||||
|
|
Loading…
Reference in New Issue