Minor fix

This commit is contained in:
Oscar Alvarez 2021-02-04 11:26:53 -05:00
parent b542eb2492
commit 61597aacc7
2 changed files with 5 additions and 2 deletions

View File

@ -541,7 +541,10 @@ class Liquidation(Workflow, ModelSQL, ModelView):
return sum(res)
def get_net_payment(self, name):
return self.currency.round(self.gross_payments + self.total_deductions)
res = (self.gross_payments or 0) - (self.total_deductions or 0)
if res:
return self.currency.round(res)
return 0
def get_currency(self, name):
return self.company.currency.id

View File

@ -1,5 +1,5 @@
[tryton]
version=5.0.5
version=5.0.6
depends:
company
company_department