<?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.
12 Apr 2008    JB      Rewrote PrdouctionOrder to work with BillOfResources/ProductionOrder pattern
11 Nov 2008    JB      Removed ConsumedItem and OutputItem from ProductionOrderHeader 
13 Nov 2008    JB      Added EariestStartDateTime and added Costing element removed PlannedCost, ActualCost, and EstimatedCost
7  Nov 2012    NO      Added OutsourcingInformation element (JIRA BOD-1237)
23 May 2013  Ajay     Added RouteCode to ProductionOrderHeaderType (BOD 2282)
3 Jul 2015    LA       TotalCostAmount added to ProductionOrderHeaderType (BOD-2271)
*****     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/ManufacturingComponents.xsd"/>

        <xsd:element name="ProductionOrder" type="ProductionOrderType">

                <xsd:annotation>

                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">Production
                                Order is a document requesting the manufacture of a specified
                                product and quantity.</xsd:documentation>

                </xsd:annotation>

        </xsd:element>

        <xsd:element name="ProductionOrderHeader" type="ProductionOrderHeaderType"/>
        <xsd:element name="ProductionOrderDetail" type="ProductionOrderDetailType"/>

        <xsd:complexType name="ProductionOrderType">
                <xsd:sequence>
                        <xsd:element ref="ProductionOrderHeader" minOccurs="0"/>
                        <xsd:element ref="ProductionOrderDetail" minOccurs="0" maxOccurs="unbounded"/>

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

        <xsd:complexType name="ProductionOrderHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledHeaderType">
                                <xsd:sequence>

                                        <xsd:element ref="BOMReference" minOccurs="0">
                                                <xsd:annotation>
                                                  <xsd:documentation>Has been
                                                  deprecated</xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="Item" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="RouteCode" minOccurs="0" maxOccurs="unbounded"/><!--Element added for BOD-2282  -->           
                                        <xsd:element ref="ItemInstance" minOccurs="0"
                                                maxOccurs="unbounded"/>

                                        <xsd:element ref="OriginalBillOfResourcesReference"
                                                minOccurs="0"/>
                                        <xsd:element ref="Site" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Party" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="OriginationCountryCode" minOccurs="0"/>
                                        <xsd:element ref="DestinationCountryCode" minOccurs="0"/>
                                        <xsd:element ref="PriorityCode" minOccurs="0"/>
                                        <xsd:element ref="OrderQuantity" minOccurs="0"/>
                                        <xsd:element ref="OrderQuantityDistribution" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="OrderBaseUOMQuantity" minOccurs="0"/>
                                        <xsd:element ref="RequiredQuantity" minOccurs="0"/>
                                        <xsd:element ref="RequiredBaseUOMQuantity" minOccurs="0"/>
                                        <xsd:element ref="DueQuantity" minOccurs="0"/>
                                        <xsd:element ref="DueBaseUOMQuantity" minOccurs="0"/>
                                        <xsd:element ref="ExecutionTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="ForecastedTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="RunTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="SetupTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="TearDownTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="NeedDeliveryDate" minOccurs="0"/>
                                        <xsd:element ref="DueDateTime" minOccurs="0"/>
                                        <xsd:element ref="RequiredDateTime" minOccurs="0"/>
                                        <xsd:element ref="AvailableDateTime" minOccurs="0"/>
                                        <xsd:element ref="ReasonCode" minOccurs="0"/>
                                        <xsd:element ref="KanbanNumber" minOccurs="0"/>
                                        <xsd:element ref="SerializedLot" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="Distribution" minOccurs="0"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="ReworkIndicator" minOccurs="0"/>
                                        <xsd:element ref="PlannerPersonReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="ShopFloorPlannerPersonReference"
                                                minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="ForwardScheduleIndicator" minOccurs="0"/>
                                        <xsd:element ref="PlannedDueDate" minOccurs="0"/>
                                        <xsd:element ref="RequestedDeliveryDate" minOccurs="0"/>
                                        <xsd:element ref="Costing" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="TotalCost" minOccurs="0" maxOccurs="unbounded">
                                                <xsd:annotation>
                                                        <xsd:documentation>
                                                                Contains the total cost; note that this would 
                                                                contain all the cost types that were not specified 
                                                                with the Costing element. 
                                                        </xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="TotalCostAmount" minOccurs="0">
                                                <xsd:annotation>
                                                        <xsd:documentation>
                                                                Contains the total cost; note that this would 
                                                                contain all the cost types that were not specified 
                                                                with the Costing element. 
                                                        </xsd:documentation>
                                                        <xsd:documentation>
                                                                use "TotalCost" instead of this element; this will just be retained
                                                                for backward compatability
                                                        </xsd:documentation>
                                                </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element ref="TotalCostBaseAmount" minOccurs="0"/>
                                        <xsd:element ref="TotalCostReportAmount" minOccurs="0"/>
                                        <xsd:element ref="ScrapQuantity" minOccurs="0"/>
                                        <xsd:element ref="ScrapBaseUOMQuantity" minOccurs="0"/>
                                        <xsd:element ref="Rejection" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="BackFlushedIndicator" minOccurs="0"/>
                                        <xsd:element ref="EarliestStartDateTime" minOccurs="0"/>
                                        <xsd:element ref="SalesOrderReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                </xsd:sequence>
                                <xsd:attribute name="type" type="StringType" use="optional"/>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:complexType name="ProductionOrderDetailType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledSequenceType">
                                <xsd:sequence>
                                        <xsd:element ref="OriginalBillOfResourcesReference"
                                                minOccurs="0" maxOccurs="1"/>
                                        <xsd:element ref="AlternateBillOfResourcesReference"
                                                minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="ParentBillOperationReference"
                                                minOccurs="0" maxOccurs="1"/>
                                        <xsd:element ref="BillOfResources" minOccurs="0"
                                                maxOccurs="1"/>
                                        <xsd:element ref="OutsourcingInformation" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>





</xsd:schema>
