Add functionality for store credit either in fin account or billing account while performing return.
---------------------------------------------------------------------------------------------------- Key: OFBIZ-2502 URL: https://issues.apache.org/jira/browse/OFBIZ-2502 Project: OFBiz Issue Type: Improvement Components: order Affects Versions: SVN trunk Reporter: Santosh Malviya Priority: Minor Fix For: SVN trunk Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. Following are the steps to do this: (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Santosh Malviya updated OFBIZ-2502: ----------------------------------- Attachment: FinAccountOrBillingAccount.patch Here is the patch which solves this purpose, > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mridul Pathak updated OFBIZ-2502: --------------------------------- Attachment: OFBIZ-2502.patch Re-implemented this feature. Uploading the new patch. Following scenarios are now covered in this patch: 1) Added a field to ProductStore to specify Store Credit Account type (FIN_ACCOUNT or BILLING_ACCOUNT), default for demo ProductStore is FIN_ACCOUNT. 2) If finAccountId or billingAccountId is explicitly supplied, then it is used. 3) If none is supplied, BillingAccount with negative balance is looked up, and credit is stored if found one. 4) Else, ProductStore is looked up to find the Store Credit Account type. 5) If its FIN_ACCOUNT, the FinAccount of type STORE_CREDIT_ACCT is looked up for the party, if found is used, else new FIN_ACCOUNT of same type is created. 6) If its BILLING_ACCOUNT, an existing BILLING_ACCOUNT is used, if none exists, new one is created. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715569#action_12715569 ] Mridul Pathak commented on OFBIZ-2502: -------------------------------------- Tested all the scenarios covered in the above patch. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715880#action_12715880 ] Mridul Pathak commented on OFBIZ-2502: -------------------------------------- Steps to test. 1) Create a Sales Order for DemoCustomer with payment type Offline/COD. 2) Quick Ship the Order. 3) Receive Payment from OrderView page. 4) Create Return of type Store Credit. 5) Accept and Receive the return. Return amount will be Credited to FIN_ACCOUNT or BILLING_ACCOUNT as per store settings, or to the one explicitly supplied. 6) On Edit Return Header screen (https://localhost:8443/ordermgr/control/returnMain?returnId=10000), you can specify billingAccountId/finAccountId explicitly. 7) On Edit Product Store screen, you can change storeCreditAccountEnumId. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715978#action_12715978 ] David E. Jones commented on OFBIZ-2502: --------------------------------------- How this is described to work looks great. It's wonderful to finally have support for this OOTB! > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mridul Pathak updated OFBIZ-2502: --------------------------------- Attachment: OFBIZ-2502.patch Updated patch with following improvements. 1) Handled the case of multiple billing accounts (with +ve or -ve available balance) 2) If user has multiple active billing accounts or fin accounts, the one with most recent fromDate will be chosen to store credit. 3) If both finAccountId and billingAccountId are present in ReturnHeader, then the one preferred in productStore.storeCreditAccountEnumId settings will be used. Default will be FinAccount. Thanks to David and Vikas for discussing this functionality. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vikas Mayur reassigned OFBIZ-2502: ---------------------------------- Assignee: Vikas Mayur > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Assignee: Vikas Mayur > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vikas Mayur closed OFBIZ-2502. ------------------------------ Resolution: Fixed Thanks Mridul, Santosh, David, Mridul your patch is in trunk rev. 781804 with very minor changes. I fixed a typo on the title name specified on the relation on the ProductStore as well as added description to the new field on this entity. Btw, I think we should use the generics (for example for loop) instead of using the ListIterator but I have not changed that part of code. Vikas > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Assignee: Vikas Mayur > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716499#action_12716499 ] Mridul Pathak commented on OFBIZ-2502: -------------------------------------- Thanks Vikas. I think you are talking about "for each" loop, please correct me if I am wrong. I would have used that but, here I have to use while loop, and you might have noticed that I have used generics with ListIterator. Here is the link about generics in Java that I have referred: http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html, I think I have used the same approach as described here. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Assignee: Vikas Mayur > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716563#action_12716563 ] Vikas Mayur commented on OFBIZ-2502: ------------------------------------ Sorry, I wasn't clear with my last comment. Instead of using ListIterator simply Iterator could be used, as the way it is used it just does the forward traversing. If this add extra advantages then its fine. > Add functionality for store credit either in fin account or billing account while performing return. > ---------------------------------------------------------------------------------------------------- > > Key: OFBIZ-2502 > URL: https://issues.apache.org/jira/browse/OFBIZ-2502 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Reporter: Santosh Malviya > Assignee: Vikas Mayur > Priority: Minor > Fix For: SVN trunk > > Attachments: FinAccountOrBillingAccount.patch, OFBIZ-2502.patch, OFBIZ-2502.patch > > > Currently OFBiz creates a Store Credit as a Payment associated with a Billing Account (creating a new BA if one doesn't already exist). Do same for fin account. > Following are the steps to do this: > (1) Add a field to the ProductStore entity to specify whether returns should go on a Financial Account or a Billing Account. > (2) Extend the processCreditReturn service to look at that setting and if set for a Financial Account find one for the customer (create one if necessary) and add a credit transaction to it for the credit and associate that credit transaction to the ReturnItem it came from (just like currently done with BillingAccount Payment). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |