Author: jaz
Date: Mon Mar 26 21:13:30 2007
New Revision: 522737
URL:
http://svn.apache.org/viewvc?view=rev&rev=522737Log:
UI to display financial accounts in checkout (for use as payment)
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh
ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh?view=diff&rev=522737&r1=522736&r2=522737==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh Mon Mar 26 21:13:30 2007
@@ -40,6 +40,11 @@
}
}
+finAccounts = delegator.findByAnd("FinAccountAndRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", "OWNER"));
+finAccounts = EntityUtil.filterByDate(finAccounts, UtilDateTime.nowTimestamp(), "roleFromDate", "roleThruDate", true);
+finAccounts = EntityUtil.filterByDate(finAccounts);
+context.put("finAccounts",finAccounts);
+
context.put("shoppingCart", cart);
context.put("userLogin", userLogin);
context.put("productStoreId", productStoreId);
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl?view=diff&rev=522737&r1=522736&r2=522737==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl Mon Mar 26 21:13:30 2007
@@ -354,12 +354,26 @@
</#if>
<tr><td colspan="2"><hr class="sepbar"/></td></tr>
+ <#-- financial accounts -->
+ <#list finAccounts as finAccount>
+ <tr>
+ <td width="1%">
+ <input type="radio" name="checkOutPaymentId" value="FIN_ACCOUNT|${finAccount.finAccountId}" <#if "FIN_ACCOUNT" == checkOutPaymentId>checked="checked"</#if>/>
+ </td>
+ <td width="50%">
+ <span class="tabletext">${uiLabelMap.FinancialAccount} #${finAccount.finAccountId}</span>
+ </td>
+ </tr>
+ </#list>
+
<#if !paymentMethodList?has_content>
+ <#if (!finAccounts?has_content)>
<tr>
<td colspan="2">
<div class="tabletext"><b>${uiLabelMap.AccountingNoPaymentMethodsOnFile}.</b></div>
</td>
</tr>
+ </#if>
<#else>
<#list paymentMethodList as paymentMethod>
<#if paymentMethod.paymentMethodTypeId == "CREDIT_CARD">