<?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.
-->

<entity-engine-xml>

    <!-- An order that needs stock from two inventory items -->
    <OrderHeader createdBy="admin" currencyUom="USD" entryDate="2011-08-12 23:17:11.507" grandTotal="105.14" orderId="DEMO81015" orderTypeId="SALES_ORDER" priority="2" productStoreId="9000" remainingSubTotal="79.56" salesChannelEnumId="WEB_SALES_CHANNEL" statusId="ORDER_APPROVED" visitId="10043"/>
    
    <OrderItem changeByUserLoginId="admin" isModifiedPrice="N" isPromo="N" itemDescription="Round Gizmo" orderId="DEMO81015" orderItemSeqId="00001" orderItemTypeId="PRODUCT_ORDER_ITEM" prodCatalogId="DemoCatalog" productId="GZ-2644" quantity="6.000000" selectedAmount="0.000000" statusId="ITEM_APPROVED" unitListPrice="48.000" unitPrice="38.400"/>
    
    <OrderContactMech contactMechId="9021" contactMechPurposeTypeId="ORDER_EMAIL" orderId="DEMO81015"/>
    <OrderContactMech contactMechId="9010" contactMechPurposeTypeId="SHIPPING_LOCATION" orderId="DEMO81015"/>

    <OrderRole orderId="DEMO81015" partyId="Company" roleTypeId="BILL_FROM_VENDOR"/>
    <OrderRole orderId="DEMO81015" partyId="DemoCustomer" roleTypeId="BILL_TO_CUSTOMER"/>
    <OrderRole orderId="DEMO81015" partyId="DemoCustomer" roleTypeId="END_USER_CUSTOMER"/>
    <OrderRole orderId="DEMO81015" partyId="DemoCustomer" roleTypeId="PLACING_CUSTOMER"/>
    <OrderRole orderId="DEMO81015" partyId="DemoCustomer" roleTypeId="SHIP_TO_CUSTOMER"/>

    <OrderPaymentPreference createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.789" maxAmount="105.14" orderId="DEMO81015" orderPaymentPreferenceId="10020" overflowFlag="N" paymentMethodTypeId="EXT_OFFLINE" presentFlag="N" statusId="PAYMENT_NOT_RECEIVED" swipedFlag="N"/>

    <OrderItemShipGroup carrierPartyId="UPS" carrierRoleTypeId="CARRIER" contactMechId="9010" isGift="N" maySplit="N" orderId="DEMO81015" shipGroupSeqId="00001" shipmentMethodTypeId="NEXT_DAY"/>

    <OrderItemShipGroupAssoc orderId="DEMO81015" orderItemSeqId="00001" quantity="6.000000" shipGroupSeqId="00001"/>

    <OrderAdjustment amount="-8.840" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" description="10% off entire purchase" orderAdjustmentId="81015" orderAdjustmentTypeId="PROMOTION_ADJUSTMENT" orderId="DEMO81015" orderItemSeqId="_NA_" productPromoActionSeqId="01" productPromoId="9011" productPromoRuleId="01" shipGroupSeqId="_NA_"/>
    <OrderAdjustment amount="-103.600" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" description="Buy 4 items for $50 from Purple Gizmo [GZ-5005], Rainbow Gizmo [GZ-1004], Round Gizmo [GZ-2644] or Square Gizmo [GZ-2002] limit 2 per customer" orderAdjustmentId="81016" orderAdjustmentTypeId="PROMOTION_ADJUSTMENT" orderId="DEMO81015" orderItemSeqId="00001" productPromoActionSeqId="01" productPromoId="9015" productPromoRuleId="01" shipGroupSeqId="_NA_"/>
    <OrderAdjustment amount="-38.400" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" description="Get $500 off any item in the Small Gizmos [101] category, limit 1 per order, 2 per customer, 3 for entire promotion. Discount not to exceed the price of the item." orderAdjustmentId="81017" orderAdjustmentTypeId="PROMOTION_ADJUSTMENT" orderId="DEMO81015" orderItemSeqId="00001" productPromoActionSeqId="01" productPromoId="9016" productPromoRuleId="01" shipGroupSeqId="_NA_"/>
    <OrderAdjustment amount="24.700" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" orderAdjustmentId="81018" orderAdjustmentTypeId="SHIPPING_CHARGES" orderId="DEMO81015" orderItemSeqId="_NA_" shipGroupSeqId="00001"/>
    <OrderAdjustment amount="0.000" comments="Utah County, Utah Sales Tax" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" customerReferenceId="12-3456789" exemptAmount="0.00" orderAdjustmentId="81019" orderAdjustmentTypeId="SALES_TAX" orderId="DEMO81015" orderItemSeqId="_NA_" overrideGlAccountId="224153" primaryGeoId="UT-UTAH" shipGroupSeqId="00001" sourcePercentage="0.100000" taxAuthGeoId="UT-UTAH" taxAuthPartyId="UT_UTAH_TAXMAN" taxAuthorityRateSeqId="9005"/>
    <OrderAdjustment amount="0.000" comments="Utah County, Utah Sales Tax" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" customerReferenceId="12-3456789" exemptAmount="0.08" orderAdjustmentId="81020" orderAdjustmentTypeId="SALES_TAX" orderId="DEMO81015" orderItemSeqId="00001" overrideGlAccountId="224153" primaryGeoId="UT-UTAH" shipGroupSeqId="00001" sourcePercentage="0.100000" taxAuthGeoId="UT-UTAH" taxAuthPartyId="UT_UTAH_TAXMAN" taxAuthorityRateSeqId="9005"/>
    <OrderAdjustment amount="0.000" comments="Utah State Sales Tax" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" customerReferenceId="12-3456789" exemptAmount="4.19" orderAdjustmentId="81021" orderAdjustmentTypeId="SALES_TAX" orderId="DEMO81015" orderItemSeqId="00001" overrideGlAccountId="224153" primaryGeoId="UT" shipGroupSeqId="00001" sourcePercentage="4.750000" taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" taxAuthorityRateSeqId="9004"/>
    <OrderAdjustment amount="0.884" comments="1% OFB _NA_ Tax" createdByUserLogin="admin" createdDate="2011-08-12 23:17:11.708" orderAdjustmentId="81022" orderAdjustmentTypeId="SALES_TAX" orderId="DEMO81015" orderItemSeqId="00001" overrideGlAccountId="224000" primaryGeoId="_NA_" shipGroupSeqId="00001" sourcePercentage="1.000000" taxAuthGeoId="_NA_" taxAuthPartyId="_NA_" taxAuthorityRateSeqId="9000"/>

    <!-- OrderStatus of PAYMENT_NOT_RECEIVED automatically generated by an EECA -->
    <OrderStatus orderId="DEMO81015" orderStatusId="81015" statusDatetime="2011-08-12 23:17:11.507" statusId="ORDER_CREATED" statusUserLogin="admin"/>
    <OrderStatus orderId="DEMO81015" orderItemSeqId="00001" orderStatusId="81016" statusDatetime="2011-08-12 23:17:11.507" statusId="ITEM_CREATED" statusUserLogin="admin"/>

    <InventoryItemDetail accountingQuantityDiff="0.000000" availableToPromiseDiff="-5.000000" effectiveDate="2011-08-12 23:17:12.433" inventoryItemDetailSeqId="81015" inventoryItemId="9001" orderId="DEMO81015" orderItemSeqId="00001" quantityOnHandDiff="0.000000"/>
    <InventoryItemDetail accountingQuantityDiff="0.000000" availableToPromiseDiff="-1.000000" effectiveDate="2011-08-12 23:17:12.85" inventoryItemDetailSeqId="81016" inventoryItemId="9025" orderId="DEMO81015" orderItemSeqId="00001" quantityOnHandDiff="0.000000"/>

    <OrderItemShipGrpInvRes createdDatetime="2011-08-12 23:17:12.839" inventoryItemId="9001" orderId="DEMO81015" orderItemSeqId="00001" priority="2" promisedDatetime="2011-08-27 23:17:11.507" quantity="5.000000" reserveOrderEnumId="INVRO_FIFO_REC" reservedDatetime="2011-08-12 23:17:12.839" shipGroupSeqId="00001"/>
    <OrderItemShipGrpInvRes createdDatetime="2011-08-12 23:17:12.967" inventoryItemId="9025" orderId="DEMO81015" orderItemSeqId="00001" priority="2" promisedDatetime="2011-08-27 23:17:11.507" quantity="1.000000" reserveOrderEnumId="INVRO_FIFO_REC" reservedDatetime="2011-08-12 23:17:12.967" shipGroupSeqId="00001"/>

</entity-engine-xml>
