ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ash...@apache.org
Subject svn commit: r1082880 - in /ofbiz/trunk/applications/order: config/OrderUiLabels.xml webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy webapp/ordermgr/order/orderstats.ftl
Date Fri, 18 Mar 2011 12:12:54 GMT
Author: ashish
Date: Fri Mar 18 12:12:54 2011
New Revision: 1082880

URL: http://svn.apache.org/viewvc?rev=1082880&view=rev
Log:
Following fix are done in this commit.
Bug #1 : Fixed typo ORDER_ORDERED = > ORDER_CREATED.
Bug #2 : Fixed order total amount for today, WTD, MTD and YTD, It was showing future created
order amounts.
Thanks Amit.

Modified:
    ofbiz/trunk/applications/order/config/OrderUiLabels.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderstats.ftl

Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=1082880&r1=1082879&r2=1082880&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Fri Mar 18 12:12:54 2011
@@ -2680,6 +2680,18 @@
         <value xml:lang="zh_CN">为报价建立请求</value>
         <value xml:lang="zh_TW">為報價建立要求</value>
     </property>
+    <property key="OrderCreated">
+        <value xml:lang="de">Erstellt</value>
+        <value xml:lang="en">Created</value>
+        <value xml:lang="es">Creado</value>
+        <value xml:lang="fr">Création</value>
+        <value xml:lang="it">Creato</value>
+        <value xml:lang="nl">Aangemaakt op</value>
+        <value xml:lang="ro">Creat</value>
+        <value xml:lang="ru">Создано</value>
+        <value xml:lang="th">สร้าง</value>
+        <value xml:lang="zh">已创建</value>
+    </property>
     <property key="OrderCreateExchangeOrder">
         <value xml:lang="en">Create Exchange Order</value>
         <value xml:lang="it">Creare ordine di cambio</value>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy?rev=1082880&r1=1082879&r2=1082880&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderStats.groovy
Fri Mar 18 12:12:54 2011
@@ -46,14 +46,20 @@ weekBegin = UtilDateTime.getWeekStart(no
 monthBegin = UtilDateTime.getMonthStart(nowTimestamp, timeZone, locale);
 yearBegin = UtilDateTime.getYearStart(nowTimestamp, timeZone, locale);
 
+dayEnd = UtilDateTime.getDayEnd(nowTimestamp, timeZone, locale);
+weekEnd = UtilDateTime.getWeekEnd(nowTimestamp, timeZone, locale);
+monthEnd = UtilDateTime.getMonthEnd(nowTimestamp, timeZone, locale);
+yearEnd = UtilDateTime.getYearEnd(nowTimestamp, timeZone, locale);
+
 // order status report
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS,
null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS,
null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
dayBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
dayBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO,
dayEnd)],
                     EntityOperator.AND);
 dayList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.dayOrder = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_ORDERED"]);
+context.dayOrder = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_CREATED"]);
 context.dayApprove = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_APPROVED"]);
 context.dayComplete = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_COMPLETED"]);
 context.dayCancelled = EntityUtil.filterByAnd(dayList, [statusId : "ORDER_CANCELLED"]);
@@ -62,10 +68,11 @@ context.dayRejected = EntityUtil.filterB
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS,
null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS,
null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
weekBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
weekBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO,
weekEnd)],
                     EntityOperator.AND);
 weekList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.weekOrder = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_ORDERED"]);
+context.weekOrder = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_CREATED"]);
 context.weekApprove = EntityUtil.filterByAnd(weekList, [statusId: "ORDER_APPROVED"]);
 context.weekComplete = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_COMPLETED"]);
 context.weekCancelled = EntityUtil.filterByAnd(weekList, [statusId : "ORDER_CANCELLED"]);
@@ -74,10 +81,11 @@ context.weekRejected = EntityUtil.filter
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS,
null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS,
null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
monthBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
monthBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO,
monthEnd)],
                     EntityOperator.AND);
 monthList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.monthOrder = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_ORDERED"]);
