You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2009/11/24 18:30:55 UTC
svn commit: r883796 - in
/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting:
ledger/GeneralLedgerServices.xml test/AutoAcctgTransTests.xml
Author: jacopoc
Date: Tue Nov 24 17:30:55 2009
New Revision: 883796
URL: http://svn.apache.org/viewvc?rev=883796&view=rev
Log:
Misc fixes for tests for gl postings, and also a couple of bug fixes discovered playing with the tests.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=883796&r1=883795&r2=883796&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Tue Nov 24 17:30:55 2009
@@ -1644,6 +1644,7 @@
<!-- Set header fields (AcctgTrans) -->
<set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="INVENTORY"/>
+ <set field="createAcctgTransAndEntriesInMap.workEffortId" from-field="parameters.workEffortId"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/>
<call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap">
<result-to-field result-name="acctgTransId"/>
@@ -1660,7 +1661,7 @@
<entity-one entity-name="WorkEffort" value-field="workEffort">
<field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
</entity-one>
- <get-related-one value-field="workEffort" relation-name="Facility" to-value-field="facility"/>
+ <get-related-one value-field="workEffort" relation-name="Facility" to-value-field="facility"/>
<if-compare field="workEffort.workEffortTypeId" operator="equals" value="PROD_ORDER_TASK">
<if-not-empty field="workEffort.workEffortParentId">
<entity-and entity-name="WorkEffortGoodStandard" list="workEffortGoodStandards">
@@ -1688,7 +1689,7 @@
<set field="creditEntry.organizationPartyId" from-field="facility.ownerPartyId"/>
<set field="creditEntry.productId" from-field="workEffortGoodStandard.productId"/>
<set field="creditEntry.origAmount" from-field="costComponent.cost"/>
- <set field="creditEntry.origCurrencyUomId" from-field="facility.currencyUomId"/>
+ <set field="creditEntry.origCurrencyUomId" from-field="costComponent.costUomId"/>
<set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
<!-- Debit -->
<make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
@@ -1702,7 +1703,7 @@
<set field="debitEntry.organizationPartyId" from-field="facility.ownerPartyId"/>
<set field="debitEntry.productId" from-field="workEffortGoodStandard.productId"/>
<set field="debitEntry.origAmount" from-field="costComponent.cost"/>
- <set field="debitEntry.origCurrencyUomId" from-field="facility.currencyUomId"/>
+ <set field="debitEntry.origCurrencyUomId" from-field="costComponent.costUomId"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
<!-- Set header fields (AcctgTrans) -->
<set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/>
@@ -1835,6 +1836,7 @@
<!-- Set header fields (AcctgTrans) -->
<set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="INVENTORY"/>
+ <set field="createAcctgTransAndEntriesInMap.workEffortId" from-field="parameters.workEffortId"/>
<set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/>
<call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap">
<result-to-field result-name="acctgTransId"/>
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml?rev=883796&r1=883795&r2=883796&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml Tue Nov 24 17:30:55 2009
@@ -437,17 +437,11 @@
<field-map field-name="userLoginId" value="system"/>
</entity-one>
<call-service service-name="issueProductionRunTask" in-map-name="serviceCtx"/>
- <entity-condition entity-name="WorkEffortAndInventoryAssign" list="workEffortAndInventoryAssigns"/>
<entity-condition entity-name="WorkEffortAndInventoryAssign" list="workEffortAndInventoryAssigns">
- <condition-list combine="and">
- <condition-expr field-name="workEffortId" from-field="workEffortId"/>
- <condition-list combine="or">
- <condition-expr field-name="productId" operator="equals" value="MAT_A_COST"/>
- <condition-expr field-name="productId" operator="equals" value="MAT_B_COST"/>
- </condition-list>
- </condition-list>
+ <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
</entity-condition>
+
<assert><not><if-empty field="workEffortAndInventoryAssigns"/></not></assert>
<set field="totalIssuedQty_MAT_A_COST" value="0.0" type="BigDecimal"/>
@@ -479,8 +473,7 @@
<entity-condition entity-name="AcctgTrans" list="acctgTransList">
<condition-list combine="and">
<condition-expr field-name="acctgTransTypeId" operator="equals" value="INVENTORY"/>
- <condition-expr field-name="acctgTransId" operator="not-equals" value="6003"/>
- <condition-expr field-name="acctgTransId" operator="not-equals" value="6004"/>
+ <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
</condition-list>
</entity-condition>
<assert><not><if-empty field="acctgTransList"/></not></assert>
@@ -548,10 +541,12 @@
<set field="serviceCtx.statusId" value="PRUN_COMPLETED"/>
<call-service service-name="changeProductionRunTaskStatus" in-map-name="serviceCtx"/>
- <entity-one entity-name="WorkEffort" value-field="workEffort">
- <field-map field-name="workEffortId" from-field="workEffortId"/>
- </entity-one>
- <get-related value-field="workEffort" relation-name="AcctgTrans" list="acctgTransList"/>
+ <entity-condition entity-name="AcctgTrans" list="acctgTransList">
+ <condition-list combine="and">
+ <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
+ <condition-expr field-name="acctgTransTypeId" operator="equals" value="MANUFACTURING"/>
+ </condition-list>
+ </entity-condition>
<assert><not><if-empty field="acctgTransList"></if-empty></not></assert>
<iterate list="acctgTransList" entry="acctgTrans">
<get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>