Workflow

How to Convert a Quotation to an Invoice / Receipt Draft

Verified to draft. Demo run quotation-to-invoice-receipt-draft-20260519T162111Z created quotation ORC 9999/90 / 999900090, used To convert / Invoice / Receipt, and opened invoice / receipt draft 460 at /vendas/fr/rasc/NDYw. The FR draft was not finalized or paid.

Evidence Summary

Source view
/vendas/orc/view/OTk5OTAwMDkw
Target draft
/vendas/fr/rasc/NDYw
Workflow run
quotation-to-invoice-receipt-draft-20260519T162111Z
Source quotation
999900090 / ORC 9999/90
Created draft
460, invoice / receipt type FR
Evidence file
raw/playwright/workflows/latest-quotation-to-invoice-receipt-draft.json

Verified quotation to invoice receipt draft conversion workflow

When to Use This

Use this workflow after a customer accepts a quotation and the sale should become an Invoice / Receipt [FR], meaning the normal final flow expects payment as part of the invoice/receipt process. The conversion creates an FR draft from the quotation lines. It does not by itself complete payment or finalize the FR document.

In the verified run, the source quotation remained ABR / Open after draft creation. Treat the generated FR as a draft that still needs payment review and final save.

Step-by-Step

  1. Open the quotation that should become an invoice / receipt. The verified source was ORC 9999/90.
  2. Confirm the quotation is the correct customer and line set. The verified quotation was for customer 910, 100 Ouvidos Lda, with article AI-DEMO-20260519-021105, quantity 1, and total 1.97.
  3. In the bottom action bar, open To convert.
  4. Choose Invoice / Receipt. This maps to facturar('fr').
  5. Confirm the Are you sure? dialog.
  6. OfficeGest calls facturardoc with source tipoop=ORC, source number 999900090, and target tipoopdest=fr.
  7. OfficeGest returns the draft identifier. The verified response was "OK:460:vendas".
  8. OfficeGest opens the FR draft route /vendas/fr/rasc/NDYw.
  9. Review the copied invoice / receipt draft before saving. The verified draft kept reference AI-ORC-FR-20260519T162111Z, type FR, and copied the source line from ORC 9999/90.
  10. When the invoice / receipt is ready, continue with the normal Create an Invoice / Receipt checks, including payment before finalization.

Conversion Options Observed

Menu itemObserved handlerMeaning
Invoicefacturar('ft')Creates an FT draft from the quotation. Use this when payment will be handled later.
Invoice / Receiptfacturar('fr')Creates an FR draft from the quotation. This is the verified path in this guide.
Internal Docfacturar('enc')Creates an ENC/internal document path from the quotation.
Order of ServicecriarOS()Posts the quotation context to the workshops order-of-service route; not verified here.

Verified Values

FieldValue
Source quotation999900090 / ORC 9999/90
Source state after conversionABR / Open, total 1.97, paid 0.
Created FR draft460, opened at /vendas/fr/rasc/NDYw.
Draft referenceAI-ORC-FR-20260519T162111Z
Draft line sourcendocori=999900090, tipodocori=ORC, linhandocori=1.
Draft lineArticle AI-DEMO-20260519-021105, quantity 1, unit price about 1.599, VAT 23%.

Backend Calls Observed

Action or endpointPurpose
saveDocumentCreated the source ORC quotation. The verified source save returned 999900090%OK&=&OKDOC&=&.
facturardocConverted the source ORC into an FR draft. Payload included tipoopdest=fr, tipoop=ORC, and num=999900090. Response: "OK:460:vendas".
listaTabDocumentoLoaded the generated FR draft lines after opening /vendas/fr/rasc/NDYw.
dt_list_draftsQueried sales drafts for TipoOp=FR after conversion.
DT_List_DocumentosChecked the source ORC list after conversion and confirmed the quotation row still appeared as open.

Raw evidence: raw/playwright/workflows/quotation-to-invoice-receipt-draft-20260519T162111Z.json. Screenshots: assets/screenshots/quotation-to-invoice-receipt-draft-20260519T162111Z-01-orc-filled.png through assets/screenshots/quotation-to-invoice-receipt-draft-20260519T162111Z-04-fr-list.png.

Validation Notes