Workflow

How to Finalize a Converted Pro-Forma Sales Order Draft

Verified end to end. Demo run finalize-converted-proforma-sales-order-draft-20260519T171841Z created pro-forma invoice FP 9999/65, converted it to ENC draft 463, then saved that draft as final sales order ENC 9999/109 / 999900109.

Evidence Summary

Source pro-forma
999900065 / FP 9999/65
Draft route
/vendas/enc/rasc/NDYz
Final view
/vendas/enc/view/OTk5OTAwMTA5
Workflow run
finalize-converted-proforma-sales-order-draft-20260519T171841Z
Created sales order
999900109 / ENC 9999/109
Evidence file
raw/playwright/workflows/latest-finalize-converted-proforma-sales-order-draft.json

Verified converted pro-forma sales order draft finalization workflow

When to Use This

Use this workflow after a Pro-Forma Invoice [FP] should become a formal Sales Order [ENC] before invoicing or fulfillment. The saved FP view exposes To convert options for Invoice, Invoice / Receipt, and Internal Doc; this guide covers the verified Internal Doc path.

This workflow records an order, not payment. Invoice the order later using the sales order conversion actions.

Step-by-Step

  1. Open the saved pro-forma invoice. The verified source was /vendas/fp/view/OTk5OTAwMDY1, document FP 9999/65.
  2. Click To convert, then choose Internal Doc.
  3. OfficeGest creates an ENC draft. The verified response was "OK:463:vendas" and the draft opened at /vendas/enc/rasc/NDYz.
  4. Confirm the draft is the correct customer, reference, and source pro-forma. The verified draft reference was AI-FP-ENC-FIN-20260519T171841Z.
  5. Review the copied line. The verified line used article AI-DEMO-20260519-021105, quantity 1, and VAT 23%.
  6. Check that the draft line points back to the pro-forma: ndocori=999900065, tipodocori=FP, and linhandocori=1.
  7. Click Save and Finish.
  8. Confirm the Are you sure? dialog.
  9. OfficeGest posts saveDocument from draft mode and returns the final ENC number. The verified response was {"return":"999900109%&=&OKDOC&=&","print_documents":[]}.
  10. OfficeGest opens the final sales order view /vendas/enc/view/OTk5OTAwMTA5, with title OG - ENC 9999/109.
  11. Search the ENC list for 999900109 and confirm the sales order row exists as open.

Verified Values

FieldValue
Source pro-forma999900065 / FP 9999/65
Converted ENC draft463, opened at /vendas/enc/rasc/NDYz.
Final sales order999900109 / ENC 9999/109, opened at /vendas/enc/view/OTk5OTAwMTA5.
Final sales order stateABR / Open, total 1.97, paid 0.
Source pro-forma state after conversionABR / Open, total 1.97, paid 0.
Draft line sourcendocori=999900065, tipodocori=FP, linhandocori=1.

Backend Calls Observed

Action or endpointPurpose
facturardocCreated ENC draft 463 from source FP 9999/65.
listaTabDocumentoLoaded the ENC draft line before finalization.
saveDocumentFinalized the draft into sales order 999900109 / ENC 9999/109.
DT_List_DocumentosVerified the final ENC sales order row in the document list.

Raw evidence: raw/playwright/workflows/finalize-converted-proforma-sales-order-draft-20260519T171841Z.json. Screenshots: assets/screenshots/finalize-converted-proforma-sales-order-draft-20260519T171841Z-01-fp-filled.png through assets/screenshots/finalize-converted-proforma-sales-order-draft-20260519T171841Z-05-enc-list.png.

Validation Notes