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).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@553750 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+7
-6
@@ -29,6 +29,12 @@ if(orderId != null){
|
||||
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(orderPaymentPreferenceId != null){
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user