Workflow

How to Select a Customer on a Sales Invoice

Verified up to the save boundary. Demo run sales-invoice-customer-selection-20260520T024003Z selected customer [910] 100 Ouvidos Lda on an FT create form, confirmed the billing fields populated, and verified no save, payment, print, or line-insert request was submitted.

When to Use This

Use this when the invoice needs a normal named billing customer before document lines, payment terms, billing address overrides, or final save. The same billing-customer concept appears in invoice-style documents, but the verified route here is Invoice [FT] at /vendas/ft/create.

Step-by-Step

  1. Open Sales / Invoice [FT], then click New document, or navigate directly to /vendas/ft/create.
  2. In Vehicle & Entity, find the billing customer field. The field id is #doc_CodTerc; the visible label may appear as Fact entity or Customer.
  3. Search for and select the customer. The verified run used [910] 100 Ouvidos Lda.
  4. Wait for OfficeGest to populate the billing data. The verified active customer filled VAT 509031862, name 100 Ouvidos Lda, address Rua Engenheiro Armando Almeida Mansos 33 Moura, locality Moura, postal code 7860-004, and country PRT.
  5. Check that the customer and VAT fields are not marked as mandatory-field errors. If OfficeGest shows an inactive-customer warning or clears the real customer/VAT fields, choose another active billing entity.
  6. Continue with invoice lines, payment terms, billing address, and final save only after the active customer is accepted.

Verified Behavior

CheckObserved result
Route/vendas/ft/create
Selected customer#doc_CodTerc=910, 100 Ouvidos Lda
Customer lookupNameEntidades returned activo:"T", VAT 509031862, address, locality, postal code, country, and salesperson id.
Populated billing fields#doc_NContrib=509031862, NomeFact=100 Ouvidos Lda, #doc_Morada, #doc_Localidade, #doc_CodPostal, and #doc_CodPais=PRT.
Related customer checksOfficeGest also checked customer broker id, advances via DT_Select_AdiantamentosClientes, and customer address options via moradase.
Safety boundaryNo saveDocument, saveRascunho, insertLinhaTabDoc, print, payment, or delete request was submitted.

Backend Calls Observed

Action or endpointPurpose
NameEntidadesLoads the selected billing customer data and active/inactive status.
edi&option=get_broker_id_entityChecks broker/commercial entity metadata for the selected customer.
DT_Select_AdiantamentosClientesChecks customer advances/open advance documents.
Sel2_Select&table=moradase and load&tabela=moradaseLoads alternate address options for the customer.

Raw evidence: raw/playwright/workflows/sales-invoice-customer-selection-20260520T024003Z.json. Screenshots: assets/screenshots/sales-invoice-customer-selection-20260520T024003Z-01-create-page.png and assets/screenshots/sales-invoice-customer-selection-20260520T024003Z-02-customer-selected.png.

Related Guides