<?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
8 Jul 2009    PO      Added new noun.

        *****     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="ExpenseReport" type="ExpenseReportType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">When
                                included in a hierarchy, the Components are position dependent for
                                their meaning and applicability to the Bill of
                                Resources.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:complexType name="ExpenseReportType">
                <xsd:sequence>
                        <xsd:element ref="ExpenseReportHeader" minOccurs="0"/>
                        <xsd:element ref="ExpenseReportLine" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="ExpenseReportHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledHeaderType">
                                <xsd:sequence>
                                        <xsd:element ref="ExpenseReportTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="PersonnelReference" minOccurs="0"/>
                                        <xsd:element ref="TotalAmount" minOccurs="0"/>
                                        <xsd:element ref="CashAdvanceAmount" minOccurs="0"/>
                                        <xsd:element ref="CompanyChargeAmount" minOccurs="0"/>
                                        <xsd:element ref="PersonnelDueAmount" minOccurs="0"/>
                                        <xsd:element ref="CompanyDueAmount" minOccurs="0"/>
                                        <xsd:element ref="AuthorizedAmount" minOccurs="0"/>
                                        <xsd:element ref="AppliedLossCarryForwardAmount"
                                                minOccurs="0"/>
                                        <xsd:element ref="AppliedAdjustmentAmount" minOccurs="0"/>
                                        <xsd:element ref="TotalCorporateChargeAmount" minOccurs="0"/>
                                        <xsd:element ref="RemainingLossCarryForwardAmount"
                                                minOccurs="0"/>
                                        <xsd:element ref="GeneratedLossCarryForwardAmount"
                                                minOccurs="0"/>
                                        <xsd:element ref="CompanyPaysCardAmount" minOccurs="0"/>
                                        <xsd:element ref="ExpenseException" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="Overage" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="CreatedByID" minOccurs="0"/>
                                        <xsd:element ref="PriorityCode" minOccurs="0"/>
                                        <xsd:element ref="RecallableIndicator" minOccurs="0"/>
                                        <xsd:element ref="RemittanceAdviceReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="ID" minOccurs="0"/>
                                        <xsd:element ref="ExportStatus" minOccurs="0"/>
                                        <xsd:element ref="Purpose" minOccurs="0"/>
                                        <xsd:element ref="DocumentFiledDateTime" minOccurs="0"/>
                                        <xsd:element ref="UserLocation" minOccurs="0"/>

                                        <xsd:element ref="CostCenterCode" minOccurs="0"/>
                                        <xsd:element ref="DepartmentCode" minOccurs="0"/>
                                        <xsd:element ref="DivisionCode" minOccurs="0"/>


                                        <xsd:element ref="CompanyCode" minOccurs="0"/>

                                        <xsd:element ref="PurposeID" minOccurs="0"/>
                                        <xsd:element ref="DocumentApprovedDateTime" minOccurs="0"/>
                                        
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:element name="ExpenseReportHeader" type="ExpenseReportHeaderType"/>

        <xsd:complexType name="ExpenseReportLineType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledLineType">
                                <xsd:sequence>
                                        <xsd:element ref="DateTime" minOccurs="0"/>
                                        <xsd:element ref="PaymentMethodCode" minOccurs="0"/>
                                        <xsd:element ref="ReceiptIndicator" minOccurs="0"/>
                                        <xsd:element ref="ReceiptCheckedIndicator" minOccurs="0"/>
                                        <xsd:element ref="ApprovalCode" minOccurs="0"/>
                                        <xsd:element ref="PersonalIndicator" minOccurs="0"/>
                                        <xsd:element ref="ItemizedIndicator" minOccurs="0"/>
                                        <xsd:element ref="ParentLineNumber" minOccurs="0"/>
                                        <xsd:element ref="CreditCard" minOccurs="0"/>
                                        <xsd:element ref="ExpenseType" minOccurs="0"/>
                                        <xsd:element ref="PaidAmount" minOccurs="0"/>
                                        <xsd:element ref="BaseAmount" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation>The amount in its original
                                                  (foreign) currency</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="ApprovedAmount" minOccurs="0"/>
                                        <xsd:element ref="ExpenseException" minOccurs="0"/>
                                        <xsd:element ref="ExchangeRate" minOccurs="0"/>
                                        <xsd:element ref="DefaultExchangeRate" minOccurs="0"/>
                                        <xsd:element ref="ApprovedExchangeRate" minOccurs="0"/>
                                        <xsd:element ref="ExpenseAllocation" minOccurs="0"/>
                                        <xsd:choice>
                                                <xsd:element ref="PerDiem" minOccurs="0"/>
                                                <xsd:element ref="Mileage" minOccurs="0"/>
                                                <xsd:element ref="Airline" minOccurs="0"/>
                                                <xsd:element ref="CarRental" minOccurs="0"/>
                                                <xsd:element ref="Hotel" minOccurs="0"/>
                                                <xsd:element ref="Guest" minOccurs="0"
                                                  maxOccurs="unbounded"/>
                                        </xsd:choice>
                                        <xsd:element ref="ExpenseDateTime" minOccurs="0"/>
                                        <xsd:element ref="CostCenterCode" minOccurs="0"/>
                                        <xsd:element ref="ProjectReference" minOccurs="0"/>


                                        <xsd:element
                                                ref="SupplierStandardIndustrialClassificationCode"
                                                minOccurs="0"/>
                                        <xsd:element ref="Purpose" minOccurs="0"/>
                                        <xsd:element ref="Address" minOccurs="0"/>
                                        <xsd:element ref="PaymentType" minOccurs="0"/>
                                        <xsd:element ref="ProjectChargeCode" minOccurs="0"/>
                                        <xsd:element ref="CreditCardTransaction" minOccurs="0"/>

                                        <xsd:element ref="PurposeCode" minOccurs="0"/>
                                        
                                        <xsd:element ref="CreditCardTransactionID" minOccurs="0"/>
                                        <xsd:element ref="BookingAgent" minOccurs="0"/>
                                        <xsd:element ref="DepartmentCode" minOccurs="0"/>
                                        <xsd:element ref="DivisionCode" minOccurs="0"/>
                                        <xsd:element ref="CompanyCode" minOccurs="0"/>
                                        <xsd:element ref="PaymentCardIndustryToken" minOccurs="0"/>
                                        <xsd:element ref="DistributedTax" minOccurs="0"/>
                                        <xsd:element ref="SupplierParty" minOccurs="0"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:element name="ExpenseReportLine" type="ExpenseReportLineType"/>


        <xsd:complexType name="ExpenseExceptionType">
                <xsd:sequence>
                        <xsd:element ref="ReasonCode" minOccurs="0"/>
                        <xsd:element ref="PriorityCode" minOccurs="0"/>
                        <xsd:element ref="ApprovalCode" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="ExpenseException" type="ExpenseExceptionType"/>

        <xsd:complexType name="OverageType">
                <xsd:sequence>
                        <xsd:element ref="DateTime" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="TotalAmount" minOccurs="0"/>
                        <xsd:element ref="TotalPerDiemAmount" minOccurs="0"/>
                        <xsd:element ref="TotalPersonalAmount" minOccurs="0"/>
                        <xsd:element ref="OverageAllocation" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="Overage" type="OverageType"/>

        <xsd:complexType name="OverageAllocationType">
                <xsd:sequence>
                        <xsd:element ref="Percent" minOccurs="0"/>
                        <xsd:element ref="Amount" minOccurs="0"/>
                        <xsd:element ref="BaseAmount" minOccurs="0">
                                <xsd:annotation>
                                        <xsd:documentation>The amount in its original
                                                (foreign) currency</xsd:documentation>
                                </xsd:annotation>
                        </xsd:element>
                      
                        <xsd:element ref="ProjectReference" minOccurs="0"/>
                        <xsd:element ref="ApprovedIndicator" minOccurs="0"/>
                        <xsd:element ref="BillableIndicator" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="OverageAllocation" type="OverageAllocationType"/>

        <xsd:complexType name="ExpenseTypeType">
                <xsd:sequence>
                        <xsd:element ref="Name" minOccurs="0"/>
                        <xsd:element ref="ExpenseCode" minOccurs="0"/>
                        <xsd:element ref="ExpenseCategory" minOccurs="0"/>
                        <xsd:element ref="PerDiemIndicator" minOccurs="0"/>

                        <xsd:element ref="ExpenseCategoryClass" minOccurs="0"/>
                        <xsd:element ref="SpecialCode" minOccurs="0"/>
                        <xsd:element ref="ExternalExpenseCode" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="ExpenseType" type="ExpenseTypeType"/>

        <xsd:complexType name="ExpenseAllocationType">
                <xsd:sequence>
                        <xsd:element ref="Percent" minOccurs="0"/>
                        <xsd:element ref="Amount" minOccurs="0"/>
                        <xsd:element ref="BaseAmount" minOccurs="0">
                                <xsd:annotation>
                                        <xsd:documentation>The amount in its original
                                                (foreign) currency</xsd:documentation>
                                </xsd:annotation>
                        </xsd:element>
                        <xsd:element ref="ApprovedIndicator" minOccurs="0"/>
                        <xsd:element ref="CostCenterCode" minOccurs="0"/>
                        <xsd:element ref="ProjectReference" minOccurs="0"/>
                        <xsd:element ref="BillableIndicator" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="ExpenseAllocation" type="ExpenseAllocationType"/>
        <xsd:complexType name="PerDiemType">
                <xsd:sequence>
                        <xsd:element ref="PrivateNightStayIndicator" minOccurs="0"/>
                        <xsd:element ref="FirstDayIndicator" minOccurs="0"/>
                        <xsd:element ref="LastDayIndicator" minOccurs="0"/>
                        <xsd:element ref="OvernightStayIndicator" minOccurs="0"/>
                        <xsd:element ref="LongTermStayIndicator" minOccurs="0"/>
                        <xsd:element ref="BreakfastDeductionIndicator" minOccurs="0"/>
                        <xsd:element ref="LunchDeductionIndicator" minOccurs="0"/>
                        <xsd:element ref="DinnerDeductionIndicator" minOccurs="0"/>
                        <xsd:element ref="TimePeriod" minOccurs="0"/>
                        <xsd:element ref="MealAmount" minOccurs="0"/>
                        <xsd:element ref="OutsideMealNumber" minOccurs="0"/>
                        <xsd:element ref="PerDiemAmount" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="PerDiem" type="PerDiemType"/>

        <xsd:complexType name="MileageType">
                <xsd:sequence>
                        <xsd:element ref="DistanceMeasure" minOccurs="0"/>
                        <xsd:element ref="RateAmount" minOccurs="0"/>
                        <xsd:element ref="OdometerStartMeasure" minOccurs="0"/>
                        <xsd:element ref="OdometerEndMeasure" minOccurs="0"/>
                        <xsd:element ref="PassengerNumber" minOccurs="0"/>
                        <xsd:element ref="RateDescription" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="Mileage" type="MileageType"/>

        <xsd:complexType name="AirlineType">
                <xsd:sequence>
                        <xsd:element ref="DepartureDateTime" minOccurs="0"/>
                        <xsd:element ref="DepartureAirportCode" minOccurs="0"/>
                        <xsd:element ref="DestinationAirportCode" minOccurs="0"/>
                        <xsd:element ref="TicketStatus" minOccurs="0"/>
                        <xsd:element ref="TicketNumber" minOccurs="0"/>
                        <xsd:element ref="ServiceClassCode" minOccurs="0"/>

                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="Airline" type="AirlineType"/>

        <xsd:complexType name="CarRentalType">
                <xsd:sequence>
                        <xsd:element ref="AgreementID" minOccurs="0"/>
                        <xsd:element ref="ServiceClassCode" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="CarRental" type="CarRentalType"/>
        <xsd:complexType name="HotelType">
                <xsd:sequence>

                        <xsd:element ref="ServiceClassCode" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:element name="Hotel" type="HotelType"/>
        <xsd:complexType name="GuestType">
                <xsd:sequence>
                        <xsd:element ref="ID" minOccurs="0"/>
                        <xsd:element ref="GivenName" minOccurs="0"/>
                        <xsd:element ref="FamilyName" minOccurs="0"/>
                        <xsd:element ref="Title" minOccurs="0"/>
                        <xsd:element ref="CompanyName" minOccurs="0"/>
                        <xsd:element ref="ExternalIndicator" minOccurs="0"/>
                        <xsd:element ref="Location" minOccurs="0"/>
                        <xsd:element ref="ExternalID" minOccurs="0"/>
                        <xsd:element ref="Address" minOccurs="0"/>
                        <xsd:element ref="UserArea" minOccurs="0"/>


                </xsd:sequence>
                <xsd:attribute name="type" type="NormalizedStringType" use="optional"/>
        </xsd:complexType>

        <xsd:element name="Guest" type="GuestType"/>
        <xsd:element name="ExpenseReportTimePeriod" type="TimePeriodType"/>
        <xsd:element name="ApprovalCode" type="CodeType"/>
        <xsd:element name="TotalPerDiemAmount" type="AmountType"/>
        <xsd:element name="TotalPersonalAmount" type="AmountType"/>
        <xsd:element name="CashAdvanceAmount" type="AmountType"/>
        <xsd:element name="CompanyChargeAmount" type="AmountType"/>
        <xsd:element name="CompanyDueAmount" type="AmountType"/>
        <xsd:element name="PersonnelDueAmount" type="AmountType"/>
        <xsd:element name="AuthorizedAmount" type="AmountType"/>
        <xsd:element name="AppliedLossCarryForwardAmount" type="AmountType"/>
        <xsd:element name="AppliedAdjustmentAmount" type="AmountType"/>
        <xsd:element name="TotalCorporateChargeAmount" type="AmountType"/>
        <xsd:element name="RemainingLossCarryForwardAmount" type="AmountType"/>
        <xsd:element name="GeneratedLossCarryForwardAmount" type="AmountType"/>
        <xsd:element name="CompanyPaysCardAmount" type="AmountType"/>
        <xsd:element name="RecallableIndicator" type="IndicatorType"/>
        <xsd:element name="DefaultExchangeRate" type="CurrencyExchangeRateType"/>
        <xsd:element name="ApprovedExchangeRate" type="CurrencyExchangeRateType"/>
        <xsd:element name="ReceiptIndicator" type="IndicatorType"/>
        <xsd:element name="ReceiptCheckedIndicator" type="IndicatorType"/>
        <xsd:element name="PersonalIndicator" type="IndicatorType"/>
        <xsd:element name="ItemizedIndicator" type="IndicatorType"/>
        <xsd:element name="ApprovedAmount" type="AmountType"/>
        <xsd:element name="PerDiemAmount" type="AmountType"/>
        <xsd:element name="PrivateNightStayIndicator" type="IndicatorType"/>
        <xsd:element name="FirstDayIndicator" type="IndicatorType"/>
        <xsd:element name="LastDayIndicator" type="IndicatorType"/>
        <xsd:element name="OvernightStayIndicator" type="IndicatorType"/>
        <xsd:element name="LongTermStayIndicator" type="IndicatorType"/>
        <xsd:element name="BreakfastDeductionIndicator" type="IndicatorType"/>
        <xsd:element name="LunchDeductionIndicator" type="IndicatorType"/>
        <xsd:element name="DinnerDeductionIndicator" type="IndicatorType"/>
        <xsd:element name="MealAmount" type="AmountType"/>
        <xsd:element name="OutsideMealNumber" type="IntegerNumericType"/>
        <xsd:element name="DistanceMeasure" type="MeasureType"/>
        <xsd:element name="RateAmount" type="AmountType"/>
        <xsd:element name="OdometerStartMeasure" type="MeasureType"/>
        <xsd:element name="OdometerEndMeasure" type="MeasureType"/>
        <xsd:element name="PassengerNumber" type="IntegerNumericType"/>
        <xsd:element name="DepartureDateTime" type="DateTimeType"/>
        <xsd:element name="DepartureAirportCode" type="CodeType"/>
        <xsd:element name="DestinationAirportCode" type="CodeType"/>
        <xsd:element name="TicketStatus" type="StatusType"/>
        <xsd:element name="TicketNumber" type="NormalizedStringType"/>
        <xsd:element name="ServiceClassCode" type="CodeType"/>
        <xsd:element name="ExpenseCode" type="CodeType"/>
        <xsd:element name="ExpenseCategory" type="CodeType"/>
        <xsd:element name="PerDiemIndicator" type="IndicatorType"/>

        <xsd:element name="AgreementID" type="IdentifierType"/>

        <xsd:element name="ExportStatus" type="IntegerNumericType"/>
        <xsd:element name="Purpose" type="TextType"/>
        <xsd:element name="DocumentFiledDateTime" type="DateTimeType"/>
        <xsd:element name="UserLocation" type="TextType"/>

        <xsd:element name="PurposeID" type="IdentifierType"/>
        <xsd:element name="DocumentApprovedDateTime" type="DateTimeType"/>

        <xsd:element name="SpecialCode" type="CodeType"/>
        <xsd:element name="ExpenseCategoryClass" type="CodeType"/>

        <xsd:element name="RateDescription" type="DescriptionType"/>
        <xsd:element name="ExternalIndicator" type="IndicatorType"/>
        <xsd:element name="ExternalID" type="IdentifierType"/>

        <xsd:element name="ExpenseDateTime" type="DateTimeType"/>


        <xsd:element name="SupplierStandardIndustrialClassificationCode" type="CodeType"/>
        <xsd:element name="PaymentType" type="CodeType"/>
        <xsd:element name="ProjectChargeCode" type="CodeType"/>
        <xsd:element name="CreditCardTransaction" type="NormalizedStringType"/>

        <xsd:element name="PurposeCode" type="CodeType"/>
        
        <xsd:element name="CreditCardTransactionID" type="IdentifierType"/>
        <xsd:element name="BookingAgent" type="PersonType"/>
        <xsd:element name="DivisionCode" type="CodeType"/>
        <xsd:element name="CompanyCode" type="CodeType"/>
        <xsd:element name="PaymentCardIndustryToken" type="TokenType"/>
        <xsd:element name="ExternalExpenseCode" type="CodeType"/>
       
</xsd:schema>
