<?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.
16 Apr 2009    NO      Added BillingTriggerCode and InvoiceImmediatelyIndicator fields for use by Billing (BOD-741)

        *****     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/Operational/OrderManagementComponents.xsd"/>

        <xsd:element name="CustomerReturn" type="CustomerReturnType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The CustomerReturn is intended to be used to handle the scenario when goods are 
                                returned by the customer.  Return Merchandise Authorization (RMA) information is
                                captured as well as information needed to communicate the goods received to various 
                                systems on the network.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="CustomerReturnHeader" type="CustomerReturnHeaderType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Provides
                                information that pertains to the entire CustomerReturn.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="CustomerReturnLine" type="CustomerReturnLineType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Provides
                                the line level detail of the items received and the associated detail.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:element name="CustomerReturnSubLine" type="CustomerReturnSubLineType">
                <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 received item.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <xsd:complexType name="CustomerReturnType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">The schema
                                type for CustomerReturn. CustomerReturn is essentially an extension of SalesOrder.
                        </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                        <xsd:element ref="CustomerReturnHeader" minOccurs="0"/>
                        <xsd:element ref="CustomerReturnLine" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="CustomerReturnHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="OrderHeaderType">
                                <xsd:sequence>
                                        <xsd:element ref="SalesOrganizationIDs" minOccurs="0"/>
                                        <xsd:element ref="DistributionCenterCode" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation
                                                  source="http://schema.infor.com/InforOAGIS/2"
                                                  >Indicates the DistributionCenter
                                                  that the Seller will ship the items
                                                  from.</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="OrderCommission" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="PurchaseOrderReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="BillingTriggerCode" minOccurs="0"/>
                                        <xsd:element ref="InvoiceImmediatelyIndicator" minOccurs="0"/>
                                        <xsd:element ref="PrepaidIndicator" minOccurs="0"/>
                                        <xsd:element ref="ReceivableReference" 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="ShipFromParty" 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="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="CustomerReturnLineType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Is the
                                CustomerReturn Line type that provides the structure of the CustomerReturn Line.
                        </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                        <xsd:extension base="OrderLineType">
                                <xsd:sequence>
                                        <xsd:element ref="PurchaseOrderReference" minOccurs="0"/>        
                                        <xsd:element ref="RouteReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="BOMReference" minOccurs="0"                    
                                                maxOccurs="unbounded"/>                
                                        <xsd:element ref="ScheduledDeliveryDateTime" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation
                                                  source="http://schema.infor.com/InforOAGIS/2"
                                                  >The scheduled delivery date
                                                  provided by the
                                                  supplier.</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="ActualDeliveryDateTime" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation
                                                  source="http://schema.infor.com/InforOAGIS/2"
                                                  >Is the actual delivery date and
                                                  time of the line
                                                  item.</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="ActualShipDateTime" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation
                                                  source="http://schema.infor.com/InforOAGIS/2"
                                                  >Inidicates the shipping date and
                                                  time of the line item.</xsd:documentation>
                                                 </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="DistributionCenterCode" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation
                                                  source="http://schema.infor.com/InforOAGIS/2"
                                                  >Indicates the distribution center
                                                  the line item will be shipped
                                                  from.</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="OrderCommission" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="CustomerReturnSubLine" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="ContractReference" minOccurs="0"/>
                                        <xsd:element ref="CarrierParty" minOccurs="0"/>
                                        <xsd:element ref="ShipFromParty" minOccurs="0"/>
                                        <xsd:element ref="SupplierParty" minOccurs="0"/>
                                        <xsd:element ref="FixedPriceItemIndicator" minOccurs="0"/>
                                        <xsd:element ref="AllocatedQuantity" minOccurs="0"/>
                                        <xsd:element ref="UnitQuantityConversionFactor"
                                                minOccurs="0"/>
                                        <xsd:element ref="Allowance" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="Charge" 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="ReceivedQuantity"
                                                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:element ref="BaseCurrencyAmount" minOccurs="0" maxOccurs="unbounded"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="CustomerReturnSubLineType">
                <xsd:complexContent>
                        <xsd:extension base="RequestSubLineType">
                                <xsd:sequence>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <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="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: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="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:group name="WarrantyGroup">
                <xsd:sequence>
                        <xsd:element ref="WarrantyIndicator" minOccurs="0"/>
                        <xsd:element ref="UnderWarrantyQuantity" minOccurs="0"/>
                </xsd:sequence>
        </xsd:group>

</xsd:schema>
