Author: mor
Date: Wed May 13 13:49:04 2009 New Revision: 774367 URL: http://svn.apache.org/viewvc?rev=774367&view=rev Log: Added screens to see billing accounts and returns information under Fin. History tab in Party. Added slightly modified patch from Vivek Mishra, part of OFBIZ-2445 (https://issues.apache.org/jira/browse/OFBIZ-2445) Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy (with props) Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Added: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy?rev=774367&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy (added) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy Wed May 13 13:49:04 2009 @@ -0,0 +1,31 @@ +/* + * 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. + */ + +import org.ofbiz.accounting.payment.BillingAccountWorker; +import org.ofbiz.entity.util.EntityUtil; + +partyId = parameters.partyId; +currencyUomId = null; +billingAccounts = []; +if (partyId) { + billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId]); + if (billingAccountAndRoles) currencyUomId = EntityUtil.getFirst(billingAccountAndRoles).accountCurrencyUomId; + if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); +} +context.billingAccounts = billingAccounts; \ No newline at end of file Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy?rev=774367&r1=774366&r2=774367&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy Wed May 13 13:49:04 2009 @@ -20,6 +20,8 @@ import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.entity.util.*; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.party.contact.*; @@ -36,6 +38,21 @@ context.currentStatus = returnHeader.getRelatedOneCache("StatusItem"); } +} else { + partyId = parameters.partyId; + returnHeaders = delegator.findList("ReturnHeader", EntityCondition.makeCondition("fromPartyId", EntityOperator.EQUALS, partyId), null, null, null, false); + returnList = []; + returnHeaders.each { returnHeader -> + returnMap = [:]; + returnMap.returnId = returnHeader.returnId; + statusItem = returnHeader.getRelatedOne("StatusItem"); + returnMap.statusId = statusItem.description; + returnMap.fromPartyId = returnHeader.fromPartyId; + returnMap.toPartyId = returnHeader.toPartyId; + + returnList.add(returnMap); + } + context.returnList = returnList; } context.returnHeader = returnHeader; context.returnId = returnId; Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?rev=774367&r1=774366&r2=774367&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Wed May 13 13:49:04 2009 @@ -1013,4 +1013,16 @@ <field name="submit" title="${uiLabelMap.CommonSubmit}"><submit/></field> </form> + <form name="PartyBillingAccount" type="list" list-name="billingAccounts" default-table-style="basic-table hover-bar"> + <field name="billingAccountId"><display/></field> + <field name="accountLimit"><display type="currency"/></field> + <field name="accountBalance"><display type="currency"/></field> + <field name="description"><display/></field> + </form> + <form name="PartyReturns" type="list" list-name="returnList" default-table-style="basic-table hover-bar"> + <field name="returnId"><display/></field> + <field name="statusId"><display/></field> + <field name="fromPartyId"><display/></field> + <field name="toPartyId"><display/></field> + </form> </forms> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=774367&r1=774366&r2=774367&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Wed May 13 13:49:04 2009 @@ -1144,6 +1144,26 @@ </screenlet> </widgets> </section> + <section> + <actions> + <script location="component://accounting/webapp/accounting/WEB-INF/actions/payment/BillingAccounts.groovy"/> + </actions> + <widgets> + <screenlet title="${uiLabelMap.AccountingBillingAccount}"> + <include-form name="PartyBillingAccount" location="component://party/webapp/partymgr/party/PartyForms.xml"/> + </screenlet> + </widgets> + </section> + <section> + <actions> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy"/> + </actions> + <widgets> + <screenlet title="${uiLabelMap.OrderOrderReturns}"> + <include-form name="PartyReturns" location="component://party/webapp/partymgr/party/PartyForms.xml"/> + </screenlet> + </widgets> + </section> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |