Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display only posted entries #648

Merged
merged 4 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions partner_statement/report/activity_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _initial_balance_sql_q1(self, partners, date_start, account_type):
JOIN account_move m ON (l.move_id = m.id)
WHERE l.partner_id IN %(partners)s AND at.type = %(account_type)s
AND l.date < %(date_start)s AND not l.blocked
AND m.state IN ('posted')
GROUP BY l.partner_id, l.currency_id, l.amount_currency,
l.company_id
""", locals()), "utf-8")
Expand Down Expand Up @@ -90,6 +91,7 @@ def _display_lines_sql_q1(self, partners, date_start, date_end,
AND at.type = %(account_type)s
AND %(date_start)s <= l.date
AND l.date <= %(date_end)s
AND m.state IN ('posted')
GROUP BY l.partner_id, m.name, l.date, l.date_maturity,
CASE WHEN (aj.type IN ('sale', 'purchase'))
THEN l.name
Expand Down
2 changes: 1 addition & 1 deletion partner_statement/report/outstanding_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _display_lines_sql_q1(self, partners, date_end, account_type):
(pc.id IS NOT NULL AND
pc.max_date <= %(date_end)s) OR
(pd.id IS NULL AND pc.id IS NULL)
) AND l.date <= %(date_end)s
) AND l.date <= %(date_end)s AND m.state IN ('posted')
GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name,
l.ref, l.blocked, l.currency_id,
l.balance, l.amount_currency, l.company_id
Expand Down
1 change: 1 addition & 0 deletions partner_statement/report/report_statement_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def _show_buckets_sql_q1(self, partners, date_end, account_type):
pc.max_date <= %(date_end)s) OR
(pd.id IS NULL AND pc.id IS NULL)
) AND l.date <= %(date_end)s AND not l.blocked
AND m.state IN ('posted')
GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity,
l.amount_currency, l.balance, l.move_id,
l.company_id, l.id
Expand Down