Workflow

How to Handle the No Lines Error on a Sales Invoice

Verified end to end. Demo run sales-invoice-no-lines-validation-20260519T183637Z opened a blank FT create page, clicked Save and Finish, captured the visible toast Error No lines, and confirmed OfficeGest did not post saveDocument.

Evidence Summary

Route
/vendas/ft/create
Page title
OG - Invoice [FT]
Attempted action
Save and Finish on an invoice with 0 lines
Visible result
ErrorNo lines
Evidence file
raw/playwright/workflows/latest-sales-invoice-no-lines-validation.json

Verified invoice no-lines validation flow

What It Means

OfficeGest blocks final save when an FT invoice has no document lines. The verified attempt stayed on the create page, showed the error toast, and did not send the final saveDocument request, so no invoice number was created.

How to Fix It

  1. Stay on the invoice create page after the error.
  2. Select the customer if it is not already selected.
  3. Add at least one article line in the document line area.
  4. Confirm the line grid shows the article, quantity, VAT, and totals.
  5. Use Save and Finish again only after the line grid is no longer empty.

Verified Behavior

CheckObserved result
Before saveCustomer empty, article search empty, line grid row count 0.
After save attemptStill on /vendas/ft/create with title OG - Invoice [FT].
User messageVisible toast text was ErrorNo lines.
Final save requestNo saveDocument request was submitted.
Backend callsOfficeGest still recalculated an empty line table through listaTabDocumento, create_document&option=calcular_totais, and checkProfitMargins.

Raw evidence: raw/playwright/workflows/sales-invoice-no-lines-validation-20260519T183637Z.json. Screenshots: assets/screenshots/sales-invoice-no-lines-validation-20260519T183637Z-01-blank-ft-before-save.png and assets/screenshots/sales-invoice-no-lines-validation-20260519T183637Z-02-no-lines-error.png.