Workflow

How to Create a Supplier Invoice / Receipt FRF

Verified end to end. Demo run supplier-invoice-receipt-frf-20260519T072511Z created supplier invoice/receipt FRF 9999/23 / 999900023 for supplier [100] AI Demo Supplier 20260519T030323Z, paid it immediately, and verified the stock increase.

Evidence Summary

Create route
/compras/frf/create
List route
/compras/frf
Workflow run
supplier-invoice-receipt-frf-20260519T072511Z
Created document
999900023 / FRF 9999/23
Evidence file
raw/playwright/workflows/latest-supplier-invoice-receipt-frf.json

Verified Supplier Invoice Receipt FRF workflow

When to Use This

Use Invoice / Receipt forn. [FRF] when a supplier invoice is registered and paid in the same workflow. It behaves like a supplier invoice with stock movement plus an immediate payment row, so the saved document finishes as paid instead of open.

Step-by-Step

  1. Open Purchases / Invoice / Receipt forn. [FRF], then click the create action, or navigate directly to /compras/frf/create.
  2. Confirm the page title is OG - Invoice / Receipt forn. [FRF]. The form includes hidden TipoOp=FRF and MovimentaStock=1.
  3. Select the supplier. The verified run used supplier 100, AI Demo Supplier 20260519T030323Z, VAT 590303236.
  4. Enter the supplier invoice/reference number in Supplier`s N.. The verified run used AI-FRF-20260519T072511Z, checked through findNumNoForn against table FactRecF.
  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":"999900023%&=&OKDOC&=&"}.
  11. Verify the FRF list. Search 999900023 on /compras/frf; the verified row showed FRF 9999/23, 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 2 to 3.

Verified FRF Values

FieldValue
Internal number999900023
Visible documentFRF 9999/23
Supplier referenceAI-FRF-20260519T072511Z
Supplier[100] AI Demo Supplier 20260519T030323Z, VAT 590303236
Route/list identity/compras/frf, table FactRecF, tipoop=FRF, tipoterc=F, actualizacc=T, recibo=F.
StatusLIQ / Finished, validation N/D.
Total/paymentTotal 1.51; paid value 1.51; payment method NUM.
Stock effectWarehouse 1 physical stock for the demo article changed from 2 to 3; 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=FactRecF, forn=100, and numnoforn=AI-FRF-20260519T072511Z.
loadArtigoReducido&compras=TLoads purchase article metadata, including current warehouse stock 2, cost 1.23, and VAT 23.
insertLinhaTabDocInserts the FRF line with id_tipoop=FRF, cliente=100, isforn=T, quantity 1, and warehouse 1.
price_variation_articleChecks supplier/article price variation for supplier 100.
create_document&option=calcular_totaisCalculates FRF totals. The verified total was 1.51.
payment&option=validateChecks whether the payment total can cover the document 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=FRF.
saveDocumentSaves the supplier invoice/receipt. The verified payload used TipoOp=FRF, CodTipoLanc=AccVDinFMerc, NumNoForn=AI-FRF-20260519T072511Z, MovimentaStock=1, and id=47729.
payment&option=get_paymentLoads payment data on the saved FRF view.
DT_List_DocumentosF&table=FactRecFVerifies the saved FRF list row.
dt_list_recalc_stock_articles_lojasVerifies warehouse stock after saving the FRF.

Raw evidence: raw/playwright/workflows/supplier-invoice-receipt-frf-20260519T072511Z.json. Probe evidence: raw/playwright/compras-frf-create-probe.json. Screenshots: assets/screenshots/supplier-invoice-receipt-frf-20260519T072511Z-01-create-page.png through assets/screenshots/supplier-invoice-receipt-frf-20260519T072511Z-04-frf-list.png.

Validation Notes