svn commit: r535310 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/return/quickReturn.bsh return/quickReturn.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r535310 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/return/quickReturn.bsh return/quickReturn.ftl

jacopoc
Author: jacopoc
Date: Fri May  4 09:13:57 2007
New Revision: 535310

URL: http://svn.apache.org/viewvc?view=rev&rev=535310
Log:
Added payment method drop down box to the quick return screen.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh?view=diff&rev=535310&r1=535309&r2=535310
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/quickReturn.bsh Fri May  4 09:13:57 2007
@@ -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.*;
@@ -52,6 +53,19 @@
     context.put("toPartyId", productStore.getString("payToPartyId"));
     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);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl?view=diff&rev=535310&r1=535309&r2=535310
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl Fri May  4 09:13:57 2007
@@ -37,12 +37,38 @@
           <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%">