anskaffelser / ehf-postaward-g2

Specifications part of EHF Post-Award, 2nd generation.
33 stars 37 forks source link

EUGEN-T10-R042 Ambiguous Invoice/TaxTotal/TaxSubtotal/TaxAmount precision #270

Closed juskoljo closed 6 years ago

juskoljo commented 6 years ago

Please make sure this box is checked before submitting your issue - thank you!

Issues related to PEPPOL BIS or rules part of PEPPOL BIS must be sent to rfc@peppol.eu.

Your issue here: Is there some specific reason why there is -1..+0.99 NOK precision allowed in validation of calculating TaxTotal/TaxSubtotal/TaxAmount? I've been contacted regarding this issue as it is causing problems in receivers system.

Potentially the total payable amount of 100.000 invoices may be 100.000 NOK too small or 99.000 NOK too big.

In below examples TaxSubtotal/TaxAmount should be 24.41 NOK (97.62 * 0.25 = 24.405 NOK). Correct PayableAmount should be 122.03 NOK. Both of the below examples pass the validation.

Scenario 1: TaxAmount is 0.99 NOK greater (than 25.41 NOK)

  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="NOK">25.40</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="NOK">97.62</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="NOK">25.40</cbc:TaxAmount> <!-- +0.99 NOK -->
      <cac:TaxCategory>
        <cbc:ID schemeID="UNCL5305">S</cbc:ID>
        <cbc:Percent>25.000</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="NOK">97.62</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="NOK">97.62</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="NOK">123.02</cbc:TaxInclusiveAmount>
    <cbc:ChargeTotalAmount currencyID="NOK">0.00</cbc:ChargeTotalAmount>
    <cbc:PayableAmount currencyID="NOK">123.02</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>

Scenario 2: TaxAmount is -1.00 NOK smaller (than 25.41 NOK)

  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="NOK">23.41</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="NOK">97.62</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="NOK">23.41</cbc:TaxAmount> <!-- -1.00 NOK -->
      <cac:TaxCategory>
        <cbc:ID schemeID="UNCL5305">S</cbc:ID>
        <cbc:Percent>25.000</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="NOK">97.62</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="NOK">97.62</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="NOK">121.03</cbc:TaxInclusiveAmount>
    <cbc:ChargeTotalAmount currencyID="NOK">0.00</cbc:ChargeTotalAmount>
    <cbc:PayableAmount currencyID="NOK">121.03</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>
klakegg commented 6 years ago

Rules identified with EUGEN-* is not EHF rules.