From 61ecf06d24da5222c50c794415c77cbdaef0a391 Mon Sep 17 00:00:00 2001 From: Renato Lima Date: Sun, 14 Jul 2024 21:37:43 -0300 Subject: [PATCH] Added difal values fields in invoice report --- l10n_br_account/report/account_invoice_report.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/l10n_br_account/report/account_invoice_report.py b/l10n_br_account/report/account_invoice_report.py index 376c03fd476c..8c26d5ac853a 100644 --- a/l10n_br_account/report/account_invoice_report.py +++ b/l10n_br_account/report/account_invoice_report.py @@ -51,6 +51,15 @@ class AccountInvoiceReport(models.Model): string="Valor ICMS ST", digits=dp.get_precision("Account") ) + icms_origin_value = fields.Float(string="Valor Difal Origem", digits=dp.get_precision("Account")) + + icms_destination_value = fields.Float( + string="Valor Difal Destino", + digits=dp.get_precision("Account"), + ) + + icmsfcp_value = fields.Float(string="Valor Difal FCP", digits=dp.get_precision("Account")) + ipi_value = fields.Float(string="Valor IPI", digits=dp.get_precision("Account")) pis_value = fields.Float(string="Valor PIS", digits=dp.get_precision("Account")) @@ -84,6 +93,9 @@ def _select(self): , sub.cest_id , sub.fiscal_type , sub.icms_value + , sub.icms_origin_value + , sub.icms_destination_value + , sub.icmsfcp_value , sub.icmsst_value , sub.ipi_value , sub.pis_value @@ -107,6 +119,9 @@ def _sub_select(self): , fdl.cest_id , fdl.fiscal_type , SUM(fdl.icms_value) as icms_value + , SUM(fdl.icms_origin_value) as icms_origin_value + , SUM(fdl.icms_destination_value) as icms_destination_value + , SUM(fdl.icmsfcp_value) as icmsfcp_value , SUM(fdl.icmsst_value) as icmsst_value , SUM(fdl.ipi_value) as ipi_value , SUM(fdl.pis_value) as pis_value