feat: Se añade campo de real declarado y descuadre

This commit is contained in:
2023-07-31 23:21:42 -05:00
parent 303ec31799
commit 9a6554bdc1
3 changed files with 24 additions and 3 deletions

View File

@@ -346,9 +346,13 @@ class StatementLine(ModelView):
balance = Monetary(
"Balance", currency='currency', digits='currency', states=_states)
end_balance = Monetary(
"End Balance", currency='currency', digits='currency')
"End Balance", currency='currency', digits='currency', readonly=True)
transfer = Monetary(
"Transfer", currency='currency', digits='currency')
real_cash = Monetary(
"Real Cash", currency='currency', digits='currency')
mismatch = Monetary(
"Mismatch", currency='currency', digits='currency', readonly=True)
account = fields.Many2One('account.account', "Account",
domain=[
('company', '=', Eval('company', 0)),
@@ -369,6 +373,13 @@ class StatementLine(ModelView):
return Transaction().context.get('company')
def get_mismatch(self, name):
return 0
@fields.depends('end_balance', 'real_cash', 'mismatch')
def on_change_real_cash(self):
self.mismatch = self.real_cash - self.end_balance
class PayInvoiceSupplierStart(ModelView):
'Payment Invoice To Supplier'
__name__ = 'pay_invoice.statement.start'