XV-PL-21
WartoscZamowienia (…) must be the sum of P_11NettoZ and P_11VatZ of the order lines (…) (FA(3) information sheet, WartoscZamowienia).
error: the document is invalid
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
/fa:Faktura/fa:Fa/fa:Zamowienie[../fa:RodzajFaktury = 'ZAL' and not(fa:ZamowienieWiersz/fa:StanPrzedZ)]
Test
pl:near(pl:dec(fa:WartoscZamowienia), $sum, 0.01)
Checked with KSeF FA(3)