Analytical Cost Centers

v0.1.0

Multi-dimensional cost accounting across departments, projects, units, and tags with granular managerial P&L breakdown.

Analytical Cost Centers

While the General Ledger Chart of Accounts provides the legal structure for statutory reporting, managerial accounting requires deeper cross-sectional insights.

The Analytical Cost Center Service (ium()->accounting()->costCenters()) enables tagging journal voucher lines with analytical dimensions without expanding the core Chart of Accounts.


1. Supported Analytical Dimensions

In Obelawium Accounting, cost centers can represent:

  • Cost Centers / Departments: CC-ENG (Engineering), CC-MKT (Marketing), CC-HR (Human Resources).
  • Projects & Client Engagements: PRJ-ALPHA, PRJ-GOV-CONTRACT.
  • Geographic / Business Units: BU-NA (North America), BU-EMEA (Europe & Middle East).
  • Product Lines: PL-SAAS-CORE, PL-HARDWARE.

2. Managing Cost Centers

Cost centers are created with code, name, category, and optional parent linkage for hierarchical departmental roll-ups.

use Obelaw\Ium\Accounting\Data\CreateCostCenterDto;

// 1. Create a parent department
$engDept = ium()->accounting()->costCenters()->create(
    new CreateCostCenterDto(
        code: 'CC-ENG',
        name: 'Engineering & Technology',
        category: 'department',
        parentId: null
    )
);

// 2. Create sub-teams under Engineering
$cloudTeam = ium()->accounting()->costCenters()->create(
    new CreateCostCenterDto(
        code: 'CC-ENG-CLOUD',
        name: 'Cloud Infrastructure & DevOps',
        category: 'sub_department',
        parentId: $engDept->id
    )
);

3. Tagging Journal Voucher Lines

When drafting vouchers, individual debit or credit line items can attach an analytical dimension:

use Obelaw\Ium\Accounting\Data\CreateJournalEntryDto;

$dto = CreateJournalEntryDto::fromMajor([
    'entry_date'    => '2026-03-31',
    'currency_code' => 'USD',
    'memo'          => 'Cloud Infrastructure AWS Monthly Billing',
    'lines' => [
        [
            'account_code'     => '5210', // Cloud Hosting Expense
            'side'             => 'debit',
            'amount'           => 14200.00,
            'cost_center_code' => 'CC-ENG-CLOUD', // Analytical Dimension
            'memo'             => 'AWS us-east-1 compute cluster',
        ],
        [
            'account_code'     => '1111', // Bank Cash
            'side'             => 'credit',
            'amount'           => 14200.00,
            'memo'             => 'Direct Debit AWS',
        ],
    ],
]);

$voucher = ium()->accounting()->journalEntries()->createDraft($dto);

4. Managerial Reporting by Cost Center

Generate departmental profit-and-loss reports without complex joins:

$departmentPnl = ium()->accounting()->costCenters()->getIncomeStatement(
    costCenterCode: 'CC-ENG',
    periodId: $periodId
);

echo "Department: {$departmentPnl['cost_center_name']}\n";
echo "Total Operating Expenses: {$departmentPnl['total_expense_major']}\n";
dump($departmentPnl['expenses_breakdown']);