Evidence Summary
- Original draft
472//vendas/ft/rasc/NDcy- Active edited draft
473//vendas/ft/rasc/NDcz- Line count
2lines before,1line after- Reference
AI-FT-DRAFT-20260519T182039Z-ADDLINE-DELLINE- Evidence file
raw/playwright/workflows/latest-delete-line-sales-invoice-draft.json
When to Use This
Use this when an FT draft is still editable and the user needs to remove an article line before issuing the invoice. The verified run started from a two-line draft, deleted the second line, saved the document as a draft again, and confirmed no final invoice or stock movement was created by the draft edit.
Like other draft edit workflows, re-saving after a line deletion returned a new active draft number. The verified run moved from draft 472 to draft 473.
Step-by-Step
- Open the saved FT draft. The verified source was
/vendas/ft/rasc/NDcy. - Confirm the page is still OG - Invoice [FT] on a draft route, not a final invoice view.
- Review the line grid and identify the line to remove. The verified draft had two lines for article
AI-DEMO-20260519-021105. - Use the line's delete action and confirm deletion when OfficeGest asks.
- Confirm the line grid now shows the reduced line count or quantity. The verified draft changed from two matching rows to one matching row.
- Click Save Draft.
- Use the new draft route returned by OfficeGest. The verified re-save returned
OK:473and opened active draft/vendas/ft/rasc/NDcz. - Reopen or refresh the active draft and confirm the removed line is still absent.
- 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 | 472, route /vendas/ft/rasc/NDcy. |
| Active edited draft | 473, route /vendas/ft/rasc/NDcz. |
| Customer | [910] 100 Ouvidos Lda, VAT 509031862. |
| Line result | Row count changed from 2 to 1; total quantity changed from 2 to 1. |
| Total with VAT | Line total with VAT changed from 3.93354 to 1.96677. |
| Final document list | No final FT rows were returned for reference AI-FT-DRAFT-20260519T182039Z-ADDLINE-DELLINE. |
| Stock effect | Warehouse 1 stock stayed at -3 before and after the draft line deletion. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
listaTabDocumento | Loads and reloads the saved draft line grid. |
deleteLinhaDoc | Deletes the selected draft line. The verified run removed line sequence 2. |
create_document&option=calcular_totais | Recalculates totals after the deleted line. |
saveRascunho | Re-saves the draft. The verified response returned draft 473. |
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/delete-line-sales-invoice-draft-20260519T182132Z.json. Screenshots: assets/screenshots/delete-line-sales-invoice-draft-20260519T182132Z-01-open-draft-before-line-delete.png through assets/screenshots/delete-line-sales-invoice-draft-20260519T182132Z-04-reopened-edited-draft.png.