<?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/WDCGU01/2.0.xsd" xmlns:td="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/WDCGU01/2.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <!--Wniosek o wydanie, zmianę lub cofnięcie pozwolenia na złożenie zabezpieczenia generalnego, w tym możliwego obniżenia wysokości lub zwolnienia z obowiązku złożenia zabezpieczenia -->
  <!--<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.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="WDCGU01">
    <xs:annotation>
      <xs:documentation source="rootName" xml:lang="pl">
        WDCGU01
      </xs:documentation>
      <xs:documentation source="rootDoc" xml:lang="pl">
        Komunikat zawiera dane wniosku o pozwolenie  na złożenie zabezpieczenia generalnego, w tym możliwego obniżenia wysokości lub zwolnienia z obowiązku złożenia zabezpieczenia.
      </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="td: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
            </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:documentation source="rule">
                  R659
                </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:documentation source="rule">
                  R659
                </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="WnioskodawcaPodmiot" type="td:PodmiotWnioskodawcaCloType2024">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Wnioskodawca (D.3/1; D.3/2).
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="PrzedstawicielPodmiot" type="td:PodmiotPrzedstawicielCloType" 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">
              R675
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="PrzedstawicielOsoba" type="td:OsobaFizycznaPrzedstawicielType" 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 przedsta
            </xs:documentation>
            <xs:documentation source="rule">
              R675
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="OsobaOdpowiedzialnaZaWniosek" type="td: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="OsobaOdpowiedzialnaZaSprawyCelne" type="td:OsobaOdpowiedzialnaZaSprawyCelneType2024" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Osoba odpowiedzialna za sprawy celne (D.3/5).
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Imię i nazwisko oraz dane kontaktowe osoby odpowiedzialnej za sprawy celne.
            </xs:documentation>
            <xs:documentation source="rule">
              R652
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="KierujacyPrzedsiebiorstwem" type="td:ZarzadzajacyPrzedsiebiorstwemZalacznikA2024" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Osoba kierująca przedsiębiorstwem wnioskodawcy lub nadzorująca zarządzanie nim (D.3/7).
            </xs:documentation>
            <xs:documentation source="rule">
              R652
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="EwidencjeCelne" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Miejsce prowadzenia ewidencji oraz jej rodzaj (D.4/4; D.8/2).
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="MiejsceProwadzenia" type="td:AdresType2024">
                <xs:annotation>
                  <xs:documentation source="name" xml:lang="pl">
                    Miejsce prowadzenia ewidencji (D.4/4/).
                  </xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="rodzaj" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Rodzaj ewidencji (D.8/2) 
                </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="KsiegiRachunkowe" minOccurs="0" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Rodzaj głównych ksiąg rachunkowych na potrzeby celne ( D.8/1).
            </xs:documentation>
            <xs:documentation source="rule">
              R512
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="MiejsceProwadzenia" type="td:AdresType2024" minOccurs="0" maxOccurs="1">
                <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:sequence>
            <xs:attribute name="rodzaj" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Rodzaj głównych ksiąg rachunkowych na potrzeby celne (D.8/1)
                </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="LiczbaOperacji" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Liczba operacji (D.7/4)
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="pl">
              Szacunkowa miesięczna   ilość operacji realizowanych w ramach uproszczenia.
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="liczbaOperacji" use="required">
              <xs:annotation>
                <xs:documentation source="name" xml:lang="pl">
                  Liczba operacji
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:integer">
                  <xs:totalDigits value="7"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="PoziomZabezpieczeniaKwotaReferencyjnaTermin">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="KwotaReferencyjnaOgolem" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:attribute name="kwotaReferencyjna">
                    <xs:simpleType>
                      <xs:restriction base="xs:decimal">
                        <xs:totalDigits value="18"/>
                        <xs:fractionDigits value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="waluta" type="xs:string" fixed="PLN"/>
                  <xs:attribute name="sposobWyliczeniaKwoty"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="KwotaReferencyjnaPC" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="KwotyNaleznosci">
                      <xs:complexType>
                        <xs:attribute name="KwotaNaleznosciInnychOplat">
                          <xs:simpleType>
                            <xs:restriction base="xs:decimal">
                              <xs:totalDigits value="18"/>
                              <xs:fractionDigits value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="WalutaNaleznosciInnychOplat" type="xs:string"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="SredniOkres" minOccurs="0" maxOccurs="99">
                      <xs:complexType>
                        <xs:attribute name="RodzajSredniegoOkresu">
                          <xs:annotation>
                            <xs:documentation source="name" xml:lang="pl">
                              Rodzaj średniego okresu 
                            </xs:documentation>
                            <xs:documentation source="doc" xml:lang="pl">
                              Lista lokalna. Możliwe wartości od 1 do 3:
                              1 = dni
                              2 = miesiące
                              3 = tygodnie
                            </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:integer">
                              <xs:enumeration value="1"/>
                              <xs:enumeration value="2"/>
                              <xs:enumeration value="3"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="RodzajSredniegoOkresuNazwa">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="256"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="CzasTrwaniaSredniegoOkresu"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="KwotaDlugu" minOccurs="0">
                      <xs:complexType>
                        <xs:annotation>
                          <xs:documentation source="name" xml:lang="pl">
                            KWOTA REFERENCYJNA ISTNIEJĄCEGO DŁUGU CELNEGO DLA PROCEDURY CELNEJ
                          </xs:documentation>
                          <xs:documentation source="doc" xml:lang="pl">
                            Kwota istniejącego, rzeczywistego długu
                          </xs:documentation>
                        </xs:annotation>
                        <xs:attribute name="KwotaDlugu"/>
                        <xs:attribute name="WalutaDlugu" type="xs:string" fixed="PLN"/>
                        <xs:attribute name="OpisKwotyDlugu">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="KwotaPotencjalnegoDlugu" minOccurs="0">
                      <xs:complexType>
                        <xs:annotation>
                          <xs:documentation source="name" xml:lang="pl">
                            KWOTA REFERENCYJNA POTENCJALNEGO DŁUGU CELNEGO DLA PROCEDURY CELNEJ
                          </xs:documentation>
                          <xs:documentation source="doc" xml:lang="pl">
                            Kwota potencjalnego długu
                          </xs:documentation>
                        </xs:annotation>
                        <xs:attribute name="KwotaDlugu">
                          <xs:annotation>
                            <xs:documentation source="name" xml:lang="pl">
                              kwota potencjalnego długu
                            </xs:documentation>
                            <xs:documentation source="doc" xml:lang="pl">
                              Kwota potencjalnego długu
                            </xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="WalutaDlugu" type="xs:string" fixed="PLN"/>
                        <xs:attribute name="OpisKwotyDlugu">
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="kwotaReferencyjnaKod"/>
                  <xs:attribute name="kwotaReferencyjnaNazwa"/>
                  <xs:attribute name="NumerReferencyjnyWniosku"/>
                  <xs:attribute name="NumerReferencyjnyDecyzji"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="PoziomZabezpieczenia" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                  <xs:attribute name="poziomZabezpieczeniaKod">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Poziom zabezpieczenia
                      </xs:documentation>
                      <xs:documentation source="doc" xml:lang="pl">
                        Poziom zabezpieczenia słownik PDR 1547
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="poziomZabezpieczeniaNazwa">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="140"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="poziomZabezpieczeniaOpis">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="2560"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="terminPlatnosci"  minOccurs="0">
                <xs:complexType>
                  <xs:attribute name="terminPlatnosci" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Termin płatności
                      </xs:documentation>
                      <xs:documentation source="doc" xml:lang="pl">
                        Kod terminu płatności, przyjmujący jedną z wartości:
                        1 - Normalny okres przed dokonaniem płatności, tzn. nie więcej niż 10 dni od daty powiadomienia dłużnika o długu celnym zgodnie z art. 108 kodeksu
                        2 - Odroczenie płatności (art. 110 kodeksu)
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="128"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="terminPlatnosciNazwa" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Termin płatności opis
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="256"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="FormaZabezpieczenia">
                <xs:complexType>
                  <xs:attribute name="formaZabezpieczenKod" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Kod formy zabezpieczeń
                      </xs:documentation>
                      <xs:documentation source="doc" xml:lang="pl">
                        Wartości listy:
                        1  lub 2 jeśli nie ma gwaranta na liście można dopisać dane spoza listy. 
                      </xs:documentation>
                      <xs:documentation source="list">
                        1567
                      </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="formaZabezpieczenNazwa" use="optional">
                    <xs:annotation>
                      <xs:documentation source="name" xml:lang="pl">
                        Forma 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="Gwarant" minOccurs="0" maxOccurs="99">
                <xs:complexType>
                  <xs:attribute name="nazwaGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="kodPanstwaGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="miejscowoscGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="kodPocztowyGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="ulicaGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="opisGwaranta">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="512"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ZgodaNaPublikacje" minOccurs="0" maxOccurs="1">
          <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" maxOccurs="1">
          <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">
                  Informacje dodatkowe
                </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="td:ZalacznikType" minOccurs="0" maxOccurs="99">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Załącznik
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SkladajacyWniosek" type="td:SkladajacyWniosekType">
          <xs:annotation>
            <xs:documentation source="name" xml:lang="pl">
              Osoba składająca wniosek
            </xs:documentation>
            <xs:documentation source="doc">
              Dane osoby wnioskującej (podpisującej wniosek).
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ds:Signature" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>