DevOp.DK.Plus 0.13.0 reads gift certificates and credit notes, pays a sales invoice with gift certificates,
gives the change back as cash or a credit note (or forfeits it), and sells gift certificates on an invoice, as the
dkERP desktop does. It is available in the .NET client, the devop-dk command line, and the PowerShell module.
Live verification. Verified live on a test company (2026-11-11) with this release: selling gift certificates (including automatic numbering, required barcodes and expiry), redeeming them with cash change, forfeit and a credit-note change, marking certificates used, activating the change credit note, the recovery commands, and the refusals before any write; every test invoice ended fully settled. Not exercised live: the reference lookup after a failed invoice create, because no create failed.
DK Plus has no gift-certificate or credit-note endpoint. Both are rows of the dkERP papers table SOPAPERS, which
the client reads and writes through the generic table resource. Creating an invoice does not mark a certificate used
or create a credit note by itself, and the DK Plus invoice endpoint is not atomic with the table writes. The client
therefore does the whole sequence, checks what it can before the first write, and reports exactly what is left when
a step fails. Nothing is retried or rolled back.
| Task | .NET | CLI | PowerShell | Page |
|---|---|---|---|---|
| Read, list, count, settings | Sales.GiftCertificate, Sales.CreditNote |
sales gift-certificate get, list, count, settings; sales credit-note get, list, count |
Get-GiftCertificate, Get-CreditNote, Get-GiftCertificateCount, Get-CreditNoteCount, Get-GiftCertificateSettings |
Reading and settings |
| Pay an invoice with certificates | Sales.Invoice.CreateWithGiftCertificatesAsync with Redeem |
sales invoice create --gift-certificate |
New-Invoice -GiftCertificate |
Redeeming on an invoice |
| Sell certificates on an invoice | the same method with Sell |
sales invoice create --sell-gift-certificate |
New-Invoice -SellGiftCertificate |
Selling |
| Check or finish after a failure | Sales.Invoice.FindByReferenceAsync, Sales.GiftCertificate.MarkUsedAsync, Sales.CreditNote.ActivateAsync, Sales.GiftCertificate.CreateAsync |
sales invoice find, sales gift-certificate mark-used, sales credit-note activate, sales gift-certificate create |
Get-Invoice -Reference, Set-GiftCertificateUsed, Enable-CreditNote, New-GiftCertificate |
Failures and recovery |
The reads and writes are DK-specific, so use IDkPlusClient (not the portable IExternalErpClient), as described in
Client API and queries. The models are GiftCertificate, CreditNote,
GiftCertificateSettings, GiftCertificateInvoiceOptions, and GiftCertificateInvoiceResult in the
DevOp.DK.Plus.Models namespace.
Release: 0.13.0. Upgrading: the sales resource interfaces gained members, see
Upgrading to 0.13.