[ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708455#action_12708455 ]
Pranay Pandey edited comment on OFBIZ-2445 at 5/13/09 3:14 AM: --------------------------------------------------------------- Sorry Vivek, after a testing and thorough review I found few more things which should be improved in this patch before it goes in trunk: 1) In BillingAccounts.groovy follwing code: {code} if (partyId) { billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId]); if (billingAccountAndRoles) currencyUomId = billingAccountAndRoles.accountCurrencyUomId.get(0); if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); if (billingAccounts) context.billingAccounts = billingAccounts; } {code} should be improved to: {code} billingAccounts = []; if (partyId) { currencyUomId = EntityUtil.getFirst((delegator.findByAnd("BillingAccountAndRole", [partyId : partyId])).accountCurrencyUomId; if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); } context.billingAccounts = billingAccounts; {code} 2) In ReturnHeader.groovy {code} returnHeaderTypeId = null; fromPartyId = null; statusId = null; {code} Above initializations can be removed as not used anywhere in your code and you added them {code} partyId = parameters.get("partyId"); can be partyId = parameters.partyId; returnRecords = []; should be returns = []; returns = [:] should be returnMap or returnValue {code} {code} condition = EntityCondition.makeCondition("fromPartyId", EntityOperator.EQUALS, partyId); returnHeaders = delegator.findList("ReturnHeader", condition, null, null, null, false); {code} can be improved to: {code} returnHeaders = delegator.findList("ReturnHeader", EntityCondition.makeCondition("fromPartyId", EntityOperator.EQUALS, partyId), null, null, null, false); {code} This is all from my side. was (Author: pandeypranay): Sorry Vivek, after a testing and thorough review I found few more things which should be improved in this patch before it goes in trunk: 1) In BillingAccounts.groovy follwing code: {code} if (partyId) { billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId]); if (billingAccountAndRoles) currencyUomId = billingAccountAndRoles.accountCurrencyUomId.get(0); if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); if (billingAccounts) context.billingAccounts = billingAccounts; } {code} should be improved to: {code} billingAccounts = []; if (partyId) { currencyUomId = EntityUtil.getFirst((delegator.findByAnd("BillingAccountAndRole", [partyId : partyId])).accountCurrencyUomId; if (currencyUomId) billingAccounts = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher); } context.billingAccounts = billingAccounts; {code} 2) In ReturnHeader.groovy {code} returnHeaderTypeId = null; fromPartyId = null; statusId = null; {code} Above initializations can be removed as not used anywhere in your code and you added them {code} partyId = parameters.get("partyId"); can be partyId = parameters.partyId; returnRecords = []; should be returns = []; returns = [:] should be return = [:]; {code} {code} condition = EntityCondition.makeCondition("fromPartyId", EntityOperator.EQUALS, partyId); returnHeaders = delegator.findList("ReturnHeader", condition, null, null, null, false); {code} can be improved to: {code} returnHeaders = delegator.findList("ReturnHeader", EntityCondition.makeCondition("fromPartyId", EntityOperator.EQUALS, partyId), null, null, null, false); {code} This is all from my side. > Show Billing Account Info on the Party Profile > ---------------------------------------------- > > Key: OFBIZ-2445 > URL: https://issues.apache.org/jira/browse/OFBIZ-2445 > Project: OFBiz > Issue Type: Improvement > Components: accounting, party > Affects Versions: SVN trunk > Reporter: Pranay Pandey > Assignee: Vikas Mayur > Fix For: SVN trunk > > > Show Billing Account Info and returns as well to show outstanding returns on > the Party Profile > There is a Financial History ("Fin. History") tab on the profile in the Party > Manager but it only contains information about invoice and payments. Add > information about Billing Account(s) and available credit on this page. Add > section about returns as well to show outstanding returns with status. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.