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 06abd6ab9f5b081c8917acfd81119dc023bee564..d3c53f83e65a66b6d86bd48c26718b4685d3fdc3 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 849eaf846afa36e3886600eca759f81d637bd064..db01d14d8b6cf55d1fb90f9af071167336d636e1 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