HR-BR-4

U slučaju pozitivnog iznosa koji dospijeva na plaćanje (BT-115), datum dospijeća plaćanja (BT-9) mora biti naveden

In English When the amount due for payment (BT-115) is positive, the payment due date (BT-9) must be given.

error: the document is invalid

Why it fails

  • The amount due (cbc:PayableAmount) is positive, and neither cbc:DueDate nor cac:PaymentMeans/cbc:PaymentDueDate is given.

How to fix it

Add cbc:DueDate after cbc:IssueDate (or cbc:PaymentDueDate in cac:PaymentMeans).

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
ubl-creditnote:CreditNote | ubl-invoice:Invoice
Test
($payableAmount > 0) and (exists(cbc:DueDate) or exists(cac:PaymentMeans/cbc:PaymentDueDate)) or (($payableAmount <= 0))

Checked with Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)