<?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.
    
-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:oa="http://www.openapplications.org/oagis/9" xmlns="http://schema.infor.com/Infor1.0"
    targetNamespace="http://schema.infor.com/Infor1.0" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.openapplications.org/oagis/9"
        schemaLocation="../../../../9.0/Resources/Components/Common/Components.xsd"/>
    <xsd:include schemaLocation="../Common/Components.xsd"/>

    <xsd:complexType name="ComponentType">
        <xsd:complexContent>
            <xsd:extension base="oa:ItemInstanceType">
                <xsd:sequence>
                    <xsd:element ref="oa:Quantity"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="DefaultSourceType">
        <xsd:sequence>
            <xsd:choice>
                <xsd:element ref="oa:SupplierParty" minOccurs="0"/>
                <xsd:element ref="oa: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="oa:DurationMeasureType">
                <xsd:attribute name="durationType" type="oa: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 dimension 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="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="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="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="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="EOQQuantity" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation/>
                </xsd:annotation>
            </xsd:element>
            <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="oa:EffectiveDateTime" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="PlanningMethodCode" type="oa:CodeType"/>
    <xsd:element name="ProcurementMethodCode" type="oa:CodeType"/>

    <xsd:element name="DefaultSource" type="DefaultSourceType"/>

    <xsd:element name="LeadTimeDuration" type="oa:DurationMeasureType"/>
    <xsd:element name="OrderCycleDuration" type="oa:DurationMeasureType"/>

    <xsd:element name="EOQQuantity" type="oa:QuantityType"/>
    <xsd:element name="LinePointQuantity" type="oa:QuantityType"/>
    <xsd:element name="MaxQuantity" type="oa:QuantityType"/>
    <xsd:element name="MinQuantity" type="oa:QuantityType"/>
    <xsd:element name="OrderPointQuantity" type="oa:QuantityType"/>
    <xsd:element name="SafetyStockQuantity" type="oa:QuantityType"/>

    <xsd:element name="Horizons" type="HorizonsType"/>
    <xsd:element name="HorizonDuration" type="HorizonDurationType"/>

    <xsd:element name="Supercedes" type="SupercedeType"/>
    <xsd:element name="Substitutions" type="oa:ItemInstanceType"/>
    <xsd:element name="AddOns" type="oa:ItemInstanceType"/>
    <xsd:element name="Components" type="ComponentType"/>

    <xsd:element name="ProcurementParameters" type="ProcurementParametersType"/>
</xsd:schema>
