<?xml version="1.0" encoding="utf-8"?>
<!--

    ** OAGIS® Revision: 9.2 Release Candidate 1  **
    ** Date: 26 Oct 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  
     
    Name: 
-->
<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="../Components/Common/Components.xsd"/>
        <xsd:element name="Fulfillment" type="FulfillmentType">
                <xsd:annotation>
                        <xsd:documentation source="http://www.openapplications.org/oagis/9"
                                >Fulfillment always corresponds to one "lowest level" demand
                                line. This is the lowest level in a demand BOD that defines a demand
                                with item+warehouse+quantity+date. For sales orders, for example,
                                this could be the order line, or the details below it if they exist.
                                (If, during order creation, ATP returns that some demand cannot be
                                completely delivered at the requested date, then ATP returns when
                                the remainder can be delivered..</xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:complexType name="FulfillmentType">
                <xsd:sequence>
                        <xsd:element ref="FulfillmentHeader" minOccurs="0"/>
                        <xsd:element ref="FulfillmentLine" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="FulfillmentHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledHeaderType">
                                <xsd:sequence> 
                                        <xsd:element ref="Item" minOccurs="0"/>
                                        <xsd:element ref="Location" minOccurs="0"/>
                                        <xsd:element ref="RequestedDateTime" minOccurs="0"/>
                                        <xsd:element ref="PromisedDateTime" minOccurs="0"/>
                                        <xsd:element ref="CommittedDateTime" minOccurs="0"/>
                                        <xsd:element ref="RequestedQuantity" minOccurs="0"/>
                                        <xsd:element ref="PlannedFulfillQuantity" minOccurs="0"/>
                                        <xsd:element ref="EarliestLineDateTime" minOccurs="0"/>
                                        <xsd:element ref="LatestLineDateTime" minOccurs="0"/>                                     
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:element name="FulfillmentHeader" type="FulfillmentHeaderType"/>

        <xsd:complexType name="FulfillmentLineType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledLineType">
                                <xsd:sequence> 
                                        <xsd:element ref="DateTime" minOccurs="0"/>
                                        <xsd:element ref="Quantity" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:element name="FulfillmentLine" type="FulfillmentLineType"/>

</xsd:schema>
