FA(3) field · pre-submission error
Duplicate line number — the NrWierszaFa field in KSeF
Every invoice line has a number (NrWierszaFa). On a regular invoice those numbers should be unique —
a duplicate breaks the unambiguous mapping of lines to totals. The XSD schema doesn't enforce it, so an invoice with a duplicate is easy to send unnoticed.
What NrWierszaFa is
NrWierszaFa is the consecutive invoice row number — one per line (FaWiersz).
The FA(3) Brochure describes it as the "consecutive invoice row number".
The rule: numbers must be unique
KSeF Guard requires line numbers to be unique within a single invoice. They may have gaps
(e.g. 1, 2, 4, 5), but no NrWierszaFa value may repeat.
A duplicate number blocks the unambiguous mapping of line items to the P_13_X / P_14_X totals.
Exception — corrections: on correction invoices duplicate NrWierszaFa values are normal (the before/after blocks), so the rule does not apply. More on correction invoices →
Two kinds of duplicate
Duplicate line number
Two different lines share the same NrWierszaFa. Each line on a regular invoice must have a unique number.
Duplicate line item
Two lines with identical content (goods, price, quantity). Better to merge them into one item with the right quantity, or differentiate by description (e.g. batch number, delivery date).
Why KSeF doesn't catch it
The FA(3) XSD schema doesn't enforce unique line numbers — KSeF accepts an invoice with a repeated NrWierszaFa.
Uniqueness is an additional KSeF Guard check that protects against an ambiguous mapping of lines to totals. It's one of the cases where KSeF Guard catches a problem
KSeF does not enforce.
Example
<FaWiersz><NrWierszaFa>1</NrWierszaFa> ... </FaWiersz>
<FaWiersz><NrWierszaFa>2</NrWierszaFa> ... </FaWiersz>
<FaWiersz><NrWierszaFa>2</NrWierszaFa> ... </FaWiersz>
The third line repeats number 2 — that's a duplicate. Change it to the next free number. (simplified example)
What KSeF Guard checks
KSeF Guard checks line-number uniqueness (excluding corrections) and flags repeated line items. See the full rule set in the Rule Explorer.
Related: foreign-currency invoices (P_14_1W) • split payment (P_18A) • correction invoices. For higher volumes there's batch validation for accounting offices.
Frequently asked questions
Can line numbers have gaps?
Will KSeF reject an invoice with a duplicate line number?
Does the rule apply to correction invoices?
How is a duplicate number different from a duplicate line item?
KSeF Guard is a technical tool, not tax advice.
Runs offline • Line-number uniqueness + 127 other rules • Invoice XML never leaves your computer