Workflow

How to Create a C. Interno CI

Verified end to end. Demo run internal-invoice-ci-20260519T060951Z created internal invoice CI 9999/9 / 999900009, verified it through the CI list, and confirmed warehouse stock reduction.

Evidence Summary

Create route
/vendas/ci/create
List route
/vendas/ci
Final view
/vendas/ci/view/OTk5OTAwMDA5
Workflow run
internal-invoice-ci-20260519T060951Z
Created document
999900009 / CI 9999/9
Evidence file
raw/playwright/workflows/latest-internal-invoice-ci.json

Verified C. Interno CI workflow

When to Use This

Use C. Interno [CI] for a sales-side internal invoice workflow that uses customer, delivery, vehicle, accounting, and article-line controls. In the verified demo, CI behaved as an open customer document, reduced physical stock in the selected warehouse, and did not create a receipt automatically.

Step-by-Step

  1. Open Sales / C. Interno [CI], then click New, or navigate directly to /vendas/ci/create.
  2. Confirm the page title is OG - C. Interno [CI]. The primary save actions are Save Draft, Save and Print, and Save and Finish.
  3. Select the customer. The verified run used customer 910, 100 Ouvidos Lda, VAT 509031862.
  4. Review Vehicle & Entity. Vehicle fields were visible and Print vehicle data was checked, but the verified direct article-line CI saved with license plate, brand, model, and mileage fields empty.
  5. Review Delivery Method. The verified run used load address Leiria, postal code 2400, country PRT, and discharge address from the customer master record in Moura.
  6. Confirm document series, employee, commercial, payment term, and currency. The verified run used series 9999, employee Demo, commercial Comercial 1, payment term PP, and currency EUR.
  7. Optionally enter a reference. The verified run used AI-CI-20260519T060951Z.
  8. Add the article line. The verified run inserted article AI-DEMO-20260519-021105, quantity 1, warehouse 1, unit price 1.60, VAT 23%, and total 1.97.
  9. Click Save and Finish. OfficeGest showed the confirmation Are you sure?; confirm it to create the CI.
  10. OfficeGest posts saveDocument, redirects to the CI view, and creates an open internal invoice. The verified save response was 999900009%OK&=&OKDOC&=&.
  11. Search the CI list for 999900009. The verified row showed status ABR / Open, total 1.97, paid 0.00, pending 1.97, and payment term Pronto Pagamento.
  12. Check stock after saving. Warehouse 1 physical stock changed from 1 to 0; warehouse 2 stayed 0; customer-order and supplier-order quantities stayed unchanged.

Verified CI Values

FieldValue
Internal number999900009
Visible document numberCI 9999/9
Customer[910] 100 Ouvidos Lda, VAT 509031862
Route/list identity/vendas/ci, table DocumCI, typesaft=FT, tipoop=CI, oficinas=T, recibo=F, actualizacc=T.
Vehicle fieldsdoc_CodEquipExt, doc_Viatura, doc_Marca, and doc_Modelo were present but blank in the verified direct-line save; imprimirviatura was checked.
LineArticle AI-DEMO-20260519-021105, quantity 1, warehouse 1, VAT 23%.
StatusABR, visible as Open; validation N/D.
Total1.97; paid 0.00; pending 1.97.
Stock effectWarehouse 1 physical stock changed from 1 to 0; warehouse 2 stayed 0; qtd_enc_cliente stayed 2; qtd_enc_forn stayed 1.

Backend Calls Observed

Action or endpointPurpose
DT_List_Documentos&table=DocumCILoads and verifies CI documents with oficinas=T, recibo=F, actualizacc=T, typesaft=FT, and tipoop=CI.
NameEntidades&tabla=ClienteLoads customer master data for customer 910, including VAT, address, seller, and employee context.
findDocsPendentesChecks pending customer documents for customer 910 during entity selection.
loadArtigoReducido / insertLinhaTabDocLoads the warehouse article and inserts the CI line. The insert used temporary table 47273, article AI-DEMO-20260519-021105, customer 910, warehouse 1, quantity 1, payment term PP, and currency EUR.
create_document&option=calcular_totaisCalculates gross, VAT, retention, and total. Verified totals were net 1.60, VAT 0.37, retention 0.00, and total 1.97.
checkProfitMarginsValidates profit margin rules for temporary table 47273 before saving.
saveDocumentCreates the CI document. The verified response was {"return":"999900009%OK&=&OKDOC&=&","print_documents":[]}.
dt_list_recalc_stock_articles_lojasConfirms stock/order quantities after final save. Warehouse 1 physical stock changed from 1 to 0.

Raw evidence: raw/playwright/workflows/internal-invoice-ci-20260519T060951Z.json. Probe evidence: raw/playwright/vendas-ci-create-probe.json. Screenshots: assets/screenshots/internal-invoice-ci-20260519T060951Z-01-create-page.png through assets/screenshots/internal-invoice-ci-20260519T060951Z-04-ci-list.png.