Workflow

How to Create a Receipt from a Sales Invoice

Verified end to end. Demo run sales-invoice-to-receipt-20260519T174312Z created source invoice FT 9999/1675, used To convert / Receipt, and saved receipt R 9999/246 / 999900246.

Evidence Summary

Source FT
999901675 / FT 9999/1675
Target R
999900246 / R 9999/246
Target view
/vendas/r/view/OTk5OTAwMjQ2
Workflow run
sales-invoice-to-receipt-20260519T174312Z
Evidence file
raw/playwright/workflows/latest-sales-invoice-to-receipt.json

Verified invoice to receipt workflow

When to Use This

Use this path when the user is already viewing an open Invoice [FT] and wants to record payment for that specific invoice. OfficeGest opens the normal Receipt [R] create page, but it preloads the source FT into the Documents grid so the user does not need to search pending documents manually.

Step-by-Step

  1. Open the source invoice. The verified source was FT 9999/1675.
  2. Click To convert, then choose Receipt.
  3. OfficeGest posts to /vendas/r/create and opens Receipt [R] with customer 910 already filled.
  4. Check the Documents grid. The verified run showed exactly the source FT row: 999901675, FT 9999/1675, total 1.97, and value to pay 1.97.
  5. Leave unrelated rows in Outstanding documents unselected unless the user wants to settle more documents.
  6. Confirm the receipt totals. The verified draft showed valorAPagar=1.97, totalGeral=1.97, and totAPagar=1.97.
  7. Add the payment method. The verified run used [NUM] Numerario for 1.97 with no change due.
  8. Save the receipt. The backend returned 999900246 and OfficeGest opened the R view.
  9. Verify the receipt list. The verified receipt row was R 9999/246, state F / Closed, total 1.97.
  10. Verify the source FT. The source invoice changed to LIQ / Finished with ValorPago=1.97 and pending value 0.00.

Verified Values

FieldValue
Source invoice999901675 / FT 9999/1675
Receipt999900246 / R 9999/246
Customer[910] 100 Ouvidos Lda, VAT 509031862
Preloaded documentFT 9999/1675 appeared in Documents with total 1.97 and value to pay 1.97.
Payment[NUM] Numerario, amount 1.97, change 0.
Receipt stateF / Closed, total 1.97.
Source FT stateLIQ / Finished, paid 1.97, pending 0.00.

Backend Calls Observed

Action or endpointPurpose
POST /vendas/r/createOpens R create from the FT view with copy=1, codterc_copy=910, num_copy=999901675, and tipoop_copy=FT.
loadTabDocumentoReciboBuilds the receipt document tab with the source FT context.
listaTabDocumentoReciboReturns the selected source FT in Documents with estado=T and value to pay 1.97.
payment&option=addAdds the cash payment line for 1.97.
payment&option=validateValidates payment totals; the verified response allowed save with troco=0.
saveDocumentReciboSaves the R document. The verified response returned 999900246 and OKDOC.
DT_List_DocumentosVerifies receipt and source FT states after save.

Raw evidence: raw/playwright/workflows/sales-invoice-to-receipt-20260519T174312Z.json. Screenshots: assets/screenshots/sales-invoice-to-receipt-20260519T174312Z-01-source-ft-filled.png through assets/screenshots/sales-invoice-to-receipt-20260519T174312Z-05-receipt-list.png.