Evidence Summary
- Original draft
469//vendas/ft/rasc/NDY5- Active edited draft
470//vendas/ft/rasc/NDcw- Line count
1line before,2lines after- Reference
AI-FT-DRAFT-20260519T181144Z-ADDLINE- Evidence file
raw/playwright/workflows/latest-add-line-sales-invoice-draft.json
When to Use This
Use this when an FT draft is still editable and the user needs to add another article before issuing the invoice. The verified run added a second line for the same article, saved the document as a draft again, and confirmed no final invoice or stock movement was created by the draft edit.
Like the header-edit workflow, re-saving after a line edit returned a new active draft number. The verified run moved from draft 469 to draft 470.
Step-by-Step
- Open the saved FT draft. The verified source was
/vendas/ft/rasc/NDY5. - Confirm the page is still OG - Invoice [FT] on a draft route, not a final invoice view.
- Review the current lines. The verified draft started with one line for article
AI-DEMO-20260519-021105, quantity1, total with VAT1.96677. - Add the extra article line from the document line area. The verified run added the same article again with quantity
1. - Confirm the line grid now shows the extra line or increased line total. The verified draft had two matching rows and total quantity
2. - Click Save Draft.
- Use the new draft route returned by OfficeGest. The verified re-save returned
OK:470and opened active draft/vendas/ft/rasc/NDcw. - Reopen or refresh the active draft and confirm both lines are still present.
- Do not treat the document as issued until you use Save and Finish. The verified final FT list search returned no final invoice rows.
Verified Values
| Field | Value |
|---|---|
| Original draft | 469, route /vendas/ft/rasc/NDY5. |
| Active edited draft | 470, route /vendas/ft/rasc/NDcw. |
| Customer | [910] 100 Ouvidos Lda, VAT 509031862. |
| Line result | Row count changed from 1 to 2; total quantity changed from 1 to 2. |
| Total with VAT | Line total with VAT changed from 1.96677 to 3.93354. |
| Final document list | No final FT rows were returned for reference AI-FT-DRAFT-20260519T181144Z-ADDLINE. |
| Stock effect | Warehouse 1 stock stayed at -3 before and after the draft line add. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
listaTabDocumento | Loads the saved draft line grid. |
loadArtigoReducido | Loads the added article for the new draft line. |
insertLinhaTabDoc | Adds the second article line into the draft line table. |
create_document&option=calcular_totais | Recalculates totals after the added line. |
saveRascunho | Re-saves the draft. The verified response returned draft 470. |
DT_List_Documentos | Confirms the edited draft reference is not a finalized FT invoice. |
dt_list_recalc_stock_articles_lojas | Confirms no stock movement happened while the document remained a draft. |
Raw evidence: raw/playwright/workflows/add-line-sales-invoice-draft-20260519T181220Z.json. Screenshots: assets/screenshots/add-line-sales-invoice-draft-20260519T181220Z-01-open-draft-before-line-add.png through assets/screenshots/add-line-sales-invoice-draft-20260519T181220Z-04-reopened-edited-draft.png.