Workflow

How to Set Payment Terms and Due Date on a Sales Invoice

Verified end to end. Demo run sales-invoice-payment-terms-20260519T193814Z changed the FT payment condition from [PP] Pronto Pagamento to [30] 30 Dias, saved FT 9999/1681, and verified the final view and list kept the selected term and due date.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjgx
Created invoice
999901681 / FT 9999/1681
Customer
[910] 100 Ouvidos Lda
Payment condition
[30] 30 Dias, due date 18/06/2026
Evidence file
raw/playwright/workflows/latest-sales-invoice-payment-terms.json

Verified sales invoice payment terms workflow

When to Use This

Use payment terms when the FT should remain unpaid but carry a specific payment deadline, such as 10, 30, 45, 60, or 90 days. This differs from an Invoice / Receipt [FR], which requires payment before final save.

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 billing fields. The verified run used customer 910, VAT 509031862.
  3. Open the invoice details area and locate Payment condition / Payment Deadline. The field is #doc_CodFormaPag.
  4. Choose the payment condition. The verified run selected [30] 30 Dias, stored as CodFormaPag=30.
  5. Confirm the days helper field. The verified #doc_CodFormaPag_dias value was 30.
  6. Confirm or adjust the due date. The verified due-date field #doc_CodFormaPag_data was 18/06/2026.
  7. Complete the invoice header, including seller, employee, and reference if needed.
  8. Add at least one document line. The verified run inserted article AI-DEMO-20260519-021105, quantity 1, warehouse 1.
  9. Click Save and Finish, then confirm the Are you sure? dialog.
  10. Verify the final invoice view still shows the chosen payment condition and due date.

Available Terms Observed

CodeLabelDays
-Livre0
1010 Dias10
3030 Dias30
4545 Dias45
6060 Dias60
9090 Dias90
PAPagamento Antecipado0
PPPronto Pagamento1

Verified Behavior

CheckObserved result
DefaultThe blank FT started with PP, days 1, and due date 20/5/2026.
Changed termThe verified invoice used CodFormaPag=30, days 30, due date 18/06/2026.
Final save payloadThe nested saveDocument form payload submitted CodFormaPag=30 and DataLimitePaga=18/06/2026.
Final viewThe final invoice view retained #doc_CodFormaPag=30 and #doc_CodFormaPag_data=18/06/2026.
List stateThe FT list showed FT 9999/1681 as ABR / Open with fpag: 30 Dias.

Backend Calls Observed

Action or endpointPurpose
NameEntidadesLoads customer billing data after customer selection.
loadArtigoReducido / insertLinhaTabDocLoads and inserts the invoice article line. The line insert also included the selected formapag=30.
saveDocumentSaves the final FT invoice with the selected payment term and due date.
DT_List_DocumentosVerifies the invoice list row after save.

Raw evidence: raw/playwright/workflows/sales-invoice-payment-terms-20260519T193814Z.json. Screenshots: assets/screenshots/sales-invoice-payment-terms-20260519T193814Z-01-create-page.png through assets/screenshots/sales-invoice-payment-terms-20260519T193814Z-03-final-view.png.