<?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® Payable 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/Nouns/Payable.xsd"/>
    <xsd:include schemaLocation="../Components/Common/Components.xsd"/>

    <xsd:element name="Payable" type="PayableType"/>

    <xsd:complexType name="PayableType">
        <xsd:annotation>
            <xsd:documentation>The schema type for Payable. This document tracks the status and
                balance amounts for a payable.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>

            <xsd:element ref="PayableHeader" minOccurs="0"/>
            <xsd:element ref="PayableLine" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="PayableHeader" type="PayableHeaderType"/>
    <xsd:element name="PayableLine" type="PayableLineType"/>

    <xsd:complexType name="PayableHeaderType">
        <xsd:complexContent>
            <xsd:extension base="oa:StatusEnabledHeaderType">
                <xsd:sequence>
                    <xsd:element ref="oa:SupplierParty" minOccurs="0"/>
                    <xsd:element ref="oa:RemitToParty" minOccurs="0"/>
                    <xsd:element ref="PayableStyle" minOccurs="0"/>
                    <xsd:element ref="InvoiceReference" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="oa:Classification" minOccurs="0"/>
                    <xsd:element ref="Supplier1099Indicator" minOccurs="0"/>
                    <xsd:element ref="oa:ExtendedAmount" minOccurs="0"/>
                    <xsd:element ref="oa:TotalAmount" minOccurs="0"/>
                    <xsd:element ref="oa:Tax" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="oa:Allowance" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="oa:Charge" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="Discount" minOccurs="0"/>
                    <xsd:element ref="PayableAmount" minOccurs="0"/>
                    <xsd:element ref="PaymentAmount" minOccurs="0"/>
                    <xsd:element ref="PaidAmount" minOccurs="0"/>
                    <xsd:element ref="oa:CurrencyExchangeRate" minOccurs="0"/>
                    <xsd:element ref="oa:PaymentTerm" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="DueDate" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="PayableLineType">
        <xsd:complexContent>
            <xsd:extension base="oa:StatusEnabledLineType">
                <xsd:sequence>
                    <xsd:group ref="oa:ItemInstanceGroup"/>
                    <xsd:element ref="oa:ExtendedAmount" minOccurs="0"/>
                    <xsd:element ref="oa:TotalAmount" minOccurs="0"/>
                    <xsd:element ref="oa:Tax" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="oa:Allowance" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="oa:Charge" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="Discount" minOccurs="0"/>
                    <xsd:element ref="PayableAmount" minOccurs="0"/>
                    <xsd:element ref="PaymentAmount" minOccurs="0"/>
                    <xsd:element ref="PaidAmount" minOccurs="0"/>
                    <xsd:element ref="oa:CurrencyExchangeRate" minOccurs="0"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="PayableAmount" type="oa:AmountType"/>
    <xsd:element name="PaymentAmount" type="oa:AmountType"/>
    <xsd:element name="PaidAmount" type="oa:AmountType"/>
    <xsd:element name="DueDate" type="oa:DateTimeType"/>
    
    <xsd:element name="PayableStyle" type="oa:StringType">
        <xsd:annotation>
            <xsd:documentation> This is the type of document that caused this payable to exist. This
                will be an Infor managed dimension. Expected codes in this dimension will be
                Invoice, CreditMemo, DebitMemo, Commission, Miscellaneous, Overhead.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
</xsd:schema>
