Skip to main content

Opening Entry

Record the initial state of a company's books by listing all assets and liabilities at the start of operations (or the start of a new fiscal year). Ohada Lib automatically routes each item to the correct SYSCOHADA account and calculates the equity (capital) as the balancing figure.

In accounting, this journal entry is called A-Nouveaux or Journal d'Ouverture. Every opening entry must be perfectly balanced:

Debit (Assets) = Credit (Liabilities) + Credit (Capital)

Types Reference

OpeningEntryInput

interface OpeningEntryInput {
date?: Date;

// ── Debit side (Assets) ──────────────────────────────────
fixedAssets?: OpeningFixedAsset[]; // Immobilisations — Class 2
stocks?: OpeningStock[]; // Stocks — Class 3
receivables?: OpeningReceivable[]; // Receivables — Class 4
bank?: number; // Account 5211
cash?: number; // Account 5711
mobileMoney?: number; // Account 5141 (Orange Money, MTN MoMo…)

// ── Credit side (Liabilities) ────────────────────────────
liabilities?: OpeningLiability[];
}

OpeningFixedAsset

interface OpeningFixedAsset {
label: string; // e.g. "MacBook Pro", "Camion Isuzu"
type: FixedAssetType; // See table below
amount: number; // Net book value (valeur nette comptable)
}

OpeningStock

interface OpeningStock {
label: string;
type: StockType; // See table below
amount: number; // Total value at cost price
}

OpeningReceivable

interface OpeningReceivable {
label: string;
type: ReceivableType; // See table below
amount: number;
}

OpeningLiability

interface OpeningLiability {
label: string;
type: LiabilityType; // See table below
amount: number;
}

Account Mapping

Fixed Assets (FixedAssetType)

TypeAccountDescription
PATENT_LICENSE212Brevets, licences, concessions
SOFTWARE2183Logiciels et sites internet
INTANGIBLE_OTHER21Autres immobilisations incorporelles
LAND22Terrains
COMMERCIAL_BUILDING2313Bâtiments commerciaux et industriels
RESIDENTIAL_BUILDING2314Bâtiments d'habitation
INDUSTRIAL_EQUIPMENT241Matériel et outillage industriel
AGRICULTURAL_EQUIPMENT243Matériel agricole
OFFICE_EQUIPMENT2441Matériel de bureau
COMPUTER_EQUIPMENT2444Matériel informatique (PC, imprimantes…)
OFFICE_FURNITURE2445Mobilier de bureau
PASSENGER_VEHICLE2451Véhicules de tourisme
UTILITY_VEHICLE2452Véhicules utilitaires, camions
FINANCIAL_ASSET27Immobilisations financières (titres, prêts)

Stocks (StockType)

TypeAccountDescription
MERCHANDISE3111Marchandises
RAW_MATERIALS3211Matières premières
FINISHED_GOODS3411Produits finis
PACKAGING3611Emballages commerciaux
OTHER_SUPPLIES3811Autres approvisionnements

Receivables (ReceivableType)

TypeAccountDescription
CUSTOMER4111Clients
SUPPLIER_ADVANCE4091Avances versées aux fournisseurs
TAX_CREDIT4717Créances fiscales et sociales
OTHER_RECEIVABLE4721Débiteurs divers

Liabilities (LiabilityType)

TypeAccountDescription
SUPPLIER4011Fournisseurs (dettes opérationnelles)
BANK_LOAN1621Emprunts auprès d'établissements de crédit
OPERATING_CREDIT1622Crédits de trésorerie à court terme
OTHER_DEBT4711Créditeurs divers

Cash & Equivalents (direct fields)

FieldAccountDescription
bank5211Solde bancaire
cash5711Caisse (espèces)
mobileMoney5141Mobile Money (Orange Money, MTN MoMo…)

Usage

Minimal — cash only

const ohada = new Ohada();

const entry = ohada.recordOpeningEntry({ cash: 500000 });
// 1 debit line: 5711 debit 500 000
// 1 credit line: 1011 credit 500 000 (capital)

Standard scenario

const entry = ohada.recordOpeningEntry({
fixedAssets: [
{ label: "Camion Isuzu", type: 'UTILITY_VEHICLE', amount: 1500000 },
{ label: "Mobilier bureau", type: 'OFFICE_FURNITURE', amount: 2000000 },
],
stocks: [
{ label: "Stock marchandises", type: 'MERCHANDISE', amount: 300000 },
],
cash: 500000,
liabilities: [
{ label: "Fournisseur ACME", type: 'SUPPLIER', amount: 1500000 },
],
});

// Assets = 1 500 000 + 2 000 000 + 300 000 + 500 000 = 4 300 000
// Debts = 1 500 000
// Capital = 4 300 000 - 1 500 000 = 2 800 000 → credited to 1011

Full scenario — all asset categories

const entry = ohada.recordOpeningEntry({
fixedAssets: [
{ label: "MacBook Pro", type: 'COMPUTER_EQUIPMENT', amount: 800000 },
{ label: "Toyota Hilux", type: 'PASSENGER_VEHICLE', amount: 3000000 },
{ label: "Local commercial", type: 'COMMERCIAL_BUILDING',amount: 5000000 },
],
stocks: [
{ label: "Stock de départ", type: 'MERCHANDISE', amount: 2000000 },
],
receivables: [
{ label: "Client Entreprise X", type: 'CUSTOMER', amount: 450000 },
],
bank: 1200000,
cash: 100000,
mobileMoney: 50000,
liabilities: [
{ label: "Fournisseur Début", type: 'SUPPLIER', amount: 600000 },
{ label: "Emprunt BNI 5 ans", type: 'BANK_LOAN', amount: 4000000 },
],
});

// Total assets = 12 600 000
// Total liabilities = 4 600 000
// Capital = 8 000 000 → credited to 1011

Deficit scenario

When total liabilities exceed total assets, the shortfall is debited to account 1311 (Report à nouveau débiteur) instead:

const entry = ohada.recordOpeningEntry({
cash: 1000,
liabilities: [
{ label: "Emprunt impayé", type: 'BANK_LOAN', amount: 5000 },
],
});

// Assets = 1 000 / Liabilities = 5 000
// Capital = -4 000 → debited to 1311

Capital Calculation Logic

SituationResultAccount
Assets > LiabilitiesCredit the difference1011
Assets < LiabilitiesDebit the difference1311
Assets = LiabilitiesNo equity line added

Parameter Reference

ParameterTypeRequiredDescription
dateDateEntry date (defaults to today)
fixedAssetsOpeningFixedAsset[]Immobilisations — Class 2
stocksOpeningStock[]Stocks — Class 3
receivablesOpeningReceivable[]Receivables — Class 4
banknumberBank balance — Account 5211
cashnumberCash on hand — Account 5711
mobileMoneynumberMobile money — Account 5141
liabilitiesOpeningLiability[]Supplier debts, loans, other