Workflow

How to Create a Debit Note

Verified end to end. Demo run debit-note-nd-20260520T001537Z created debit note ND 9999/5 / 999900005 from source invoice FT 9999/1707 and verified the saved ND through the debit-note list.

Evidence Summary

Create route
/vendas/nd/create
List route
/vendas/nd
Final view
/vendas/nd/view/OTk5OTAwMDA1
Workflow run
debit-note-nd-20260520T001537Z
Created document
999900005 / ND 9999/5
Evidence file
raw/playwright/workflows/latest-debit-note-nd.json

Verified debit note workflow

When to Use This

Use Note debit [ND] when you need an amending sales document that increases a customer's receivable value and references a prior sales document. In the verified demo, ND used source association but did not move stock.

Step-by-Step

  1. Open Sales / Amending / Note debit [ND], then click Create Debit Note, or navigate directly to /vendas/nd/create.
  2. Select the customer. The verified run used customer 910, 100 Ouvidos Lda, VAT 509031862.
  3. Confirm document series, employee, commercial, and payment term. The verified run used series 9999, employee Demo, commercial Comercial 1, and payment term PP.
  4. Optionally enter a Reference. The verified run used AI-ND-20260520T001537Z.
  5. In the source association menu, choose the source document type. The verified run used [FT] Invoice.
  6. Select the source document. The verified run selected 999901707 / FT 9999/1707, dated 20/05/2026.
  7. Choose the source line quantity. The verified run used line 1, article AI-DEMO-20260519-021105, quantity 1, unit price 1.60, VAT 23%.
  8. Click the association modal Save. OfficeGest copies the selected source line into the ND draft and calculates gross 1.60, VAT 0.37, and total 1.97.
  9. Click Save and Finish, then confirm the Are you sure? dialog if shown.
  10. OfficeGest posts saveDocument, redirects to the ND view, and creates an open debit note. The verified save response was 999900005%OK&=&OKDOC&=&.
  11. Search the ND list for 999900005. The verified row showed status ABR / Open, paid value 0.00, pending value 1.97, and total 1.97.

Verified Debit Note Values

FieldValue
Internal number999900005
Visible document numberND 9999/5
Source document999901707 / FT 9999/1707
Source lineArticle AI-DEMO-20260519-021105, quantity 1, warehouse 1.
Customer[910] 100 Ouvidos Lda, VAT 509031862
StatusABR, visible as Open
Total1.97; paid 0.00; pending 1.97.
Source invoice resultFT 9999/1707 remained ABR / Open, paid 0.00, pending 1.97.
Source association resultAfter save, FT 9999/1707 was no longer returned by the ND source association list for customer 910.
Stock effectWarehouse 1 stock for the demo article stayed -41 after the ND was saved.

Backend Calls Observed

Action or endpointPurpose
DT_List_Documentos&table=NDebLoads and verifies debit notes with typesaft=ND, tipoop=ND, and actualizacc=T.
NameEntidadesLoads customer master data for customer 910.
associar_documento&option=load_modalOpens the source-document association modal for selected type FT.
associar_documento&option=listar_documentosLists source documents available for ND association. Before save it returned FT 9999/1707; after save that source was no longer returned.
associar_documento&option=listar_tabelaLoads source lines for the selected FT document.
associar_documento&option=save_linhasCopies the selected source line into the ND temporary document table.
listaTabDocumentoLoads the ND draft line before save and on the final view.
create_document&option=calcular_totaisCalculates gross, VAT, retention, and total.
saveDocumentCreates the ND document. The verified response was {"return":"999900005%OK&=&OKDOC&=&","print_documents":[]}.
DT_List_Documentos&table=FactChecks the source invoice remained open and unpaid.
dt_list_recalc_stock_articles_lojasConfirms stock stayed unchanged at -41 in warehouse 1.

Raw evidence: raw/playwright/workflows/debit-note-nd-20260520T001537Z.json. Screenshots: assets/screenshots/debit-note-nd-20260520T001537Z-01-create-page.png through assets/screenshots/debit-note-nd-20260520T001537Z-05-nd-list.png.