Evidence Summary
- Create route
/vendas/pre/create- List route
/vendas/pre- Workflow run
zoom-level-pre-20260519T064145Z- Created document
999900079 / PRE 9999/79- Evidence file
raw/playwright/workflows/latest-zoom-level-pre.json
When to Use This
Use Zoom Level [PRE] from Sales when creating this credit-note-style document from a previous sales document. The verified page is source-document driven: a direct article insertion attempt called loadArtigoReducido with tipoop=PRE but did not insert a line. The successful path used Holding-Source to associate a previous FS document line.
Step-by-Step
- Open Sales / Zoom Level [PRE], then click the new-document action, or navigate directly to
/vendas/pre/create. - Confirm the page title is OG - Zoom Level [PRE]. The create form includes Entity, Details, Marketing, Recomendations, and Document.
- Select the customer. The verified run used customer
910, 100 Ouvidos Lda, VAT509031862. - Confirm series, employee, commercial, and payment term. The verified run used series
9999, employeeDemo, commercialComercial 1, and payment termPP. - Select a credit-note reason. The verified run used reason
1, Erro de faturacao, loaded frommotivos_docswithis_nc=1. - Enter a reference if needed. The verified run used
AI-PRE-20260519T064145Z. - In Holding-Source, choose a source document type. The verified run used [FS] Simplified invoice; the page also exposed [FR], [FT], [NV], and [VD].
- Select the source document. The verified run selected
999900008 / FS 9999/8. - Save the association modal. OfficeGest copied source line
FS_999900008_1into the PRE draft: articleAI-DEMO-20260519-021105, quantity1, warehouse1, unit price1.60, VAT23%, and total1.97. - Click End. PRE opens the standard payment modal. Select [NUM] Numerario for the full total, then click the payment modal Save.
- Confirm the Are you sure? dialog. OfficeGest posts
saveDocumentand returns999900079%OK&=&OKDOC&=&. - Search the PRE list for
999900079. The verified row showedPRE 9999/79, statusLIQ/ Finished, total1.97, paid1.97, and pending value0.00. - Check stock after saving. Warehouse
1physical stock changed from1to2; customer-order quantity stayed4; supplier-order quantity stayed1.
Verified PRE Values
| Field | Value |
|---|---|
| Internal number | 999900079 |
| Visible document number | PRE 9999/79 |
| Source document | 999900008 / FS 9999/8, line 1 |
| Route/list identity | /vendas/pre, table DocumPRE, typesaft=NC, tipoop=PRE, oficinas=F, recibo=F, actualizacc=T. |
| Reason | 1, Erro de faturacao |
| Customer | [910] 100 Ouvidos Lda, VAT 509031862 |
| Line | Article AI-DEMO-20260519-021105, quantity 1, warehouse 1, VAT 23%. |
| Status | LIQ, visible as Finished; validation N/D. |
| Total and payment | Total 1.97; paid 1.97; pending 0.00; payment method Numerario through the payment modal. |
| Stock effect | Warehouse 1 stock changed from 1 to 2; qtd_enc_cliente stayed 4; qtd_enc_forn stayed 1. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
DT_List_Documentos&table=DocumPRE | Loads and verifies PRE documents with oficinas=F, recibo=F, actualizacc=T, typesaft=NC, and tipoop=PRE. |
Sel2_Select_v2&table=motivos_docs | Loads reason options filtered by where[is_nc]=1. |
loadArtigoReducido | Direct PRE article loading returned no insertable CodArtigo for the demo article, confirming the practical need to use source association for this workflow. |
associar_documento&option=load_modal | Opens the source-document association modal for tipoop=FS, customer 910, and source type PRE. |
associar_documento&option=listar_documentos | Lists available source documents. Customer 910 exposed FS 9999/8, FT 9999/1666, and FR 9999/841 in the probe. |
associar_documento&option=save_linhas | Copies the selected FS 9999/8 line into the PRE temporary table. |
create_document&option=calcular_totais | Calculates gross, VAT, retention, and total. Verified totals were net 1.60, VAT 0.37, and total 1.97. |
payment&option=validate | Validates PRE payment before final save. Without a payment line it returned the payment error; adding NUM for 1.97 allowed the save. |
saveDocument | Creates the PRE document. The verified response was {"return":"999900079%OK&=&OKDOC&=&","print_documents":[]}. |
dt_list_recalc_stock_articles_lojas | Confirms stock changed from 1 to 2 in warehouse 1. |
Raw evidence: raw/playwright/workflows/zoom-level-pre-20260519T064145Z.json. Probe evidence: raw/playwright/vendas-pre-create-probe.json and raw/playwright/vendas-pre-source-association-probe.json. Screenshots: assets/screenshots/zoom-level-pre-20260519T064145Z-01-create-page.png through assets/screenshots/zoom-level-pre-20260519T064145Z-05-pre-list.png.