[jira] Created: (OFBIZ-2740) Payment capture only triggered on when Invoice is in Ready status

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

[jira] Created: (OFBIZ-2740) Payment capture only triggered on when Invoice is in Ready status

Nicolas Malin (Jira)
Payment capture only triggered on when Invoice is in Ready status
-----------------------------------------------------------------

                 Key: OFBIZ-2740
                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
             Project: OFBiz
          Issue Type: Improvement
          Components: accounting, order, product
    Affects Versions: SVN trunk
            Reporter: Vikas Mayur
             Fix For: SVN trunk


Discuss can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture only triggered on when Invoice is in Ready status

Nicolas Malin (Jira)

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

Vikas Mayur updated OFBIZ-2740:
-------------------------------

    Attachment: invoices.patch

Attaching patch based on Jacopo notes on dev mailing list. For easy reference, see the copied notes below.

------------------------------------------------------------------------------------------------------------------------

a) if ProductStore.autoApproveInvoice = Y then the invoice will be automatically moved to the ready status, this will trigger the capturePaymentsByInvoice sservice and everything will work as now
b) if ProductStore.autoApproveInvoice = N then the invoice will stay in the in-process status and payments will not be captured

We may have to redesign the way ECA rules are defined; here is what I would suggest (it should work and be enough flexible):

updateShipment --> PICKED: trigger createInvoiceForOrder (invoice in status IN PROCESS)
ProductStore.autoApproveInvoice = Y: calls updateInvoice to status READY
updateShipment --> PACKED: trigger updateInvoice to status READY (it is important to pass thru the status PICKED or make sure that invoices are created before the call to updateInvoice)
updateInvoice --> READY: trigger capturePaymentsByInvoice

Note: the above are just very generic notes and we will probably have to create small services for the above ECAs: for examplewhen a shipment is moved to PACKED then we will have to attach a service that find out all the invoices associated to the shipment and then for each of them it calls the updateInvoice service (in my notes I have simplified it saying that the event will call the updateInvoice Service)

------------------------------------------------------------------------------------------------------------------------------------

> Payment capture only triggered on when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch
>
>
> Discuss can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Vikas Mayur updated OFBIZ-2740:
-------------------------------

    Description: Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962  (was: Discuss can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962)
        Summary: Payment capture is only triggered when Invoice is in Ready status  (was: Payment capture only triggered on when Invoice is in Ready status)

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Jacopo Cappellato commented on OFBIZ-2740:
------------------------------------------

Vikas,

thanks for implementing this.
The patch looks really good but here are some suggestions:

* instead of creating invoices (if missing) inside of updateInvoicesFromShipment, what if we call createInvoicesFromShipment before running it? This should greatly simplify the code. The service call could be placed in the same eca or at the beginning of the updateInvoicesFromShipment service
* I'd suggest a better name for the updateInvoicesFromShipment service (especially if you'll do the change I have proposed above): setInvoicesToReadyFromShipment (or createSetInvoicesToReadyFromShipment)

Jacopo


> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

BJ Freeman commented on OFBIZ-2740:
-----------------------------------

should this not effect the facetoFace (POS)

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Vikas Mayur updated OFBIZ-2740:
-------------------------------

    Attachment: invoices.patch

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch, invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Vikas Mayur commented on OFBIZ-2740:
------------------------------------

Calling createInvoicesFromShipment  in UpdateShipment does simplified that code a lot. Now only goal of the service setInvoicesToReadyFromShipment (which earlier was updateShipmentsFromInvoice) is to move the status of invoice to ready for all the invoices that were in In-Process status.

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch, invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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] Assigned: (OFBIZ-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Vikas Mayur reassigned OFBIZ-2740:
----------------------------------

    Assignee: Vikas Mayur

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>            Assignee: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch, invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Jacopo Cappellato commented on OFBIZ-2740:
------------------------------------------

great


> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>            Assignee: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch, invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
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-2740) Payment capture is only triggered when Invoice is in Ready status

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

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

Vikas Mayur closed OFBIZ-2740.
------------------------------

    Resolution: Fixed

Thanks Jacopo for your additional help in reviewing the patch.

After testing this patch multiple times I did not find any issues and every thing was working fine.

Patch is in trunk rev. 795809

> Payment capture is only triggered when Invoice is in Ready status
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-2740
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2740
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, order, product
>    Affects Versions: SVN trunk
>            Reporter: Vikas Mayur
>            Assignee: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: invoices.patch, invoices.patch
>
>
> Description can be read from link - http://www.nabble.com/Verify-Pick-Process-td24495382.html#a24509962

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.