Skip to main content

Supplier Invoice

What it is

The check-and-approve screen for one supplier bill. The scanned document is on the left and what was read out of it is on the right, so you can compare the two line by line, correct anything wrong, and then either Confirm or Reject it.

This is the step the upload screen hands over to, and the reason nothing extracted automatically is acted on until a person has looked at it.

Who can open it

Any signed-in staff account that is active, subject to the same two gates as the Supplier Invoices list — an active account, and the finance.ledger feature grant while FEATURE_GRANULAR_RBAC is on. The owner bypasses the grant.

There is no separate approver role. Anyone who can open the invoice can confirm it, including whoever uploaded it.

Before you start

🔴 Confirming is final on this screen. Once an invoice is Confirmed or Rejected, every field and every button disappears — only a status badge remains. There is no reopen, no unconfirm and no edit-after-confirm control anywhere on the page.

⚠️ Confirm saves first, and stops if that save fails. Fixed 2026-08-23: before that date a failed save was ignored and the invoice was confirmed anyway, holding the uncorrected figures, while the screen navigated away before you could read the error. Now a failed save leaves the invoice pending and shows you why, so you can correct it and try again.

⚠️ Nothing is checked for you. No rule requires subtotal plus tax to equal the total, and nothing compares the invoice against the purchase order it is matched to. If the supplier has billed more than the order, this screen will not say so — that is the reader's job.

⚠️ Confirming records approval; it does not book anything. It sets the status and stamps who confirmed it and when. No ledger entry, payment or accounting record is created by this button.

Every control on the page

Header:

ControlWhen it appearsWhat it does
SaveWhile the invoice is still pendingSaves the header and all line items. Shows Saved successfully for three seconds
RejectWhile pendingOpens the rejection dialog
ConfirmWhile pendingSaves, then confirms, then returns to the list. Stops at the save if it fails
Confirmed / Rejected badgeOnce decidedStatus only — the buttons are gone

The OCR confidence sits just under the title, as a percentage.

Left pane — Document Preview. The uploaded file in a viewer, with a link to open it in a new tab. It is the original, not the extraction.

Right pane — Invoice Details. Every field is disabled once the invoice is confirmed or rejected:

FieldNotes
SupplierChosen from your suppliers. What matching guessed, if anything, is pre-selected
Purchase OrderThe order to bill against. Changing it reloads the order's lines for the item matcher below
Invoice NumberThe supplier's own number
Invoice Date
CurrencyFree text, prompting INR / USD / AED. Nothing checks it against a list
Subtotal, Tax Amount, Total AmountTyped in full. Not calculated and not cross-checked

Line Items — one block per line, each with Description, Qty, Unit, Unit Price, Line Total, HSN Code, and, once a purchase order is selected, Match PO Item to tie the line to a line on that order. Line Total is typed, not calculated — changing quantity or price does not update it.

Under each line, in small italics, is the raw text the reader pulled off the page for that line — useful when a figure looks wrong and you want to see what it actually read.

Lines can be added and removed, so an invoice the reader missed lines on can be completed by hand.

Rejection dialog — "Provide a reason for rejecting this invoice. This will be recorded." A reason is required; Confirm Rejection stays disabled until you type one. Cancel closes without rejecting.

What it writes

Save sends PATCH /api/supplier-invoices/[id] with the header and the complete set of line items. The lines are replaced by what is on screen — a line you removed is gone.

Confirm first does the same save; if that save fails nothing further happens. On success it calls POST /api/supplier-invoices/[id]/confirm, which sets the invoice to confirmed and records your user and the time. It writes nothing else.

Reject sends POST /api/supplier-invoices/[id]/reject with your reason, which is stored against the invoice.

Both decisions return you to Supplier Invoices.

When it goes wrong

"Saved successfully" never appears and a red error does. Fix what the error says and try again. If you pressed Confirm, the invoice was left pending — nothing was confirmed.

An invoice confirmed before 2026-08-23 holds figures you know you corrected. That was the defect described above. It cannot be reopened from this screen; raise it with whoever administers the system, since the record says confirmed.

Everything is greyed out. The invoice is already confirmed or rejected. That is the end state.

No document appears in the left pane. The stored file could not be loaded. The extracted values are still editable, but you have nothing to check them against — find the original before confirming.

The line totals do not add up to the total. Expected: nothing on this screen calculates. Both were read off the page or typed, and neither is derived from the other.

The supplier or purchase order you want is not in the dropdown. Both lists are limited to the entity the invoice belongs to.