<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.mf.gov.pl/schematy/SZPROT/e-Klient/WRR0001/1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sz="http://www.mf.gov.pl/schematy/SZPROT/Typy/1.0.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.mf.gov.pl/schematy/SZPROT/e-Klient/WRR0001/1.0.xsd">
  <xs:import namespace="http://www.mf.gov.pl/schematy/SZPROT/Typy/1.0.xsd" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=1021325"/>
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=10125"/>
  <xs:element name="WRR0001" type="WRRType">
    <xs:annotation>
      <xs:documentation source="rootName" xml:lang="pl">
        WRR0001
      </xs:documentation>
      <xs:documentation source="rootDoc" xml:lang="pl">
        Wniosek o rejestrację danych osoby fizycznej w SISC.
      </xs:documentation>
      <xs:documentation source="rootDoc" xml:lang="pl">
        Komunikat jest przekazywany przez osobę fizyczną z portalu PUESC do SZPROT PLUS.
      </xs:documentation>
      <xs:documentation source="doc" xml:lang="pl">
        Element główny.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="WRRType">
    <xs:sequence>
      <xs:element name="Naglowek">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Dane podstawowe
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="sz:NaglowekType">
              <xs:attribute name="rejestracjaUpr" use="optional">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Rejestracja uproszczona
                  </xs:documentation>
                  <xs:documentation source="doc" xml:lang="pl">
                    Osoby zarejestrowane w sposób uproszczony mogą przesyłać do SISC wyłącznie dokumenty PDS (osoby zagraniczne) i zgłoszenia INTRASTAT.
                    Od wersji 2.14 ta wartość  nie jest deklarowana przez osobę wypełniającą wniosek (rejestracja pełna/ uproszczona jest obsługiwana automatycznie w systemie SZPROT PLUS ).
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:boolean"/>
                </xs:simpleType>
              </xs:attribute>
              <xs:attribute name="eoriOperacjaKod" use="optional">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Kod operacji na EORI
                  </xs:documentation>
                  <xs:documentation source="doc" xml:lang="pl">
                    Możliwe wartości: "1" (Rejestracja), "3" (Dezaktywacja)
                  </xs:documentation>
                  <xs:documentation source="rule">
                    R105
                  </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:length value="1"/>
                    <xs:enumeration value="1"/>
                    <xs:enumeration value="3"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="OsobaFizyczna" type="sz:OsobaFizycznaType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Osoba fizyczna
          </xs:documentation>
          <xs:documentation source="doc" xml:lang="pl">
            Dane identyfikacyjne i adresowe osoby, której wniosek dotyczy.
          </xs:documentation>
          <xs:documentation source="rule">
            R33, R107
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="9" name="Adres" type="sz:AdresType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="en">
            Adres
          </xs:documentation>
          <xs:documentation source="rule">
            R57
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="99" minOccurs="0" name="DedykowanyKontakt" type="sz:DedykowanyKontaktType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Preferowany kontakt
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="Akcyza">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Akcyza
          </xs:documentation>
          <xs:documentation source="doc" xml:lang="pl">
            Dane rejestrowane na podstawie ustawy o podatku akcyzowym.
          </xs:documentation>
          <xs:documentation source="rule">
            R131
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="9" name="WyrobZuzywany">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Zużywany wyrób akcyzowy
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Informacja o zużywaniu wyrobów akcyzowych zwolnionych od akcyzy ze względu na ich przeznaczenie.
                </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element maxOccurs="9" name="Adres" type="sz:AdresType">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Adres miejsca zużywania wyrobów akcyzowych
                      </xs:documentation>
                      <xs:documentation source="rule">
                        R99, R130
                      </xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="rodzajWyrobuKod" use="required">
                  <xs:annotation>
                    <xs:documentation source="name" xml:lang="pl">
                      Kod rodzaju wyrobu 
                    </xs:documentation>
                    <xs:documentation source="list">
                      1637
                    </xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="2"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="rodzajWyrobuNazwa" use="optional">
                  <xs:annotation>
                    <xs:documentation source="name" xml:lang="pl">
                      Rodzaj wyrobu
                    </xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="140"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="sredniaIlosc" use="required">
                  <xs:annotation>
                    <xs:documentation source="name" xml:lang="pl">
                      Średnia roczna ilość zużywanego wyrobu akcyzowego 
                    </xs:documentation>
                    <xs:documentation source="doc">
                      Określenie przewidywanej ilości zużywanych w roku kalendarzowym wyrobów akcyzowych zwolnionych od akcyzy ze względu na ich przeznaczenie.
                    </xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:decimal">
                      <xs:totalDigits value="16"/>
                      <xs:fractionDigits value="6"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="jednostkaKod" use="required">
                  <xs:annotation>
                    <xs:documentation source="name" xml:lang="pl">
                      Kod jednostki miary
                    </xs:documentation>
                    <xs:documentation source="list">
                      1636
                    </xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="2"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="jednostkaNazwa" use="optional">
                  <xs:annotation>
                    <xs:documentation source="name" xml:lang="pl">
                      Nazwa jednostki
                    </xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="70"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="organAkcyzowyKod" use="required">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Kod organu KAS do spraw akcyzy
              </xs:documentation>
              <xs:documentation source="list">
                001F
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:length value="8"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="organAkcyzowyNazwa" use="optional">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Nazwa organu do spraw akcyzy
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="140"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="podstawaPrawnaKod" use="required">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Kod podstawy prawnej określenia właściwości miejscowej w akcyzie
              </xs:documentation>
              <xs:documentation source="list">
                1634
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="2"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="podstawaPrawnaNazwa" use="optional">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Podstawa prawna określenia właściwości miejscowej w akcyzie
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="140"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="akcyzaOperacjaKod" use="required">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Cel zgłoszenia w akcyzie
              </xs:documentation>
              <xs:documentation source="doc" xml:lang="pl">
                Możliwe wartości: "1" (Rejestracja), "2" (Zmiana danych), "3" (Zmiana właściwości naczelnika urzędu skarbowego), "6" (Zakończenie zużywania)
              </xs:documentation>
              <xs:documentation source="rule">
                R127, R129
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:length value="1"/>
                <xs:enumeration value="1"/>
                <xs:enumeration value="2"/>
                <xs:enumeration value="3"/>
                <xs:enumeration value="6"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="dataZaprzestaniaAkc" type="xs:date" use="optional">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Data zaprzestania zużywania wyrobów akcyzowych
              </xs:documentation>
              <xs:documentation source="rule">
                R56
              </xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="przyczynaZaprzestaniaAkcWyjasnienie" use="optional">
            <xs:annotation>
              <xs:documentation source="name" xml:lang="pl">
                Wyjaśnienie przyczyny zaprzestania zużywania wyrobów akcyzowych
              </xs:documentation>
              <xs:documentation source="rule">
                R56
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="350"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element maxOccurs="9" minOccurs="0" name="WpisNaListe" type="sz:WpisNaListeType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Wpis na listę
          </xs:documentation>
          <xs:documentation source="doc" xml:lang="pl">
            Lista, na którą osoba jest wpisana. Na przykład lista agentów celnych.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="9" minOccurs="0" name="Certyfikat" type="sz:CertyfikatType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Certyfikat kwalifikowany
          </xs:documentation>
          <xs:documentation source="rule">
            R60
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="99" minOccurs="0" name="Oswiadczenie" type="sz:OswiadczenieType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Oświadczenie
          </xs:documentation>
          <xs:documentation source="rule">
            R59
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="InfDodatkowe" type="sz:InfDodatkoweType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Informacje dodatkowe
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="9" minOccurs="0" name="Zalacznik" type="sz:PlikType">
        <xs:annotation>
          <xs:documentation source="name">
            Załącznik
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Wnioskodawca" type="sz:WnioskodawcaType">
        <xs:annotation>
          <xs:documentation source="name" xml:lang="pl">
            Wnioskodawca
          </xs:documentation>
          <xs:documentation source="rule">
            R26
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" ref="ds:Signature"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>