Workflow

How to Cancel a Simplified Invoice

Verified end to end. Demo run cancel-simplified-invoice-fs-20260519T234643Z created and paid FS 9999/12, cancelled it from the FS view, and verified the FS list returned ANU / Canceled.

Evidence Summary

Simplified invoice route
/vendas/fs/view/OTk5OTAwMDEy
List route
/vendas/fs
Workflow run
cancel-simplified-invoice-fs-20260519T234643Z
Cancelled document
999900012 / FS 9999/12
Evidence file
raw/playwright/workflows/latest-cancel-simplified-invoice-fs.json

Verified simplified invoice cancellation workflow

When to Use This

Use Cancel on an FS when the issued simplified invoice must be annulled. In the verified run, the FS was already paid during creation, OfficeGest required a cancellation reason, changed the state to ANU, kept the paid value visible in the list, and reversed the stock movement from the sold line.

Cancellation is irreversible in the OfficeGest confirmation dialog. Use it only when the business and fiscal rules allow annulling the issued simplified invoice.

Step-by-Step

  1. Open Sales / Simplified Invoice [FS] and open the FS view. The verified run used FS 9999/12.
  2. Confirm it is the correct paid document. The verified FS row had total 1.97, paid value 1.97, and pending value 0.00.
  3. Click the red Cancel action in the FS 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 FS list for the document number. The verified row returned estado=ANU, visible state Canceled, total 1.97, paid value 1.97, and pending value 0.00.

Verified Cancellation Values

FieldValue
Internal number999900012
Visible document numberFS 9999/12
Customer[910] 100 Ouvidos Lda, VAT 509031862
Payment before cancellation[NUM] Numerario amount 1.97; validation returned valid:true and troco:0.
Cancellation reasonid_motivo_anulacao=1, Erro de faturacao
Final stateANU, visible as Canceled
Total1.97
Paid / pendingValorPago=1.97; pending value remained 0.00 in the FS list row.
Stock effectWarehouse 1 stock for article AI-DEMO-20260519-021105 moved from -37 before FS creation to -38 after save, then returned to -37 after cancellation.

Backend Calls Observed

Action or endpointPurpose
payment&option=addAdds the immediate FS cash payment row before the document is saved.
payment&option=validateValidates that the payment equals the FS total before final save.
saveDocumentFinishes the paid FS and opens the final FS view.
Sel2_Select_v2 with table=motivos_docsLoads active cancellation reasons where is_anulacao=1.
deleteDocumentSubmits the actual FS cancellation with num=999900012, tipoop=FS, and the selected cancellation reason.
DT_List_Documentos&table=FactSimVerifies the FS row in the list after cancellation. The returned row had estado=ANU and desig_estado=Canceled.
dt_list_recalc_stock_articles_lojasVerifies warehouse stock before creation, after save, and after cancellation.

Raw evidence: raw/playwright/workflows/cancel-simplified-invoice-fs-20260519T234643Z.json. Screenshots: assets/screenshots/cancel-simplified-invoice-fs-20260519T234643Z-01-fs-line-before-payment.png through assets/screenshots/cancel-simplified-invoice-fs-20260519T234643Z-05-fs-list.png.