Workflow

How to Set a Line Expected Date on a Sales Invoice

Verified end to end. Demo run sales-invoice-line-expected-date-20260519T210214Z changed an FT line expected date from 19/05/2026 to 26/05/2026, saved FT 9999/1697, and verified the final FT line retained DataPrevista=2026-05-26 00:00:00.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjk3
Created invoice
999901697 / FT 9999/1697
Customer
[910] 100 Ouvidos Lda
Line date
26/05/2026
Evidence file
raw/playwright/workflows/latest-sales-invoice-line-expected-date.json

Verified sales invoice line expected date workflow

When to Use This

Use a line expected date when a specific invoice line needs a planned delivery, fulfillment, or expected handling date different from the document date. This is a line-level scheduling field and does not change 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 expected/planned date column. The stored line field is DataPrevista.
  5. Enter the date in DD/MM/YYYY format. The verified run entered 26/05/2026.
  6. Wait for the line grid to reload and confirm the line now stores DataPrevista=2026-05-26 00:00:00.
  7. Click Save and Finish, then confirm Are you sure?.
  8. Verify the saved invoice view still shows the expected date on the line.

Verified Behavior

CheckObserved result
Before editThe inserted line had DataPrevista=2026-05-19 00:00:00.
Date editupdateEditableTabDoc returned {"success":true,"msg":""} for campo=DataPrevista and value=26/05/2026.
After grid reloadThe line returned DataPrevista=2026-05-26 00:00:00.
Final viewThe saved FT line retained DataPrevista=2026-05-26 00:00:00 and TotalCIVA=1.96677.
List stateThe FT list returned FT 9999/1697 as ABR / Open with total and pending value 1.97.

The editable date field validates DD/MM/YYYY and the datepicker start date was the document date in the verified run: 19/05/2026.

Backend Calls Observed

Action or endpointPurpose
NameEntidadesLoads customer billing data after customer selection.
loadArtigoReducido / insertLinhaTabDocLoads and inserts the invoice article line.
updateEditableTabDocUpdates the line field DataPrevista.
DT_TabDocumentoReloads the document-line grid after the expected-date 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-expected-date-20260519T210214Z.json. Screenshots: assets/screenshots/sales-invoice-line-expected-date-20260519T210214Z-01-create-page.png through assets/screenshots/sales-invoice-line-expected-date-20260519T210214Z-04-final-view.png.