﻿<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:include schemaLocation="simpleTypes.xsd"/>
    <xs:include schemaLocation="elements.xsd"/>
    <xs:include schemaLocation="warehouseStockLog.xsd" />
    <!-- декларация алкохолни напитки -->
    <xs:element name="Declaration">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="KindOfDeclaration" type="KindOfDeclarationType" />
				<xs:element name="TypeOfDeclaration" type="TypeOfDeclarationType" />
				<xs:element name="IsCorrectionDeclaration" type="IsCorrectionDeclarationType" />
				<xs:element name="RefNumberOfCorrectedDeclaration" type="RefNumberOfCorrectedDeclarationType" minOccurs="0" maxOccurs="1"/>
				<xs:element name="IsDelayedReporting" type="IsDelayedReportingType" />
				<xs:element name="DelayReferenceNumber" type="DelayReferenceNumberType"	minOccurs="0" maxOccurs="1"/>
				<xs:element name="PreparationDate" type="DateType" />
				<xs:element name="CustomsOffice" type="CustomsOfficeType" />
				<xs:element name="TotalAmountOfExciseDuty" type="TotalAmountOfExciseDutyType" />
				<xs:element ref="Customer" />
				<xs:element ref="Declarer" />
				<xs:element ref="ReportingPeriod" />
				<xs:element ref="AppliedDocuments" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="ExciseGoods" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="WarehouseStockLog" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="Inventories" minOccurs="0" maxOccurs="1" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	  <xs:element name="ExciseGoods">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ExciseGood" minOccurs="1" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ExciseGood">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="ExciseGoodADType">
                    <xs:sequence>
                    	<xs:element name="MissingLabelsCnt" type="MissingLabelsCntType" minOccurs="0" maxOccurs="1" />
                        <xs:element name="Degree" type="DegreeType" minOccurs="0" maxOccurs="1" />
                        <xs:element name="TaxBase" type="TaxBaseType" minOccurs="0" maxOccurs="1" />
                        <xs:element name="ExciseDuty" type="ExciseDutyType" minOccurs="0" maxOccurs="1" />
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

</xs:schema>
