Hi Jim,
the service has been modified to support and generate one invoice for
multiple order/shipments; this is true also for the Invoice PDF (if I
am not wrong).
However right now there is no way to trigger the invoice generation
using the existing ui.
If you want to test this feature you may try to invoke the
createInvoicesFromShipment service from a bsh script (for example) and
pass to it the list of shipmentIds you want to invoice.
Jacopo
On May 22, 2008, at 4:07 AM, Jim Yanda wrote:
Hi Jacopo,
Was this functionality ever implemented? How do I consolidated
multiple
shipments onto a single invoice?
Thanks.
Jim
Jacopo Cappellato wrote:
Hi all,
I'll need to implement a new way to create invoices from sales
shipments.
If I'm not wrong, right now in OFBiz you can create invoices in two
ways:
a) from an orderId: the createInvoiceForOrder service is used
b) from a shipmentId: the createInvoicesFromShipment service is used,
this service internally calls the createInvoiceForOrder service for
each
of the orders associated to the shipment
The new way I'm going to implement is this:
c) from a set of shipment ids: I'd like to call a modified version of
the createInvoicesFromShipment service
The main difference between method c and b is that if an order is
shipped with two shipments and I pass the two shipment ids to the
service of point c, I'll get ONE invoice (instead of TWO with
method b)
for the order containing all the items shipped in the two shipments.
I've modified the createInvoicesFromShipment service to accept as an
optional input parameter a List of shipmentIds: then all the
ItemIssuances associated to the shipments are selected (instead of
only
the ItemIssuances associated to one shipment); then the logic is
EXACTLY
the same.
I'm I'm testing it right now and it seems to work pretty well.
How to trigger this service?
I'd like to add a new shipment status to mark all the shipments
that are
ready to be invoiced; then a new service can be run that:
1) selects all the shipments in this status and puts thir ids in a
List
2) calls the modified version of the createInvoicesFromShipment
passing
the List to it
3) updates the shipments' status to mark them as invoiced/completed
What do you think of this?
Jacopo
_______________________________________________
Dev mailing list
[EMAIL PROTECTED]
http://lists.ofbiz.org/mailman/listinfo/dev
--
View this message in context:
http://www.nabble.com/Dev---A-new-way-to-create-invoices-from-shipments-tp3630362p17395979.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.