svn commit: r936260 - in /ofbiz/trunk/applications/order: servicedef/services.xml src/org/ofbiz/order/order/OrderServices.java

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

svn commit: r936260 - in /ofbiz/trunk/applications/order: servicedef/services.xml src/org/ofbiz/order/order/OrderServices.java

ashish-18
Author: ashish
Date: Wed Apr 21 11:35:55 2010
New Revision: 936260

URL: http://svn.apache.org/viewvc?rev=936260&view=rev
Log:
Adding statusId optional input parameter in createOrderPaymentPreference service.
Thanks Divesh for the contribution.

Modified:
    ofbiz/trunk/applications/order/servicedef/services.xml
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: ofbiz/trunk/applications/order/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?rev=936260&r1=936259&r2=936260&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Wed Apr 21 11:35:55 2010
@@ -432,6 +432,7 @@ under the License.
         <attribute name="orderId" type="String" mode="IN"/>
         <attribute name="paymentMethodTypeId" type="String" mode="IN"/>
         <attribute name="paymentMethodId" type="String" mode="IN" optional="true"/>
+        <attribute name="statusId" type="String" mode="IN" optional="true"/>
         <attribute name="maxAmount" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="orderPaymentPreferenceId" type="String" mode="OUT"/>
     </service>

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=936260&r1=936259&r2=936260&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 Wed Apr 21 11:35:55 2010
@@ -2574,6 +2574,7 @@ public class OrderServices {
         Map result = new HashMap();
         Delegator delegator = ctx.getDelegator();
         String orderId = (String) context.get("orderId");
+        String statusId = (String) context.get("statusId");
         String paymentMethodTypeId = (String) context.get("paymentMethodTypeId");
         String paymentMethodId = (String) context.get("paymentMethodId");
         BigDecimal maxAmount = (BigDecimal) context.get("maxAmount");
@@ -2591,6 +2592,10 @@ public class OrderServices {
         Map fields = UtilMisc.toMap("orderPaymentPreferenceId", prefId, "orderId", orderId, "paymentMethodTypeId",
                 paymentMethodTypeId, "paymentMethodId", paymentMethodId, "maxAmount", maxAmount);
 
+        if (statusId != null) {
+            fields.put("statusId", statusId);
+        }
+
         try {
             GenericValue v = delegator.makeValue("OrderPaymentPreference", fields);
             v.set("createdDate", UtilDateTime.nowTimestamp());