Workflow

How to Create a Supplier Self-Billing Invoice AFT

Verified end to end. Demo run supplier-self-billing-aft-20260519T084109Z created self-billing invoice AFT 9999/1 / 999900001 for supplier [100] AI Demo Supplier 20260519T030323Z, verified the AFT list row, and confirmed the stock increase.

Evidence Summary

Create route
/compras/aft/create
List route
/compras/aft
Final view
/compras/aft/view/OTk5OTAwMDAx
Workflow run
supplier-self-billing-aft-20260519T084109Z
Created document
999900001 / AFT 9999/1
Evidence file
raw/playwright/workflows/latest-supplier-self-billing-aft.json

Verified supplier self-billing AFT workflow

When to Use This

Use Self-billing / Invoice autof. [AFT] when the company issues a supplier invoice under a self-billing arrangement. In the verified path AFT behaved as an open, unpaid supplier invoice, updated stock, and also carried accounting launch fields in the save payload.

Step-by-Step

  1. Open Purchases / Self-billing / Invoice autof. [AFT], then click Invoice autof., or navigate directly to /compras/aft/create.
  2. Confirm the form is using TipoOp=AFT.
  3. Select the Supplier. The verified run used supplier 100, AI Demo Supplier 20260519T030323Z, VAT 590303236.
  4. Enter a traceable value in Supplier`s N.. The verified run used AI-AFT-20260519T084109Z.
  5. Review document defaults: series 9999, employee Demo, payment condition PP, currency EUR, and warehouse 1.
  6. Review the accounting fields if they are visible. The verified save used accounting launch date 19/05/2026 and launch type AccFactFMerc.
  7. Add the article line. The verified line used article AI-DEMO-20260519-021105, quantity 1, unit cost 1.23, VAT 23%, and total 1.51.
  8. Click Save and Finish.
  9. Confirm the Are you sure? dialog with OK.
  10. OfficeGest posts saveDocument, redirects to the AFT view, and keeps the document in Open status. The verified save response created document 999900001.
  11. Search the AFT list for 999900001 or the supplier reference. The verified list row had status ABR / Open, validation N/D, total 1.51, and paid value 0.
  12. Verify stock for stock-moving article lines. The verified run changed warehouse 1 stock from 6 to 7.

Verified AFT Values

FieldValue
Internal number999900001
Visible document numberAFT 9999/1
Supplier referenceAI-AFT-20260519T084109Z
Internal referenceAI-AFT-REF-20260519T084109Z
Route/list identity/compras/aft, table documaft, tipoop=AFT, tipoterc=F, actualizacc=T, recibo=F, draft typesaft=FT.
Accounting launchdata_lanc_contabilidade=19/05/2026, CodTipoLanc=AccFactFMerc.
StatusABR / Open, validation N/D.
Total and paymentTotal 1.51; no payment line; ValorPago=0.
Stock/order effectPhysical stock in warehouse 1 changed from 6 to 7; customer-order quantity stayed 4; supplier-order quantity stayed 2.

Backend Calls Observed

Action or endpointPurpose
dt_list_draftsLoads AFT drafts with compras=T, search[TipoOp]=AFT, and typesaft=FT.
listaTabDocumento&isforn=TLoads the temporary supplier line table with tipoop=aft.
loadArtigoReducido&compras=TLoads purchase article metadata, including physical stock 6, customer-order quantity 4, supplier-order quantity 2, cost 1.23, and VAT 23.
create_document&option=get_notas_entidadeLoads supplier notes for supplier 100 with tipoentidade=F.
create_document&option=get_notas_artigoLoads article notes for AI-DEMO-20260519-021105.
saveDocumentCreates the open AFT. The verified payload used TipoOp=AFT, NumNoForn=AI-AFT-20260519T084109Z, CodTipoLanc=AccFactFMerc, data_lanc_contabilidade=19/05/2026, referencia=AI-AFT-REF-20260519T084109Z, MovimentaStock=1, id=48414, stockneg=NAO USAR, isedit=F, and israsc=0.
listaTabDocumentoImpCustosLoads cost allocation/import-cost lines on the saved AFT view.
DT_List_DocumentosFVerifies the document in the AFT list using table documaft, actualizacc=T, and tipoop=AFT.
dt_list_recalc_stock_articles_lojasVerifies warehouse stock after saving the AFT.

Raw evidence: raw/playwright/workflows/supplier-self-billing-aft-20260519T084109Z.json. Screenshots: assets/screenshots/supplier-self-billing-aft-20260519T084109Z-01-create-page.png through assets/screenshots/supplier-self-billing-aft-20260519T084109Z-04-aft-list.png.