<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.mf.gov.pl/schematy/SZPROT/e-Decyzje/WDDPO01/2.0.xsd" xmlns:ed="http://www.mf.gov.pl/schematy/SZPROT/Typy_eDecyzje/1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.mf.gov.pl/schematy/SZPROT/e-Decyzje/WDDPO01/2.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <!--=====Wniosek o wydanie lub zmianę pozwolenia na odroczenie płatności-->
  <xs:import namespace="http://www.mf.gov.pl/schematy/SZPROT/Typy_eDecyzje/1.0.xsd" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=1022000"/>
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://seap-intranet-ws:8080/seap_schematy/xsd?id=10125"/>
  <xs:element name="WDDPO01">
    <xs:annotation>
      <xs:documentation source="rootName" xml:lang="pl">
        WDDPO01
      </xs:documentation>
      <xs:documentation source="rootDoc" xml:lang="pl">
        Wniosek o wydanie lub zmianę pozwolenia na odroczenie płatności należności celnych, o ile pozwolenie nie zostanie przyznane w odniesieniu do jednej operacji
      </xs:documentation>
      <xs:documentation source="doc" xml:lang="pl">
        Element główny 
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Wniosek" type="ed:NaglowekEdecyzjePozType3">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Dane ogólne wniosku (D.1/1, D.1/3, D.1/4, D.1/6, D.1/7).
            </xs:documentation>
            <xs:documentation source="rule">
              R785, R506
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="WnioskodawcaPodmiot" type="ed:PodmiotWnioskodawcaCloType2024">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Wnioskodawca (D.3/1; D.3/2).
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Dane Wnioskodawcy
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="PrzedstawicielPodmiot" type="ed:PodmiotPrzedstawicielCloType2024" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Przedstawiciel - podmiot  (D.3/3; D.3/4).
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Dane Przedstawiciela, który jest podmiotem gospodarczym.
            </xs:documentation>
            <xs:documentation source="rule">
              R742
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="PrzedstawicielOsoba" type="ed:OsobaFizycznaPrzedstawicielType2024" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Przedstawiciel - osoba fizyczna (D.3/3; D.3/4).
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Dane przedstawiciela osoby - fizycznej
            </xs:documentation>
            <xs:documentation source="rule">
              R742
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="OsobaOdpowiedzialnaZaWniosek" type="ed:OsobaFizycznaIdEdecyzjeType2024">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Osoba do kontaktu odpowiedzialna za wniosek (D.3/6).
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="KsiegiRachunkoweAdres" type="ed:AdresType2024" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Miejsce, w którym prowadzone są główne księgi rachunkowe na potrzeby celne lub w którym są one dostępne (D.4/3).
            </xs:documentation>
            <xs:documentation source="rule">
              R652
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="EwidencjeCelneAdres" type="ed:AdresType2024" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Miejsce prowadzenia ewidencji (D.4/4/).
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="DataRozpoczeciaWaznosciPozwolenia" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Wnioskowana data rozpoczęcia ważności pozwolenia (D.4/6).
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="dataOd" type="xs:date" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Wnioskowana data początkowa
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="opis" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Opis terminu rozpoczęcia ważności pozwolenia
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="2560"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="RodzajOdroczenia" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Rodzaj odroczenia płatności (D.VII/1)
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="rodzajOdroczeniaKod" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Rodzaj odroczenia płatności (D.VII/1)
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  W odniesieniu do odroczenia płatności stosuje się następujące kody:
                  1 - Art. 110 lit. b) kodeksu, tzn. łącznie dla wszystkich kwot należności celnych przywozowych lub wywozowych zaksięgowanych zgodnie z art. 105 ust. 1 akapit pierwszy, w wyznaczonym okresie nie dłuższym niż 31 dni.
                  2 - Art. 110 lit. c) kodeksu, tzn. łącznie dla wszystkich kwot należności celnych przywozowych lub wywozowych, które podlegają całościowemu zaksięgowaniu zgodnie z art. 105 ust. 1 akapit drugi.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="rodzajOdroczeniaNazwa" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Opis rodzaju odroczenia płatności
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="255"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="sposobOdroczeniaOpis" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Sposób odroczenia płatności
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Edytowalne pole opisowe
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="sposobObliczaniaTerminu" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Sposób obliczenia terminu płatności należności celnych:
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Edytowalne pole opisowe
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="dlugoscOkresuRozliczeniowego" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Długość okresu rozliczeniowego
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Edytowalne pole opisowe
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="poczatekOkresuRozliczeniowego" type="xs:date" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Początek okresu rozliczeniowego
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="RodzajProceduryCelnej" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Rodzaj procedur celnych (D.7/2).
            </xs:documentation>
            <xs:documentation source="rule">
              R512, R726
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="kodProcedury" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Kod procedury
                </xs:documentation>
                <xs:documentation source="list">
                  003
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="liczbaOperacjiMiesiecznie" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Liczba operacji miesiecznie dla danego rodzaju procedury
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:integer">
                  <xs:totalDigits value="7"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="nrPozwolenia" use="optional">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Numer pozwolenia lub wniosku o wydanie pozwolenia
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  W przypadku, gdy kod procedury dotyczy procedur specjalnych - należy podać numer pozwolenia na procedurę specjalną lub nr wniosku  o wydanie pozwolenia na procedurę specjalną.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="35"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="TowarObejmowany" minOccurs="0" maxOccurs="9999">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Opis i wartość towarów, które mają zostać objęte procedurą (D.5/2, D5/4).
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="opis" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Opis towarów (D.5/2)
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="2560"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="wartosc" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Wartość towarów (D.5/4)
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:totalDigits value="16"/>
                  <xs:fractionDigits value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="waluta" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Waluta
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Kod waluty, w której podano wartość towarów (D.5/4).
                </xs:documentation>
                <xs:documentation source="list">
                  026
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="3"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Zabezpieczenie" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Zabezpieczenie (D.4/12; D.8/6).
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="UCZabezpieczenia" minOccurs="0">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Urząd celny zabezpieczenia (D.4.12).
                  </xs:documentation>
                  <xs:documentation source="rule">
                    R657
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="kod" use="required">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Kod
                      </xs:documentation>
                      <xs:documentation source="doc" xml:lang="pl">
                        Kod urzędu celnego zabezpieczenia (D.4/12).
                      </xs:documentation>
                      <xs:documentation source="list">
                        001
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="8"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="nazwa" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Nazwa urzędu celnego zabezpieczenia 
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="255"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="numerGRN" minOccurs="0" maxOccurs="99">
                <xs:complexType>
                  <xs:attribute name="nrGRN" use="required">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="24"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="numerReferencyjny" minOccurs="0" maxOccurs="99">
                <xs:complexType>
                  <xs:attribute name="numerReferencyjnyInny" use="required">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="wymaganeZabezpieczenieKod" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Kod określający wymagalność zabezpieczenia
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Kod określający wymagalność zabezpieczenia D.8/6):
                  0 - Nie wymaga się zabezpieczenia
                  1- Wymaga się.
                </xs:documentation>
                <xs:documentation source="rule">
                  R657
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="zabezpieczeniePoleTekstowe" use="optional">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="ZgodaNaPublikacje" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Zgoda na publikację w wykazie posiadaczy pozwoleń (D.8/12).
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="zgodaNaPublikacje" type="xs:boolean" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Czy wyrażenie zgody na publikację w wykazie posiadaczy pozwoleń?
                </xs:documentation>
                <xs:documentation source="doc" xml:lang="pl">
                  Znacznik wyrażenia zgody na publikację w wykazie posiadaczy pozwoleń (D.8/12).
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="InformacjaDodatkowa" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Dodatkowe informacje (D.8/5).
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="tekst" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Tekst informacji dodatkowej.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="2560"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="Zalacznik" type="ed:ZalacznikType" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Załączony dokument (D.2/4).
            </xs:documentation>
            <xs:documentation source="doc">
              Załączny dokument elektroniczny w postaci pliku lub numeru e-Dokumentu w podsystemie e-Dokumenty.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SkladajacyWniosek" type="ed:SkladajacyWniosekType">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Data i dane osoby składającej wniosek (D.1/2; D.4/2).
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ds:Signature" minOccurs="0">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Podpis elektroniczny osoby składającej wniosek.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
