Workflow

How to Apply a Global Discount on a Sales Invoice

Verified end to end. Demo run sales-invoice-global-discount-20260519T200434Z applied a 5% document-level discount, saved FT 9999/1686, and verified the saved invoice and FT list total were discounted to 1.87 EUR.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjg2
Created invoice
999901686 / FT 9999/1686
Customer
[910] 100 Ouvidos Lda
Discount
PerDesc=5, discount value 0.08 EUR
Evidence file
raw/playwright/workflows/latest-sales-invoice-global-discount.json

Verified sales invoice global discount workflow

When to Use This

Use a global discount when the whole invoice should receive a percentage discount after line totals are calculated. Use the line-discount workflow instead when only one article line should be discounted.

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 header fields. The verified run used customer 910, VAT 509031862, seller 1, and employee 1.
  3. Add the article line. The verified run inserted article AI-DEMO-20260519-021105, quantity 1, warehouse 1, unit price 1.599, VAT 23%.
  4. Go to the totals/discount area below the document lines.
  5. Set the first document discount field to the desired percentage. The verified field is #doc_PerDesc, submitted as PerDesc.
  6. Confirm the totals recalculate. In the verified run, Discount became 0.08 EUR, Net Total became 1.52 EUR, VAT became 0.35 EUR, and Total became 1.87 EUR.
  7. Click Save and Finish, then confirm the Are you sure? dialog.
  8. Verify the saved invoice view and FT list. The verified FT list row showed total 1.87, paid 0.00, and pending 1.87.

Verified Behavior

CheckObserved result
Before discountTotal discount 0.00 EUR, net total 1.60 EUR, VAT 0.37 EUR, final total 1.97 EUR.
After discount#doc_PerDesc=5, total discount 0.08 EUR, net total 1.52 EUR, VAT 0.35 EUR, final total 1.87 EUR.
Final save payloadThe nested saveDocument form payload submitted PerDesc=5.
Final viewThe saved FT view retained #doc_PerDesc=5 and displayed the discounted totals.
List stateThe FT list returned FT 9999/1686 as ABR / Open with total and pending value 1.87.

Backend Calls Observed

Action or endpointPurpose
NameEntidadesLoads customer billing data after customer selection.
loadArtigoReducido / insertLinhaTabDocLoads and inserts the invoice article line.
create_document&option=calcular_totaisRecalculates totals using desconto1=5.
saveDocumentSaves the final FT invoice with PerDesc=5.
DT_List_DocumentosVerifies the invoice list row after save.

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