Commit 07a508a3 authored by Jérome Perrin's avatar Jérome Perrin

When searching by date, this use the movement table. This is not good, because...

When searching by date, this use the movement table. This is not good, because it can match invoice lines, for now adds "movement.is_accountable" in WHERE clause not to select them.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17320 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90cf5aa2
......@@ -478,6 +478,7 @@ WHERE\n
AND catalog.creation_date <\n
<dtml-sqlvar "creation_date_range_max+1" type="datetime"> </dtml-if>\n
<dtml-if use_movement_table>\n
AND movement.is_accountable\n
AND movement.explanation_uid = catalog.uid </dtml-if>\n
<dtml-if resource> AND movement.resource_uid =\n
<dtml-var "restrictedTraverse(resource).getUid()"> </dtml-if>\n
......@@ -665,6 +666,7 @@ WHERE\n
AND catalog.creation_date <\n
<dtml-sqlvar "creation_date_range_max+1" type="datetime"> </dtml-if>\n
<dtml-if use_movement_table>\n
AND movement.is_accountable\n
AND movement.explanation_uid = catalog.uid </dtml-if>\n
<dtml-if resource> AND movement.resource_uid =\n
<dtml-var "restrictedTraverse(resource).getUid()"> </dtml-if>\n
......
464
\ No newline at end of file
465
\ No newline at end of file
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