+context.monthOrder = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_CREATED"]);
 context.monthApprove = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_APPROVED"]);
 context.monthComplete = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_COMPLETED"]);
 context.monthCancelled = EntityUtil.filterByAnd(monthList, [statusId : "ORDER_CANCELLED"]);
@@ -86,10 +94,11 @@ context.monthRejected = EntityUtil.filte
 ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS,
null),
                         EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS,
null),
-                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
yearBegin)],
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO,
yearBegin),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.LESS_THAN_EQUAL_TO,
yearEnd)],
                     EntityOperator.AND);
 yearList = delegator.findList("OrderStatus", ecl, null, null, null, false);
-context.yearOrder = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_ORDERED"]);
+context.yearOrder = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_CREATED"]);
 context.yearApprove = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_APPROVED"]);
 context.yearComplete = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_COMPLETED"]);
 context.yearCancelled = EntityUtil.filterByAnd(yearList, [statusId : "ORDER_CANCELLED"]);
@@ -100,6 +109,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
dayBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
dayEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 dayItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -109,10 +119,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
dayBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
dayEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 dayHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, [statusId : "ORDER_ORDERED"]);
+dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, [statusId : "ORDER_CREATED"]);
 
 dayItemTotal = calcItemTotal(dayHeaders);
 dayItemCount = calcItemCount(dayItems);
@@ -131,6 +142,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
weekBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
weekEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 weekItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -140,10 +152,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
weekBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
weekEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 weekHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, [statusId : "ORDER_ORDERED"]);
+weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, [statusId : "ORDER_CREATED"]);
 
 weekItemTotal = calcItemTotal(weekHeaders);
 weekItemCount = calcItemCount(weekItems);
@@ -162,6 +175,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
monthBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
monthEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 monthItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -171,10 +185,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
monthBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
monthEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 monthHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, [statusId : "ORDER_ORDERED"]);
+monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, [statusId : "ORDER_CREATED"]);
 
 monthItemTotal = calcItemTotal(monthHeaders);
 monthItemCount = calcItemCount(monthItems);
@@ -193,6 +208,7 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_REJECTED"),
                         EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL,
"ITEM_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
yearBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
yearEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 yearItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
@@ -202,10 +218,11 @@ ecl = EntityCondition.makeCondition([
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_REJECTED"),
                         EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"ORDER_CANCELLED"),
                         EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO,
yearBegin),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO,
yearEnd),
                         EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS,
"SALES_ORDER")],
                     EntityOperator.AND);
 yearHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
-yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, [statusId : "ORDER_ORDERED"]);
+yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, [statusId : "ORDER_CREATED"]);
 
 yearItemTotal = calcItemTotal(yearHeaders);
 yearItemCount = calcItemCount(yearItems);
@@ -221,7 +238,7 @@ context.yearItemTotalPaid = yearItemTota
 context.yearItemCountPaid = yearItemCountPaid;
 
 // order state report
-waitingPayment = delegator.findByAnd("OrderHeader", [statusId : "ORDER_ORDERED", orderTypeId
: "SALES_ORDER"]);
+waitingPayment = delegator.findByAnd("OrderHeader", [statusId : "ORDER_CREATED", orderTypeId
: "SALES_ORDER"]);
 context.waitingPayment = waitingPayment.size();
 
 waitingApproval = delegator.findByAnd("OrderHeader", [statusId : "ORDER_PROCESSING", orderTypeId
: "SALES_ORDER"]);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderstats.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderstats.ftl?rev=1082880&r1=1082879&r2=1082880&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderstats.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderstats.ftl Fri Mar 18 12:12:54
2011
@@ -128,7 +128,7 @@ under the License.
           </tr>
           <tr class="alternate-row">
             <td>&nbsp;</td>
-            <td>${uiLabelMap.OrderOrdered}</td>
+            <td>${uiLabelMap.OrderCreated}</td>
             <td align="right">${dayOrder?size?default(0)?string.number}</td>
             <td align="right">${weekOrder?size?default(0)?string.number}</td>
             <td align="right">${monthOrder?size?default(0)?string.number}</td>



Mime
View raw message