svn commit: r553750 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh

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

svn commit: r553750 - /ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh

jacopoc
Author: jacopoc
Date: Thu Jul  5 23:10:00 2007
New Revision: 553750

URL: http://svn.apache.org/viewvc?view=rev&rev=553750
Log:
Applied patch by Rashko Rejmer (OFBIZ-1125) to pull the value of the maxAmount field and use it as a default value for the payment auth screen (if a payment preference is passed).

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh?view=diff&rev=553750&r1=553749&r2=553750
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.bsh Thu Jul  5 23:10:00 2007
@@ -29,6 +29,12 @@
    context.put("orderHeader", orderHeader);
 }
 
+if(orderHeader != null){
+   orh = new OrderReadHelper(orderHeader);
+   context.put("orh", orh);
+   context.put("overrideAmount", new Double(orh.getOrderGrandTotal()));
+}
+
 if(orderPaymentPreferenceId != null){
    orderPaymentPreference = delegator.findByPrimaryKey("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId));
    context.put("orderPaymentPreference", orderPaymentPreference);
@@ -37,10 +43,5 @@
 if(orderPaymentPreference != null){
    paymentMethodType = orderPaymentPreference.getRelatedOneCache("PaymentMethodType");
    context.put("paymentMethodType", paymentMethodType);
-}
-
-if(orderHeader != null){
-   orh = new OrderReadHelper(orderHeader);
-   context.put("orh", orh);
-   context.put("overrideAmount", new Double(orh.getOrderGrandTotal()));
+   context.put("overrideAmount", orderPaymentPreference.getDouble("maxAmount").doubleValue());
 }