<?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.
29 Sep 2010    NO      Added GLFullAccount element in the row (JIRA BOD-1423).
29 Sep 2010    NO      Added ReportingCurrencyAmount and AlternativeCurrencyAmount elements in the row (JIRA BOD-1379).


        *****     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/Financial/Components.xsd"/>

    <xsd:element name="GLMovement" type="GLMovementType">
        <xsd:annotation>
            <xsd:documentation> GLMovement used for associating a chart of accounts, a currency, and
                a calendar.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="GLMovementType">
        <xsd:complexContent>
            <xsd:extension base="StatusEnabledStandardHeaderType">
                <xsd:sequence>
                    <xsd:element ref="GLMovementRow" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="GLMovementRowType">
        <xsd:sequence>
            <xsd:element ref="LastJournalSequenceID" minOccurs="0"/>
            <xsd:element ref="AccountingJournalReference" minOccurs="0"/>
            <xsd:element ref="LedgerSetupReference" minOccurs="0"/>
            <xsd:element ref="AccountingBookTypeCode" minOccurs="0"/>
            <xsd:element ref="PostingKey" minOccurs="0"/>
            <xsd:element ref="GLAccount" minOccurs="0"/>
            <xsd:element ref="AccountType" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> AccountType is an account classification that specifies the
                        use of this account. Balance Sheet, P+L, Statistical Single Year,
                        Statistical Multi-year. Other classifications can be associated to the
                        account through the classification element especially the AccountSubType
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="DimensionCodes" minOccurs="0"/>
            <xsd:element ref="LineType" minOccurs="0"/>
            <xsd:element ref="FinancialCalendarReference" minOccurs="0"/>
            <xsd:element ref="AccountingDate" minOccurs="0"/>
            <xsd:element ref="AccountingDayNumber" minOccurs="0"/>
            <xsd:element ref="SourcePostingDate" minOccurs="0"/>
            <xsd:element ref="SourceDayNumber" minOccurs="0"/>
            <xsd:element ref="DebitMovement" minOccurs="0"/>
            <xsd:element ref="CreditMovement" minOccurs="0"/>
            <xsd:element ref="NetMovement" minOccurs="0"/>
            <xsd:element ref="MemoValue" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="UserArea" minOccurs="0"/>
            <xsd:element ref="GLFullAccount" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="GLMovementRow" type="GLMovementRowType"/>

    <xsd:complexType name="MovementType">
        <xsd:sequence>
            <xsd:element ref="FunctionalAmount" minOccurs="0"/>
            <xsd:element ref="SourceAmount" minOccurs="0"/>
            <xsd:element ref="Amount" minOccurs="0"/>
            <xsd:element ref="ReportingCurrencyAmount" minOccurs="0"/>
            <xsd:element ref="AlternativeCurrencyAmount" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="MemoValueType">
        <xsd:sequence>
            <xsd:element ref="MemoType" minOccurs="0"/>
            <xsd:element ref="MemoDebit" minOccurs="0"/>
            <xsd:element ref="MemoCredit" minOccurs="0"/>
            <xsd:element ref="MemoNet" minOccurs="0"/>
            <xsd:element ref="Code" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> Used to define the measure of this amount. eg. lines,
                        pounds, gallons or orders. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="PositiveIntegerNumericType"/>
    </xsd:complexType>

    <xsd:element name="SourcePostingDate" type="DateType"/>
    <xsd:element name="MemoValue" type="MemoValueType"/>

    <xsd:element name="DebitMovement" type="MovementType"/>
    <xsd:element name="CreditMovement" type="MovementType"/>
    <xsd:element name="NetMovement" type="MovementType"/>

    <xsd:element name="LastJournalSequenceID" type="NormalizedStringType"/>
    <xsd:element name="SourcePeriodID" type="NormalizedStringType"/>

    <xsd:element name="MemoDebit" type="NumericType"/>
    <xsd:element name="MemoCredit" type="NumericType"/>
    <xsd:element name="MemoNet" type="NumericType"/>

    <xsd:element name="AccountingDayNumber" type="PositiveIntegerNumericType"/>
    <xsd:element name="SourceDayNumber" type="PositiveIntegerNumericType"/>

    <xsd:element name="PostingKey" type="StringType">
        <xsd:annotation>
            <xsd:documentation> A string that uniquely identifies the combination of account and
                dimensions to facilitate better update performance. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="GLFullAccount" type="StringType">
        <xsd:annotation>
            <xsd:documentation> This this a segmented account with the Nominal Account and then a delimited 
                list of the dimension values. As an example, SX.e uses division, department, 
                account, sub-account.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    
</xsd:schema>
