1. Home
  2. Docs
  3. Accounting
  4. A Possible Accounting Spe...
  5. 8.Database changes

8.Database changes

8.1        Chart of Accounts Table (acc_coa)

Table stores the “Chart of Accounts” for an organization.

Column NameData TypeDescription
idint
gl_codevarchar(45)
categoryvarchar(45)Whether the account falls under “asset”, “income”, “expense”, “liability” or “equity”
parent_IdintReferences “id” of table “m_acc_coa”. For enabling a hierarchical COA
namevarchar(45)
typevarchar(45)Either “header” or “detail” account. Header accounts will not have transactions logged against them
descriptionvarchar(500)
disabledBooleanA Flag indicating if the account has been disabled (not deleted). No more manual entries can
be posted against a disabled Account
manual_entries_allowedBoolean
Flag indicates if manual Journal entries can be passed against this account

8.2         Modifications to Loan Product (“m_product_loan”)

Table stores the “Chart of Accounts” for an organization.

Column NameData TypeDescription
accounting_rulevarchar(45)The type of accounting required. Either “none”, “cash” or “accrual”
*Selecting none would disable posting of all accounting transactions

8.3         Mapping Loan product to Chart of accounts  (acc_product_coa_mapping)

The table maps the GL codes used by a particular loan/saving product. 

Column NameData TypeDescription
idint
acc_idintForeign Key to acc_coa
product_idintreference to either Loan or Saving product
product_typevarchar(45)“loan” or “saving”
financial_account_typevarchar(45)Name of a financial Account Type
Ex: ” Cash”, “Interest on Loan”

8.4.Journal Entries (acc_journal_entry)

Table stores all journal entries generated in the system (either created automatically by the system or those created manually).

Column NameData TypeDescription
idPrimary key for the entry
coa_idintForeign key to the Chart of Accounts Table
entry_dateDATE TIMEThe entry date for the journal entry (can be backdated to any date etc)
batch_idvarchar(45)Batch key for the entry, could be a UUID generated by Java.Used to link together a set of related Journal entries
typevarchar(45)Whether the entry is a debit or a credit
amountFloat
descriptionvarchar(500)user notes for manual entries
branch_idBranch with which this entry is associated
reversal_idForeign key to another journal entry which reversed this journal entry (id column of acc_journal_entry)
is_reversedBooleanFlag indicating if the Journal entry is reversed (an entry can be reversed only once)
entity_typevarchar(45)“Loan” or “Savings” account for system generated entries. Null for manual entries
entity_idintNullable foreign key to a loan or savings account
system_generatedBooleanFlag indicating whether the entry was logged automatically by the system
created_dateDateAudit feild to indicated the actual date on which the entry was posted into the system
created_byvarchar(45)Foreign key to user who created the Entry (for manual entries)

8.5.Branch accounts closure (acc_closure)

Table stores details of all branches and dates for which all Journal entries have been closed.

Column NameData TypeDescription
IdInt
closing_dateDATE
office_idIntId of the office for which the closure date is applicable 
created_byvarchar(45)
created_dateDATE
last_updated_dateDATE

How can we help?