Commit 4dd83049 authored by Jérome Perrin's avatar Jérome Perrin

use delivery table instead of movement table here, otherwise transactions...

use delivery table instead of movement table here, otherwise transactions without lines cannot be searched by date.
remove a very outdated FIXME comment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24950 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5492d56a
......@@ -534,19 +534,14 @@ destination_section_where_expression</string> </value>
<dtml-var "portal_categories.restrictedTraverse(section_category).getUid()">\n
</dtml-if>\n
\n
<dtml-comment>\n
-- FIXME: we want stop date when we are destination_section and start_date when\n
-- we are source_section (one solution is to read in stock.date, but we try\n
-- to avoid the use of stock table here)\n
</dtml-comment>\n
<dtml-if from_date>\n
AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.start_date <= <dtml-sqlvar expr="to_date+1" type="datetime">\n
AND delivery.start_date <= <dtml-sqlvar expr="to_date+1" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.start_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.start_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......@@ -757,13 +752,13 @@ destination_section_where_expression</string> </value>
</dtml-if>\n
\n
<dtml-if from_date>\n
AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.start_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
AND delivery.start_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.start_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.start_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......@@ -942,13 +937,13 @@ UNION\n
</dtml-if>\n
\n
<dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.stop_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.stop_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
AND delivery.stop_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.stop_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.stop_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......@@ -1186,19 +1181,14 @@ UNION\n
<dtml-var "portal_categories.restrictedTraverse(section_category).getUid()">\n
</dtml-if>\n
\n
<dtml-comment>\n
-- FIXME: we want stop date when we are destination_section and start_date when\n
-- we are source_section (one solution is to read in stock.date, but we try\n
-- to avoid the use of stock table here)\n
</dtml-comment>\n
<dtml-if from_date>\n
AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.start_date <= <dtml-sqlvar expr="to_date+1" type="datetime">\n
AND delivery.start_date <= <dtml-sqlvar expr="to_date+1" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.start_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.start_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......@@ -1409,13 +1399,13 @@ UNION\n
</dtml-if>\n
\n
<dtml-if from_date>\n
AND movement.start_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.start_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.start_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
AND delivery.start_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.start_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.start_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......@@ -1594,13 +1584,13 @@ UNION\n
</dtml-if>\n
\n
<dtml-if from_date>\n
AND movement.stop_date >= <dtml-sqlvar from_date type="datetime">\n
AND delivery.stop_date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND movement.stop_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
AND delivery.stop_date <= <dtml-sqlvar expr="to_date.latestTime()" type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND movement.stop_date < <dtml-sqlvar at_date type="datetime">\n
AND delivery.stop_date < <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
\n
<dtml-if node>\n
......
839
\ No newline at end of file
840
\ 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