<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://esf.gov.kz/esf/model/document/vatcredit/abstract" xmlns:tns="http://esf.gov.kz/esf/model/document/vatcredit/abstract" xmlns:avatcredit="http://esf.gov.kz/esf/model/document/vatcredit/abstract" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="abstractInvoice.esf">

  <xs:import namespace="abstractInvoice.esf"/>

  <xs:element name="vatCreditNotice" type="tns:AbstractVatCreditNotice"/>

  <xs:complexType name="AbstractVatCreditNotice" abstract="true">
    <xs:annotation>
      <xs:documentation>Базовый класс для Извещения</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="branchTin" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>ИИН/БИН структурного подразделения</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="date" type="xs:string">
        <xs:annotation>
          <xs:documentation>Дата оформления</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="number" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Номер извещения в учетной системе</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="tin" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>ИИН/БИН плательщика НДС</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AbstractVatCreditEntry">
    <xs:sequence>
      <xs:element name="invoiceRegistrationNumber" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Регистрационный номер ЭСФ</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="invoiceType" type="ns1:InvoiceType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Тип ЭСФ</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="rowNum" type="xs:int" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Порядковый номер сроки извещения</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="vatCreditQuarter" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Квартал отнесения в зачет</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]{4}/[1-4]"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>