|
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
|