Author: jonesde
Date: Tue Mar 27 21:43:38 2007 New Revision: 523171 URL: http://svn.apache.org/viewvc?view=rev&rev=523171 Log: Added section to the profile page to show account histories; this should probably go on another page as histories could get long, but will do that later Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl (with props) Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl?view=auto&rev=523171 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl (added) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl Tue Mar 27 21:43:38 2007 @@ -0,0 +1,102 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<table border="0" cellpadding="1"> + <tr> + <td align="right" width="25%"><div class="tableheadtext">Account Number:</div></td> + <td><div class="tabletext">${ownedFinAccount.finAccountId}</div></td> + </tr> + <tr> + <td align="right"><div class="tableheadtext">Currency:</div></td> + <td><div class="tabletext">${(accountCurrencyUom.description)?if_exists} [${ownedFinAccount.currencyUomId?if_exists}]</div></td> + </tr> + <tr> + <td align="right"><div class="tableheadtext">Date Opened:</div></td> + <td><div class="tabletext">${ownedFinAccount.fromDate?if_exists}</div></td> + </tr> + <tr> + <td align="right"><div class="tableheadtext">Is Frozen:</div></td> + <td><div class="tabletext">${ownedFinAccount.isFrozen?default("N")}</div></td> + </tr> + <#if ownedFinAccount.replenishLevel?exists> + <tr> + <td align="right"><div class="tableheadtext">Replenish Level:</div></td> + <td><div class="tabletext">${ownedFinAccount.replenishLevel}</div></td> + </tr> + </#if> +</table> + +<table border="0" cellpadding="1" border="2"> + <tr> + <th>Transaction ${uiLabelMap.CommonDate}</th> + <th>ID</th> + <th>Type</th> + <th>Amount</th> + </tr> + <#list ownedFinAccountTransList as ownedFinAccountTrans> + <#assign finAccountTransType = ownedFinAccountTrans.getRelatedOne("FinAccountTransType")/> + <#assign displayAmount = ownedFinAccountTrans.amount/> + <#if ownedFinAccountTrans.finAccountTransTypeId == "WITHDRAWAL"> + <#assign displayAmount = -displayAmount/> + </#if> + <tr> + <td>${ownedFinAccountTrans.transactionDate?if_exists}</td> + <td>${ownedFinAccountTrans.finAccountTransId}</td> + <td>${finAccountTransType.description?default(ownedFinAccountTrans.finAccountTransTypeId)?if_exists}</td> + <td><@ofbizCurrency amount=displayAmount isoCode=ownedFinAccount.currencyUomId/></td> + </tr> + </#list> + <tr> + <th>Actual Balance</th> + <td> </td> + <td> </td> + <th><@ofbizCurrency amount=ownedFinAccount.actualBalance isoCode=ownedFinAccount.currencyUomId/></th> + </tr> +</table> + +<#if ownedFinAccountAuthList?has_content> +<table border="0" cellpadding="1"> + <tr> + <th>Authorization ${uiLabelMap.CommonDate}</th> + <th>ID</th> + <th>Expires</th> + <th>Amount</th> + </tr> + <tr> + <td>Actual Balance</td> + <td> </td> + <td> </td> + <td><@ofbizCurrency amount=ownedFinAccount.actualBalance isoCode=ownedFinAccount.currencyUomId/></td> + </tr> + <#list ownedFinAccountAuthList as ownedFinAccountAuth> + <tr> + <td>${ownedFinAccountAuth.authorizationDate?if_exists}</td> + <td>${ownedFinAccountAuth.finAccountAuthId}</td> + <td>${ownedFinAccountAuth.thruDate?if_exists}</td> + <td><@ofbizCurrency amount=-ownedFinAccountAuth.amount isoCode=ownedFinAccount.currencyUomId/></td> + </tr> + </#list> + <tr> + <th>Available Balance</th> + <td> </td> + <td> </td> + <th><@ofbizCurrency amount=ownedFinAccount.availableBalance isoCode=ownedFinAccount.currencyUomId/></th> + </tr> +</table> +</#if> Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl?view=diff&rev=523171&r1=523170&r2=523171 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl Tue Mar 27 21:43:38 2007 @@ -559,6 +559,8 @@ <#-- only 5 messages will show; edit the viewprofile.bsh to change this number --> ${screens.render("component://ecommerce/widget/CustomerScreens.xml#messagelist-include")} +${screens.render("component://ecommerce/widget/CustomerScreens.xml#FinAccountList-include")} + <#else> <div class="head3">${uiLabelMap.PartyNoPartyForCurrentUserName}: ${userLogin.userLoginId}</div> </#if> Modified: ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml?view=diff&rev=523171&r1=523170&r2=523171 ============================================================================== --- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original) +++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Tue Mar 27 21:43:38 2007 @@ -398,4 +398,53 @@ </widgets> </section> </screen> + + <!-- simple screens for FinAccount summary --> + <screen name="FinAccountList-include"> + <section> + <actions> + <entity-condition entity-name="FinAccount" list-name="ownedFinAccountList" filter-by-date="true"> + <condition-list combine="and"> + <condition-expr field-name="ownerPartyId" operator="equals" env-name="userLogin.partyId"/> + <condition-expr field-name="organizationPartyId" operator="equals" env-name="productStore.payToPartyId"/> + </condition-list> + <order-by field-name="-fromDate"/> + </entity-condition> + </actions> + <widgets> + <section> + <condition><not><if-empty field-name="ownedFinAccountList"/></not></condition> + <widgets> + <container id="fin-account-list" style="screenlet"> + <container style="screenlet-header"> + <label style="boxhead" text="My Accounts"/> + </container> + <container style="screenlet-body"> + <iterate-section entry-name="ownedFinAccount" list-name="ownedFinAccountList"> + <section> + <actions> + <entity-condition entity-name="FinAccountTrans" list-name="ownedFinAccountTransList"> + <condition-expr field-name="finAccountId" env-name="ownedFinAccount.finAccountId"/> + <order-by field-name="transactionDate"/> + </entity-condition> + <entity-condition entity-name="FinAccountAuth" list-name="ownedFinAccountAuthList" filter-by-date="true"> + <condition-expr field-name="finAccountId" env-name="ownedFinAccount.finAccountId"/> + <order-by field-name="authorizationDate"/> + </entity-condition> + <entity-one entity-name="Uom" value-name="accountCurrencyUom" auto-field-map="false" use-cache="true"> + <field-map field-name="uomId" env-name="ownedFinAccount.currencyUomId"/> + </entity-one> + </actions> + <widgets> + <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl"/></html></platform-specific> + </widgets> + </section> + </iterate-section> + </container> + </container> + </widgets> + </section> + </widgets> + </section> + </screen> </screens> |
Free forum by Nabble | Edit this page |