Misc cleanups:

* modified order of seca definitions
* improved and cleaned up comments
* unified two secas with the same conditions into one

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@891171 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2009-12-16 10:04:32 +00:00
parent 60480280a2
commit 13526fffa7
@@ -45,10 +45,13 @@ under the License.
<action service="createAcctgTransForShipmentReceipt" mode="sync"/>
</eca>
<!-- work effort related transactions -->
<eca service="assignInventoryToWorkEffort" event="commit">
<action service="createAcctgTransForWorkEffortIssuance" mode="sync"/>
</eca>
<eca service="createWorkEffortInventoryProduced" event="commit">
<action service="createAcctgTransForWorkEffortInventoryProduced" mode="sync"/>
</eca>
<eca service="createCostComponent" event="commit">
<condition field-name="workEffortId" operator="is-not-empty"/>
<condition field-name="costComponentTypeId" operator="not-equals" value="ACTUAL_MAT_COST"/>
@@ -61,11 +64,7 @@ under the License.
<action service="createAcctgTransForInventoryItemOwnerChange" mode="sync"/>
</eca>
<eca service="assignInventoryToWorkEffort" event="commit">
<action service="createAcctgTransForWorkEffortIssuance" mode="sync"/>
</eca>
<!--creating inventory item detail when unitCost is not empty and recieptId is empty-->
<!-- creating inventory item detail when unitCost is not empty and receiptId is empty -->
<eca service="createInventoryItemDetail" event="commit">
<condition field-name="unitCost" operator="is-not-empty"/>
<condition field-name="receiptId" operator="is-empty"/>
@@ -83,12 +82,27 @@ under the License.
<condition field-name="fixedAssetId" operator="is-not-empty"/>
<action service="createAcctgTransForFixedAssetMaintIssuance" mode="sync"/>
</eca>
<!--attempt to create AcctgTrans and Entries for Incoming Payment -->
<!-- accounting transactions for Purchase (AP) and Sales Invoices (AR) -->
<eca service="setInvoiceStatus" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>
<condition field-name="statusId" operator="equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_PAID"/>
<action service="createAcctgTransForPurchaseInvoice" mode="sync"/>
<action service="createAcctgTransForSalesInvoice" mode="sync"/>
</eca>
<eca service="setInvoiceStatus" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>
<condition field-name="statusId" operator="equals" value="INVOICE_CANCELLED"/>
<action service="cancelInvoice" mode="sync"/>
</eca>
<!-- accounting transactions for Incoming Payment (AR) -->
<eca service="createPayment" event="commit">
<condition field-name="statusId" operator="equals" value="PMNT_RECEIVED"/>
<action service="createAcctgTransAndEntriesForIncomingPayment" mode="sync"/>
</eca>
<!--attempt to create AcctgTrans and Entries for Incoming when set PaymentStatus -->
<eca service="setPaymentStatus" event="commit">
<condition field-name="statusId" operator="equals" value="PMNT_RECEIVED"/>
<condition field-name="oldStatusId" operator="not-equals" value="PMNT_RECEIVED"/>
@@ -96,43 +110,17 @@ under the License.
<action service="createAcctgTransAndEntriesForIncomingPayment" mode="sync"/>
</eca>
<!-- attempt to create AcctgTrans for Purchase Invoice -->
<eca service="setInvoiceStatus" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>
<condition field-name="statusId" operator="equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_PAID"/>
<action service="createAcctgTransForPurchaseInvoice" mode="sync"/>
</eca>
<!-- attempt to create AcctgTrans for Sales Invoice -->
<eca service="setInvoiceStatus" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>
<condition field-name="statusId" operator="equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_READY"/>
<condition field-name="oldStatusId" operator="not-equals" value="INVOICE_PAID"/>
<action service="createAcctgTransForSalesInvoice" mode="sync"/>
</eca>
<!--attempt to create AcctgTrans and Entries for Outgoing Payment -->
<!-- accounting transactions for Outgoing Payment (AP) -->
<eca service="createPayment" event="commit">
<condition field-name="statusId" operator="equals" value="PMNT_SENT"/>
<action service="createAcctgTransAndEntriesForOutgoingPayment" mode="sync"/>
</eca>
<!--attempt to create AcctgTrans and Entries for Outgoing when set PaymentStatus -->
<eca service="setPaymentStatus" event="commit">
<condition field-name="statusId" operator="equals" value="PMNT_SENT"/>
<condition field-name="oldStatusId" operator="not-equals" value="PMNT_SENT"/>
<condition field-name="oldStatusId" operator="not-equals" value="PMNT_CONFIRMED"/>
<action service="createAcctgTransAndEntriesForOutgoingPayment" mode="sync"/>
</eca>
<eca service="setInvoiceStatus" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>
<condition field-name="statusId" operator="equals" value="INVOICE_CANCELLED"/>
<action service="cancelInvoice" mode="sync"/>
</eca>
<eca service="createPaymentApplication" event="commit">
<condition field-name="invoiceId" operator="is-not-empty"/>