<?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
7  Nov 2012    NO      Defined OutsourcingInformation element (JIRA BOD-1237)
12 Nov 2012    NO      Added OperationCode to the OutsourcingInformation element (JIRA BOD-1237)


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

	<xsd:element name="ActualCostAmount" type="AmountType"/>
	

	<xsd:element name="ServiceContract" type="ServiceContractType">
		<xsd:annotation>
			<xsd:documentation>The Contract is a light-weight version of the noun which will be
				created in conjucntion with the pricing evolve component.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:complexType name="ServiceContractType">
		<xsd:annotation>
			<xsd:documentation>This is the wrong element to use to reference a Service Contract.
				This was built to deal with a misnamed element in CustomerCall.</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:sequence>
				<xsd:element ref="ServiceContractHeader" minOccurs="0"/>
				<xsd:element ref="ServiceContractLine" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:sequence>
				<xsd:annotation>
					<xsd:documentation source="http://schema.infor.com/InforOAGIS/2">StatusCode is
						being deprecated in favor of the Status as of 9.1.</xsd:documentation>
				</xsd:annotation>
				<xsd:group ref="DocumentIDsGroup" minOccurs="0"/>
				<xsd:element ref="DocumentDateTime" minOccurs="0"/>
				<xsd:group ref="FreeFormTextGroup" minOccurs="0"/>
				<xsd:element ref="StatusCode" minOccurs="0"/>
				<xsd:element ref="Status" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="LineNumber" minOccurs="0"/>
				<xsd:element ref="UserArea" minOccurs="0"/>
				<xsd:element ref="Quantity" minOccurs="0"/>
				<xsd:element ref="BaseUOMQuantity" minOccurs="0"/>
			</xsd:sequence>
		</xsd:choice>
	</xsd:complexType>

	<xsd:element name="ServiceContractReference" type="OrderReferenceType">
		<xsd:annotation>
			<xsd:documentation>This is the proper element to use to reference a Service
				Contract.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:complexType name="ServiceContractHeaderType">
		<xsd:complexContent>
			<xsd:extension base="StatusEnabledHeaderType">
				<xsd:sequence>
					<xsd:element ref="CustomerParty" minOccurs="0"/>
					<xsd:element ref="ShipToParty" minOccurs="0"/>
					<xsd:element ref="BillToParty" minOccurs="0"/>
					<xsd:element ref="PayFromParty" minOccurs="0"/>
					<xsd:element ref="SupplierParty" minOccurs="0"/>
					<xsd:element ref="ShipFromParty" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="RemitToParty" minOccurs="0"/>
					<xsd:element ref="Location" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="BuyerReference" minOccurs="0"/>
					<xsd:element ref="UserArea" minOccurs="0"/>
					<xsd:element ref="SalesPersonReference" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="ContractTypeCode" minOccurs="0"/>
					<xsd:element ref="Classification" minOccurs="0"/>
					<xsd:element ref="IndexationTimePeriod" minOccurs="0"/>
					<xsd:element ref="RenewalTimePeriod" minOccurs="0"/>
					<xsd:element ref="PaymentTerm" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="PricingMethodCode" minOccurs="0"/>
					<xsd:element ref="ContractTemplateCode" minOccurs="0"/>
					<xsd:element ref="ContractPrice" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="ProjectReference" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="ServiceContractHeader" type="ServiceContractHeaderType"/>

	<xsd:complexType name="ServiceContractLineType">
		<xsd:sequence>
			<xsd:element ref="LineNumber" minOccurs="0"/>
			<xsd:element ref="EffectiveTimePeriod" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>from the 'OTIS UK Design Document SMSLN1.04 - ERP5.0c
						Contracts Integration' - contractEffectiveDate and
						contractExpiryDate..</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="ContractBasisCode" minOccurs="0"/>
			<xsd:element ref="ContractPrice" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="ShipToParty" minOccurs="0"/>
			<xsd:element ref="TransportationTerm" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="Status" minOccurs="0"/>
			<xsd:element ref="AgreedQuantity" minOccurs="0"/>
			<xsd:element ref="AgreedBaseUOMQuantity" minOccurs="0"/>
			<xsd:element ref="MinimumQuantity" minOccurs="0"/>
			<xsd:element ref="MinimumBaseUOMQuantity" minOccurs="0"/>
			<xsd:element ref="MaximumQuantity" minOccurs="0"/>
			<xsd:element ref="MaximumBaseUOMQuantity" minOccurs="0"/>
			<xsd:element ref="LSPProcessIndicator" minOccurs="0"/>
			<xsd:element ref="CUMUpdateBasisCode" minOccurs="0"/>
			<xsd:element ref="Reference" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="UserArea" minOccurs="0"/>
			<xsd:element ref="DeviatingCustomerOrderNumberActionCode" minOccurs="0"/>
			<xsd:element ref="DeviatingEmptyCustomerOrderNumberActionCode" minOccurs="0"/>
			<xsd:element ref="ConfiguredAsset" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="SupervisorPerson" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="CoverageTermGroup" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="ContractTemplateCode" minOccurs="0"/>
			<xsd:element ref="ProjectReference" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="sequence" type="PositiveIntegerNumericType" use="optional"/>
	</xsd:complexType>

	<xsd:element name="ServiceContractLine" type="ServiceContractLineType"/>



	<xsd:element name="ContractTypeCode" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>from the 'OTIS UK Design Document SMSLN1.04 - ERP5.0c Contracts
				Integration' - ContractTypeCode; String 9</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="SupervisorPerson" type="PersonType">
		<xsd:annotation>
			<xsd:documentation>from the 'OTIS UK Design Document SMSLN1.04 - ERP5.0c Contracts
				Integration' - Supervisor (Service Office); String 6</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="IndexationTimePeriod" type="TimePeriodType">
		<xsd:annotation>
			<xsd:documentation>Indexation can be applied to the service contract price. Indexation
				enables you to lower or raise the price of the service contract at given
				intervals</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="RenewalTimePeriod" type="TimePeriodType">
		<xsd:annotation>
			<xsd:documentation>Service contract describes the terms and conditions between the
				service provider and the customer. Service contracts can be renewed to provide
				extended services and thereby, additional stream of revenue to the service
				organization.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="CostCoveringMethodCode" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>A method that determines how the costs of the service order are
				covered by the service contract. The following cost-covering methods are available:
				Fixed Price , Ceiling , Coverage Percentage, Ceiling on Coverage Percentage,
				Exclusion, Own Risk </xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="ContractTemplateCode" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>Templates for service contracts and service-contract quotations are
				prepared in advance. You can use the templates to save time as you need not retype
				similar information. Templates are generic and can be made specific to the item with
				a definition of price per period. These templates are not specific to customers and
				do not have specific cluster lines, but the templates themselves are specific to
				items. </xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:complexType name="CoverageTermGroupType">
		<xsd:sequence>
			<xsd:element ref="CoverageTypeCode" minOccurs="0"/>
			<xsd:element ref="ServiceContractTerm" minOccurs="0"/>
			<xsd:element ref="CostCoveringMethodCode" minOccurs="0"/>
			<xsd:element ref="CeilingAmount" minOccurs="0"/>
			<xsd:element ref="CeilingBaseAmount" minOccurs="0"/>
			<xsd:element ref="CeilingReportAmount" minOccurs="0"/>
			<xsd:element ref="CoveragePercentage" minOccurs="0"/>
			<xsd:element ref="CostAmount" minOccurs="0"/>
			<xsd:element ref="CostBaseAmount" minOccurs="0"/>
			<xsd:element ref="CostReportAmount" minOccurs="0"/>
			<xsd:element ref="SalesAmount" minOccurs="0"/>
			<xsd:element ref="SalesBaseAmount" minOccurs="0"/>
			<xsd:element ref="SalesReportAmount" minOccurs="0"/>
			<xsd:element ref="UserArea" minOccurs="0"/>
			<xsd:element ref="CostTypeCode" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="CoverageTermGroup" type="CoverageTermGroupType"/>

	<xsd:complexType name="ServiceContractTermType">
		<xsd:sequence>
			<xsd:element ref="ID" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="EffectiveTimePeriod" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ServiceContractTerm" type="ServiceContractTermType"/>

	<xsd:element name="CeilingAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>The agreed limit up to which the costs are covered by the contract,
				quotation, order, or warranty. If the Ceiling on Coverage Percentage method is
				selected, this is the discount limit. In this case it is the phase term that holds
				the discount information, and not the coverage term.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="CoveragePercentage" type="PercentType">
		<xsd:annotation>
			<xsd:documentation>The percentage that you can subtract from the gross sales price or
				purchase price. In this case the phase term holds the discount
				information.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="AlternateIDs" type="IDsType"/>

	<!--  Quality Management elements -->
	<xsd:element name="ResponsiblePersonReference" type="PersonReferenceType">
		<xsd:annotation>
			<xsd:documentation>Person who is reponsible for a plan, an action, etc.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="InitiatorPersonReference" type="PersonReferenceType">
		<xsd:annotation>
			<xsd:documentation>Person who initiated or created a plan, etc.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	
	<xsd:element name="DefectiveMaterialNoticeReference" type="SemanticDocumentReferenceType">
		<xsd:annotation>
			<xsd:documentation>A reference to one or more defective material notices which triggered the corrective action plan.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	
	<!--  Project Management elements -->
	
	<xsd:complexType name="LastModificationType">
		<xsd:sequence>
			<xsd:element ref="DateTime" minOccurs="0"/>
			<xsd:element ref="ResponsiblePersonReference" minOccurs="0"/>
			<xsd:element ref="ReasonCode" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="LastModification" type="LastModificationType"/>
	<xsd:element name="BilledAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>The total invoiced amount related to this component.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="BilledBaseAmount" type="AmountType"/>
	<xsd:element name="BilledReportAmount" type="AmountType"/>
	<xsd:element name="AdditionalDocumentText" type="NoteType">
		<xsd:annotation>
			<xsd:documentation>The reference text to be printed on external documents, such as acknowledgements, for example, the name of a contact person or a customer reference number.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="DocumentTextIndicator" type="IndicatorType">
		<xsd:annotation>
			<xsd:documentation>Indicates whether or not the reference text must be printed on external documents. Default False.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ExpectedSalesAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>The amount that defines the sales potential for this component.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ExpectedSalesBaseAmount" type="AmountType"/>
	<xsd:element name="ExpectedSalesReportAmount" type="AmountType"/>
	<xsd:element name="BillingType" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>The billing type for this component; a value from the extensible code list 'Billing Types'. Valid values include: Cost Plus, Unit Rate, Installment, Progress Invoice, Delivery Based.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="InvoiceDeliveryMethod" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>A way to categorize invoices by their delivery method. User-defined value of the code list 'Invoice Delivery Methods'.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="SalesType" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>A code that allows one to identify the kind of sale made and the kind of receivable. User-defined value of the code list 'Sales Types'.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="CustomsValueAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>The amount defined as the Customs value.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="CustomsValueBaseAmount" type="AmountType"/>
	<xsd:element name="CustomsValueReportAmount" type="AmountType"/>
	<xsd:element name="ConfirmedDeliveryDateTime" type="DateTimeType">
		<xsd:annotation>
			<xsd:documentation>The date confirmed to the customer for delivering the contract.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="PlannedReceivedDateTime" type="DateTimeType">
		<xsd:annotation>
			<xsd:documentation>The planned date when the deliverables must be received.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	
	<xsd:element name="ToBeBilledAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>The installment amount that has been approved for billing.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ToBeBilledBaseAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>Monetary amount used for consolidation at accounting entity level.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="ToBeBilledReportAmount" type="AmountType">
		<xsd:annotation>
			<xsd:documentation>Monetary amount used for consolidation at tenant level.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="PlannedBillingDateTime" type="DateTimeType">
		<xsd:annotation>
			<xsd:documentation>The planned date for billing.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	
	<xsd:element name="OutsourcingInformation" type="OutsourcingInformationType"/>
	
	<xsd:complexType name="OutsourcingInformationType">
		<xsd:sequence>
			<xsd:element ref="SupplierParty" minOccurs="0"/>
			<xsd:element ref="ProvidedItems" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="AvailaibleItems" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element ref="OperationToBePerformed" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:element name="ProvidedItems" type="ItemType"/>
	<xsd:element name="AvailaibleItems" type="ItemType"/>
	<xsd:element name="OperationToBePerformed" type="OperationToBePerformedType"/>
	
	<xsd:complexType name="OperationToBePerformedType">
		<xsd:sequence>
			<xsd:element ref="Name" minOccurs="0"/>
			<xsd:element ref="Description" minOccurs="0"/>
			<xsd:element ref="OperationCode" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="OperationCode" type="CodeType">
		<xsd:annotation>
			<xsd:documentation>Code Type associated with the Operation performed. This can be used to classify the operation.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	
	<xsd:element name="CompletionPeriod" type="FinancialPeriodType"/>
	<xsd:element name="CreationPeriod" type="FinancialPeriodType"/>
	<xsd:element name="DuePeriod" type="FinancialPeriodType"/>
	<xsd:element name="TestLocation" type="LocationType"/>

</xsd:schema>
