web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

xRechnung-electronic report

(4) ShareShare
ReportReport
Posted on by 26
Hello D3 community,
 
We are implementing for Germany the standard xRechnung (e-invoice) , however we are receiving a validation error which is related to cash discount in the XML, particularly related to the line <cbc:ID>Z</cbc:ID>. The Z indicates that it's a zero rated transaction. We are validating this on the government portal (Germany). We do not understand why it's at all calculating cash discount already in the XML, as you cannot know at this point if the Customer will pay in the required time! 
If you go on the german government portal and create an invoice with cash discount, the cash discount is only provided as a note, which is correct-see below, so why is D365 calculating the above in the standard ER.
 
 
Categories:
  • Jonas "Jones" Melgaard Profile Picture
    5,017 Most Valuable Professional on at
    There is a know issue related to xRechnung validation and discount lines inserted in sales orders, that got fixed in 10.0.40.
    What platform update are you on?
  • PK-16100640-0 Profile Picture
    26 on at
    Thanks for your reply, but we are on 10.0.41
     
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    15,271 Super User 2026 Season 2 on at
    Hi,
    Ref. to the screenshots, you have two invoices, can you upload on of the invoices in xml format so I can check further?
     
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    5,017 Most Valuable Professional on at
    I just had a play with the electronic report design, needed to do some Power Platform configuration in my environment. This is the logic behind that section:
     
    It's pretty dumb and contains no logic as such. If the invoice in F&O got posted with a cash disc amount greater than zero, then this section will be printed.
    I feel it's fairly simple to fix in the design, but I wonder what the invoice journal looks like in F&O? Is that also posted with a cash discount?
     
    In that case, the discount is applied way to early in F&O.
     
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    15,271 Super User 2026 Season 2 on at
    Hi,

    Is the invoice in Peppol BIS Billing 3.0 format? If not, which version is it?

    Could you please upload the XML file of the invoice to this issue?

    Regarding the configuration, the cac:PaymentTerms will be enabled when the CashDisc is not zero.



    For the Tax code "Z," it will be enabled if you have a posting with a zero rate tax code. Tax code "S" will be used when a standard tax rate is applied, in this case, 19%.
  • Jonas "Jones" Melgaard Profile Picture
    5,017 Most Valuable Professional on at
    @Alireza last time I configured this for a German unit I used the "Sales Invoice DE" format that is built on top of the PEPPOL format.
    But if it an old version that could maybe explain this issue?
  • PK-16100640-0 Profile Picture
    26 on at
    hello again, the reason why i posted two xml's is that one is created directly in the german government portal showing how they display cash discount only as a note when cash discount > 0 and the other xml is the one created from D365 when cash discount >0. I will copy paste both examples below. I believe this is a bug the way D365 displays the cash discount when not zero.
     
     
     
     
     
     
     
    To answer your question the invoice journal shows the discount too in the field cash discount, but it's not affecting my total taxes, netto or brutto field. It will only affect these fields on settlement of the invoice.
     
    We are using the latest released version for DE 19.03.2024.
     
     
    Here is the example from the government portal, if you log in and create an XML with cash discount, you can see cash discount is only shown as a note, no calculation etc.
     
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <ns0:Invoice xmlns:ns0="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
    <cbc:ProfileID>Test</cbc:ProfileID>
    <cbc:ID>123456789</cbc:ID>
    <cbc:IssueDate>2024-10-15</cbc:IssueDate>
    <cbc:DueDate>2024-10-29</cbc:DueDate>
    <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
    <cbc:BuyerReference>991-33333TEST-33</cbc:BuyerReference>
    <cac:InvoicePeriod>
    <cbc:StartDate>2024-10-01</cbc:StartDate>
    <cbc:EndDate>2024-10-31</cbc:EndDate>
    </cac:InvoicePeriod>
    <cac:OrderReference>
    <cbc:ID>Customer reference</cbc:ID>
    </cac:OrderReference>
    <cac:AccountingSupplierParty>
    <cac:Party>
    <cbc:EndpointID schemeID="EM">hello@test.com</cbc:EndpointID>
    <cac:PartyIdentification>
    <cbc:ID>Test123</cbc:ID>
    </cac:PartyIdentification>
    <cac:PostalAddress>
    <cbc:CityName>München</cbc:CityName>
    <cbc:PostalZone>226013</cbc:PostalZone>
    <cac:Country>
    <cbc:IdentificationCode>DE</cbc:IdentificationCode>
    </cac:Country>
    </cac:PostalAddress>
    <cac:PartyTaxScheme>
    <cbc:CompanyID>DE123456789</cbc:CompanyID>
    <cac:TaxScheme>
    <cbc:ID>VAT</cbc:ID>
    </cac:TaxScheme>
    </cac:PartyTaxScheme>
    <cac:PartyTaxScheme>
    <cbc:CompanyID>115/000/00000</cbc:CompanyID>
    <cac:TaxScheme>
    <cbc:ID>AAA</cbc:ID>
    </cac:TaxScheme>
    </cac:PartyTaxScheme>
    <cac:PartyLegalEntity>
    <cbc:RegistrationName>PEKU GMBH</cbc:RegistrationName>
    </cac:PartyLegalEntity>
    <cac:Contact>
    <cbc:Name>PEKU GMBH</cbc:Name>
    <cbc:Telephone>06802423955</cbc:Telephone>
    <cbc:ElectronicMail>hello@test.com</cbc:ElectronicMail>
    </cac:Contact>
    </cac:Party>
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
    <cac:Party>
    <cbc:EndpointID schemeID="EM">hello1@test.com</cbc:EndpointID>
    <cac:PostalAddress>
    <cbc:CityName>München</cbc:CityName>
    <cbc:PostalZone>226013</cbc:PostalZone>
    <cac:Country>
    <cbc:IdentificationCode>DE</cbc:IdentificationCode>
    </cac:Country>
    </cac:PostalAddress>
    <cac:PartyTaxScheme>
    <cbc:CompanyID>DE123456788</cbc:CompanyID>
    <cac:TaxScheme>
    <cbc:ID>VAT</cbc:ID>
    </cac:TaxScheme>
    </cac:PartyTaxScheme>
    <cac:PartyLegalEntity>
    <cbc:RegistrationName>ANCO GMBH</cbc:RegistrationName>
    </cac:PartyLegalEntity>
    <cac:Contact>
    <cbc:Name>ANCO GMBH</cbc:Name>
    <cbc:ElectronicMail>hello@test.com</cbc:ElectronicMail>
    </cac:Contact>
    </cac:Party>
    </cac:AccountingCustomerParty>
    <cac:Delivery>
    <cbc:ActualDeliveryDate>2024-10-15</cbc:ActualDeliveryDate>
    </cac:Delivery>
    <cac:PaymentMeans>
    <cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
    <cac:PayeeFinancialAccount>
    <cbc:ID>DE02701500000000XXXXXX</cbc:ID>
    </cac:PayeeFinancialAccount>
    </cac:PaymentMeans>
    <cac:PaymentTerms>
    <cbc:Note>#SKONTO#TAGE=21#PROZENT=2.00#BASISBETRAG=20.00# </cbc:Note>
    </cac:PaymentTerms>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="EUR">9.50</cbc:TaxAmount>
    <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">50.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">9.50</cbc:TaxAmount>
    <cac:TaxCategory>
    <cbc:ID>S</cbc:ID>
    <cbc:Percent>19</cbc:Percent>
    <cac:TaxScheme>
    <cbc:ID>VAT</cbc:ID>
    </cac:TaxScheme>
    </cac:TaxCategory>
    </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="EUR">50.00</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="EUR">50.00</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="EUR">59.50</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="EUR">59.50</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
    <cbc:ID>1</cbc:ID>
    <cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">50.00</cbc:LineExtensionAmount>
    <cac:Item>
    <cbc:Name>Test</cbc:Name>
    <cac:SellersItemIdentification>
    <cbc:ID>001</cbc:ID>
    </cac:SellersItemIdentification>
    <cac:ClassifiedTaxCategory>
    <cbc:ID>S</cbc:ID>
    <cbc:Percent>19</cbc:Percent>
    <cac:TaxScheme>
    <cbc:ID>VAT</cbc:ID>
    </cac:TaxScheme>
    </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
    <cbc:PriceAmount currencyID="EUR">50</cbc:PriceAmount>
    </cac:Price>
    </cac:InvoiceLine>
    </ns0:Invoice>
     
     
     
    Thanks for your help!
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    15,271 Super User 2026 Season 2 on at
    I can't determine the version without seeing the XML file (the one you already shared screenshots of in this thread) and the values within the <cbc:CustomizationID> tag.
  • PK-16100640-0 Profile Picture
    26 on at
    Here the original one i posted originally at the start of the thread.
     
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    5,017 Most Valuable Professional on at
    I'd say it's a bug in the format that should be raised with Microsoft.
    If Microsoft says it's by design, then you can easily modify the format (Control the visibility of the 'ZZZ' allowance charge or the 'Z' tax group, add the PaymentTerms note etc).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 363 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 188

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans