Workflow

How to Save a Sales Invoice Draft

Verified end to end. Demo run sales-invoice-draft-ft-20260519T175248Z filled an Invoice [FT], clicked Save Draft, and opened draft 464 at /vendas/ft/rasc/NDY0.

Evidence Summary

Draft type
FT / Invoice
Draft number
464
Draft route
/vendas/ft/rasc/NDY0
Reference
AI-FT-DRAFT-20260519T175248Z
Evidence file
raw/playwright/workflows/latest-sales-invoice-draft-ft.json

Verified sales invoice draft workflow

When to Use This

Use Save Draft when the invoice is not ready to be issued. The verified draft kept the customer, reference, article line, totals, and editable FT context, but it did not create a final FT document row and did not change physical stock in the stock check.

Step-by-Step

  1. Open Sales / Invoice [FT] or go to /vendas/ft/create.
  2. Select the customer. The verified run used customer 910, 100 Ouvidos Lda.
  3. Fill the normal invoice header fields, including payment term and reference if needed.
  4. Add the invoice line. The verified run used article AI-DEMO-20260519-021105, quantity 1, warehouse 1, VAT 23%, and total 1.97.
  5. Click Save Draft, not Save and Finish.
  6. OfficeGest saves through saveRascunho and opens the draft route. The verified response was "OK:464:&=&AI-DEMO-20260519-021105:1#".
  7. Confirm the URL is a draft URL like /vendas/ft/rasc/NDY0. The page title remains OG - Invoice [FT].
  8. Review the draft. The verified draft still contained customer 910, reference AI-FT-DRAFT-20260519T175248Z, type FT, and the article line.
  9. When the invoice is ready later, open the draft route and use Save and Finish to issue the final FT.

Verified Values

FieldValue
Customer[910] 100 Ouvidos Lda, VAT 509031862.
Draft464, opened as /vendas/ft/rasc/NDY0.
ReferenceAI-FT-DRAFT-20260519T175248Z.
LineArticle AI-DEMO-20260519-021105, quantity 1, warehouse 1, unit price 1.599, VAT 23%.
Final document listSearch for the draft reference returned no final FT rows in the verified run.
Stock checkWarehouse stock for the article was -1 before draft save and -1 after draft save.

Backend Calls Observed

Action or endpointPurpose
NameEntidades&tabla=ClienteLoads customer master data after customer selection.
loadArtigoReducidoLoads the selected article for an FT line.
insertLinhaTabDocCreates the temporary line-table row before saving the draft.
create_document&option=calcular_totaisCalculates invoice totals before draft save.
checkProfitMarginsRuns margin validation before save.
saveRascunhoSaves the draft. The verified response returned OK:464.
listaTabDocumentoReloads the draft line on /vendas/ft/rasc/NDY0.
DT_List_DocumentosConfirmed the draft reference was not present as a finalized FT document.
dt_list_recalc_stock_articles_lojasConfirmed the physical stock value did not change after draft save.

Raw evidence: raw/playwright/workflows/sales-invoice-draft-ft-20260519T175248Z.json. Screenshots: assets/screenshots/sales-invoice-draft-ft-20260519T175248Z-01-create-page.png through assets/screenshots/sales-invoice-draft-ft-20260519T175248Z-04-draft-page.png.