diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh b/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh index 47de117b4b..13ba1a481f 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh @@ -19,6 +19,7 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.*; +import org.ofbiz.entity.util.*; import org.ofbiz.order.order.*; import org.ofbiz.party.contact.*; import org.ofbiz.product.store.*; @@ -53,6 +54,19 @@ if (orderId != null) { context.put("orderHeaderAdjustments", orh.getAvailableOrderHeaderAdjustments()); } +// payment method info +if (partyId != null) { + List creditCardList = EntityUtil.filterByDate(delegator.findByAnd("PaymentMethodAndCreditCard", UtilMisc.toMap("partyId", partyId))); + if (UtilValidate.isNotEmpty(creditCardList)) { + context.put("creditCardList", creditCardList); + } + List eftAccountList = EntityUtil.filterByDate(delegator.findByAnd("PaymentMethodAndEftAccount", UtilMisc.toMap("partyId", partyId))); + if (UtilValidate.isNotEmpty(eftAccountList)) { + context.put("eftAccountList", eftAccountList); + } +} + + returnTypes = delegator.findAll("ReturnType", UtilMisc.toList("sequenceId")); context.put("returnTypes", returnTypes); diff --git a/applications/order/webapp/ordermgr/return/quickReturn.ftl b/applications/order/webapp/ordermgr/return/quickReturn.ftl index f7d9073219..5f5ecb5afa 100644 --- a/applications/order/webapp/ordermgr/return/quickReturn.ftl +++ b/applications/order/webapp/ordermgr/return/quickReturn.ftl @@ -37,12 +37,38 @@ under the License. #if> <#include "returnItemInc.ftl"/> +
| + <#if creditCardList?exists || eftAccountList?exists> + + <#else> + + #if> + <#if (party.partyId)?has_content> + ${uiLabelMap.AccountingCreateNewCreditCard} + #if> + |
${uiLabelMap.OrderReturnShipFromAddress}: |
|||||||
|
|