Commit 2bf932d7 authored by Jérome Perrin's avatar Jérome Perrin

change omit_input / omit_output to match Resource_zGetInventory behaviour.

use date from stock table


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4762 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a23f450
...@@ -297,19 +297,19 @@ WHERE\n ...@@ -297,19 +297,19 @@ WHERE\n
AND movement.is_accountable = 1\n AND movement.is_accountable = 1\n
AND node.uid = stock.node_uid\n AND node.uid = stock.node_uid\n
<dtml-if from_date>\n <dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if at_date>\n <dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if to_date>\n <dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_simulation>\n <dtml-if omit_simulation>\n
AND child.portal_type != "Simulation Movement"\n AND child.portal_type != "Simulation Movement"\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_input>\n <dtml-if omit_input>\n
AND stock.quantity > 0\n AND stock.quantity < 0\n
AND (movement.source_uid <> movement.destination_uid \n AND (movement.source_uid <> movement.destination_uid \n
OR stock.section_uid <> stock.mirror_section_uid\n OR stock.section_uid <> stock.mirror_section_uid\n
OR movement.destination_uid IS NULL\n OR movement.destination_uid IS NULL\n
...@@ -317,7 +317,7 @@ WHERE\n ...@@ -317,7 +317,7 @@ WHERE\n
)\n )\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity < 0\n AND stock.quantity > 0\n
AND (movement.source_uid <> movement.destination_uid \n AND (movement.source_uid <> movement.destination_uid \n
OR stock.section_uid <> stock.mirror_section_uid\n OR stock.section_uid <> stock.mirror_section_uid\n
OR movement.destination_uid IS NULL\n OR movement.destination_uid IS NULL\n
...@@ -442,19 +442,19 @@ WHERE\n ...@@ -442,19 +442,19 @@ WHERE\n
AND movement.is_accountable = 1\n AND movement.is_accountable = 1\n
AND node.uid = stock.node_uid\n AND node.uid = stock.node_uid\n
<dtml-if from_date>\n <dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if at_date>\n <dtml-if at_date>\n
AND movement.stop_date <= <dtml-sqlvar at_date type="datetime">\n AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if to_date>\n <dtml-if to_date>\n
AND movement.stop_date < <dtml-sqlvar to_date type="datetime">\n AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_simulation>\n <dtml-if omit_simulation>\n
AND child.portal_type != "Simulation Movement"\n AND child.portal_type != "Simulation Movement"\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_input>\n <dtml-if omit_input>\n
AND stock.quantity > 0\n AND stock.quantity < 0\n
AND (movement.source_uid <> movement.destination_uid \n AND (movement.source_uid <> movement.destination_uid \n
OR stock.section_uid <> stock.mirror_section_uid\n OR stock.section_uid <> stock.mirror_section_uid\n
OR movement.destination_uid IS NULL\n OR movement.destination_uid IS NULL\n
...@@ -462,7 +462,7 @@ WHERE\n ...@@ -462,7 +462,7 @@ WHERE\n
)\n )\n
</dtml-if>\n </dtml-if>\n
<dtml-if omit_output>\n <dtml-if omit_output>\n
AND stock.quantity < 0\n AND stock.quantity > 0\n
AND (movement.source_uid <> movement.destination_uid \n AND (movement.source_uid <> movement.destination_uid \n
OR stock.section_uid <> stock.mirror_section_uid\n OR stock.section_uid <> stock.mirror_section_uid\n
OR movement.destination_uid IS NULL\n OR movement.destination_uid IS NULL\n
......
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