Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
erp5
Commits
3d735cbe
Commit
3d735cbe
authored
Nov 16, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bank_reconciliation: extend related key to support internal transaction line
parent
fd215503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
bt5/erp5_bank_reconciliation/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_aggregate_bank_reconciliation.sql
..._mysql_innodb/z_related_aggregate_bank_reconciliation.sql
+12
-1
No files found.
bt5/erp5_bank_reconciliation/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_aggregate_bank_reconciliation.sql
View file @
3d735cbe
...
...
@@ -6,4 +6,15 @@ AND <dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.aggregat
<
dtml
-
var
table_2
>
.
uid
=
<
dtml
-
var
table_1
>
.
uid
</
dtml
-
if
>
<
dtml
-
var
RELATED_QUERY_SEPARATOR
>
<
dtml
-
var
table_0
>
.
uid
=
<
dtml
-
var
query_table
>
.
uid
\ No newline at end of file
<
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()"
>
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment