You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by salmant <sa...@free.fr> on 2008/04/22 17:39:02 UTC
order and invoice
Hello,
I was wondering when (what order status) an invoice was created from an
order and what were the conditions to create automatically the invoice ?
Thanks very much
Re: order and invoice
Posted by Bilgin Ibryam <bi...@iguanait.com>.
The invoices are created based the order shipments status.
So if you create a shipment for some order items, and
pack(SHIPMENT_PACKED) the shipment, the order items in the shipment will
be invoiced. Here is the seca for it:
<!-- if new statusId of a SALES_SHIPMENT is SHIPMENT_PACKED, create
invoice -->
<eca service="updateShipment" event="commit">
<condition-field field-name="statusId" operator="not-equals"
to-field-name="oldStatusId"/>
<condition field-name="statusId" operator="equals"
value="SHIPMENT_PACKED"/>
<condition field-name="shipmentTypeId" operator="equals"
value="SALES_SHIPMENT"/>
<action service="createInvoicesFromShipment" mode="sync"
run-as-user="system"/>
</eca>
Bilgin