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
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
- Open the source invoice. The verified source was
FT 9999/1675. - Click To convert, then choose Receipt.
- OfficeGest posts to
/vendas/r/createand opens Receipt [R] with customer910already filled. - Check the Documents grid. The verified run showed exactly the source FT row:
999901675,FT 9999/1675, total1.97, and value to pay1.97. - Leave unrelated rows in Outstanding documents unselected unless the user wants to settle more documents.
- Confirm the receipt totals. The verified draft showed
valorAPagar=1.97,totalGeral=1.97, andtotAPagar=1.97. - Add the payment method. The verified run used [NUM] Numerario for
1.97with no change due. - Save the receipt. The backend returned
999900246and OfficeGest opened the R view. - Verify the receipt list. The verified receipt row was
R 9999/246, stateF/ Closed, total1.97. - Verify the source FT. The source invoice changed to
LIQ/ Finished withValorPago=1.97and pending value0.00.
Verified Values
| Field | Value |
|---|---|
| Source invoice | 999901675 / FT 9999/1675 |
| Receipt | 999900246 / R 9999/246 |
| Customer | [910] 100 Ouvidos Lda, VAT 509031862 |
| Preloaded document | FT 9999/1675 appeared in Documents with total 1.97 and value to pay 1.97. |
| Payment | [NUM] Numerario, amount 1.97, change 0. |
| Receipt state | F / Closed, total 1.97. |
| Source FT state | LIQ / Finished, paid 1.97, pending 0.00. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
POST /vendas/r/create | Opens R create from the FT view with copy=1, codterc_copy=910, num_copy=999901675, and tipoop_copy=FT. |
loadTabDocumentoRecibo | Builds the receipt document tab with the source FT context. |
listaTabDocumentoRecibo | Returns the selected source FT in Documents with estado=T and value to pay 1.97. |
payment&option=add | Adds the cash payment line for 1.97. |
payment&option=validate | Validates payment totals; the verified response allowed save with troco=0. |
saveDocumentRecibo | Saves the R document. The verified response returned 999900246 and OKDOC. |
DT_List_Documentos | Verifies 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.