﻿<?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" maxOccurs="9999" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="ExciseGood">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="ExciseGoodADType">
					<xs:sequence>
                    	<xs:element name="Density" type="SixThreeDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="CarbonDioxideQnt" type="FifteenDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="CalorificAbility" type="FifteenDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="CarbonDioxideDutyRate" type="FourThreeDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="CalorificDutyRate" type="FourThreeDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="TotalCarbonDioxideQnt" type="FifteenDigitsDecimalType" minOccurs="0" maxOccurs="1" />
						<xs:element name="TotalCalorificAbility" type="FifteenDigitsDecimalType" 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>
