Skip to content
CRYSTAL ITIT Solutions
ERP & Management

Cost Accounting for Moroccan SMEs: Finally Know Where You Make Money and Where You Lose It

July 31, 20268 min read
Cost Accounting for Moroccan SMEs: Finally Know Where You Make Money and Where You Lose It

A company can be profitable overall and lose money every day on part of its business without knowing it. General accounting — mandatory, standardised, aimed at the tax administration and third parties — answers the question "how much?": how much revenue, how much expense, how much profit. It does not answer the question "where?": where the margin is made, which activity subsidises the other, which customer mobilises more resources than it brings in, which project has overrun and by how much. That is the role of cost accounting, and it is probably the most under-used management tool in Moroccan SMEs — often because it is imagined as reserved for large groups and their management controllers. Wrongly: integrated into a modern ERP, cost accounting is set up with a few well-chosen dimensions and largely automatic allocation, without weighing down daily entry. This guide explains what it is concretely for, how to choose your dimensions, how to automate it in a tool like Crystal ERP (erp.crystalit.ma), and the mistakes that make it fail.

General and cost accounting: two different questions

General accounting classifies operations by nature: purchases, salaries, rent, sales. It produces the balance sheet and the income statement, indispensable but global documents — the result they show is the sum of all activities, the good and the bad alike. Cost accounting reclassifies the same operations by destination: which activity does this expense serve, which department does this revenue come from, which project does this working time benefit. No additional entries: one extra dimension on the existing entries.

This change of angle changes decisions. A trader discovers that his retail business, the historic storefront, actually lives at the expense of his wholesale business; a service provider finds that his biggest customer, once the time actually spent is counted, generates an almost zero margin; a construction company sees, project by project, which ones kept to their budget and which ones ate the others' margin (Construction and Project Management Software in Morocco). Without cost accounting, these realities remain invisible: the overall result averages them out. With it, every decision — pricing, commercial priorities, dropping or developing an activity — rests on figures instead of impressions.

  • General accounting answers "how much?"; cost accounting answers "where?" — two questions, one set of entries.
  • The overall result averages profitable and loss-making activities: it can hide lasting losses.
  • Margin by activity, profitability by customer, cost by project: the three classic revelations of cost accounting.
  • No legal obligation: cost accounting is an internal steering tool, free in its design.
  • The prerequisite for any decision on pricing, commercial priority or dropping an activity.

Choosing your analytical dimensions: the decision that conditions everything

An analytical dimension is a reading grid: by activity, by site, by project or job, by customer or customer family, by product or product family. The temptation is to want many; experience recommends choosing few — two, rarely three — and choosing them starting from the decisions to enlighten, not from the theoretical richness of the breakdown. If the strategic question is "is retail profitable compared with wholesale?", the dimension is the activity. If the company lives on projects, the dimension is the project. If it has several sites or warehouses, the dimension is the site (Managing Several Companies and Several Sites in One ERP).

Each dimension must pass a simple test: can the vast majority of expenses and revenues be assigned to its sections without fooling yourself? A relevant dimension has clear sections, stable over the year and in reasonable number — five activities, fifteen jobs in progress, three sites — rather than a labyrinth of codes nobody knows how to use after six months. Structural costs (head-office rent, management salaries, professional fees) that do not naturally attach to any section are accepted as such: they are grouped and spread using a simple, documented key — or left in "structure", which is often more honest than sophisticated allocations that give an illusion of precision.

  • Start from the decisions to enlighten, not from the theoretical breakdown: the dimension follows the strategic question.
  • Two well-kept dimensions are worth more than four half-filled ones.
  • Clear, stable sections in reasonable number: a code everyone knows how to pick without hesitating.
  • Accept structural costs: a simple, documented allocation key, or a dedicated "structure" section.
  • Review the dimensions once a year, not at every new reporting request.

Automating allocation: cost accounting without weighing down data entry

The classic failure of cost accounting fits in one sentence: "you now have to fill in one more code on every entry". If allocation relies on everyone's memory and goodwill, it will be incomplete, inconsistent, then abandoned. The answer is automation at the source: in an integrated ERP, most operations know where they come from, and therefore where they should be allocated. A sales invoice carries its customer, its site, its job: its entries inherit these dimensions without any keying. A purchase order attached to a project allocates its costs to the project. A stock issue for a project follows the project. Product, customer and job records carry default allocations that the user only changes by exception.

