Skip to content

Commit

Permalink
Improved: Included parentProductId and parentProductName in Get Cycle…
Browse files Browse the repository at this point in the history
… Count Items API (#42).
  • Loading branch information
ravilodhi committed Jan 14, 2025
1 parent 732b341 commit 5e51216
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions service/co/hotwax/cycleCount/InventoryCountServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@
<econdition field-name="statusId" value="INV_COUNT_COMPLETED" />
</entity-find>
<set field="itemDetail.acceptedByUserLoginId" from="itemStatusHistory?.first?.changeByUserLoginId"/>

<!-- fetch the Parent Product details -->
<entity-find entity-name="org.apache.ofbiz.product.product.ProductAssocAndFrom" list="parentProductDetails">
<econdition field-name="productIdTo" from="inventoryItem.productId"/>
<econdition field-name="productAssocTypeId" value="PRODUCT_VARIANT"/>
<date-filter/>
</entity-find>
<set field="itemDetail.parentProductId" from="parentProductDetails?.first?.productId"/>
<set field="itemDetail.parentProductName" from="parentProductDetails?.first?.productName"/>

<script>itemList.add(itemDetail)</script>
</iterate>
</actions>
Expand Down

0 comments on commit 5e51216

Please sign in to comment.