Workflow

How to Cancel a Receipt

Verified end to end. Demo run cancel-receipt-r-20260519T235225Z created receipt R 9999/250, cancelled it from the receipt view, and verified source invoice FT 9999/1706 returned to open and unpaid.

Evidence Summary

Receipt route
/vendas/r/view/OTk5OTAwMjUw
List route
/vendas/r
Workflow run
cancel-receipt-r-20260519T235225Z
Cancelled receipt
999900250 / R 9999/250
Source invoice
999901706 / FT 9999/1706
Evidence file
raw/playwright/workflows/latest-cancel-receipt-r.json

Verified receipt cancellation workflow

When to Use This

Use Cancel on a receipt when the receipt settlement itself must be annulled. In the verified run, OfficeGest kept the receipt searchable, changed it from F / Closed to ANU / Canceled, and reopened the invoice that the receipt had settled.

Cancellation is irreversible in the OfficeGest confirmation dialog. After cancellation, the source invoice becomes pending again and needs another valid settlement if the customer still paid it.

Step-by-Step

  1. Open Sales / Receipt [R] and open the receipt view. The verified run used R 9999/250.
  2. Confirm the receipt and source invoice are correct. Before cancellation, R 9999/250 was F / Closed and source FT 9999/1706 was LIQ / Finished with ValorPago=1.97.
  3. Click the red Cancel action in the receipt 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 receipt list for the receipt number. The verified row returned estado=ANU, visible state Canceled, total 1.97.
  8. Search the FT invoice list for the source invoice. The verified source invoice returned to ABR / Open, ValorPago=0, and pending value 1.97.

Verified Cancellation Values

FieldValue
Receipt internal number999900250
Visible receipt numberR 9999/250
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
Receipt before cancellationF / Closed, total 1.97.
Receipt after cancellationANU / Canceled, total 1.97.
Source invoice before cancellationFT 9999/1706, LIQ / Finished, ValorPago=1.97, pending value 0.00.
Source invoice after cancellationFT 9999/1706, ABR / Open, ValorPago=0, pending value 1.97.

Backend Calls Observed

Action or endpointPurpose
changeEstadoReciboMoves the source invoice into the receipt documents grid before saving the receipt.
payment&option=addAdds the receipt cash payment row.
payment&option=validateValidates that the receipt payment covers the selected invoice value.
saveDocumentReciboSaves the closed receipt and settles the source invoice.
podeAnularDoc&num=999900250&tipoop=RChecks whether the receipt can be cancelled.
deleteDocumentSubmits the receipt cancellation with tipoop=R and the selected cancellation reason.
DT_List_Documentos&table=RecibosVerifies the receipt list before and after cancellation.
DT_List_Documentos&table=FactVerifies the source FT invoice before and after cancellation.

Raw evidence: raw/playwright/workflows/cancel-receipt-r-20260519T235225Z.json. Screenshots: assets/screenshots/cancel-receipt-r-20260519T235225Z-01-create-page.png through assets/screenshots/cancel-receipt-r-20260519T235225Z-08-receipt-list.png.