svn commit: r600765 - in /ofbiz/trunk/applications/order: entitydef/eecas.xml src/org/ofbiz/order/order/OrderServices.java webapp/ordermgr/order/orderpaymentinfo.ftl

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

svn commit: r600765 - in /ofbiz/trunk/applications/order: entitydef/eecas.xml src/org/ofbiz/order/order/OrderServices.java webapp/ordermgr/order/orderpaymentinfo.ftl

apatel-2
Author: apatel
Date: Mon Dec  3 17:38:27 2007
New Revision: 600765

URL: http://svn.apache.org/viewvc?rev=600765&view=rev
Log:
Fix for Bug in Creating OrderPaymentPreference Record from OrderView Screen.

Ashish thanks for reporting this bug and providing fix for it.

Modified:
    ofbiz/trunk/applications/order/entitydef/eecas.xml
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl

Modified: ofbiz/trunk/applications/order/entitydef/eecas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/eecas.xml?rev=600765&r1=600764&r2=600765&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/eecas.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/eecas.xml Mon Dec  3 17:38:27 2007
@@ -41,6 +41,7 @@
 
     <eca entity="OrderPaymentPreference" operation="create-store" event="return">
         <condition field-name="orderPaymentPreferenceId" operator="is-not-empty"/>
+        <condition field-name="statusId" operator="is-not-empty"/>
         <action service="changeOrderPaymentStatus" mode="sync"/>
     </eca>
 </entity-eca>

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=600765&r1=600764&r2=600765&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec  3 17:38:27 2007
@@ -4527,6 +4527,7 @@
         try {
             GenericValue orderPaymentPreference = delegator.findByPrimaryKey("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId));
             String orderId = orderPaymentPreference.getString("orderId");
+            String statusUserLogin = orderPaymentPreference.getString("createdByUserLogin");
             GenericValue orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId));
             if (orderHeader == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorCouldNotChangeOrderStatusOrderCannotBeFound", locale));
@@ -4540,7 +4541,7 @@
             orderStatus.put("orderId", orderId);
             orderStatus.put("orderPaymentPreferenceId", orderPaymentPreferenceId);
             orderStatus.put("statusDatetime", UtilDateTime.nowTimestamp());
-            orderStatus.put("statusUserLogin", userLogin.getString("userLoginId"));
+            orderStatus.put("statusUserLogin", statusUserLogin);
             orderStatus.put("changeReason", changeReason);
 
             orderStatus.create();

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl?rev=600765&r1=600764&r2=600765&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl Mon Dec  3 17:38:27 2007
@@ -34,12 +34,14 @@
          <#assign orderPaymentStatuses = orderReadHelper.getOrderPaymentStatuses()>
          <#if orderPaymentStatuses?has_content>
            <#list orderPaymentStatuses as orderPaymentStatus>
-             <#assign statusItem = orderPaymentStatus.getRelatedOne("StatusItem")>
-             <div class="tabletext">
-               ${statusItem.get("description",locale)} - ${orderPaymentStatus.statusDatetime?default("0000-00-00 00:00:00")?string}
-               &nbsp;
-               ${uiLabelMap.CommonBy} - [${orderPaymentStatus.statusUserLogin}]
-             </div>
+             <#assign statusItem = orderPaymentStatus.getRelatedOne("StatusItem")?if_exists>
+             <#if statusItem?has_content>
+                <div class="tabletext">
+                  ${statusItem.get("description",locale)} - ${orderPaymentStatus.statusDatetime?default("0000-00-00 00:00:00")?string}
+                  &nbsp;
+                  ${uiLabelMap.CommonBy} - [${orderPaymentStatus.statusUserLogin?if_exists}]
+                </div>
+             </#if>
            </#list>
          </#if>
        </td>