From 07497e8cf66da5ca71ac041ff42ec3a26ed4bb5b Mon Sep 17 00:00:00 2001 From: Jacopo Cappellato Date: Fri, 4 May 2007 16:13:57 +0000 Subject: [PATCH] Added payment method drop down box to the quick return screen. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@535310 13f79535-47bb-0310-9956-ffa450edef68 --- .../WEB-INF/actions/return/quickReturn.bsh | 14 ++++++++++ .../webapp/ordermgr/return/quickReturn.ftl | 28 ++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) 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. <#include "returnItemInc.ftl"/> +
+

${uiLabelMap.FormFieldTitle_paymentMethodId}:

+ + +
+ <#if creditCardList?exists || eftAccountList?exists> + + <#else> + + + <#if (party.partyId)?has_content> + ${uiLabelMap.AccountingCreateNewCreditCard} + +
-

${uiLabelMap.OrderReturnShipFromAddress}: