Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse Charge working? #122

Closed
hypers1 opened this issue Nov 28, 2020 · 6 comments
Closed

Reverse Charge working? #122

hypers1 opened this issue Nov 28, 2020 · 6 comments

Comments

@hypers1
Copy link

hypers1 commented Nov 28, 2020

Does reverse charge (TAX Catory Code AE) work?
I cannot validate documents with AE:

_[BR-AE-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is “Reverse charge” shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) and/or the Buyer legal

Test.zip

registration identifier (BT-47).

[BR-AE-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Reverse charge" shall have a VAT exemption reason code (BT-121), meaning "Reverse charge" or the VAT exemption reason text (BT-120) "Reverse charge" (or the equivalent standard text in another language).

[BR-AE-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is “Reverse charge” shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47)._

I am a little bit confused, because all required fields are filled. What could be the reason for this?

@hypers1
Copy link
Author

hypers1 commented Nov 28, 2020

Hier ist nochmal der Inhalt der XML-Datei. Meiner Meinung nach ist die Datei korrekt (auch wenn man der Doku glauben darf):

<rsm:CrossIndustryInvoice xmlns:a="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
rsm:ExchangedDocumentContext
ram:GuidelineSpecifiedDocumentContextParameter
ram:IDurn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
rsm:ExchangedDocument
ram:ID18383</ram:ID>
ram:TypeCode380</ram:TypeCode>
ram:IssueDateTime
<udt:DateTimeString format="102">20201127</udt:DateTimeString>
</ram:IssueDateTime>
</rsm:ExchangedDocument>
rsm:SupplyChainTradeTransaction
ram:IncludedSupplyChainTradeLineItem
ram:AssociatedDocumentLineDocument
ram:LineID1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
ram:SpecifiedTradeProduct
ram:SellerAssignedID1</ram:SellerAssignedID>
ram:NameHSW-Tür Instandsetzung</ram:Name>
</ram:SpecifiedTradeProduct>
ram:SpecifiedLineTradeAgreement
ram:GrossPriceProductTradePrice
ram:ChargeAmount52.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
ram:NetPriceProductTradePrice
ram:ChargeAmount52.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
ram:SpecifiedLineTradeDelivery
<ram:BilledQuantity unitCode="HUR">4.00</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
ram:SpecifiedLineTradeSettlement
ram:ApplicableTradeTax
ram:TypeCodeVAT</ram:TypeCode>
ram:ExemptionReasonUmkehrung der Steuerschuldnerschaft</ram:ExemptionReason>
ram:CategoryCodeAE</ram:CategoryCode>
ram:RateApplicablePercent0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
ram:SpecifiedTradeSettlementLineMonetarySummation
ram:LineTotalAmount208.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
ram:ApplicableHeaderTradeAgreement
ram:BuyerReference123456789</ram:BuyerReference>
ram:SellerTradeParty
ram:ID116078</ram:ID>
ram:NameMustermann GmbH</ram:Name>
ram:DefinedTradeContact
ram:PersonNameWolfgang Muster</ram:PersonName>
ram:TelephoneUniversalCommunication
ram:CompleteNumber069-12335</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
ram:EmailURIUniversalCommunication
ram:URIID[email protected]</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
ram:PostalTradeAddress
ram:PostcodeCode60388</ram:PostcodeCode>
ram:LineOneMusterstrasse 4</ram:LineOne>
ram:CityNameFrankfurt am Main</ram:CityName>
ram:CountryIDDE</ram:CountryID>
</ram:PostalTradeAddress>
ram:SpecifiedTaxRegistration
<ram:ID schemeID="FC">04523149435</ram:ID>
</ram:SpecifiedTaxRegistration>
ram:SpecifiedTaxRegistration
<ram:ID schemeID="VA">DE152338654</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
ram:BuyerTradeParty
ram:ID10099</ram:ID>
ram:NameDB Station&Service AG RB Mitte</ram:Name>
ram:DefinedTradeContact
ram:PersonNameKlaus Koffer</ram:PersonName>
</ram:DefinedTradeContact>
ram:PostalTradeAddress
ram:PostcodeCode10115</ram:PostcodeCode>
ram:LineOneElisabeth-Schwarzhaupt-Platz 1</ram:LineOne>
ram:CityNameBerlin</ram:CityName>
ram:CountryIDDE</ram:CountryID>
</ram:PostalTradeAddress>
ram:SpecifiedTaxRegistration
<ram:ID schemeID="VA">DE152138634</ram:ID>
</ram:SpecifiedTaxRegistration>
ram:SpecifiedTaxRegistration
<ram:ID schemeID="FC">04523249415</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
ram:BuyerOrderReferencedDocument
<ram:IssuerAssignedID />
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
ram:ApplicableHeaderTradeDelivery
ram:ActualDeliverySupplyChainEvent
ram:OccurrenceDateTime
<udt:DateTimeString format="102">20201123</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
ram:DeliveryNoteReferencedDocument
ram:IssuerAssignedID22138</ram:IssuerAssignedID>
</ram:DeliveryNoteReferencedDocument>
</ram:ApplicableHeaderTradeDelivery>
ram:ApplicableHeaderTradeSettlement
ram:InvoiceCurrencyCodeEUR</ram:InvoiceCurrencyCode>
ram:SpecifiedTradeSettlementPaymentMeans
ram:TypeCode1</ram:TypeCode>
ram:InformationRechnung</ram:Information>
ram:PayeePartyCreditorFinancialAccount
ram:IBANIDDE54500800000192632400</ram:IBANID>
ram:AccountNameMustermann GmbH</ram:AccountName>
</ram:PayeePartyCreditorFinancialAccount>
ram:PayeeSpecifiedCreditorFinancialInstitution
ram:BICIDDRESDEFFXXX</ram:BICID>
</ram:PayeeSpecifiedCreditorFinancialInstitution>
</ram:SpecifiedTradeSettlementPaymentMeans>
ram:ApplicableTradeTax
ram:CalculatedAmount0.00</ram:CalculatedAmount>
ram:TypeCodeVAT</ram:TypeCode>
ram:BasisAmount233.00</ram:BasisAmount>
ram:CategoryCodeAE</ram:CategoryCode>
ram:RateApplicablePercent0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
ram:SpecifiedTradeAllowanceCharge
ram:ChargeIndicator
udt:Indicatortrue</udt:Indicator>
</ram:ChargeIndicator>
ram:BasisAmount0.00</ram:BasisAmount>
ram:ActualAmount25.00</ram:ActualAmount>
ram:ReasonLieferpauschale</ram:Reason>
ram:CategoryTradeTax
ram:TypeCodeVAT</ram:TypeCode>
ram:CategoryCodeAE</ram:CategoryCode>
ram:RateApplicablePercent0.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
ram:SpecifiedTradePaymentTerms
ram:Description10 Tage 3% Skonto, 30 Tage netto</ram:Description>
ram:DueDateDateTime
<udt:DateTimeString format="102">20201227</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
ram:SpecifiedTradeSettlementHeaderMonetarySummation
ram:LineTotalAmount208.00</ram:LineTotalAmount>
ram:ChargeTotalAmount25.00</ram:ChargeTotalAmount>
ram:AllowanceTotalAmount0.00</ram:AllowanceTotalAmount>
ram:TaxBasisTotalAmount233.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">0.00</ram:TaxTotalAmount>
ram:GrandTotalAmount233.00</ram:GrandTotalAmount>
ram:DuePayableAmount233.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

@stephanstapel
Copy link
Owner

stephanstapel commented Nov 28, 2020

My approach usually is to step through the source code of the validation which is in this case (https://docs.peppol.eu/poacc/billing/3.0/rules/BR-AE-02/):

(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))

Please note that this is an open source project. I'm investing my spare time to enhance the library. I can't support commercial initiatives and check individual mappings for free.
However if you find bugs in the library or need enhancements, I'll be there to help!

@hypers1
Copy link
Author

hypers1 commented Nov 29, 2020

I am not sure, wether it is a bug:
When reverse charge is used, some validators (i. e. https://www.epoconsulting.com/erechnung/xrechnung-validator) don't accept the file when the sales taxid (Umsatzsteuer-ID) is marked with the schemeID "VA".

This works not:

                                <ram:SpecifiedTaxRegistration>
                                        <ram:ID schemeID="VA">DE201092120</ram:ID>
                                </ram:SpecifiedTaxRegistration>

This works:

                                <ram:SpecifiedTaxRegistration>
                                        <ram:ID schemeID="VAT">DE201092120</ram:ID>
                                </ram:SpecifiedTaxRegistration>

@landrix
Copy link
Contributor

landrix commented Nov 29, 2020

VA is right

@hypers1
Copy link
Author

hypers1 commented Nov 29, 2020

Yes, I think the same, after I studied the documentation. Are some validators working wrong?
I have some files with this problem, that the Deutsche Bahn doesn't accept, because of the VA/VAT-Problem.

@stephanstapel
Copy link
Owner

there is a similar discussion here:
ConnectingEurope/eInvoicing-EN16931#57

There are some old changes for BR-AE-04 here (referenced in the issue):
ConnectingEurope/eInvoicing-EN16931@68ba586
i.e. for (pure) EN16391, the validation is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants