Workflow

How to Set a Line Unit of Measure on a Sales Invoice

Verified end to end. Demo run sales-invoice-line-unit-20260519T210702Z changed an FT line unit from UN to H / Hora / Homem (FTE), saved FT 9999/1698, and verified the final FT line retained CodUnidade=H.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjk4
Created invoice
999901698 / FT 9999/1698
Customer
[910] 100 Ouvidos Lda
Line unit
H / Hora / Homem (FTE)
Evidence file
raw/playwright/workflows/latest-sales-invoice-line-unit.json

Verified sales invoice line unit workflow

When to Use This

Use a line unit change when the invoice line should be expressed in a different measurement unit, such as hours instead of units. This changes the line unit label and does not recalculate the quantity, price, VAT, or total by itself.

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 unit column. The stored line field is CodUnidade.
  5. Select the target unit. The verified run selected H / Hora / Homem (FTE).
  6. Wait for the document-line grid to reload and confirm the line now holds CodUnidade=H.
  7. Review the line quantity and totals. In the verified run Qtd=1 and TotalCIVA=1.96677 stayed unchanged.
  8. Click Save and Finish, then confirm Are you sure?.
  9. Verify the saved invoice view still shows CodUnidade=H on the document line.

Observed Unit Choices

CodeLabel
BDBidao 20L
cmCentímetro
CXCaixa
HHora / Homem (FTE)
kgKilograma
LLitro
mMetro
M2Metro Quadrado
UNUnidades
VGValor Global

Verified Behavior

CheckObserved result
Before editThe inserted line had CodUnidade=UN and TotalCIVA=1.96677.
Unit editupdateEditableTabDoc returned {"success":true,"msg":""} for campo=CodUnidade and value=H.
After grid reloadThe line returned CodUnidade=H and the same total.
Final viewThe saved FT line retained CodUnidade=H and TotalCIVA=1.96677.
List stateThe FT list returned FT 9999/1698 as ABR / Open with total and pending value 1.97.

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 CodUnidade.
DT_TabDocumentoReloads the document-line grid after the unit 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-unit-20260519T210702Z.json. Screenshots: assets/screenshots/sales-invoice-line-unit-20260519T210702Z-01-create-page.png through assets/screenshots/sales-invoice-line-unit-20260519T210702Z-04-final-view.png.