<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date          By      Note
10 Apr 2008    JB      Added correct Copyright and update comments to schema.
 
        *****     Update End     *****
 
-->


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schema.infor.com/InforOAGIS/2"
    targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:include schemaLocation="../Operational/ManufacturingComponents.xsd"/>

    <xsd:complexType name="DefaultSourceType">
        <xsd:sequence>
            <xsd:choice>
                <xsd:element ref="SupplierParty" minOccurs="0"/>
                <xsd:element ref="WarehouseLocation" minOccurs="0"/>
            </xsd:choice>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="HorizonsType">
        <xsd:sequence>
            <xsd:element ref="HorizonDuration" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="HorizonDurationType">
        <xsd:simpleContent>
            <xsd:extension base="DurationMeasureType">
                <xsd:attribute name="durationType" type="NormalizedStringType"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="ProcurementParametersType">
        <xsd:sequence>
            <xsd:element ref="ProcurementMethodCode" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> Manufacture, Purchase, Transfer </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="DefaultSource" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> This is the reference to the source. This can be a reference
                        to a Location (with a plant or warehouse type) of the type specified by the
                        Procurement Method, or a Supplier. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="PlanningMethodCode" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>This is the code for the planning method used for this item
                        for a location. This will use the code PlanningMethod. The list of
                        valid planning methods will be made available in the documentaiton. There
                        should be the ability to turn off codes that are not available for the
                        implemented package.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="LinePointQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The quantity of this item at which the purchasing system
                        should include this item in a purchase plan for the purposes of making a
                        planned buy.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="LinePointBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="OrderPointQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The quantity of this item at which the purchasing system
                        should include this item on an emergency order.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="OrderPointBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="MinQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The quantity at which the item should be placed on a an order
                        when using a Min/Max order method.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="MinBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="MaxQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The quantity the the order should put the stock level at when
                        using the Min/Max order method. (Order quantity = Max Quantity - Stock
                        Level)</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="MaxBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="SafetyStockQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The amount of stock that should remain in inventory at the
                        lowest point of the planning cycle to cover variances is usage and supplier
                        lead time.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="SafetyStockBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="SafetyStockDays" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The number of days that should be covered for normal usage by
                        the safety stock.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="EOQQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation/>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="EOQBaseUOMQuantity" minOccurs="0"/>
            <xsd:element ref="LeadTimeDuration" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation/>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="OrderCycleDuration" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation/>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Horizons" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation/>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="SupercedeType">
        <xsd:sequence>
            <xsd:element ref="Components" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="EffectiveDateTime" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="SubstitutionType">
        <xsd:sequence>
            <xsd:element ref="Components" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="EffectiveDateTime" type="DateTimeType" use="optional"/>
        <xsd:attribute name="EndDateTime" type="DateTimeType" use="optional"/>
        <xsd:attribute name="Priority" type="PriorityEnumType" use="optional"/>
    </xsd:complexType>

    <xsd:element name="PlanningMethodCode" type="CodeType"/>
    <xsd:element name="ProcurementMethodCode" type="CodeType"/>

    <xsd:element name="DefaultSource" type="DefaultSourceType"/>

    <xsd:element name="OrderCycleDuration" type="DurationMeasureType"/>
    <xsd:element name="ObsolescenseDateTime" type="DateTimeType"/>
    <xsd:element name="BestByShelfLifeDuration" type="DurationMeasureType"/>
    <xsd:element name="SellByShelfLifeDuration" type="DurationMeasureType"/>
    <xsd:element name="QualityInspectionLeadTimeDuration" type="DurationMeasureType"/>

    <xsd:element name="SafetyStockDays" type="PositiveIntegerNumericType"/>


    <xsd:element name="Horizons" type="HorizonsType"/>
    <xsd:element name="HorizonDuration" type="HorizonDurationType"/>

    <xsd:element name="Supercedes" type="SupercedeType"/>
    <xsd:element name="Substitutions" type="SubstitutionType"/>
    <xsd:element name="AddOns" type="ItemInstanceType"/>

    <xsd:element name="ProcurementParameters" type="ProcurementParametersType"/>
</xsd:schema>
