<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arif Hossen</title>
    <description>The latest articles on DEV Community by Arif Hossen (@arifhossen_dev).</description>
    <link>https://dev.to/arifhossen_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4196511%2Fdfe14381-b20d-4646-b4dc-25f47c9f13be.png</url>
      <title>DEV Community: Arif Hossen</title>
      <link>https://dev.to/arifhossen_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arifhossen_dev"/>
    <language>en</language>
    <item>
      <title>Designing a chart of accounts you can reconcile</title>
      <dc:creator>Arif Hossen</dc:creator>
      <pubDate>Wed, 21 Oct 2026 11:21:41 +0000</pubDate>
      <link>https://dev.to/arifhossen_dev/designing-a-chart-of-accounts-you-can-reconcile-1cl8</link>
      <guid>https://dev.to/arifhossen_dev/designing-a-chart-of-accounts-you-can-reconcile-1cl8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;What finance people mean by a ledger, and the modelling mistakes that make month-end hurt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Published 2026-10-15 by Arif Hossen&lt;br&gt;
Source: &lt;a href="https://arifhossen.dev/blog/designing-a-chart-of-accounts-you-can-reconcile" rel="noopener noreferrer"&gt;https://arifhossen.dev/blog/designing-a-chart-of-accounts-you-can-reconcile&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Where it started
&lt;/h2&gt;

&lt;p&gt;The finance team at an East African Islamic insurer started using the statements I had built in earnest, and they did not balance. The reports summed only the lowest-level accounts. They ignored balances carried forward from prior years. There was no retained-earnings line. And in this kind of insurer every one of those figures has to appear twice, once for the participants' pool and once for the shareholders' fund.&lt;/p&gt;

&lt;p&gt;A statement that does not balance is not a cosmetic bug for a finance head. It is a stop. Every one of those mistakes was in the model, not in the arithmetic.&lt;/p&gt;
&lt;h2&gt;
  
  
  One ledger, two sets of books
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Two funds
&lt;/h3&gt;

&lt;p&gt;An Islamic insurer keeps the participants' money and the shareholders' money apart. Not as a report filter, but as two sets of books that each have to balance on their own.&lt;/p&gt;

&lt;p&gt;So the fund is a property of the account, not of the posting. Every account belongs to exactly one fund. The same name can exist in both, each with its own code. Retained earnings exist once per fund. Business modules never name an account directly. They ask a mapping for salary expense or retained earnings in a given fund, so payroll and claims post to the right book without hard-coding a code.&lt;/p&gt;
&lt;h2&gt;
  
  
  Let the code carry the hierarchy
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Codes
&lt;/h3&gt;

&lt;p&gt;Account codes are generated, never typed. Seven digits, where the trailing zeros give the level.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1000000   assets (category root)
1100000   group
1110000   sub-group
1110001   postable leaf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Trailing zeros give the level&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Two rules follow from that, and both are enforced. A parent account cannot take postings, only leaves can. And an account that already has journal lines cannot be turned back into a parent: the save is refused with a reason.&lt;/p&gt;

&lt;p&gt;Those rules are what make the roll-up possible. If a parent can hold its own postings, its balance is no longer the sum of its children, and nobody can tell which number is right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the wrong entry impossible to post
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The ledger refuses
&lt;/h3&gt;

&lt;p&gt;The ledger accepts a journal only when it is approved, has a fund, and balances. An unbalanced entry is refused with a message naming the debit total, the credit total and the difference.&lt;/p&gt;

&lt;p&gt;Once posted, an entry is read-only. A mistake is corrected by a reversal: a mirror entry with a written reason, linked to the original, which stays visible. Nothing is edited after the fact.&lt;/p&gt;

&lt;p&gt;Time is controlled the same way. Each month is a period that closes itself after a grace window, locks after two months, and can be reopened only one step back, with approval. Journals, payments, purchase orders and payroll all check the period before they post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recoding a chart that already has history
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Changing it live
&lt;/h3&gt;

&lt;p&gt;Seven months in, finance needed seven-digit codes instead of six. By then the chart held real accounts with real postings.&lt;/p&gt;

&lt;p&gt;I shipped it as one reviewed change with three reversible conversions: one to convert the codes, one to fix parent codes the old format had left wrong, and one to fix leaves that pointed at the wrong sub-parent. The seeders moved to the new format in the same change, along with a seeder that loads the client's real chart, so test environments rehearsed against the real thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The statements were rebuilt, not patched
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What it cost
&lt;/h3&gt;

&lt;p&gt;The fix for the imbalance went into the calculation layer. Parent accounts roll up their children, prior years carry forward, retained earnings sit per fund, and a year-end close moves the result into them. Posted transactions were not touched. Over 1,100 lines of tests prove each parent equals the sum beneath it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The lesson I took: roll-ups, carry-forwards and retained earnings are not reporting features to add later. They are the model. I built journals and a ledger first and statements on top, and finance found the gap before I did.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>fintech</category>
      <category>chartofaccounts</category>
      <category>insurtech</category>
    </item>
  </channel>
</rss>
