Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
156 lines (127 sloc) 8.21 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.
You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<entity-facade-xml type="seed">
<!--
These DataDocuments are for inventory reporting and analysis, both current inventory and future projected inventory.
All documents have a facilityId to filter by and a productId to use as a term for buckets.
Quantity fields across the documents include: availableToPromiseTotal, quantityOnHandTotal,
orderQuantity, quantityReservedSum, quantityNotAvailableSum, quantityNotIssuedSum,
estimatedConsumeQuantity, consumeQuantity, estimatedProduceQuantity, produceQuantity, and prodEstQuantity
There are various dates available for buckets by date for more detailed results for things like graphs.
For current inventory:
- statusId (from MantleInventoryAsset) = AstAvailable
- partStatusId (from MantleInventoryOrderItem) NOT IN OrderCompleted,OrderRejected,OrderCancelled
- statusId (from MantleInventoryRunConsume,MantleInventoryRunProduce) NOT IN WeComplete,WeClosed,WeCancelled
- readyDate >= now (or beginning of current day)
These can be queried using the mantle.product.InventoryReportServices.get#InventoryProjectedInfo service.
-->
<!-- Inventory Asset -->
<!-- TODO: somehow handle old Asset records (with QOH=0)? If we set a condition we'll just end up with stale documents with a false positive QOH -->
<dataDocuments dataDocumentId="MantleInventoryAsset" indexName="mantle_inventory" documentName="InventoryAsset"
primaryEntityName="mantle.product.asset.Asset" documentTitle="${assetId}:${productId}:${facilityId}">
<fields fieldPath="assetId"/>
<fields fieldPath="assetTypeEnumId"/>
<fields fieldPath="statusId"/>
<fields fieldPath="ownerPartyId"/>
<fields fieldPath="productId"/>
<fields fieldPath="facilityId"/>
<fields fieldPath="locationSeqId"/>
<fields fieldPath="availableToPromiseTotal"/>
<fields fieldPath="quantityOnHandTotal"/>
<fields fieldPath="receivedDate"/>
<fields fieldPath="expectedEndOfLife"/>
<conditions fieldNameAlias="assetTypeEnumId" fieldValue="AstTpInventory"/>
</dataDocuments>
<!-- Sales OrderItem -->
<dataDocuments dataDocumentId="MantleInventoryOrderItem" indexName="mantle_inventory" documentName="OrderItem"
primaryEntityName="mantle.order.OrderItem" documentTitle="${orderId}:${orderItemSeqId}">
<fields fieldPath="orderId"/>
<fields fieldPath="orderItemSeqId"/>
<fields fieldPath="orderPartSeqId"/>
<fields fieldPath="productId"/>
<fields fieldPath="quantity" fieldNameAlias="orderQuantity"/>
<fields fieldPath="selectedAmount"/>
<fields fieldPath="unitAmount"/>
<fields fieldPath="requiredByDate"/>
<fields fieldPath="part:statusId" fieldNameAlias="partStatusId"/>
<fields fieldPath="part:facilityId" fieldNameAlias="facilityId"/>
<fields fieldPath="part:vendorPartyId" fieldNameAlias="vendorPartyId"/>
<fields fieldPath="part:vendorRoles:roleTypeId" fieldNameAlias="vendorRoleTypeId"/>
<fields fieldPath="reservations:assetId" fieldNameAlias="assetId"/>
<fields fieldPath="reservations:quantity" fieldNameAlias="quantityReserved"/>
<fields fieldPath="reservations:quantityNotAvailable" fieldNameAlias="quantityNotAvailable"/>
<fields fieldPath="reservations:quantityNotIssued" fieldNameAlias="quantityNotIssued"/>
<fields fieldPath="reservations:reservedDate" fieldNameAlias="reservedDate"/>
<fields fieldPath="reservations:currentPromisedDate" fieldNameAlias="currentPromisedDate"/>
<fields fieldPath="header:placedDate"/>
<conditions fieldNameAlias="productId" operator="is-not-null" fieldValue=""/>
</dataDocuments>
<!-- Production Run Estimate - Consume -->
<dataDocuments dataDocumentId="MantleInventoryRunConsume" indexName="mantle_inventory" documentName="RunConsume"
primaryEntityName="mantle.work.effort.WorkEffortProduct" documentTitle="${workEffortId}:${productId}">
<fields fieldPath="workEffortId"/>
<fields fieldPath="productId"/>
<fields fieldPath="estimatedQuantity" fieldNameAlias="estimatedConsumeQuantity"/>
<fields fieldPath="fromDate"/>
<fields fieldPath="thruDate"/>
<fields fieldPath="typeEnumId"/>
<fields fieldPath="issuances:assetId" fieldNameAlias="assetId"/>
<fields fieldPath="issuances:issuedDate" fieldNameAlias="consumeDate"/>
<fields fieldPath="issuances:quantity" fieldNameAlias="consumeQuantity"/>
<fields fieldPath="workEffort:statusId"/>
<fields fieldPath="workEffort:estimatedStartDate"/>
<fields fieldPath="workEffort:facilityId" fieldNameAlias="lineFacilityId"/>
<!-- the line's parent facility, the warehouse, is the main Facility we would filter/etc by -->
<fields fieldPath="workEffort:facility:parentFacilityId" fieldNameAlias="facilityId"/>
<conditions fieldNameAlias="typeEnumId" fieldValue="WeptConsume"/>
</dataDocuments>
<!-- Production Run Estimate - Produce -->
<dataDocuments dataDocumentId="MantleInventoryRunProduce" indexName="mantle_inventory" documentName="RunProduce"
primaryEntityName="mantle.work.effort.WorkEffortProduct" documentTitle="${workEffortId}:${productId}">
<fields fieldPath="workEffortId"/>
<fields fieldPath="productId"/>
<fields fieldPath="estimatedQuantity" fieldNameAlias="estimatedProduceQuantity"/>
<fields fieldPath="fromDate"/>
<fields fieldPath="thruDate"/>
<fields fieldPath="typeEnumId"/>
<fields fieldPath="receipts:assetId" fieldNameAlias="assetId"/>
<fields fieldPath="receipts:receivedDate" fieldNameAlias="produceDate"/>
<fields fieldPath="receipts:quantityAccepted" fieldNameAlias="produceQuantity"/>
<fields fieldPath="workEffort:statusId"/>
<fields fieldPath="workEffort:estimatedStartDate"/>
<fields fieldPath="workEffort:facilityId" fieldNameAlias="lineFacilityId"/>
<!-- the line's parent facility, the warehouse, is the main Facility we would filter/etc by -->
<fields fieldPath="workEffort:facility:parentFacilityId" fieldNameAlias="facilityId"/>
<conditions fieldNameAlias="typeEnumId" fieldValue="WeptProduce"/>
</dataDocuments>
<!-- Production Estimate -->
<dataDocuments dataDocumentId="MantleInventoryProdEstimate" indexName="mantle_inventory" documentName="ProductionEstimate"
primaryEntityName="mantle.work.estimate.ProductionEstimate" documentTitle="${productId}:${facilityId}:${readyDate}">
<fields fieldPath="productId"/>
<!-- use facilityId for the destination to match the field name used in other inventory documents, for filtering/etc -->
<fields fieldPath="destinationFacilityId" fieldNameAlias="facilityId"/>
<fields fieldPath="quantity" fieldNameAlias="prodEstQuantity"/>
<fields fieldPath="readyDate"/>
</dataDocuments>
<!-- DataFeed -->
<!-- uncomment this to enable the feed and index data for these documents:
<moqui.entity.feed.DataFeed dataFeedId="MantleInventorySearch" dataFeedTypeEnumId="DTFDTP_RT_PUSH"
feedName="Mantle Inventory Search" feedReceiveServiceName="org.moqui.impl.EntityServices.index#DataDocuments">
<documents dataDocumentId="MantleInventoryAsset"/>
<documents dataDocumentId="MantleInventoryOrderItem"/>
<documents dataDocumentId="MantleInventoryRunConsume"/>
<documents dataDocumentId="MantleInventoryRunProduce"/>
<documents dataDocumentId="MantleInventoryProdEstimate"/>
</moqui.entity.feed.DataFeed>
-->
</entity-facade-xml>
You can’t perform that action at this time.