Commit 3b5f5951 authored by Jérome Perrin's avatar Jérome Perrin

Fix stats on accounting module when filtering by node.

(the functional test failure)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17506 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d4cb51b
......@@ -513,6 +513,23 @@ WHERE\n
</dtml-if>\n
\n
<dtml-if node>\n
<dtml-if stat>\n
AND stock.uid IN (\n
SELECT child.uid from catalog as child\n
WHERE category.uid = stock.section_uid\n
AND child.parent_uid = catalog.uid\n
HAVING (SELECT count(stock.uid) from stock, catalog as child\n
WHERE stock.uid = child.uid \n
AND child.parent_uid = catalog.uid\n
AND (\n
<dtml-in node>\n
<dtml-unless sequence-start>OR</dtml-unless>\n
stock.node_uid =\n
<dtml-var "restrictedTraverse(_[\'sequence-item\']).getUid()">\n
</dtml-in> )\n
)\n
)\n
<dtml-else>\n
AND category.uid = stock.section_uid\n
AND child.uid = stock.uid\n
AND child.parent_uid = catalog.uid\n
......@@ -523,17 +540,19 @@ WHERE\n
<dtml-var "restrictedTraverse(_[\'sequence-item\']).getUid()">\n
</dtml-in> )\n
</dtml-if>\n
</dtml-if>\n
\n
<dtml-if stat>\n
AND category.uid = stock.section_uid\n
AND child.uid = stock.uid\n
AND child.parent_uid = catalog.uid\n
</dtml-if>\n
<dtml-if omit_input> AND stock.total_price < 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
<dtml-if omit_output> AND stock.total_price > 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
</dtml-if>\n
<dtml-if expr="selection_name is not None and portal_selections.getSelectionInvertModeFor(selection_name) and len(portal_selections.getSelectionInvertModeUidListFor(selection_name)) > 0">\n
AND ( 0 = 1\n
<dtml-in expr="portal_selections.getSelectionInvertModeUidListFor(selection_name)">\n
......@@ -701,6 +720,23 @@ WHERE\n
</dtml-if>\n
\n
<dtml-if node>\n
<dtml-if stat>\n
AND stock.uid IN (\n
SELECT child.uid from catalog as child\n
WHERE category.uid = stock.section_uid\n
AND child.parent_uid = catalog.uid\n
HAVING (SELECT count(stock.uid) from stock, catalog as child\n
WHERE stock.uid = child.uid \n
AND child.parent_uid = catalog.uid\n
AND (\n
<dtml-in node>\n
<dtml-unless sequence-start>OR</dtml-unless>\n
stock.node_uid =\n
<dtml-var "restrictedTraverse(_[\'sequence-item\']).getUid()">\n
</dtml-in> )\n
)\n
)\n
<dtml-else>\n
AND category.uid = stock.section_uid\n
AND child.uid = stock.uid\n
AND child.parent_uid = catalog.uid\n
......@@ -711,17 +747,19 @@ WHERE\n
<dtml-var "restrictedTraverse(_[\'sequence-item\']).getUid()">\n
</dtml-in> )\n
</dtml-if>\n
</dtml-if>\n
\n
<dtml-if stat>\n
AND category.uid = stock.section_uid\n
AND child.uid = stock.uid\n
AND child.parent_uid = catalog.uid\n
</dtml-if>\n
<dtml-if omit_input> AND stock.total_price < 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
<dtml-if omit_output> AND stock.total_price > 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
</dtml-if>\n
<dtml-if expr="selection_name is not None and portal_selections.getSelectionInvertModeFor(selection_name) and len(portal_selections.getSelectionInvertModeUidListFor(selection_name)) > 0">\n
AND ( 0 = 1\n
<dtml-in expr="portal_selections.getSelectionInvertModeUidListFor(selection_name)">\n
......
497
\ No newline at end of file
498
\ 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