Each company's ERP: entries, allocations and categories
Union with a company column, allocation, sign and intercompany elimination
P&L by accrual month, per company and for the group
Month-end close, AI agent and results meeting
What it solves
- The group P&L comes from every company in the ERP at once, including the ones added later.
- Transfers and loans between group companies stop inflating revenue and expenses.
- Each company still matches the P&L in its own ERP.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- Each group company connected to Nekt through its ERP (Omie, Conta Azul or Sankhya)
- The list of group companies as they appear in the counterparty name
- The mapping from ERP category to management account
What you get
- A consolidated management ledger, one row per entry, allocation and company
- P&L by accrual month, per company and consolidated, with intercompany eliminated
- An AI agent that answers questions about results using the group's rules
- KPIs that match the P&L by construction
Where to activate
P&L per company and consolidated, published at every close, with the month flagged as provisional until the cutoff.
Answers about results, margin and transfers with the intercompany list and the mapping already applied.
KPIs derived from the same P&L, so the number in the presentation matches the ledger.
Combining the companies is mechanical. The work is in the management account mapping and the list of intercompany counterparties. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
Omie and Conta Azul have one account per company, and each account becomes a set of tables with its own prefix. The group P&L requires combining all of them, exploding the category allocation, applying the sign once and removing transfers between group companies. Anyone who identifies intercompany by the entry description or with a rigid name pattern lets transfers through as operating expenses and delivers a margin the board does not recognize.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
Each company is its own connection and generates tables with its own prefix. Combine them all with UNION ALL and a company (or source) column filled with the name. Discover the companies from the table catalog (INFORMATION_SCHEMA) instead of a fixed list, so a new company comes in on its own. Sandbox accounts stay out.
A category id is only valid within its company. Join entry and category by id and by company. The same applies to cost center, bank account and customer.
An entry can be allocated across several categories and cost centers (in Conta Azul, evento.rateio; in Omie, the allocation percentage and the departments array). Generate one row per allocation, with amount = entry amount x percentage / 100; a null percentage counts as 100%. In Conta Azul, the allocation's valor_bruto can be null in old records: use valor.
Revenue positive, costs and expenses negative. In Omie, natureza R = +1 and P = -1; if the column already comes signed, do not flip it again. The month's result is the sum of all rows in the accrual month.
Intercompany is identified only by the counterparty name (customer on revenue, supplier on expenses), uppercased, against a list of patterns for the group companies. Write patterns that tolerate spaces and variations, such as an acronym with and without a space before the number. A loan paid by a group company is also intercompany, never an operating expense.
A transfer appears as revenue in one company and as an expense in the other. In the consolidated view, intercompany revenue comes out of gross revenue (gross revenue minus intercompany = group net revenue) and the matching expense comes out of costs and expenses. In the per-company view, it still appears.
The P&L uses the accrual date. Cash flow uses the payment date of actual settlements. When the ERP has no accrual date on the bill, state which date stands in and keep that criterion.
Each ERP category points to a management account and a group (gross revenue, deductions, costs, operating expenses, financial result) in a mapping table per company. A category without a mapping falls into an unclassified line, which shows up in the P&L and never disappears.
In Conta Azul, RENEGOTIATED comes with a zero total and is replaced by the new installments; canceled is excluded. For Conta Azul expenses, the actual amount is the pago field, not total. Automatic bank statement entries (Pix, fees, interest income) have no counterparty and are never intercompany.
Consolidated P&L structure
By accrual month. Intercompany comes out before net revenue.
Definitions
Pitfalls that already happened
The intercompany rule looked for the acronym attached to the number. Two companies registered with a space slipped through as operating expenses, a six-digit amount over the period.
Use space-tolerant patterns and test every company on the list.
Omie stores the financial summary date as a UTC timestamp at 03:00. Converting without a time zone worked by coincidence, and any record before 3 a.m. would land on the previous day.
Convert explicitly to America/Sao_Paulo.
One company's summary showed receivables and payables at zero while the bills table showed a significant overdue portfolio.
From the summary, use only the balance; check the totals against the bills.
In a group where the service cost is booked to the service month and paid the following month, the current month's P&L showed low costs and a high margin for about 30 days.
Flag the month as provisional until the close at D+30.
In a BPO firm, each client has its own ERP connection. A query used another client's connection and mixed portfolios.
Write in the context document which connection belongs to each client.
With no budget spreadsheet connected, the budget was generated as the average of the last 12 months plus a margin and came to be read as a target.
Flag the budget source and replace it with the real spreadsheet as soon as it is connected.
Acceptance test
The case is done when every item passes.
- For a closed month, each company's revenue and expenses match the P&L in its own ERP (difference below 0.5%).
- Eliminated intercompany revenue equals eliminated intercompany expense in the same month, or the difference is explained by accrual timing.
- No entry with a group counterparty appears in consolidated operating expenses.
- The sum of the allocation rows for each entry equals the entry amount.
- Every company in the catalog appears in the consolidated base, and no sandbox account does.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Group consolidated P&L - Group companies: <list>. Each one has tables with its own prefix in the <Omie/Conta Azul> ERP. Every question about "the group" uses the union of all of them, with the company column. - Entry and category are joined by id and company. - Allocation: one row per category and cost center; amount = amount x percentage / 100; null percentage = 100%. - Sign: revenue positive, costs and expenses negative, applied once. - Intercompany = counterparty (customer on revenue, supplier on expenses) that matches <patterns>, compared uppercased and tolerant of spaces. Never by description. - In the consolidated view, eliminate intercompany revenue and expense. In the per-company view, show them. - P&L by accrual date; cash by payment date of settlements. - Exclude renegotiated and canceled statuses. For Conta Azul expenses, use pago. - A category without a mapping appears as unclassified. - Omie financial summary dates are in UTC: convert to America/Sao_Paulo. - The current month is provisional until D+<N>. Per-client exceptions: - <client>: this client's ERP connection is <connection>; never use another client's. - <client>: a loan paid by company <company> to the group is intercompany. - <client>: service cost identified by <rule>, except for the managing partners, who are operating expenses.
Build the "Consolidated P&L across multiple companies" case in my Nekt workspace following the rules at https://academy.nekt.com/en/industrias/financeiros/dre-consolidado-multiempresa.md. 1) Find the source tables and confirm the columns the rules use. 2) Create a transformation at the stated grain applying every rule. 3) Run the acceptance test and show me the result of each item. 4) Create the case's context document in the workspace, leaving my clients' exceptions open for me to fill in.
Variations
Gateway statement against the settlement in the ERP, matched 1 to 1 by receipt date and gross amount; status matched (difference up to R$ 1.00), divergent or one side only.
Today's consolidated balance plus inflows by expected date minus outflows, with the lowest point and the week it happens; manual adjustments always explicit.
For BPO firms: the same model of entries, P&L, cash, bills and KPIs per client, with the management account mapping as the only custom part.