svn commit: r703731 - in /ofbiz/trunk/applications: accounting/webapp/accounting/WEB-INF/actions/reports/ manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/ marketing/webapp/marketing/WEB-INF/actions/reports/ order/webapp/ordermgr/WEB-INF/actions/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r703731 - in /ofbiz/trunk/applications: accounting/webapp/accounting/WEB-INF/actions/reports/ manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/ marketing/webapp/marketing/WEB-INF/actions/reports/ order/webapp/ordermgr/WEB-INF/actions/...

jleroux@apache.org
Author: jleroux
Date: Sat Oct 11 13:59:53 2008
New Revision: 703731

URL: http://svn.apache.org/viewvc?rev=703731&view=rev
Log:
Fix bugs related to Groovy, Timestamp and Postgres (you must use the 3 to get the problem). We should be ok with that now.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.groovy
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.groovy Sat Oct 11 13:59:53 2008
@@ -30,10 +30,10 @@
 
 exprs = [EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId)];
 if (fromDate) {
-    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDate, "Timestamp", null, null)));
 }
 if (thruDate) {
-    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
+    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruDate, "Timestamp", null, null)));
 }
 
 postedExprs = FastList.newInstance();

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy Sat Oct 11 13:59:53 2008
@@ -43,7 +43,7 @@
     eventDate = eventDate.trim();
     if (eventDate.length() < 14) eventDate = eventDate + " " + "00:00:00.000";
     paramList = paramList + "&eventDate=" + eventDate;
-        andExprs.add(EntityCondition.makeCondition("eventDate", EntityOperator.GREATER_THAN, eventDate));
+        andExprs.add(EntityCondition.makeCondition("eventDate", EntityOperator.GREATER_THAN, ObjectType.simpleTypeConvert(eventDate, "Timestamp", null, null)));
     }
     
     if (productId) {

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.groovy (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.groovy Sat Oct 11 13:59:53 2008
@@ -34,12 +34,12 @@
 orderConditionList = [] as LinkedList;
 
 if (fromDateStr && !(fromDateStr.equals(""))) {
-    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
-    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDateStr, "Timestamp", null, null)));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDateStr, "Timestamp", null, null)));
 }
 if (thruDateStr && !(thruDateStr.equals(""))) {
-    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDateStr));
-    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruDateStr, "Timestamp", null, null)));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruDateStr, "Timestamp", null, null)));
 }
 if (marketingCampaignId && !(marketingCampaignId.equals(""))) {
     visitConditionList.add(EntityCondition.makeCondition("marketingCampaignId", EntityOperator.EQUALS, marketingCampaignId));

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy Sat Oct 11 13:59:53 2008
@@ -34,12 +34,12 @@
 orderConditionList = [] as LinkedList;
 
 if (fromDateStr && !(fromDateStr.equals(""))) {
-    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
-    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDateStr, "Timestamp", null, null)));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDateStr, "Timestamp", null, null)));
 }
 if (thruDateStr && !(thruDateStr.equals(""))) {
-     visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDateStr));
-     orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDateStr));
+     visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruDateStr, "Timestamp", null, null)));
+     orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruDateStr, "Timestamp", null, null)));
 }
 if (trackingCodeIdStr && !(trackingCodeIdStr.equals(""))) {
      visitConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, trackingCodeIdStr));

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.groovy Sat Oct 11 13:59:53 2008
@@ -40,10 +40,10 @@
 conditions = [EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, orderTypeId)];
 
 if (fromOrderDate && UtilValidate.isDate(fromOrderDate)){
-    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromOrderDate));
+    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromOrderDate, "Timestamp", null, null)));
 }
 if (thruOrderDate && UtilValidate.isDate(thruOrderDate)){
-    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruOrderDate));
+    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(thruOrderDate, "Timestamp", null, null)));
 }
 
 if (productStoreId) {

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.groovy?rev=703731&r1=703730&r2=703731&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.groovy Sat Oct 11 13:59:53 2008
@@ -72,10 +72,10 @@
 
 conditionList = [];
 if (fromDate) {
-    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(fromDate, "Timestamp", null, null)));
 }
 if (toDate) {
-    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, toDate));
+    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(toDate, "Timestamp", null, null)));
 }
 entityCondition = EntityCondition.makeCondition(conditionList, EntityOperator.AND);
 orderByList = ["orderTypeId", "orderStatus"];