<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    targetNamespace="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/POG_5D.xsd"
    xmlns:tp4="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/Types.xsd"
    xmlns:tr="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/Trader.xsd"
    xmlns:pog5d="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/POG_5D.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="4_0"
    xml:lang="pl">

	<xs:import namespace="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/Types.xsd" schemaLocation="Types_Z2.xsd" />
	<xs:import namespace="http://www.e-clo.pl/ZEFIR2/eZefir2/xsd/v4_0/Trader.xsd" schemaLocation="Trader_Z2.xsd" />

	<xs:annotation>
		<xs:documentation source="doc" xml:lang="pl">ZAŁĄCZNIK DO
            DEKLARACJI POG-5 DLA PODATKU OD GIER
		</xs:documentation>
		<xs:documentation source="doc" xml:lang="pl">Formularz
            przeznaczony jest dla podatników podatku od gier:
            - prowadzących kasyna gry i salony gry bingo pieniężne oraz
            urządzających zakłady wzajemne, loterie pieniężne, grę telebingo i
            loterie audioteksowe,
            - urządzających gry liczbowe,
            - urządzających grę bingo fantowe i
            loterię fantową.
		</xs:documentation>
	</xs:annotation>
	<xs:element name="POG5D">
		<xs:annotation>
			<xs:documentation source="doc" xml:lang="pl">ELEMENT GŁÓWNY</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Header">
					<xs:annotation>
						<xs:documentation source="doc" xml:lang="pl">NAGłÓWEK DEKLARACJI</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Concession" maxOccurs="1">
								<xs:annotation>
									<xs:documentation source="doc" xml:lang="pl">DANE O ZEZWOLENIU/KONCESJI</xs:documentation>
									<xs:documentation source="box">B</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:complexContent>
										<xs:extension base="tp4:ZConcession">
											<xs:sequence>
												<xs:element name="CalculationOfTaxOnGame" minOccurs="1" maxOccurs="2">
													<xs:annotation>
														<xs:documentation source="doc" xml:lang="pl">OBLICZENIE PODATKU OD GIER</xs:documentation>
														<xs:documentation source="box">C</xs:documentation>
													</xs:annotation>
													<xs:complexType>
														<xs:attribute name="typeOfGame" use="required">
															<xs:annotation>
																<xs:documentation source="doc" xml:lang="pl">Rodzaj gry.</xs:documentation>
															</xs:annotation>
															<xs:simpleType>
																<xs:restriction base="xs:string">
																	<xs:enumeration value="48">
																		<xs:annotation>
																			<xs:documentation>Gra bingo fantowa - POG-5/D</xs:documentation>
																		</xs:annotation>
																	</xs:enumeration>
																	<xs:enumeration value="49">
																		<xs:annotation>
																			<xs:documentation>Loteria fantowa - POG-5/D</xs:documentation>
																		</xs:annotation>
																	</xs:enumeration>
																</xs:restriction>
															</xs:simpleType>
														</xs:attribute>
														<xs:attribute name="tax" type="tp4:ZAmountC" use="required">
															<xs:annotation>
																<xs:documentation source="doc" xml:lang="pl">Podstawa opodatkowania.</xs:documentation>
															</xs:annotation>
														</xs:attribute>
														<xs:attribute name="taxRatePercentage" type="tp4:ZPercentage" use="required">
															<xs:annotation>
																<xs:documentation source="doc" xml:lang="pl">Stawka podatku wyrażona ułamkiem dziesiętnym z dokładnością do 4 miejsc po przecinku.</xs:documentation>
															</xs:annotation>
														</xs:attribute>
														<xs:attribute name="amountOfTax" type="tp4:ZAmountC" use="required">
															<xs:annotation>
																<xs:documentation source="doc" xml:lang="pl">Kwota podatku. </xs:documentation>
																<xs:documentation source="rule">R8</xs:documentation>
															</xs:annotation>
														</xs:attribute>
													</xs:complexType>
												</xs:element>
											</xs:sequence>
										</xs:extension>
									</xs:complexContent>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="identifier" type="tp4:ZIdentification" use="required">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">Identyfikator podatnika (NIP).</xs:documentation>
								<xs:documentation source="box">1</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="period" type="tp4:ZPeriod" use="required">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">
                                    Data w formacie rok i miesiąc (RRRR-MM) ,gdzie RRRR - oznacza rok, MM - oznacza miesiąc.
								</xs:documentation>
								<xs:documentation source="box">5,6</xs:documentation> 
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="totalAmountOfTax" type="tp4:ZAmountT" use="required">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">Kwota
                                    podatku ogółem dla wszystkich zezwoleń/koncesji.
								</xs:documentation>
								<xs:documentation source="box">19</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="regon" type="tp4:ZNrREGON" use="optional">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">Numer identyfikacyjny REGON</xs:documentation>
								<xs:documentation source="box">8</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="fullName" type="tp4:ZCharacter" use="required">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">
                                    Pełna nazwa firmy lub nazwisko i pierwsze imię Podatnika składającego deklarację
								</xs:documentation>
								<xs:documentation source="box">7</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="formNo" use="required">
							<xs:annotation>
								<xs:documentation source="doc" xml:lang="pl">Numer załącznika.</xs:documentation>
								<xs:documentation source="box">4</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="tp4:ZFormNo">
									<xs:minInclusive value="1"/>
									<xs:maxInclusive value="99"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="version" type="tp4:ZVersion" use="required">
				<xs:annotation>
					<xs:documentation source="doc" xml:lang="pl">Wersja schematu, z którą zgodny jest komunikat.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>
