Workflow

How to Cancel a Pro-Forma Invoice

Verified end to end. Demo run cancel-proforma-invoice-fp-20260520T002319Z cancelled pro-forma invoice FP 9999/66, verified it in the FP list as canceled, and checked that stock stayed unchanged.

Evidence Summary

Pro-forma route
/vendas/fp/view/OTk5OTAwMDY2
List route
/vendas/fp
Workflow run
cancel-proforma-invoice-fp-20260520T002319Z
Cancelled pro-forma
999900066 / FP 9999/66
Evidence file
raw/playwright/workflows/latest-cancel-proforma-invoice-fp.json

Verified pro-forma invoice cancellation workflow

When to Use This

Use Cancel on a pro-forma invoice when the non-fiscal FP document should be annulled instead of converted into an invoice, invoice / receipt, or sales order. In the verified run, OfficeGest kept the FP searchable, changed it from ABR / Open to ANU / Canceled, and did not move physical stock.

Cancellation is irreversible in the OfficeGest confirmation dialog. Because FP is not a final fiscal invoice in the verified flow, cancellation did not create a payment reversal or stock reversal; ValorPago stayed 0 and pending value stayed 1.97.

Step-by-Step

  1. Open Sales / Pro-Forma Invoice [FP] and open the pro-forma view. The verified run used FP 9999/66.
  2. Confirm the values before cancellation. Before cancellation, FP 9999/66 was ABR / Open, total 1.97, ValorPago=0, pending value 1.97, and reference AI-FP-20260520T002252Z.
  3. Click the red Cancel action in the pro-forma action bar.
  4. In Reason for Cancellation, select a cancellation reason. The verified run used reason id 1, visible as Erro de faturacao.
  5. Click the red Cancel button inside the reason modal.
  6. Confirm the warning dialog: Are you sure you want to cancel? This irreversible operation.
  7. Search the FP list for the pro-forma number. The verified row returned estado=ANU, visible state Canceled, total 1.97, ValorPago=0, and pending value 1.97.
  8. Check stock when the FP includes article lines. Warehouse 1 stayed at -41, matching the verified FP behavior that did not move physical stock.

Verified Cancellation Values

FieldValue
Pro-forma internal number999900066
Visible pro-forma numberFP 9999/66
Customer[910] 100 Ouvidos Lda, VAT 509031862
Cancellation reasonid_motivo_anulacao=1, Erro de faturacao
FP before cancellationABR / Open, total 1.97, ValorPago=0, pending value 1.97.
FP after cancellationANU / Canceled, total 1.97, ValorPago=0, pending value 1.97.
Stock effectWarehouse 1 stock for AI-DEMO-20260519-021105 stayed -41.

Backend Calls Observed

Action or endpointPurpose
podeAnularDocChecks whether the FP can be cancelled. The verified call used num=999900066, tipoop=FP, and returned succeeded:true.
Sel2_Select_v2&table=motivos_docsLoads active cancellation reasons with where[is_anulacao]=1 and where[activo]=1.
deleteDocumentSubmits the FP cancellation with tipoop=FP, id_motivo_anulacao=1, and tot_fin=1.97.
DT_List_Documentos&table=FactPVerifies the FP list before and after cancellation.
dt_list_recalc_stock_articles_lojasVerifies that article stock stayed unchanged after the cancellation.

Raw evidence: raw/playwright/workflows/cancel-proforma-invoice-fp-20260520T002319Z.json. Screenshots: assets/screenshots/cancel-proforma-invoice-fp-20260520T002319Z-01-fp-view-before-cancel.png through assets/screenshots/cancel-proforma-invoice-fp-20260520T002319Z-04-fp-list.png.