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

    <xsd:element name="Contract" type="ContractType">
        <xsd:annotation>
            <xsd:documentation >The Contract is a light-weight version of the noun which will be created in conjucntion with the pricing evolve component.</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="CustomerParty" minOccurs="0"/>
                    <xsd:element ref="ShipToParty" minOccurs="0"/>
                    <xsd:element ref="SupplierParty" minOccurs="0"/>
                    <xsd:element ref="ShipFromParty" minOccurs="0" maxOccurs="unbounded"/>   
                    <xsd:element ref="Location" minOccurs="0" maxOccurs="unbounded"/> 
                    <xsd:element ref="BuyerReference" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
    <xsd:element name="ContractHeader" type="ContractHeaderType"/>
    
    <xsd:complexType name="ContractScheduleType">
        <xsd:sequence>
            <xsd:element ref="EffectiveTimePeriod" minOccurs="0"/>
            <xsd:element ref="ContractBasisCode" minOccurs="0"/>
            <xsd:element ref="ContractPrice" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="PositiveIntegerNumericType" use="optional"/>
    </xsd:complexType>
    
    <xsd:element name="ContractSchedule" type="ContractScheduleType"/>
    
    <xsd:complexType name="ContractPriceType">
        <xsd:sequence>
            <xsd:element ref="Item" minOccurs="0"/>
            <xsd:element ref="Location" minOccurs="0"/>
            <xsd:element ref="TargetQuantity" minOccurs="0"/>
            <xsd:element ref="ContractAmount"  minOccurs="0"/>
            <xsd:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded"/>
        </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="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="AmountType"/>
    
    <xsd:element name="TargetQuantity" type="QuantityType"/>
    
</xsd:schema>
