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:
Jacopo Cappellato
2007-05-04 16:13:57 +00:00
parent d96fefae12
commit 07497e8cf6
2 changed files with 41 additions and 1 deletions
@@ -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:&nbsp;${Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)}</option>
</#list>
</#if>
<#if eftAccountList?has_content>
<#list eftAccountList as eftAccount>
<option value="${eftAccount.paymentMethodId}">EFT:&nbsp;${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%">