Workflow

How to Cancel a Credit Note

Verified end to end. Demo run cancel-credit-note-nc-20260520T000825Z cancelled credit note NC 9999/62, verified it in the NC list as canceled, confirmed source simplified invoice FS 9999/14 stayed finished and paid, and checked the stock reversal.

Evidence Summary

Credit note route
/vendas/nc/view/OTk5OTAwMDYy
List route
/vendas/nc
Workflow run
cancel-credit-note-nc-20260520T000825Z
Cancelled credit note
999900062 / NC 9999/62
Source simplified invoice
999900014 / FS 9999/14
Evidence file
raw/playwright/workflows/latest-cancel-credit-note-nc.json

Verified credit note cancellation workflow

When to Use This

Use Cancel on a credit note when the NC itself was issued incorrectly and should be annulled. In the verified run, OfficeGest kept the NC searchable, changed it from ABR / Open to ANU / Canceled, and reversed the stock increase that the credit note had created.

Cancellation is irreversible in the OfficeGest confirmation dialog. The verified cancellation did not reopen or unpay the source FS; it left FS 9999/14 as LIQ / Finished with paid value 1.97.

Step-by-Step

  1. Open Sales / Credit Note [NC] and open the credit note view. The verified run used NC 9999/62.
  2. Confirm the source and values before cancellation. Before cancellation, NC 9999/62 was ABR / Open, total 1.97, ValorPago=0, pending value 1.97, and source FS 9999/14.
  3. Click the red Cancel action in the credit note 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 NC list for the credit note number. The verified row returned estado=ANU, visible state Canceled, total 1.97, ValorPago=0, and pending value 1.97.
  8. Search the source FS list for FS 9999/14. The verified row stayed LIQ / Finished, ValorPago=1.97, and pending value 0.00.
  9. Check stock for the credited article when stock matters. Warehouse 1 changed from -39 to -40, removing the stock increase caused by the NC.

Verified Cancellation Values

FieldValue
Credit note internal number999900062
Visible credit note numberNC 9999/62
Customer[910] 100 Ouvidos Lda, VAT 509031862
Source document999900014 / FS 9999/14
Cancellation reasonid_motivo_anulacao=1, Erro de faturacao
NC before cancellationABR / Open, total 1.97, ValorPago=0, pending value 1.97.
NC after cancellationANU / Canceled, total 1.97, ValorPago=0, pending value 1.97.
Source FS after cancellationLIQ / Finished, ValorPago=1.97, pending value 0.00.
Stock effectWarehouse 1 stock for AI-DEMO-20260519-021105 changed from -39 to -40.

Backend Calls Observed

Action or endpointPurpose
podeAnularDocChecks whether the NC can be cancelled. The verified call used num=999900062, tipoop=NC, and returned succeeded:true.
Sel2_Select_v2&table=motivos_docsLoads active cancellation reasons with where[is_anulacao]=1 and where[activo]=1.
deleteDocumentSubmits the NC cancellation with tipoop=NC, id_motivo_anulacao=1, and tot_fin=1.97.
DT_List_Documentos&table=NCredVerifies the NC list before and after cancellation.
DT_List_Documentos&table=FactSimVerifies the source simplified invoice after cancellation.
dt_list_recalc_stock_articles_lojasVerifies the article stock after the cancellation.

Raw evidence: raw/playwright/workflows/cancel-credit-note-nc-20260520T000825Z.json. Screenshots: assets/screenshots/cancel-credit-note-nc-20260520T000825Z-01-nc-view-before-cancel.png through assets/screenshots/cancel-credit-note-nc-20260520T000825Z-04-nc-list.png.