Workflow

How to Create a Zoom Level PRE

Verified end to end. Demo run zoom-level-pre-20260519T064145Z created PRE 9999/79 / 999900079 from source document FS 9999/8, verified it through the PRE list, and confirmed that stock increased in warehouse 1.

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

Verified Zoom Level PRE workflow

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

  1. Open Sales / Zoom Level [PRE], then click the new-document action, or navigate directly to /vendas/pre/create.
  2. Confirm the page title is OG - Zoom Level [PRE]. The create form includes Entity, Details, Marketing, Recomendations, and Document.
  3. Select the customer. The verified run used customer 910, 100 Ouvidos Lda, VAT 509031862.
  4. Confirm series, employee, commercial, and payment term. The verified run used series 9999, employee Demo, commercial Comercial 1, and payment term PP.
  5. Select a credit-note reason. The verified run used reason 1, Erro de faturacao, loaded from motivos_docs with is_nc=1.
  6. Enter a reference if needed. The verified run used AI-PRE-20260519T064145Z.
  7. In Holding-Source, choose a source document type. The verified run used [FS] Simplified invoice; the page also exposed [FR], [FT], [NV], and [VD].
  8. Select the source document. The verified run selected 999900008 / FS 9999/8.
  9. Save the association modal. OfficeGest copied source line FS_999900008_1 into the PRE draft: article AI-DEMO-20260519-021105, quantity 1, warehouse 1, unit price 1.60, VAT 23%, and total 1.97.
  10. Click End. PRE opens the standard payment modal. Select [NUM] Numerario for the full total, then click the payment modal Save.
  11. Confirm the Are you sure? dialog. OfficeGest posts saveDocument and returns 999900079%OK&=&OKDOC&=&.
  12. Search the PRE list for 999900079. The verified row showed PRE 9999/79, status LIQ / Finished, total 1.97, paid 1.97, and pending value 0.00.
  13. Check stock after saving. Warehouse 1 physical stock changed from 1 to 2; customer-order quantity stayed 4; supplier-order quantity stayed 1.

Verified PRE Values

FieldValue
Internal number999900079
Visible document numberPRE 9999/79
Source document999900008 / FS 9999/8, line 1
Route/list identity/vendas/pre, table DocumPRE, typesaft=NC, tipoop=PRE, oficinas=F, recibo=F, actualizacc=T.
Reason1, Erro de faturacao
Customer[910] 100 Ouvidos Lda, VAT 509031862
LineArticle AI-DEMO-20260519-021105, quantity 1, warehouse 1, VAT 23%.
StatusLIQ, visible as Finished; validation N/D.
Total and paymentTotal 1.97; paid 1.97; pending 0.00; payment method Numerario through the payment modal.
Stock effectWarehouse 1 stock changed from 1 to 2; qtd_enc_cliente stayed 4; qtd_enc_forn stayed 1.

Backend Calls Observed

Action or endpointPurpose
DT_List_Documentos&table=DocumPRELoads and verifies PRE documents with oficinas=F, recibo=F, actualizacc=T, typesaft=NC, and tipoop=PRE.
Sel2_Select_v2&table=motivos_docsLoads reason options filtered by where[is_nc]=1.
loadArtigoReducidoDirect 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_modalOpens the source-document association modal for tipoop=FS, customer 910, and source type PRE.
associar_documento&option=listar_documentosLists available source documents. Customer 910 exposed FS 9999/8, FT 9999/1666, and FR 9999/841 in the probe.
associar_documento&option=save_linhasCopies the selected FS 9999/8 line into the PRE temporary table.
create_document&option=calcular_totaisCalculates gross, VAT, retention, and total. Verified totals were net 1.60, VAT 0.37, and total 1.97.
payment&option=validateValidates PRE payment before final save. Without a payment line it returned the payment error; adding NUM for 1.97 allowed the save.
saveDocumentCreates the PRE document. The verified response was {"return":"999900079%OK&=&OKDOC&=&","print_documents":[]}.
dt_list_recalc_stock_articles_lojasConfirms 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.