changeset f11a731a3dc5 in modules/account_es:default
details: 
https://hg.tryton.org/modules/account_es?cmd=changeset;node=f11a731a3dc5
description:
        Use end_date to compute AEAT 303 amount_to_compensate

        issue9732
        review314511003
diffstat:

 reporting_tax.py |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (18 lines):

diff -r c808a1cd952a -r f11a731a3dc5 reporting_tax.py
--- a/reporting_tax.py  Fri Oct 16 19:19:56 2020 +0200
+++ b/reporting_tax.py  Mon Oct 19 11:52:40 2020 +0200
@@ -288,13 +288,9 @@
 
         amount_to_compensate = Decimal(0)
         fiscalyear = periods[0].fiscalyear
-        start_periods = Period.search([
-                ('fiscalyear', '=', fiscalyear.id),
-                ('end_date', '<=', start_date),
-                ])
         with transaction.set_context({
                     'fiscalyear': fiscalyear.id,
-                    'periods': [p.id for p in start_periods],
+                    'to_date': end_date,
                     }):
             for account in Account.search([
                         ('company', '=', fiscalyear.company.id),

Reply via email to