[ 
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 via email to