That is the strength of cost accounting integrated into the ERP compared with cost accounting rebuilt in spreadsheets at the end of the quarter: allocation happens as you go, where the information exists, not after the fact when nobody remembers. In Crystal ERP (Crystal ERP), the analytical dimensions run through the whole flow — quote, order, delivery, invoice, accounting entry — and margin statements by dimension can be consulted continuously rather than at the close. All that remains to allocate manually is what is genuinely ambiguous: a few bank or journal entries per month, a volume an accountant absorbs without thinking about it (Accounting software in Morocco).

  • Allocation at the source: the invoice, the order and the stock issue inherit their job, site or activity.
  • Default allocations on product, customer and job records — changed by exception only.
  • As you go, never after the fact: nobody remembers in April where a January expense belonged.
  • The end-of-quarter spreadsheet is the symptom of poorly tooled cost accounting.
  • Only the genuinely ambiguous is left to key manually: a few entries per month.

Exploiting cost accounting: margins, profitability and decisions

Cost accounting in place produces three families of lessons. Margins by activity, first: revenue, direct costs and contribution of each branch — the statement that reveals cross-subsidies between activities and grounds decisions to develop or refocus. Profitability by customer or by job, next: by including the real cost to serve — time spent, deliveries, credit notes, late payments —, some "good customers" with flattering revenue turn out to be mediocre contributors, and vice versa; enough to renegotiate terms with full knowledge. Budget tracking by section, finally: each site, department or project manager compares actuals to budget, month after month (Budget Management Software for SMEs in Morocco).

Exploitation benefits from being ritualised: a margin statement by dimension in management's monthly dashboard, a quarterly review of customer profitability with the sales team, a review of each job at its close — planned versus actual, and lessons for the next quotes. With CRYSTAL IA integrated into Crystal ERP, this exploitation becomes conversational: asking for "the trading activity's margin for the quarter" or "the five least profitable jobs of the year" in natural language dispenses with building reports, and puts cost accounting directly in the director's hands without an intermediary (Business dashboard in Morocco: managing your company in real time).

The mistakes that make cost accounting fail — and how to avoid them

Four mistakes recur systematically. The first: too many dimensions, too many sections — an analytical plan with forty codes nobody knows how to use produces wrong data with an air of precision; two irreproachable dimensions are better. The second: allocation after the fact — reconstructing at the end of the quarter what should have been entered as you go; it is the sign that the tooling is inadequate, not that the teams lack rigour. The third: byzantine allocation keys — spreading the head-office rent according to a sophisticated blend of floor area and headcount adds nothing a simple key does not already provide; decorative precision costs time and enlightens no decision.

The fourth mistake is the most expensive: producing figures and doing nothing with them. Cost accounting that changes neither a price, nor a commercial priority, nor a project organisation is a cost with no return. The antidote lies in the ritual mentioned above — regular meetings where the analytical figures are examined and followed by decisions — and in management's leading by example, as with any adoption of a management tool (Change Management: Getting Your Teams to Adopt Your New ERP). Well conducted, cost accounting becomes on the contrary the best-yielding management investment of an SME: a few days of design, automated allocation, and decisions finally grounded in the reality of margins.

  • Two irreproachable dimensions rather than four approximate ones.
  • Allocation as you go through the ERP, never end-of-quarter reconstruction.
  • Simple, documented allocation keys — decorative precision is a trap.
  • Figures followed by decisions: prices, priorities, organisation — otherwise cost accounting is just a cost.
  • A monthly management ritual where margins by dimension are examined, discussed, decided.

Cost accounting answers the question general accounting leaves open: where does the company make money, where does it lose it? For a Moroccan SME, setting it up requires neither a management controller nor a bureaucratic machine: two dimensions chosen from the decisions to enlighten, clear sections, allocation automated at the source by the ERP, and a management ritual that turns figures into decisions. Crystal ERP (erp.crystalit.ma), developed by CRYSTAL IT in Rabat with more than 20 years of experience, carries the analytical dimensions throughout the management flow — from quote to accounting entry — and CRYSTAL IA makes them queryable in natural language: the margin by activity, the profitability of a customer or a project's actuals are obtained in a single question. Contact the CRYSTAL IT team to define the two dimensions that will best enlighten your own decisions.

Have a project or a question? Let's talk with a CRYSTAL IT expert.

Request a demo