Evidence Summary
- Create route
/vendas/ft/create- Final view
/vendas/ft/view/OTk5OTAxNjk2- Created invoice
999901696 / FT 9999/1696- Customer
[910] 100 Ouvidos Lda- VAT reason
7/[M07] Isento Artigo 9.º do CIVA- Evidence file
raw/playwright/workflows/latest-sales-invoice-line-vat-reason.json
When to Use This
Use the line VAT reason when a fiscal reason must be associated with a specific invoice line. This is stored in the line field RI. In the verified run, setting the reason did not change the VAT rate or totals by itself.
Step-by-Step
- Open Sales / Invoice [FT], then click New document, or navigate directly to
/vendas/ft/create. - Select the customer and confirm the mandatory invoice fields. The verified run used customer
910, seller1, and employee1. - Add the article line. The verified run inserted article
AI-DEMO-20260519-021105, quantity1, warehouse1. - In the document lines table, edit the RI / VAT reason column for the line.
- Select the required VAT reason. The verified run selected
7, displayed by the selector as[M07] Isento Artigo 9.º do CIVA. - Wait for the document-line grid to reload and confirm the line now holds
RI=7. - Review VAT and totals. In the verified run the line stayed at
IVA=23,ValorIVA=0.36777, andTotalCIVA=1.96677. - Click Save and Finish, then confirm Are you sure?.
- Verify the saved invoice view still shows
RI=7on the document line.
Verified Behavior
| Check | Observed result |
|---|---|
| Before edit | The inserted line had empty RI, IVA=23, and TotalCIVA=1.96677. |
| Reason edit | updateEditableTabDoc returned {"success":{"success":true,"m13":false},"msg":""} for campo=RI and value=7. |
| After grid reload | The line returned RI=7, while IVA and totals stayed unchanged. |
| Final view | The saved FT line retained RI=7, IVA=23, ValorIVA=0.36777, and TotalCIVA=1.96677. |
| List state | The FT list returned FT 9999/1696 as ABR / Open with total and pending value 1.97. |
Treat this field as a fiscal classification for the line. If the invoice requires a reduced or exempt VAT rate, verify and set the VAT rate separately with the line VAT workflow.
Observed Reason Choices
The editor exposes a static selector containing Portuguese VAT reason entries. Observed examples include M01, M04, M07, M08, M10, M13, M19, M40, M44, M45, and M46.
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
NameEntidades | Loads customer billing data after customer selection. |
loadArtigoReducido / insertLinhaTabDoc | Loads and inserts the invoice article line. |
updateEditableTabDoc | Updates the line field RI. |
DT_TabDocumento | Reloads the document-line grid after the VAT-reason edit. |
saveDocument | Saves the final FT invoice after confirmation. |
DT_List_Documentos | Verifies the invoice list row after save. |
Raw evidence: raw/playwright/workflows/sales-invoice-line-vat-reason-20260519T205716Z.json. Screenshots: assets/screenshots/sales-invoice-line-vat-reason-20260519T205716Z-01-create-page.png through assets/screenshots/sales-invoice-line-vat-reason-20260519T205716Z-04-final-view.png.