Workflow

How to Change a Line Gross Price on a Sales Invoice

Verified end to end. Demo run sales-invoice-line-gross-price-20260519T211156Z changed an FT line gross price to 3.69, saved FT 9999/1699, and verified OfficeGest recalculated PrecoUni=3, ValorIVA=0.69, and TotalCIVA=3.69.

Evidence Summary

Create route
/vendas/ft/create
Final view
/vendas/ft/view/OTk5OTAxNjk5
Created invoice
999901699 / FT 9999/1699
Customer
[910] 100 Ouvidos Lda
Gross price
PVP=3.69
Evidence file
raw/playwright/workflows/latest-sales-invoice-line-gross-price.json

Verified sales invoice line gross price workflow

When to Use This

Use a line gross-price change when the user knows the final price including VAT and wants OfficeGest to derive the net unit price. This differs from editing PrecoUni, which sets the net unit price before VAT.

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 gross-price / PVP column. The stored line field is PVP.
  5. Enter the new gross price. The verified run used 3.69.
  6. Wait for the document-line grid to reload and confirm the line now holds PVP=3.69.
  7. Review the recalculated values. In the verified run OfficeGest derived PrecoUni=3, ValorIVA=0.69, and TotalCIVA=3.69.
  8. Click Save and Finish, then confirm Are you sure?.
  9. Verify the saved invoice view still shows the gross price and recalculated values.

Verified Behavior

CheckObserved result
Before editThe inserted line had PVP=1.96677, PrecoUni=1.599, and TotalCIVA=1.96677.
Gross price editupdateEditableTabDoc returned {"success":true,"msg":""} for campo=PVP and value=3.69.
After grid reloadThe line returned PVP=3.69, PrecoUni=3, and TotalCIVA=3.69.
Final viewThe saved FT line retained PVP=3.69, PrecoUni=3, ValorIVA=0.69, and TotalCIVA=3.69.
List stateThe FT list returned FT 9999/1699 as ABR / Open with total and pending value 3.69.

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