Workflow

How to Create a Supplier Cash Sale VDF

Verified end to end. Demo run supplier-cash-sale-vdf-20260519T073648Z created supplier cash-sale document VDF 9999/1 / 999900001 for supplier [100] AI Demo Supplier 20260519T030323Z, paid it immediately, and verified the warehouse stock increase.

Evidence Summary

Create route
/compras/vdf/create
List route
/compras/vdf
Workflow run
supplier-cash-sale-vdf-20260519T073648Z
Created document
999900001 / VDF 9999/1
Evidence file
raw/playwright/workflows/latest-supplier-cash-sale-vdf.json

Verified Supplier Cash Sale VDF workflow

When to Use This

Use Cash Sale forn. [VDF] when the supplier document is paid at creation time. In the verified demo it behaved like an immediate-payment purchase document: the payment modal was mandatory, the saved document finished as paid, the supplier current account was updated, and the article stock increased.

Step-by-Step

  1. Open Purchases / Cash Sale forn. [VDF], then click the create action, or navigate directly to /compras/vdf/create.
  2. Confirm the page title is OG - Cash Sale forn. [VDF]. The form includes hidden TipoOp=VDF and MovimentaStock=1.
  3. Select the supplier. The verified run used supplier 100, AI Demo Supplier 20260519T030323Z, VAT 590303236.
  4. Enter the supplier reference in Supplier`s N.. The verified run used AI-VDF-20260519T073648Z, checked by findNumNoForn against table VDinF.
  5. Confirm document date 19/05/2026, due date 20/05/2026, series 9999, collaborator Demo, and payment condition PP.
  6. Add the article line. The verified run used article AI-DEMO-20260519-021105, quantity 1, warehouse 1, unit cost 1.23, VAT 23%, and total 1.51.
  7. Click End.
  8. When the payment modal opens, choose [NUM] Numerario. OfficeGest creates a payment row for the full total.
  9. Click Save in the payment modal, then confirm the Are you sure? dialog.
  10. OfficeGest posts saveDocument. The verified response was {"return":"999900001%&=&OKDOC&=&"}.
  11. Verify the VDF list. Search 999900001 on /compras/vdf; the verified row showed VDF 9999/1, status LIQ / Finished, total 1.51, and ValorPago=1.51.
  12. Verify stock if the document includes stock-moving articles. The verified run changed warehouse 1 stock from 4 to 5.

Verified VDF Values

FieldValue
Internal number999900001
Visible documentVDF 9999/1
Supplier referenceAI-VDF-20260519T073648Z
Supplier[100] AI Demo Supplier 20260519T030323Z, VAT 590303236
Route/list identity/compras/vdf, table VDinF, tipoop=VDF, tipoterc=F, actualizacc=T, recibo=F.
StatusLIQ / Finished, validation N/D.
Total/paymentTotal 1.51; paid value 1.51; payment method NUM; troco=0.
Stock effectWarehouse 1 physical stock for the demo article changed from 4 to 5; customer-order quantity stayed 4; supplier-order quantity stayed 1.

Backend Calls Observed

Action or endpointPurpose
NameEntidades&tabla=FornLoads supplier master data after selecting supplier 100.
findNumNoFornChecks duplicate supplier reference. The verified request used tabela=VDinF, forn=100, and numnoforn=AI-VDF-20260519T073648Z.
loadArtigoReducido&compras=TLoads purchase article metadata, including current warehouse stock 4, cost 1.23, and VAT 23.
insertLinhaTabDocInserts the VDF line with id_tipoop=VDF, cliente=100, isforn=T, quantity 1, and warehouse 1.
price_variation_articleChecks supplier/article price variation for supplier 100.
create_document&option=calcular_totaisCalculates VDF totals. The verified total was 1.51.
payment&option=validateChecks payment coverage before save.
payment&option=addAdds the payment row. The verified request used compras=T, entidade=100, modopagamento=NUM, modobase=N, total=1.51, and tipoop=VDF.
saveDocumentSaves the VDF. The verified payload used TipoOp=VDF, CodTipoLanc=AccVDinFMerc, NumNoForn=AI-VDF-20260519T073648Z, MovimentaStock=1, and id=47824.
payment&option=get_paymentLoads payment data on the saved VDF view.
DT_List_DocumentosF&table=VDinFVerifies the saved VDF list row.
dt_list_recalc_stock_articles_lojasVerifies warehouse stock after saving the VDF.

Raw evidence: raw/playwright/workflows/supplier-cash-sale-vdf-20260519T073648Z.json. Screenshots: assets/screenshots/supplier-cash-sale-vdf-20260519T073648Z-01-create-page.png through assets/screenshots/supplier-cash-sale-vdf-20260519T073648Z-04-vdf-list.png.