Evidence Summary
- Source view
/vendas/orc/view/OTk5OTAwMDg5- Target draft
/vendas/ft/rasc/NDU4- Workflow run
quotation-to-invoice-draft-20260519T160923Z- Source quotation
999900089 / ORC 9999/89- Created draft
458, invoice typeFT- Evidence file
raw/playwright/workflows/latest-quotation-to-invoice-draft.json
When to Use This
Use this workflow after a customer accepts a quotation and the next step is to prepare a normal customer invoice. The conversion creates an Invoice [FT] draft from the quotation lines. It does not by itself finalize the FT invoice, post stock, or settle payment.
In the verified run, the source quotation remained ABR / Open after draft creation. Treat the generated FT as a draft that still needs review and final save.
Step-by-Step
- Open the quotation that should be converted. The verified source was
ORC 9999/89. - Confirm the quotation is the correct customer and line set. The verified quotation was for customer
910, 100 Ouvidos Lda, with articleAI-DEMO-20260519-021105, quantity1, and total1.97. - In the bottom action bar, open To convert.
- Choose Invoice. This maps to
facturar('ft'). - Confirm the Are you sure? dialog.
- OfficeGest calls
facturardocwith sourcetipoop=ORC, source number999900089, and targettipoopdest=ft. - OfficeGest returns the draft identifier. The verified response was
"OK:458:vendas". - OfficeGest opens the FT draft route
/vendas/ft/rasc/NDU4. - Review the copied invoice draft before saving. The verified draft kept reference
AI-ORC-FT-20260519T160923Z, typeFT, and copied the source line fromORC 9999/89. - When the invoice is ready, continue with the normal Create a Sales Invoice save/finalization checks.
Conversion Options Observed
| Menu item | Observed handler | Meaning |
|---|---|---|
| Invoice | facturar('ft') | Creates an FT draft from the quotation. This is the verified path. |
| Invoice / Receipt | facturar('fr') | Creates an FR draft path from the quotation. The final payment step was not run in this workflow. |
| Internal Doc | facturar('enc') | Creates an ENC/internal document path from the quotation. |
| Order of Service | criarOS() | Posts the quotation context to the workshops order-of-service route; not verified here. |
Verified Values
| Field | Value |
|---|---|
| Source quotation | 999900089 / ORC 9999/89 |
| Source state after conversion | ABR / Open, total 1.97, paid 0. |
| Created FT draft | 458, opened at /vendas/ft/rasc/NDU4. |
| Draft reference | AI-ORC-FT-20260519T160923Z |
| Draft line source | ndocori=999900089, tipodocori=ORC, linhandocori=1. |
| Draft line | Article AI-DEMO-20260519-021105, quantity 1, unit price about 1.599, VAT 23%. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
saveDocument | Created the source ORC quotation. The verified source save returned 999900089%OK&=&OKDOC&=&. |
facturardoc | Converted the source ORC into an FT draft. Payload included tipoopdest=ft, tipoop=ORC, and num=999900089. Response: "OK:458:vendas". |
listaTabDocumento | Loaded the generated FT draft lines after opening /vendas/ft/rasc/NDU4. |
dt_list_drafts | Queried sales drafts for TipoOp=FT after conversion. |
DT_List_Documentos | Checked the source ORC list after conversion and confirmed the quotation row still appeared as open. |
Raw evidence: raw/playwright/workflows/quotation-to-invoice-draft-20260519T160923Z.json. Screenshots: assets/screenshots/quotation-to-invoice-draft-20260519T160923Z-01-orc-filled.png through assets/screenshots/quotation-to-invoice-draft-20260519T160923Z-04-ft-list.png.
Validation Notes
- This workflow stops at draft: no final FT was saved in the verified run.
- The copied line keeps source metadata: the FT draft line records the original ORC number and line, which is useful for audit and support.
- Review before final save: confirm customer, dates, tax zone, stock warning, and totals before using Save and Finish on the FT draft.
- Source state: the ORC row was still open immediately after draft creation; do not assume a quote is invoiced until the target document is finalized and list state is verified.