Author: lektran
Date: Thu Apr 26 03:43:52 2007 New Revision: 532696 URL: http://svn.apache.org/viewvc?view=rev&rev=532696 Log: Applied the following patches from the trunk: rev. 532031: fixed label for serial number rev. 532060: applied patches from Joe Eckard JIRA Issue OFBIZ-924 rev. 532067: fixed external links to include the externalKeyParam rev. 532489: Fix for Double type parameter preventing refunds in the updateReturnHeader service rev. 532505: added missing label rev. 532506(partial): fixed replenish code to use the defined paymentMethod instead of picking one off the user's account rev. 532531: fix missing import of BigDecimal Added: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl (with props) Modified: ofbiz/branches/release4.0/applications/accounting/config/AccountingUiLabels.properties ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderinfo.ftl ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/viewprofile.ftl ofbiz/branches/release4.0/applications/party/widget/partymgr/CommonScreens.xml ofbiz/branches/release4.0/applications/party/widget/partymgr/PartyScreens.xml Modified: ofbiz/branches/release4.0/applications/accounting/config/AccountingUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/config/AccountingUiLabels.properties?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/accounting/config/AccountingUiLabels.properties (original) +++ ofbiz/branches/release4.0/applications/accounting/config/AccountingUiLabels.properties Thu Apr 26 03:43:52 2007 @@ -777,6 +777,7 @@ FormFieldTitle_workEffortId=Work Effort Id AccountingFinAccount=Financial Account +AccountingFinAccounts=Financial Accounts AccountingFindFinAccount=Find Financial Account AccountingEditFinAccount=Create/Update Financial Account AccountingFinAccountTransations=Transactions Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original) +++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Thu Apr 26 03:43:52 2007 @@ -693,19 +693,23 @@ return ServiceUtil.returnSuccess(); } - // determine the payment method to use to replenish - List paymentMethods; + // get the payment method to use to replenish + String paymentMethodId = finAccount.getString("replenishPaymentId"); + if (paymentMethodId == null) { + Debug.logWarning("No payment method attached to financial account [" + finAccountId + "] cannot auto-replenish", module); + return ServiceUtil.returnSuccess(); + } + + GenericValue paymentMethod; try { - paymentMethods = delegator.findByAnd("PaymentMethod", UtilMisc.toMap("partyId", ownerPartyId), UtilMisc.toList("-fromDate")); + paymentMethod = delegator.findByPrimaryKey("PaymentMethod", UtilMisc.toMap("paymentMethodId", paymentMethodId)); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - paymentMethods = EntityUtil.filterByDate(paymentMethods); - GenericValue paymentMethod = EntityUtil.getFirst(paymentMethods); if (paymentMethod == null) { // no payment methods on file; cannot replenish - Debug.logWarning("No payment methods attached to party [" + ownerPartyId + "] cannot auto-replenish", module); + Debug.logWarning("No payment method found for ID [" + paymentMethodId + "] for party [" + ownerPartyId + "] cannot auto-replenish", module); return ServiceUtil.returnSuccess(); } Modified: ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original) +++ ofbiz/branches/release4.0/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Thu Apr 26 03:43:52 2007 @@ -151,7 +151,7 @@ <if-not-empty field-name="returnItem.orderId"> <set field="returnTotalCtx.orderId" from-field="returnItem.orderId"/> <!-- no adjustment needed: adjustment is passed in to calculate the effect of an additional item on return total. --> - <calculate field-name="returnTotalCtx.adjustment"><number value="0.0"/></calculate> + <calculate field-name="returnTotalCtx.adjustment" type="BigDecimal"><number value="0.0"/></calculate> <call-service service-name="getOrderAvailableReturnedTotal" in-map-name="returnTotalCtx"> <result-to-field result-name="availableReturnTotal" field-name="availableReturnTotal"/> <result-to-field result-name="returnTotal" field-name="returnTotal"/> Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh (original) +++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh Thu Apr 26 03:43:52 2007 @@ -20,6 +20,7 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.order.order.OrderReadHelper; +import java.math.BigDecimal; dispatcher = request.getAttribute("dispatcher"); delegator = request.getAttribute("delegator"); Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderinfo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderinfo.ftl?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderinfo.ftl (original) +++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderinfo.ftl Thu Apr 26 03:43:52 2007 @@ -134,7 +134,7 @@ <td align="left" valign="top" width="80%"> <div class="tabletext"> <#if orderHeader.productStoreId?has_content> - <a href="/catalog/control/EditProductStore?productStoreId=${orderHeader.productStoreId}" target="catalogmgr" class="buttontext">${orderHeader.productStoreId}</a> + <a href="/catalog/control/EditProductStore?productStoreId=${orderHeader.productStoreId}${externalKeyParam}" target="catalogmgr" class="buttontext">${orderHeader.productStoreId}</a> <#else> ${uiLabelMap.CommonNA} </#if> @@ -166,7 +166,7 @@ <td align="left" valign="top" width="80%"> <div class="tabletext"> <#if orderHeader.createdBy?has_content> - <a href="/partymgr/control/viewprofile?userlogin_id=${orderHeader.createdBy}" target="partymgr" class="buttontext">${orderHeader.createdBy}</a> + <a href="/partymgr/control/viewprofile?userlogin_id=${orderHeader.createdBy}${externalKeyParam}" target="partymgr" class="buttontext">${orderHeader.createdBy}</a> <#else> [${uiLabelMap.CommonNotSet}] </#if> Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl (original) +++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl Thu Apr 26 03:43:52 2007 @@ -503,7 +503,7 @@ <b><i>${uiLabelMap.FacilityInventory}</i>:</b> <a href="/facility/control/EditInventoryItem?inventoryItemId=${itemIssuance.inventoryItemId}&externalLoginKey=${externalLoginKey}" class="buttontext" style="font-size: xx-small;">${itemIssuance.inventoryItemId}</a> <b><i>${uiLabelMap.OrderShipGroup}</i>:</b> ${itemIssuance.shipGroupSeqId} - <#if (inventoryItem.serialNumber?has_content)><br><b><i>${uiLabelMap.SerialNumber}</li>:</b> ${inventoryItem.serialNumber} </#if> + <#if (inventoryItem.serialNumber?has_content)><br><b><i>${uiLabelMap.ProductSerialNumber}</li>:</b> ${inventoryItem.serialNumber} </#if> </#if> </div> Added: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl?view=auto&rev=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl (added) +++ ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl Thu Apr 26 03:43:52 2007 @@ -0,0 +1,105 @@ +<#-- +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. +--> + +<p> + <b>Account Number:</b> <a href="/accounting/control/EditFinAccount?finAccountId=${ownedFinAccount.finAccountId}${externalKeyParam}" + class="smallSubmit">${ownedFinAccount.finAccountId}</a> + <b>Type:</b> ${(ownedFinAccountType.description)?default('N/A')} + <b>Name:</b> ${ownedFinAccount.finAccountName?if_exists} +</p> +<p> + <b>Currency:</b> ${(accountCurrencyUom.description)?if_exists} [${ownedFinAccount.currencyUomId?if_exists}] + <b>Date Opened:</b> ${ownedFinAccount.fromDate?if_exists} + <b>Is Frozen:</b> ${ownedFinAccount.isFrozen?default('N')} + <#if ownedFinAccount.replenishLevel?exists> + <b>Replenish Level:</b> <@ofbizCurrency amount=ownedFinAccount.replenishLevel isoCode=ownedFinAccount.currencyUomId/> + </#if> +</p> +<br /> +<table id="fa-transactions" class="basic-table" cellspacing="0" cellpadding="2"> + <thead> + <tr class="header-row"> + <td>Transaction ${uiLabelMap.CommonDate}</td> + <td>ID</td> + <td>Order Item</td> + <td>Payment</td> + <td>Type</td> + <td>Amount</td> + </tr> + </thead> + <tbody> + <#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>${ownedFinAccountTrans.orderId?if_exists}:${ownedFinAccountTrans.orderItemSeqId?if_exists}</td> + <td>${ownedFinAccountTrans.paymentId?if_exists}</td> + <td>${finAccountTransType.description?default(ownedFinAccountTrans.finAccountTransTypeId)?if_exists}</td> + <td><@ofbizCurrency amount=displayAmount isoCode=ownedFinAccount.currencyUomId/></td> + </tr> + </#list> + </tbody> + <tfoot> + <tr><td colspan="6"><hr /></td></tr> + <tr> + <td colspan="5"><b>Actual Balance</b></td> + <td><b><@ofbizCurrency amount=ownedFinAccount.actualBalance isoCode=ownedFinAccount.currencyUomId/></b></td> + </tr> + </tfoot> +</table> + +<#if ownedFinAccountAuthList?has_content> + <br /> + <table id="fa-authorizations" class="basic-table" cellspacing="0" cellpadding="2"> + <thead> + <tr class="header-row"> + <td>Authorization ${uiLabelMap.CommonDate}</td> + <td>ID</td> + <td>Expires</td> + <td>Amount</td> + </tr> + </thead> + <tbody> + <#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> + </tbody> + <tfoot> + <tr><td colspan="4"><hr /></td></tr> + <tr> + <td colspan="3"><b>Actual Balance</b></td> + <td><b><@ofbizCurrency amount=ownedFinAccount.actualBalance isoCode=ownedFinAccount.currencyUomId/></b></td> + </tr> + <tr> + <td colspan="3"><b>Available Balance</b></td> + <td><b><@ofbizCurrency amount=ownedFinAccount.availableBalance isoCode=ownedFinAccount.currencyUomId/></b></td> + </tr> + </tfoot> + </table> +</#if> Propchange: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/FinAccountDetail.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/viewprofile.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/viewprofile.ftl?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/viewprofile.ftl (original) +++ ofbiz/branches/release4.0/applications/party/webapp/partymgr/party/viewprofile.ftl Thu Apr 26 03:43:52 2007 @@ -406,6 +406,9 @@ </div> </div> + <#-- Financial Account Summary --> + ${screens.render('component://party/widget/partymgr/PartyScreens.xml#FinAccountSummary')} + <#-- UserLogins --> <div id="partyUserLogins" class="screenlet"> <div class="screenlet-title-bar"> Modified: ofbiz/branches/release4.0/applications/party/widget/partymgr/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/widget/partymgr/CommonScreens.xml?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/party/widget/partymgr/CommonScreens.xml (original) +++ ofbiz/branches/release4.0/applications/party/widget/partymgr/CommonScreens.xml Thu Apr 26 03:43:52 2007 @@ -100,6 +100,8 @@ text="${uiLabelMap.AccountingPaymentsSent}"/> <link target="/accounting/control/findPayments?lookupFlag=Y&hideFields=Y&partyIdFrom=${partyId}&externaLoginKey=${externalLoginKey}" url-mode="inter-app" text="${uiLabelMap.AccountingPaymentsReceived}"/> + <link target="/accounting/control/FindFinAccount?ownerPartyId=${partyId}" url-mode="inter-app" + text="${uiLabelMap.AccountingFinAccounts}"/> </widgets> </section> </container> Modified: ofbiz/branches/release4.0/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/widget/partymgr/PartyScreens.xml?view=diff&rev=532696&r1=532695&r2=532696 ============================================================================== --- ofbiz/branches/release4.0/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/branches/release4.0/applications/party/widget/partymgr/PartyScreens.xml Thu Apr 26 03:43:52 2007 @@ -706,5 +706,65 @@ </widgets> </section> </screen> - + + <screen name="FinAccountSummary"> + <section> + <actions> + <entity-condition entity-name="FinAccount" list-name="ownedFinAccountList" filter-by-date="true"> + <condition-expr field-name="ownerPartyId" operator="equals" env-name="parameters.partyId"/> + <order-by field-name="-fromDate"/> + </entity-condition> + </actions> + <widgets> + <section> + <condition> + <not> + <if-empty field-name="ownedFinAccountList"/> + </not> + </condition> + <condition> + <if-has-permission permission="ACCOUNTING" action="_VIEW"/> + </condition> + <widgets> + <container id="fin-account-summary" style="screenlet"> + <container style="screenlet-header"> + <label style="boxhead" text="${uiLabelMap.PageTitleFinancialAccountSummary}"/> + </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> + <entity-one entity-name="FinAccountType" value-name="ownedFinAccountType" auto-field-map="false" use-cache="true"> + <field-map field-name="finAccountTypeId" env-name="ownedFinAccount.finAccountTypeId"/> + </entity-one> + </actions> + <widgets> + <platform-specific> + <html> + <html-template location="component://party/webapp/partymgr/party/FinAccountDetail.ftl"/> + </html> + </platform-specific> + </widgets> + </section> + </iterate-section> + </container> + </container> + </widgets> + </section> + </widgets> + </section> + </screen> + </screens> + |
Free forum by Nabble | Edit this page |