<?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="../Components/Common/Components.xsd"/>

    <xsd:element name="Contract" type="ContractType">
        <xsd:annotation>
            <xsd:documentation source="http://schema.infor.com/Infor1.0"> JournalType used for
                identifying the type of a currency exchange rate. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:complexType name="ContractType">
        <xsd:sequence>
            <xsd:element ref="ContractHeader" minOccurs="0"/>
            <xsd:element ref="ContractSchedule" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="ContractBalance" minOccurs="0" />
        </xsd:sequence>
    </xsd:complexType>
        
    <xsd:complexType name="ContractHeaderType">
        <xsd:complexContent>
            <xsd:extension base="StatusEnabledHeaderType">
                <xsd:sequence>
                    <xsd:element ref="oa:CustomerParty" minOccurs="0"/>
                    <xsd:element ref="oa:ShipToParty" minOccurs="0"/>
                    <xsd:element ref="oa:SupplierParty" minOccurs="0"/>
                    <xsd:element ref="oa:ShipFromParty" minOccurs="0" maxOccurs="unbounded"/>   
                    <xsd:element ref="oa:Location" minOccurs="0" maxOccurs="unbounded"/> 
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
    <xsd:element name="ContractHeader" type="ContractHeaderType"/>
    
    <xsd:complexType name="ContractScheduleType">
        <xsd:sequence>
            <xsd:element ref="oa:EffectiveTimePeriod" minOccurs="0"/>
            <xsd:element ref="ContractBasisCode" minOccurs="0"/>
            <xsd:element ref="ContractPrice" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="oa:PositiveIntegerNumericType" use="optional"/>
    </xsd:complexType>
    
    <xsd:element name="ContractSchedule" type="ContractScheduleType"/>
    
    <xsd:complexType name="ContractPriceType">
        <xsd:sequence>
            <xsd:element ref="oa:Item" minOccurs="0"/>
            <xsd:element ref="oa:Location" minOccurs="0"/>
            <xsd:element ref="TargetQuantity" minOccurs="0"/>
            <xsd:element ref="ContractAmount"  minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:element name="ContractPrice" type="ContractPriceType"/>
    
    <xsd:complexType name="ContractBalanceType">
        <xsd:sequence>
            
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:element name="ContractBalance" type="ContractBalanceType">
        <xsd:annotation>
            <xsd:documentation>This is a stub. This element is not yet implemented.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="ContractBasisCode" type="oa:CodeType">
        <xsd:annotation>
            <xsd:documentation>These will be in the Dimension ContractBasis and will have initially the values of Order, Ship, Delivery.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="ContractAmount" type="oa:AmountType"/>
    
    <xsd:element name="TargetQuantity" type="oa:QuantityType"/>
    
</xsd:schema>
