Giter VIP home page Giter VIP logo

Comments (3)

cryptolopes avatar cryptolopes commented on June 12, 2024

Um exemplo por favor.

from saf-t-ao.

antoniomarinheiro avatar antoniomarinheiro commented on June 12, 2024

Cá vai, é o 2º documento

SAF-T-AO-ExemploTotalZero.zip

from saf-t-ao.

cryptolopes avatar cryptolopes commented on June 12, 2024

SAF-T-AO-ExemploTotalZero.zip

@antoniomarinheiro

Atenção ao encoding do ficheiro, que deve ser UTF-8:

<?xml version="1.0" encoding="iso-8859-1"?>

Atenção aos erros de estrutura:

xmllint --schema XSD/SAFTAO1.01_01.xsd testing/SAF-T-AO-ExemploTotalZero.xml --noout
testing/SAF-T-AO-ExemploTotalZero.xml:6: element TaxRegistrationNumber: Schemas validity error : Element '{urn:OECD:StandardAuditFile-Tax:AO_1.01_01}TaxRegistrationNumber': [facet 'minLength'] The value has a length of '9'; this underruns the allowed minimum length of '10'.
testing/SAF-T-AO-ExemploTotalZero.xml:6: element TaxRegistrationNumber: Schemas validity error : Element '{urn:OECD:StandardAuditFile-Tax:AO_1.01_01}TaxRegistrationNumber': '999999999' is not a valid value of the atomic type '{urn:OECD:StandardAuditFile-Tax:AO_1.01_01}SAFAOAngolaVatNumber'.   
testing/SAF-T-AO-ExemploTotalZero.xml:151: element WithholdingTaxAmount: Schemas validity error : Element '{urn:OECD:StandardAuditFile-Tax:AO_1.01_01}WithholdingTaxAmount': This element is not expected. Expected is ( {urn:OECD:StandardAuditFile-Tax:AO_1.01_01}WithholdingTaxType ).
testing/SAF-T-AO-ExemploTotalZero.xml:248: element WithholdingTaxAmount: Schemas validity error : Element '{urn:OECD:StandardAuditFile-Tax:AO_1.01_01}WithholdingTaxAmount': This element is not expected. Expected is ( {urn:OECD:StandardAuditFile-Tax:AO_1.01_01}WithholdingTaxType ).
testing/SAF-T-AO-ExemploTotalZero.xml fails to validate

Atenção à formatação do InvoiceNo

1 01/2020008 O número do documento deve iniciar-se obrigatoriamente a 1, ser contínuo e sequencial e não ter nenhum prefixo. No caso, parece ter o ano 2020 e dois zeros antes do 008.

Documento não valorado

<Invoice>
    <InvoiceNo>1 01/2020007</InvoiceNo>
    <DocumentStatus>
        <InvoiceStatus>A</InvoiceStatus>
        <InvoiceStatusDate>2020-03-26T11:42:46</InvoiceStatusDate>
        <SourceID>5</SourceID>
        <SourceBilling>P</SourceBilling>
    </DocumentStatus>
    <Hash>aw8T4PrmJ6eShjPImpN9GKxR0/E2m+Hv4jLN0CV8i0TXmqkmgL49zyk4f3TzpF+NlrQNvq7x1jdAouWj154VpxsxUxJE/voJxJX17C/tGjnjHS7dQV1kuEVQm2XSZEzusJVG6X6J9VDPaSHB6pGSu7vHSgKXkq68KcP3kCLLwJI=</Hash>
    <HashControl>1</HashControl>
    <Period>2</Period>
    <InvoiceDate>2020-02-27</InvoiceDate>
    <InvoiceType>FT</InvoiceType>
    <SpecialRegimes>
        <SelfBillingIndicator>0</SelfBillingIndicator>
        <CashVATSchemeIndicator>0</CashVATSchemeIndicator>
        <ThirdPartiesBillingIndicator>0</ThirdPartiesBillingIndicator>
    </SpecialRegimes>
    <SourceID>5</SourceID>
    <SystemEntryDate>2020-02-27T14:50:31</SystemEntryDate>
    <CustomerID>311210138</CustomerID>
    <Line>
        <LineNumber>1</LineNumber>
        <ProductCode>001</ProductCode>
        <ProductDescription>RABALHOS REALIZADOS DURANTE O M�S DE FEVEREIRO CONFORME AUTO DE MEDI��O N�6 E NOSSA PROPOSTA DTC &#8211; T</ProductDescription>
        <Quantity>1</Quantity>
        <UnitOfMeasure>Unidade</UnitOfMeasure>
        <UnitPrice>0.00000</UnitPrice>
        <TaxPointDate>2020-02-27</TaxPointDate>
        <Description>RABALHOS REALIZADOS DURANTE O M�S DE FEVEREIRO CONFORME AUTO DE MEDI��O N�6 E NOSSA PROPOSTA DTC &#8211; T</Description>
        <CreditAmount>0.000</CreditAmount>
        <Tax>
            <TaxType>IVA</TaxType>
            <TaxCountryRegion>AO</TaxCountryRegion>
            <TaxCode>OUT</TaxCode>
            <TaxPercentage>14.00</TaxPercentage>
        </Tax>
    </Line>
    <DocumentTotals>
        <TaxPayable>0.00</TaxPayable>
        <NetTotal>0.00</NetTotal>
        <GrossTotal>0.00</GrossTotal>
        <Settlement>
            <PaymentTerms>N�o Defenido - 09/03/2020</PaymentTerms>
        </Settlement>
    </DocumentTotals>
</Invoice>

Não deveria ser um problema submeter um documento a zero. Possivelmente é a plataforma da AGT que está a considerar isso mal, devendo o mesmo ser reportado à AGT. Em relação ao TaxCode, parece existir um erro. Não há motivo para dizer é do tipo OUT, devendo constar NOR.

from saf-t-ao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.