From d01e8205748e992d46b2457e66cde01062320082 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Tue, 4 Mar 2008 17:17:37 +0000
Subject: [PATCH] If at_date is None and date_condition_in_join is true, assume
 that to_date was provided instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19673 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/Resource_zGetTrackingList.xml  | 8 ++++++++
 product/ERP5/bootstrap/erp5_core/bt/revision              | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
index 06abd6ab9f..d3c53f83e6 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
@@ -417,7 +417,11 @@ FROM\n
     item AS next_item\n
   ON (\n
     <dtml-if date_condition_in_join>\n
+    <dtml-if expr="at_date is not None">\n
        next_item.date <= <dtml-sqlvar at_date type="string">\n
+    <dtml-else>\n
+       next_item.date < <dtml-sqlvar to_date type="string">\n
+    </dtml-if>\n
     AND\n
     </dtml-if>\n
     next_item.aggregate_uid = item.aggregate_uid\n
@@ -535,7 +539,11 @@ FROM\n
     item AS next_item\n
   ON (\n
     <dtml-if date_condition_in_join>\n
+    <dtml-if expr="at_date is not None">\n
        next_item.date <= <dtml-sqlvar at_date type="string">\n
+    <dtml-else>\n
+       next_item.date < <dtml-sqlvar to_date type="string">\n
+    </dtml-if>\n
     AND\n
     </dtml-if>\n
     next_item.aggregate_uid = item.aggregate_uid\n
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 849eaf846a..db01d14d8b 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-722
\ No newline at end of file
+723
-- 
2.30.9