Commit 94e89e2a authored by Jérome Perrin's avatar Jérome Perrin

bank_reconciliation: extend related key to support internal transaction line

parent e6ce6015
......@@ -7,3 +7,14 @@ AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.aggregat
</dtml-if>
<dtml-var RELATED_QUERY_SEPARATOR>
<dtml-var table_0>.uid = <dtml-var query_table>.uid
-- A line can be reconcilied for source_payment or destination_payment
-- so we also add a condition that the related bank reconciliation is
-- for "this side". Another approach, more efficient, is to customize `stock`
-- table to add `aggregate_bank_reconciliation_date` and `aggregate_bank_reconciliation_uid`
-- columns. See https://lab.nexedi.com/nexedi/erp5/merge_requests/495
AND stock.payment_uid in (
select category.category_uid
from category
where <dtml-var table_1>.uid = category.uid
and category.base_category_uid = <dtml-var "portal_categories.source_payment.getUid()"> )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment