References
References tie an invoice to the documents and accounts it belongs to, so the buyer can route and match it: the buyer reference (BT-10), purchase order (BT-13), contract (BT-12), project (BT-11), despatch and receipt advice (BT-16, BT-15), tender (BT-17), invoicing period (BG-14) and the buyer's accounting reference (BT-19). The snippets extend the base invoice.
Buyer reference and purchase order
Peppol requires a buyer reference or a purchase order reference. Many public buyers route invoices by the buyer reference.
const buyerAndOrder: Partial<InvoiceInput> = {
buyerReference: '0150abc', // BT-10: the buyer's routing reference
orderReference: { id: 'PO-4711', salesOrderId: 'SO-0815' }, // BT-13, BT-14
};Contract and project
Name the contract the invoice is issued under (BT-12) and the buyer's project it belongs to (BT-11). Both are plain identifiers the buyer matches against its own records.
const contractAndProject: Partial<InvoiceInput> = {
contractDocumentReference: { id: 'CON-2017-12' }, // BT-12
projectReference: { id: 'PRJ-42' }, // BT-11
};Defaulted: nothing.
Despatch advice, receipt advice and tender
Point to the despatch advice that announced the delivery (BT-16), the receipt advice that confirmed it (BT-15), and the tender or lot the contract was awarded in (BT-17).
const despatchAndReceipt: Partial<InvoiceInput> = {
despatchDocumentReference: { id: 'DESADV-123' }, // BT-16
receiptDocumentReference: { id: 'RECADV-456' }, // BT-15
originatorDocumentReference: { id: 'TENDER-2017-07' }, // BT-17: tender or lot
};Defaulted: nothing.
Invoicing period and accounting reference
const periodAndCost: Partial<InvoiceInput> = {
invoicePeriod: { startDate: '2017-11-01', endDate: '2017-11-30' }, // BG-14
accountingCost: '4025:123:4343', // BT-19: the buyer's accounting reference
};An invoicing period's end date may not be before its start date (BR-CO-19 requires at least one of them).