Thanks Parimal & Sumit for the Contribution. Please don't forget to update the info about migration on: http://docs.ofbiz.org/x/XxQ git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@809984 13f79535-47bb-0310-9956-ffa450edef68
147 lines
7.6 KiB
XML
147 lines
7.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
|
|
|
<!-- this eca automatically posts the accounting transactions to GL -->
|
|
<eca service="createAcctgTransAndEntries" event="commit">
|
|
<condition field-name="acctgTransId" operator="is-not-empty"/>
|
|
<action service="postAcctgTrans" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- create the accounting transactions for a sales shipment issuance every time the inventory is issued to the shipment -->
|
|
<eca service="createItemIssuance" event="commit">
|
|
<condition field-name="orderId" operator="is-not-empty"/>
|
|
<condition field-name="inventoryItemId" operator="is-not-empty"/>
|
|
<action service="createAcctgTransForSalesShipmentIssuance" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- create an accounting transactions every time an issuance to sales shipment is canceled -->
|
|
<eca service="cancelOrderItemIssuanceFromSalesShipment" event="commit">
|
|
<condition field-name="canceledQuantity" operator="greater" value="0" type="BigDecimal"/>
|
|
<action service="createAcctgTransForCanceledSalesShipmentIssuance" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- create the accounting transactions for a shipment receipt every time the inventory is received -->
|
|
<eca service="createShipmentReceipt" event="commit">
|
|
<action service="createAcctgTransForShipmentReceipt" 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"/>
|
|
<action service="createAcctgTransForWorkEffortCost" mode="sync"/>
|
|
</eca>
|
|
|
|
<eca service="updateInventoryItem" event="commit">
|
|
<condition field-name="ownerPartyId" operator="is-not-empty"/>
|
|
<condition-field field-name="ownerPartyId" operator="not-equals" to-field-name="oldOwnerPartyId"/>
|
|
<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-->
|
|
<eca service="createInventoryItemDetail" event="commit">
|
|
<condition field-name="unitCost" operator="is-not-empty"/>
|
|
<condition field-name="receiptId" operator="is-empty"/>
|
|
<action service="createAcctgTransForInventoryItemCostChange" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- attempt to create AcctgTrans Physical Inventory Variance when Physical InventoryAndVariance is created-->
|
|
<eca service="createPhysicalInventoryAndVariance" event="commit">
|
|
<condition field-name="physicalInventoryId" operator="is-not-empty"/>
|
|
<action service="createAcctgTransForPhysicalInventoryVariance" mode="sync"/>
|
|
</eca>
|
|
|
|
<!--create the accounting transactions when Fixed AssetMaint Issuance issues Inventory for fixed asset maintenance-->
|
|
<eca service="createItemIssuance" event="commit">
|
|
<condition field-name="fixedAssetId" operator="is-not-empty"/>
|
|
<action service="createAcctgTransForFixedAssetMaintIssuance" mode="sync"/>
|
|
</eca>
|
|
<!--attempt to create AcctgTrans and Entries for Incoming Payment -->
|
|
<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"/>
|
|
<condition field-name="oldStatusId" operator="not-equals" value="PMNT_CONFIRMED"/>
|
|
<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 -->
|
|
<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"/>
|
|
<action service="createAcctgTransAndEntriesForPaymentApplication" mode="sync"/>
|
|
</eca>
|
|
|
|
<!-- set GlReconciliation status after creating GlReconciliation Entries -->
|
|
<eca service="createGlReconciliationEntry" event="commit">
|
|
<condition field-name="statusId" operator="is-not-empty"/>
|
|
<action service="setGlReconciliationStatus" mode="sync"/>
|
|
</eca>
|
|
</service-eca> |