# DK-R-016

Source: https://xmlvalid.com/rules/DK-R-016

> For Danish Suppliers, a Credit note cannot have a negative total (PayableAmount)

- Level: error
- Rule sets: Peppol BIS Billing 3.0 rules 3.0.21
- Context: `ubl-creditnote:CreditNote[$DKSupplierCountry = 'DK'] | ubl-invoice:Invoice[$DKSupplierCountry = 'DK']`
- Test: `not((boolean(/ubl-creditnote:CreditNote) and ($DKCustomerCountry = 'DK')) and (number(cac:LegalMonetaryTotal/cbc:PayableAmount/text()) < 0) )`

Validate a document against these rules: https://xmlvalid.com/validate
