From ef2dc869d73af8b2f65ae1cb6c8ada6ac381fc37 Mon Sep 17 00:00:00 2001 From: Andrew Zeneski Date: Tue, 27 Mar 2007 04:13:30 +0000 Subject: [PATCH] UI to display financial accounts in checkout (for use as payment) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@522737 13f79535-47bb-0310-9956-ffa450edef68 --- .../WEB-INF/actions/entry/checkoutpayment.bsh | 5 +++++ .../webapp/ordermgr/entry/checkoutoptions.ftl | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh index fe8f4771bb..6a256f702c 100644 --- a/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh +++ b/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutpayment.bsh @@ -40,6 +40,11 @@ if (cart != null) { } } +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); diff --git a/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl b/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl index 77a6d82459..1809e99dab 100644 --- a/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl +++ b/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl @@ -354,12 +354,26 @@ function toggleBillingAccount(box) {
+ <#-- financial accounts --> + <#list finAccounts as finAccount> + + + checked="checked"/> + + + ${uiLabelMap.FinancialAccount} #${finAccount.finAccountId} + + + + <#if !paymentMethodList?has_content> + <#if (!finAccounts?has_content)>
${uiLabelMap.AccountingNoPaymentMethodsOnFile}.
+ <#else> <#list paymentMethodList as paymentMethod> <#if paymentMethod.paymentMethodTypeId == "CREDIT_CARD">