mirror of
https://github.com/NaN-tic/trytond-aeat_347.git
synced 2023-12-14 02:03:00 +01:00
parent
35aedf7ad5
commit
b558bd1cc9
1 changed files with 3 additions and 2 deletions
5
aeat.py
5
aeat.py
|
@ -345,12 +345,13 @@ class Report(Workflow, ModelSQL, ModelView):
|
|||
aeat_347_record as r
|
||||
WHERE
|
||||
r.year = %s AND
|
||||
r.party_tax_identifier is not null
|
||||
r.party_tax_identifier is not null AND
|
||||
r.company = %s
|
||||
GROUP BY
|
||||
r.party_tax_identifier, r.operation_key
|
||||
HAVING
|
||||
sum(amount) > %s
|
||||
""" % (cls.aggregate_function(), report.year,
|
||||
""" % (cls.aggregate_function(), report.year, report.company.id,
|
||||
report.operation_limit)
|
||||
cursor.execute(query)
|
||||
result = cursor.fetchall()
|
||||
|
|
Loading…
Reference in a new issue