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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -37,12 +37,38 @@ under the License.
|
||||
<input type="hidden" name="currencyUomId" value="${orderHeader.currencyUom}"/>
|
||||
</#if>
|
||||
<#include "returnItemInc.ftl"/>
|
||||
<hr/>
|
||||
<h3>${uiLabelMap.FormFieldTitle_paymentMethodId}:</h3>
|
||||
<table cellspacing="1" cellpadding="2" width="100%">
|
||||
<tr><td>
|
||||
<#if creditCardList?exists || eftAccountList?exists>
|
||||
<select name='paymentMethodId'>
|
||||
<option value=""></option>
|
||||
<#if creditCardList?has_content>
|
||||
<#list creditCardList as creditCardPm>
|
||||
<#assign creditCard = creditCardPm.getRelatedOne("CreditCard")>
|
||||
<option value="${creditCard.paymentMethodId}">CC: ${Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)}</option>
|
||||
</#list>
|
||||
</#if>
|
||||
<#if eftAccountList?has_content>
|
||||
<#list eftAccountList as eftAccount>
|
||||
<option value="${eftAccount.paymentMethodId}">EFT: ${eftAccount.nameOnAccount?if_exists}, ${eftAccount.accountNumber?if_exists}</option>
|
||||
</#list>
|
||||
</#if>
|
||||
</select>
|
||||
<#else>
|
||||
<input type='text' size='20' name='paymentMethodId'>
|
||||
</#if>
|
||||
<#if (party.partyId)?has_content>
|
||||
<a href="/partymgr/control/editcreditcard?partyId=${party.partyId}${externalKeyParam}" target="partymgr" class="smallSubmit">${uiLabelMap.AccountingCreateNewCreditCard}</a>
|
||||
</#if>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr><td colspan="8"><hr class="sepbar"></td></tr>
|
||||
<tr>
|
||||
<td colspan="8"><div class="head3">${uiLabelMap.OrderReturnShipFromAddress}:</td>
|
||||
</tr>
|
||||
<tr><td colspan="8"><hr class="sepbar"></td></tr>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<table cellspacing="1" cellpadding="2" width="100%">
|
||||
|
||||
Reference in New Issue
Block a user