Corrected Invoices (384)
A posted sales credit memo that corrects a specific invoice can be sent as a corrected invoice (BT-3 = 384) instead of a credit note (381). mseDoc365 does this with a sub-schema: a second, complete XML schema that belongs to the normal credit memo schema and is used instead of it when the credit memo is a correction.
When is a credit memo sent as 384?
When the posted credit memo has
- Applies-to Doc. Type = Invoice, and
- Applies-to Doc. No. filled in.
That invoice number is written as the preceding invoice reference (BT-25), which is mandatory for a corrected invoice. All other credit memos are sent as 381, as before.
Which schemas are used?
| Sending | Main schema (381) | 384 sub-schema | Format of the 384 |
|---|---|---|---|
| E-mail and other channels | XRECHNUNG-OUT | CII-CORRECTION | XRechnung CII, TypeCode 384 |
| PEPPOL | XRECHNUNG-UBL-OUT | UBL-CORRECTION | UBL Invoice (not CreditNote) with InvoiceTypeCode 384 |
| Hot Folder with its own schema | the Hot Folder's schema | its 384 sub-schema, if you create one | as defined by you |
Both standard sub-schemas belong to document type SALES-CR.MEMO.
The credit memo data is prepared exactly as for any credit memo; only the schema used to write the XML changes. If the credit memo is a correction but its main schema has no 384 sub-schema, the main schema is used and the credit memo goes out as 381. This also applies to OpenTrans.
What changes in the XML?
- The type code 384 is a fixed value in the sub-schema, not set by the program.
- Amounts, the quantity, the VAT breakdown and all totals are written with the opposite sign of the credit memo. This is done with the schema line option Flip Sign (15.34 becomes -15.34, see XML Schema Lines).
- Unit prices, the price discount, the base quantity and VAT rates keep their sign, because they must never be negative.
- In UBL the document is an
InvoicewithInvoiceLine/InvoicedQuantityand a due date.
Setting it up
- Open mseDoc365 XML Schemas and run Add Standard XML Schemas. The action only creates schemas that are missing; existing schemas are not changed. Until you run it, credit memos keep going out as 381.
- Check the list: CII-CORRECTION and UBL-CORRECTION show Parent Schema Code XRECHNUNG-OUT / XRECHNUNG-UBL-OUT and Type Code 384.
Your own schema (Hot Folder or own document type)
- On mseDoc365 XML Schemas, select your schema and run Add other XML Schemas to copy it, or copy a standard CORRECTION schema.
- Open the copy. In the header set Parent Schema Code to your schema and Type Code to 384.
- In its lines set the type code element (BT-3) to the fixed value 384 and Flip Sign on the amount and quantity lines (use CII-CORRECTION / UBL-CORRECTION as a reference).
Sub-schemas
- The XML Schemas list shows all schemas with the columns Parent Schema Code and Type Code. The type code of a sub-schema can be changed in the list; parent and type code can be changed in the header of the XML Schema card. Clearing the parent makes it a main schema again.
- A sub-schema can't be selected on an address or as the XML schema of a Hot Folder; entering its code there is rejected. It is only used automatically instead of its main schema.
- Each main schema can have one sub-schema per type code. A sub-schema has the document type and direction of its main schema and can't have sub-schemas itself.
- Deleting a main schema that has sub-schemas asks whether to delete them as well; No cancels the delete.
- Add other XML Schemas on a main schema also copies its sub-schemas and links the copies to the new main schema.
- Update from standard and locked lines work for sub-schemas as for any schema; a locked Flip Sign value is kept.
Other document type codes (for example 386 for a prepayment invoice) can be added by an extension, see Sub-Schemas from Extensions.