Author: lektran
Date: Sun Oct 18 02:46:03 2009
New Revision: 826351
URL:
http://svn.apache.org/viewvc?rev=826351&view=revLog:
Better lookup for AcctgTranEntries related to the test in hand, allows the test to pass
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
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=826351&r1=826350&r2=826351&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 Sun Oct 18 02:46:03 2009
@@ -52,9 +52,15 @@
<set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
<call-service service-name="receiveInventoryProduct" in-map-name="serviceCtx"/>
- <entity-condition entity-name="AcctgTransEntry" list="acctgTransEntries">
- <condition-expr field-name="productId" from-field="productId"/>
- </entity-condition>
+
+ <entity-and list="acctgTransList" entity-name="AcctgTrans">
+ <field-map field-name="shipmentId"/>
+ </entity-and>
+ <first-from-list entry="acctgTrans" list="acctgTransList"/>
+ <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntries"/>
+ <set field="productFilter.productId" from-field="productId"/>
+ <filter-list-by-and list="acctgTransEntries" map="productFilter" to-list="acctgTransEntries"/>
+
<assert><not><if-empty field="acctgTransEntries"/></not></assert>
<iterate list="acctgTransEntries" entry="acctgTransEntry">
<if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">