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
- Open Sales / Invoice [FT], then click New document, or navigate directly to
/vendas/ft/create. - In Vehicle & Entity, find the billing customer field. The field id is
#doc_CodTerc; the visible label may appear as Fact entity or Customer. - Search for and select the customer. The verified run used
[910] 100 Ouvidos Lda. - Wait for OfficeGest to populate the billing data. The verified active customer filled VAT
509031862, name 100 Ouvidos Lda, addressRua Engenheiro Armando Almeida Mansos 33 Moura, localityMoura, postal code7860-004, and countryPRT. - 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.
- Continue with invoice lines, payment terms, billing address, and final save only after the active customer is accepted.
Verified Behavior
| Check | Observed result |
|---|---|
| Route | /vendas/ft/create |
| Selected customer | #doc_CodTerc=910, 100 Ouvidos Lda |
| Customer lookup | NameEntidades 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 checks | OfficeGest also checked customer broker id, advances via DT_Select_AdiantamentosClientes, and customer address options via moradase. |
| Safety boundary | No saveDocument, saveRascunho, insertLinhaTabDoc, print, payment, or delete request was submitted. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
NameEntidades | Loads the selected billing customer data and active/inactive status. |
edi&option=get_broker_id_entity | Checks broker/commercial entity metadata for the selected customer. |
DT_Select_AdiantamentosClientes | Checks customer advances/open advance documents. |
Sel2_Select&table=moradase and load&tabela=moradase | Loads 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.