ERP entries, categories and cost centers
Mapping to the management chart, sign, allocation and status
Monthly P&L with margins and EBITDA
Month-end close, budget vs actual and AI agent
What it solves
- The month's P&L builds itself and matches the number finance presents.
- Every real booked in the ERP lands on a management line, and anything unclassified shows up instead of disappearing.
- Accrual and cash stop being mixed in the same report.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- Finance ERP connected to Nekt (entries, categories and cost centers)
- Finance's management chart of accounts and the mapping from each ERP category to a P&L line
- One closed reference month to validate the number
What you get
- A table per entry and allocation, already classified on its management line
- The monthly P&L with margins, EBITDA and comparison with the previous month and the budget
- A to-do list of whatever still has no mapping
- An AI agent that answers about results using finance's rules
Where to activate
Monthly P&L with comparisons and the classification to-do list before closing.
Answers about results and margins using closed months only and finance's rules.
Notice when an entry lands in Unclassified or when a line deviates from budget beyond the limit.
The rules are well known, but the chart of accounts mapping has to be built once with finance and validated against a closed month. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
The ERP has entries with category, nature and status, but not the P&L leadership uses. Whoever sums by ERP category mixes accrual with cash, counts cancelled and replaced bills as expenses, multiplies values when opening allocations and treats transfers between accounts as results. The month closes with a margin different from the one finance presents, and nobody knows which is right.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
The P&L uses the entry's accrual date (or the bill's issue date). The cash flow uses the date of the actual settlement. They are two tables and two different questions, never added together. If the ERP has no reliable accrual date, choose which date replaces it (issue or due date), write the choice in the context document and keep the criterion every month.
Each ERP category points to a management line (gross revenue, deductions, costs, variable expenses, operating expenses, financial result) in a mapping table kept by finance, usually a connected spreadsheet. The P&L structure configured inside the ERP is often outdated or was never used. When there is an official P&L made by controllership or an outside consultancy, the automation reproduces that number and does not invent new criteria.
A new or unmapped category lands on an Unclassified line, visible in the P&L, and goes to a to-do list with amount and description. The transformation does not fail and does not drop the entry. The goal is a zero line at close.
Revenue positive, cost and expense negative, applied from the entry's nature (in Omie, R adds and P subtracts). If the column already comes signed, do not flip it again. The month's result is the sum of all lines for that accrual month.
An entry can be split across several categories and cost centers. Create one line per allocation with amount = entry amount x percentage / 100; a null percentage counts as 100%. The allocation lines must add back to the entry amount. Opening the category list without the percentage repeats the full amount on every line.
Cancelled is out. A renegotiated bill that the ERP zeroes and replaces with new installments is out, and the new installments are in. For expenses, actual is the paid amount, not the bill's total. Bill movements such as replacement, cancellation and rescheduling are not costs: only payment and advance count. Summing every operation type inflated paid expenses by 30% to 50% in real cases.
Transfers between own accounts, investments and redemptions, shareholder contributions, loans taken or repaid, advances and the corporate card bill payment change cash, but are not revenue or expense. They stay out of the P&L and appear only in the cash flow. Movements between bank and investment accounts must be computed per entry so both sides cancel out.
Define which system is the revenue source: the ERP, the billing system or the invoice. Payment gateways and platforms are collection channels and only serve as a check. Adding ERP revenue to gateway payments counts the same sale twice.
In retail and manufacturing, COGS is the cost of the items sold in the month (quantity sold x item cost), not the month's purchases, which go to inventory. In services, the cost of services follows the service's accrual month. Payment fees, commissions and freight are variable expenses and sit between gross margin and contribution margin.
Each month has a closed flag, set when finance finishes the close. Actuals, comparisons and board reports use closed months only; the open month is partial and labeled provisional. Once closed, the month is stored in a version that is not recalculated, and adjustments found later go into the month in which they were found.
The management P&L structure
Each ERP category points to one of these lines through finance's mapping.
Definitions
Pitfalls that already happened
The P&L structure configured in the ERP had the average cost line set to hidden and purchases tied to the cost line. Showing both would count cost twice.
Reproduce finance's official P&L and treat the ERP's only as a reference.
Entries with three or four categories were opened without the allocation percentage, and each category got the entry's full amount.
Use the allocation percentage and test that the lines add back to the entry amount.
Bill replacement and cancellation settlements were summed as payments, and paid cost per cost center came out 30% to 50% above the ERP report.
Count only payment and advance as paid expense.
Revenue came from one system and gateway payments were added to it, as if they were more revenue.
Declare the official revenue source and use the gateway only as a check.
The cost of services is booked after the month in which the service happened, and for about 30 days the current month's P&L showed low cost and a high margin.
Flag the month as provisional until close and compare closed months only.
Tax totals come at invoice level. Working at item grain, the invoice total repeated on every item and inflated deductions.
Sum invoice-level values at invoice grain, and only then join with items.
Acceptance test
The case is done when every item passes.
- For a closed month, net revenue, gross margin and EBITDA match finance's official P&L (difference below 0.5%).
- The allocation lines of each entry add up to the entry amount.
- The Unclassified line is zero, or every entry on it appears on the to-do list.
- No transfer between accounts, investment, contribution or loan appears on a result line.
- Rerunning the pipeline does not change any value in a month flagged as closed.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Management P&L (DRE) - The P&L is on accrual (accrual date or, if missing, <declared date>). Cash flow is by payment date and lives in another table. Never add the two views. - Structure: gross revenue, deductions, net revenue, COGS or cost of services, gross margin, variable expenses, contribution margin, operating expenses, EBITDA, financial result, profit before taxes. - Each ERP category goes to a line through finance's mapping. Unmapped categories go to Unclassified; mention that line whenever it is not zero. - Sign: revenue positive, cost and expense negative, applied once. - Allocation: amount x percentage / 100 per category and cost center; a null percentage counts as 100%. - Excluded from sums: cancelled, renegotiated bills that were replaced, replacement and cancellation settlements. - Transfers between accounts, investments, contributions and loans are not results. - Official revenue comes from <source>. The payment gateway only checks. - Use only months flagged as closed for actuals and comparisons. The open month is provisional and must be called that. - Margins and percentages: sum the period and divide once; never average monthly percentages. - If income taxes are not computed, say profit before taxes. Client exceptions: - <client>: the official P&L is the one from consultancy <name>; reproduce its number. - <client>: category <category> is allocated across business units by <driver>.
Build the "Automated P&L (DRE)" case in my Nekt workspace following the rules at https://academy.nekt.com/en/casos/dre-automatizada.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
One ERP connection per CNPJ (company tax ID), joined with a company column and with transfers between group companies eliminated.
The budget comes in as a table by month and management line, with the budget version frozen and its source declared.
The same model replicated per client, with each client's connection declared in the context document.