efrisapi.com

Error codes / 1462

EFRIS error 1462 — the credit note dropped the original invoice's excise fields

A credit note line for an excisable product must carry the same excise fields as the original invoice line, with exciseTax negated. Omitting them because the document is a return is rejected.

What it actually means

EFRIS reverses a sale by mirroring it. The credit note line must therefore reproduce exciseFlag, categoryId, exciseRate, exciseRule, exciseUnit and exciseCurrency from the original, with the excise amount carried as a negative value like every other amount on the note.

The fix

Copy the excise fields from the original invoice line rather than recomputing them, and negate exciseTax. The excise taxDetails group also needs a non-empty taxRateName, or you hit 2831 next.

# Mirror the original line; do not recompute the excise
credit_line = {
    **{k: original_line[k] for k in (
        "exciseFlag", "categoryId", "exciseRate",
        "exciseRule", "exciseUnit", "exciseCurrency",
    ) if k in original_line},
    "exciseTax": f"-{abs(float(original_line['exciseTax'])):.2f}",
    "qty":   f"-{abs(qty)}",
    "total": f"-{abs(total):.2f}",
    "tax":   f"-{abs(tax):.2f}",
    "unitPrice": original_line["unitPrice"],   # stays positive
}

Why this happens

Fetch the original with T108, or the remaining creditable amounts with T186, and build the credit note from that rather than from your own order record. The values URA holds are the ones it validates against.

Related


The EFRIS API Kit handles this case already — it is one of the rejections the library was calibrated against. This page stays free either way.