Friday, 9 September 2016

Using KwaMoja for not for profit accounting - Part 2

According to the thread on the mailing list at the second thing that an NPO accounting system needs is a method of tracking expenses against donors and projects. Can this be done in KwaMoja? Yes, easily.

Expenses can occur in three different ways:
1 A direct payment to a person or organisation
2 A suppliers invoice being generated
3 Through a petty cash re-imbursement system.

Direct Payment System

In KwaMoja payments can be made against a general ledger code in any currency, and from any bank accounts. You can make a payment in USD from a EUR bank account whilst your main accounting currency is KES. KwaMoja will make the appropriate Exchange rate entries for you taking out the complexities.

As can be seen the payment can be tagged against any number of tags, from zero to many. So, in this case it is tagged to the research project the vehicle is used for, the donor who is financing it, and the vehicle the insurance is for. This means we can report against any of those tags, producing a report showing everything for that donor, a report for all the project receipts and payments, and a detailed costing report for each vehicle.

The double entry will be of the form:
Dr Expense account
       Cr Bank Account

Supplers Invoice

Secondly expenses for a project can come in via a suppliers invoice. Firstly the supplier is chosen and then you click the link to generate a supplier invoice.

Clicking on the general ledger button takes us to a new screen allowing us to enter the details of the expense.

Here you enter the GL code for the expense, the amount and as before, from zero to many tags for each line of the invoice.

Petty cash reimbursement system.

This is the preferred method for entering expenses incurred by employees of the organisation as it allows for close control over what is spent, authorisation at every level, and the tagging of expenses to particular projects and donors.


The Petty Cash module enables employees to submit expense claims directly into the system that can then be authorised by their immediate supervisor.
Petty cash expenses are controlled in a friendly way, enabling all employees (including those without accounting knowledge) to enter their expenses and get paid for them.
The Petty cash module uses a temporary GL table (pcashdetails), containing all information about payments and expenses entered as petty cash. When cash assignments or expenses are authorised by a supervisor, they are posted into the gltrans table and flagged.
Once any transaction in the petty cash system has been posted it cannot be modified, edited or deleted in any way. Once posted, that's it.

Setup General Parameters

Set up expenses

Definition of expenses allowed to be used in the Petty Cash system.

This table is used to isolate non-accountant users (most of workers/users of KwaMoja) from the technical details and names used in accounting. E.g.: Code Expense: VEHFUEL
So when the system posts a petty cash expense against expense code VEHFUEL, it will be posted against the GL account code 7600. You can define a default tag for this expense code, though it can be overridden when the actual expense is posted.

Set up types of tabs

Different kinds of users have different privileges. CEO can spend petty cash money on a different way than a truck driver does.

Set up expenses allowed for type of tab The link between types of tabs and expenses.

Here we need to define which expenses are allowed to a certain type of tab. This table is used to prevent users assigning expenses for expenses not allowed. as example, a user with role "member of parlament" could have a tab of a type "all allowed, including night drinks in a pub", while a user with role "hard worker" could have a tab of a type "transport to workplace" only, so the system can achieve a better control of each one's expenses.
This is where the organisation defines here policy of petty cash payments.

Set up tabs

A petty cash tab contains:
  • Tab Code
  • User: User of the tab. Who is spending/receiving moeny for petty cash expenses. Must be a KwaMoja user.
  • Type of tab: As previously defined
  • Currency: A tab will handle money in one currency only. So users allowed to spend in 2 or more currencies (e.g. international commercial team) will have 1 tab for each currency
  • Limit: Maximum amount the user can spend, to have a better control. Nowadays it only issues a warning of the supervisor, but can be coded to work differently (better)
  • Authoriser: User supervisor of the petty cash user. User authorising (or not) expenses done, checking money is spent wisely and asigning cash to users
  • GL Account For Cash Assignment: GL account where the cash assigment comes from. It must be a bank account, so when assigning cash to a tab, the system will deduct the amount from the bank account and increase the petty cash account
  • GL Account Petty Cash Tab. In GL we should have an account (one per currency) to reflect "amount of money distributed among employees" or "Petty Cash Account". This is the account where the money goes after a cash assigment is done or where the money comes where an expense is posted

At this point we have the system ready to work.


Assignment of cash

The supervisor (authoriser) gives money cash to an employee to be used as petty cash. In script PcAssignCashToTab.php we record this fact.
Supervisor can select only the tabs he/she is supervisor. Must specify amount, date. There are 2 additional fields:
  • Notes: For any further detail needed to remember
  • Receipt: In case the company has a physical receipt, or any proof, the code, number, etc of this receipt, to help solving disputes later on

At this stage no tranasction is posted in gltrans table, only at pcashdetails we write down: "Supervisor gives to user X (tab really), Y dollars on date D".
Cash Assignments can be edited and deleted before are authorised. Once authorised and posted can not be modified in any way.
Note this assignment can be at the end of the tab where the employee can be re-imbursed.

Expense claims

Employee will go out and spend money. Then will report to KwaMoja these expenses in script PcClaimExpensesFromTab.php
Employee will select a tab (from his/her own tabs). And then records details of all expenses incurred:
  • Date
  • Code of expense (from the list his/her tab is allowed depending on the type of tab involved)
  • Amount
  • Notes: For any further detail needed to remember
  • Receipt: In case the company has a physical receipt, or any proof, the code, number, etc of this receipt, to help solving disputes later on.

At this stage no tranasction is posted in gltrans table, only at pcashdetails we write down: "User U reports spending X amount in concept C on date D".
Expenses reported can be edited and deleted before are authorised. Once authorised and posted can not be modified in any way.

Expense authorisation

Supervisor will need to authorise expenses and cash assignemnts reported.

The supervisor must select a tab he/she is supervising
If there is any assignment or expense not authorised yet, it can be checked and if correct just tick it. If incorrect or in doubt (an employee claiming 10.000.000 USD for fuel car) he can call/email/report him and sort it out. Because it's not authorised yet it can be modified (to 100 USD...)
Once the update button is pressed and there are some entries ticked, then GL posting occurs.



All users must be KwaMoja users. So employees can login into KwaMoja only to claim / report their expenses, if allowed.

About advance payments

About advance payments or refunds, we always run "open tabs", so employees asks for money first, and later on they spend it (we hope in an appropriate manner) and then report expenses incurred. Any difference will be settled "next report" or "next cash assignment".
That's the idea keeping expense report and cash assignment separate, as it's flexible and fits all situations