# XV-PL-17

Source: https://xmlvalid.com/rules/XV-PL-17

> StanPrzed belongs to a correction of an invoice or a final invoice (KOR, KOR_ROZ), StanPrzedZ and KursWalutyZK to a correction of an advance invoice (KOR_ZAL), and P_15ZK to a correction of an advance or final invoice (KOR_ZAL, KOR_ROZ); this one is … (FA(3) information sheet, StanPrzed, P_15ZK).

- Level: error
- Rule sets: KSeF and FA(3) checks KSeF 2.0 invoice verification (9 April 2026), FA(3) information sheet (August 2026)
- Context: `/fa:Faktura/fa:Fa`
- Test: `($kind = ('KOR', 'KOR_ROZ') or not(fa:FaWiersz/fa:StanPrzed)) and ($kind = 'KOR_ZAL' or not(fa:Zamowienie/fa:ZamowienieWiersz/fa:StanPrzedZ | fa:KursWalutyZK)) and ($kind = ('KOR_ZAL', 'KOR_ROZ') or not(fa:P_15ZK))`

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