Workflow

How to Change a Line VAT Rate on a Sales Invoice

Verified end to end. Demo run sales-invoice-line-vat-20260519T204152Z changed an FT line from 23% VAT to 13% VAT, saved FT 9999/1693, and verified the final FT line retained IVA=13 with list total 1.81.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjkz
Created invoice
999901693 / FT 9999/1693
Customer
[910] 100 Ouvidos Lda
VAT change
23 to 13
Evidence file
raw/playwright/workflows/latest-sales-invoice-line-vat.json

Verified sales invoice line VAT workflow

When to Use This

Use a line VAT change when a specific product or service line needs a tax rate different from the article's default. This is a line-level edit; review the fiscal zone and customer tax context before saving because the VAT rate directly recalculates the invoice total.

Step-by-Step

  1. Open Sales / Invoice [FT], then click New document, or navigate directly to /vendas/ft/create.
  2. Select the customer and confirm the mandatory invoice fields. The verified run used customer 910, seller 1, and employee 1.
  3. Add the article line. The verified run inserted article AI-DEMO-20260519-021105, quantity 1, warehouse 1.
  4. In the document lines table, edit the VAT column for the line. The stored line field is IVA.
  5. Select the target VAT rate. The verified run selected 13, available as Reduzida 1 and Taxa 13% in the VAT lookup.
  6. Wait for the document-line grid to reload and confirm the line now holds IVA=13.
  7. Check the recalculated line total. In the verified run the total with VAT changed from 1.96677 to 1.80687.
  8. Click Save and Finish, then confirm Are you sure?.
  9. Verify the saved invoice view still shows IVA=13 on the document line.
  10. Verify the FT list total. The verified invoice list row displayed total and pending value 1.81.

Observed VAT Lookup

Lookup valueLabelRate
13Reduzida 113
13Taxa 13%13

The lookup used Sel2_Select_v2 against table ivas with columns codiva, designacao, tipotaxa, and iva. Other rates may appear depending on fiscal configuration and search term.

Verified Behavior

CheckObserved result
Before editThe inserted line had IVA=23 and TotalCIVA=1.96677.
VAT editupdateEditableTabDoc returned {"success":true,"msg":""} for campo=IVA and value=13.
After grid reloadThe line returned IVA=13 and TotalCIVA=1.80687.
Final viewThe saved FT line retained IVA=13, ValorIVA=0.20787, and TotalCIVA=1.80687.
List stateThe FT list returned FT 9999/1693 as ABR / Open with total and pending value 1.81.

Backend Calls Observed

Action or endpointPurpose
Sel2_Select_v2Looks up VAT rates from table ivas.
NameEntidadesLoads customer billing data after customer selection.
loadArtigoReducido / insertLinhaTabDocLoads and inserts the invoice article line.
updateEditableTabDocUpdates the line field IVA.
DT_TabDocumentoReloads the document-line grid after the VAT edit.
saveDocumentSaves the final FT invoice after confirmation.
DT_List_DocumentosVerifies the invoice list row after save.

Raw evidence: raw/playwright/workflows/sales-invoice-line-vat-20260519T204152Z.json. Screenshots: assets/screenshots/sales-invoice-line-vat-20260519T204152Z-01-create-page.png through assets/screenshots/sales-invoice-line-vat-20260519T204152Z-04-final-view.png.