DE-R-018: If both supplier and customer are located in Germany, information on cash discounts for prompt payment (Skonto) shall be provided within the element "Payment terms" BT-20 in the following way: First segment "SKONTO", second segment amount of days ("TAGE=N"), third segment percentage ("PROZENT=N"). Percentage must be separated by dot with two decimal places. In case the base value of the invoiced amount is not provided in BT-115 but as a partial amount, the base value shall be provided as fourth segment "BASISBETRAG=N" as semantic data type amount. Each entry shall start with a #, the segments must be separated by # and a row shall end with a #. A complete statement on cash discount for prompt payment shall end with a XML-conformant line break. All statements on cash discount for prompt payment shall be given in capital letters. Additional whitespaces (blanks, tabulators or line breaks) are not allowed. Other characters or texts than defined above are not allowed.
This fatal rule (DE-R-018) enforces the German-specific syntax for cash discount (Skonto) information in the Payment terms element (BT-20) when both supplier and customer are located in Germany (determined by the variables $supplierCountryIsDE and $customerCountryIsDE, which check the CountryCode in the supplier and customer postal addresses). The rule applies to Invoice and CreditNote documents. The assertion requires that any Skonto statement in BT-20 follows a strict pattern: each entry must start with '#', followed by 'SKONTO', then '#TAGE=N' (N being the number of days), then '#PROZENT=N.NN' (percentage with exactly two decimal places separated by a dot), optionally followed by '#BASISBETRAG=N' (if the base amount is not the invoice total in BT-115 but a partial amount), and each entry must end with '#'. Multiple entries are allowed, each on a new line (XML-conformant line break, i.e., or ). All text must be in uppercase, with no additional whitespace (spaces, tabs, line breaks) except the line breaks separating entries. The XPath test likely uses a combination of matches() with a regular expression to validate the entire content of BT-20 against this pattern. The context XPath selects Invoice or CreditNote elements where both country variables are true. The rule is fatal because non-compliance may lead to rejection by German public authorities or business partners.
1. Ensure that the PaymentTerms element (BT-20) is present when both supplier and customer are in Germany. 2. Format each Skonto entry as: '#SKONTO#TAGE=N#PROZENT=N.NN#' (and optionally '#BASISBETRAG=N#'). 3. Use uppercase letters only. 4. Separate multiple entries with a line break (use in XML). 5. Do not include any spaces, tabs, or extra line breaks within an entry. 6. The percentage must have exactly two decimal places, using a dot as decimal separator. 7. If the base amount for the discount is not the invoice total (BT-115), include '#BASISBETRAG=N#' as the fourth segment. 8. Validate the entire string against the regular expression: ^(#SKONTO#TAGE=\d+#PROZENT=\d+\.\d{2}#(BASISBETRAG=\d+(\.\d+)?#)?)( | )*$ (adjust for multiple entries). 9. Test with a Schematron validator to ensure compliance.
Missing <cbc:CustomizationID> or value does not declare EN 16931 CIUS compliance.
fix: Insert <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>.
No <cbc:BuyerReference> (BT-10) found. Mandatory in XRechnung 3.0 (BR-DE-15) and required in Peppol BIS 3.0 (PEPPOL-EN16931-R003) when OrderReference is absent.
fix: Insert <cbc:BuyerReference>991-12849-74</cbc:BuyerReference> in the document header.
If both supplier and customer are located in Germany, an invoice shall contain information on "PAYMENT INSTRUCTIONS" (BG-16).
If both supplier and customer are located in Germany, the group "SELLER CONTACT" (BG-6) shall be provided.
If both supplier and customer are located in Germany, the element "Buyer reference" (BT-10) shall be provided.
If both supplier and customer are located in Germany, and if one of the VAT codes S, Z, E, AE, K, G, L, or M is used, an invoice shall contain at least one of the following elements: "Seller VAT identifier" (BT-31) or "Seller tax registration identifier" (BT-32) or "SELLER TAX REPRESENTATIVE PARTY" (BG-11).
If both supplier and customer are located in Germany, the element "Invoice type code" (BT-3) should only contain the following values from code list UNTDID 1001: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice), 381 (Credit note), 875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice).