[jira] Created: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)

    [ 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vivek Mishra updated OFBIZ-2445:
--------------------------------

    Attachment: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch

Thanks for the comments Pranay.
Here is the upgraded patch according to your comments.

I think Ashish's suggestion for giving patch's name seems superb. I am following the same in this patch.
Thanks to Ashish

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708884#action_12708884 ]

Vikas Mayur commented on OFBIZ-2445:
------------------------------------

Jacques, More work for you to add something new to best practices ;)

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708907#action_12708907 ]

Jacques Le Roux commented on OFBIZ-2445:
----------------------------------------

Vikas,


Yes ;). Before pushing it to dev ML some suggestions. It could be

* fileName_OFBIZ-number.patch for a sole file
* featureDescription_OFBIZ-number.patch for a multi files patch. The issue I see here is the featureDescription subjectivity, maybe using the title of the issue or a part of this title could help. And also it could help to normalize titles so making things simpler for commiters, maybe not for contributors...

Other suggestions ? (like simply OFBIZ-number.patch, etc.)

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708910#action_12708910 ]

Vikas Mayur commented on OFBIZ-2445:
------------------------------------

Hi Jacques,

I am fine with your suggestions and yes it would be difficult for the contributor to put up featureDescription in some cases?
So in that particular case, third and last point could be as you said simply use "OFBIZ-number.patch".

Btw, Do we have anything in their that mention about not to delete patches? Its okay if something serious or confidential thing slipped in ;)

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708913#action_12708913 ]

Ashish Vijaywargiya commented on OFBIZ-2445:
--------------------------------------------

>> fileName_OFBIZ-number.patch for a sole file

IMO it won't make any sense to provide the file name in case sole file.
Suppose I am adding 6 methods in that file (for ex: PartyServices.java) and instead of mentioning the feature details while creating patch file name I am using File_Name as the prefix.

IMO we should only propose the second point and inside naming of patch we should use the "full title if its small" and "part of title if its big" along with the OFBIZ-number as suffix.

--
Ashish

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vikas Mayur closed OFBIZ-2445.
------------------------------

    Resolution: Fixed

Thanks Vivek and others.

Vivek your patch with following modifications is in trunk rev. 774367.

1) Used existing labels, IMO it was not necessary to define new labels.
2) Changed the name of the form ReturnHeaderInformation to PartyReturns, since it is actually a list of party returns.
3) Removed an extra import statement (import java.util.*;) in ReturnHeader.groovy
4) Simplified the code for showing description instead of status Id field (getRelatedOne) in ReturnHeader.groovy
5) Removed returnHeaderTypeId from the list that was displayed, was not required.

Vikas

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2445) Show Billing Account Info on the Party Profile

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708931#action_12708931 ]

Vivek Mishra commented on OFBIZ-2445:
-------------------------------------

Thanks Vikas.

> 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
>
>         Attachments: ShowBillingAccountOnPartymgr_OFBIZ-2445.patch
>
>
> 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.

12