changeset 8a562d1db161 in modules/account_es:5.6
details:
https://hg.tryton.org/modules/account_es?cmd=changeset;node=8a562d1db161
description:
Use end_date to compute AEAT 303 amount_to_compensate
issue9732
review314511003
(grafted from f11a731a3dc5e1972a4b2c87f682f8638924686f)
diffstat:
reporting_tax.py | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diffs (18 lines):
diff -r f8ac36044fc0 -r 8a562d1db161 reporting_tax.py
--- a/reporting_tax.py Mon May 04 12:08:07 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),