<?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.
03 Oct 2008    JB      Added BaseCurrencyAmount element to Header, Lines, Sublines, and Schedule
        *****     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">

        <xsd:include schemaLocation="../Components/Operational/OrderManagementComponents.xsd"/>

        <xsd:element name="SupplierRMA" type="SupplierRMAType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The purpose
                                of the SupplierRMA Business Object Document is to communicate an
                                RMA from a buyer to a supplier. The SupplierRMA carries information to
                                and from the buyer and supplier. The SupplierRMA is a legally binding
                                document once both Parties agree to the contents and the specified terms
                                and conditions of the order. </xsd:documentation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The Process
                                SupplierRMA sends the electronic form of a RMA document
                                from a customer to a supplier in order to return ordered Items.
                                </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="SupplierRMAHeader" type="SupplierRMAHeaderType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The
                                SupplierRMA Header contains information that applies to the
                                entire SupplierRMA. This Component is required.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="SupplierRMALine" type="SupplierRMALineType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The
                                SupplierRMA Line indicates the item or product returned
                                along with the quantity, price and other descriptive information. It
                                is also possible to provide additional Parties, PaymentTerms,
                                Charge, and Attachment information as needed at the line level. At
                                least one occurrence of this Component is required for each
                                occurrence of the RMA.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="SupplierRMASubLine" type="SupplierRMASubLineType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The
                                Component Subline represents any additional information concerning
                                the product on the Line. The Subline can be used to describe a
                                specific configuration of the ordered item.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="SupplierRMASchedule" type="SupplierRMAScheduleType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The
                               Component Schedule represents the requested ship or delivery dates
                                for goods ordered. The Schedule is an optional Component. The
                                Schedule can not be associated with a Subline. It is only associated
                                with a Line.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:complexType name="SupplierRMAType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The schema
                                type for SupplierRMA.</xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                        <xsd:element ref="SupplierRMAHeader" minOccurs="0"/>
                        <xsd:element ref="SupplierRMALine" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="SupplierRMAHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="OrderHeaderType">
                                <xsd:sequence>
                                        <xsd:element ref="OrderDateTime" minOccurs="0"/>
                                        <xsd:element ref="BuyerParty" minOccurs="0"/>
                                        <xsd:element ref="AcceptByDateTime" minOccurs="0"/>
                                        <xsd:element ref="ReleaseNumber" minOccurs="0"/>
                                        <xsd:element ref="RequisitionReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="QuoteReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="SalesOrderReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="PriceOverrideIndicator" minOccurs="0" />
                                        <xsd:element ref="ContractApplicableIndicator" minOccurs="0" />
                                        <xsd:element ref="RFQReference" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="ProductionOrderReference" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Classification" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="DocumentUsageCode" minOccurs="0" />
                                        <xsd:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="PlannerReference" minOccurs="0"/>
                                        <xsd:element ref="BuyerReference" minOccurs="0"/>
                                        <xsd:element ref="AuthorizationDate" minOccurs="0"/>
                                        <xsd:element ref="AuthorizedBy" minOccurs="0"/>
                                        <xsd:group ref="WarrantyGroup" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="RemitToParty" minOccurs="0"/>
                                        <xsd:element ref="PickUpDate" minOccurs="0"/>
                                        <xsd:element ref="PromisedReturnDateTime" minOccurs="0"/>
                                        <xsd:element ref="RequiredReturnDateTime" minOccurs="0"/>
                                        <xsd:element ref="ReturnReasonCode" minOccurs="0"/>
                                        <xsd:element ref="ReturnDisposition" minOccurs="0"/>
                                        <xsd:element ref="SupplierRMAID" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="SupplierRMALineType">
                <xsd:complexContent>
                        <xsd:extension base="OrderLineType">
                                <xsd:sequence>
                                        <xsd:element ref="BackOrderedQuantity" minOccurs="0"/>
                                        <xsd:element ref="ReceivedQuantity" minOccurs="0"/>
                                        <xsd:element ref="OpenQuantity" minOccurs="0"/>
                                        <xsd:element ref="QuoteReference" minOccurs="0"/>
                                        <xsd:element ref="SalesOrderReference" minOccurs="0"/>
                                        <xsd:element ref="BuyerParty" minOccurs="0"/>
                                        <xsd:element ref="SupplierRMASubLine" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="SupplierRMASchedule" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="PriceOverrideIndicator" minOccurs="0" />
                                        <xsd:element ref="ContractApplicableIndicator" minOccurs="0" />
                                        <xsd:element ref="ContractReference" minOccurs="0"/>
                                        <xsd:element ref="FixedPriceItemIndicator" minOccurs="0"/>
                                        <xsd:element ref="ExpensableItemIndicator" minOccurs="0"/>
                                        <xsd:element ref="AllocatedQuantity" minOccurs="0"/>
                                        <xsd:element ref="UnitQuantityConversionFactor" minOccurs="0"/>
                                        <xsd:element ref="SupplierParty" minOccurs="0"/>
                                        <xsd:element ref="RFQReference" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="ProductionOrderReference" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Allowance" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Charge" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Classification" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="PromisedReturnDateTime" minOccurs="0"/>
                                        <xsd:element ref="RequiredReturnDateTime" minOccurs="0"/>
                                        <xsd:element ref="ReturnReasonCode" minOccurs="0"/>
                                        <xsd:element ref="ReturnDisposition" minOccurs="0"/>
                                        <xsd:element ref="CreditedQuantity" minOccurs="0"/>
                                        <xsd:element ref="RestockPercent" minOccurs="0"/>
                                        <xsd:element ref="RestockAmount" minOccurs="0"/>
                                        <xsd:group ref="WarrantyGroup" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="SupplierRMASubLineType">
                <xsd:complexContent>
                        <xsd:extension base="RequestSubLineType">
                                <xsd:sequence>
                                        <xsd:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="SupplierRMAScheduleType">
                <xsd:complexContent>
                        <xsd:extension base="ProcurementScheduleType">
                                <xsd:sequence>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="Status" minOccurs="0"/>
                                        <xsd:element ref="PriceOverrideIndicator" minOccurs="0" />
                                        <xsd:element ref="ContractApplicableIndicator" minOccurs="0" />
                                        <xsd:element ref="ShipToParty" minOccurs="0" />
                                        <xsd:element ref="BackOrderedQuantity" minOccurs="0"/>
                                        <xsd:element ref="ReceivedQuantity" minOccurs="0"/>
                                        <xsd:element ref="UnitPrice" minOccurs="0">
                                                <xsd:annotation>
                                                        <xsd:documentation>This amount is used to override the amount on the line. 
                                                                When omitted the unit price is the same as the unit price for the line.
                                                        </xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="IncotermsCode" minOccurs="0" />
                                        <xsd:element ref="CarrierParty" minOccurs="0" />
                                        <xsd:element ref="TaxJurisdicationCodes" minOccurs="0" />
                                        <xsd:element ref="FreightTermCode" minOccurs="0"/>
                                        <xsd:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded" />
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>
        
        <xsd:element name="ReturnReasonCode" type="ReasonCodeType">
                <xsd:annotation>
                        <xsd:documentation> Reason for the return : Return, Damage, and Replace.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="PickUpDate" type="DateType">
                <xsd:annotation>
                        <xsd:documentation> Date the goods will be picked up by the carrier.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="PromisedReturnDateTime" type="DateTimeType">
                <xsd:annotation>
                        <xsd:documentation> Date the customer promised to ship the goods back.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="RequiredReturnDateTime" type="DateTimeType">
                <xsd:annotation>
                        <xsd:documentation> Date the customer is required to ship the goods back.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="UnderWarrantyQuantity" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation> Specific quantity of an item under warranty.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="AuthorizedBy" type="NameType">
                <xsd:annotation>
                        <xsd:documentation> Name of the person who authorized the RMA.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="ReturnDisposition" type="StringType">
                <xsd:annotation>
                        <xsd:documentation> Identifies what is to be done with the returned item
                                (e.g., Returned to Inventory, Scrapped due to damage, Returned to
                                Vendor, Replace, Credited, and Repaired). </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        
        <xsd:element name="CreditedQuantity" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation> Quantity that will be credited to the (Customer) account. </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="RestockPercent" type="PercentType">
                <xsd:annotation>
                        <xsd:documentation> Percentage of the price that is charged for restocking
                                the returned item. </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="RestockAmount" type="AmountType">
                <xsd:annotation>
                        <xsd:documentation> Amount of the price that is charged for restocking
                                the returned item....based on the RestockPercent. </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        

        <xsd:group name="WarrantyGroup">
                <xsd:sequence>
                        <xsd:element ref="WarrantyIndicator" minOccurs="0"/>
                        <xsd:element ref="UnderWarrantyQuantity" minOccurs="0"/>
                </xsd:sequence>
        </xsd:group>
        
               
        <xsd:element name="SupplierRMAID" type="IdentifierType">
                <xsd:annotation>
                        <xsd:documentation> stores the RMA Number from the Supplier. 
                                (* Note: IdentifierType..need to define in Fields.xsd)
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        
        
</xsd:schema>
