416
Ledger & statements
Cash flow statement
Direct method, 1 Jan 2026 - 9 Nov 2026
Opening cash
2,270,000.00
Operating
2,355,921.65
Investing + financing
414,800.00
Closing cash
5,040,721.65
| Cash at the start of the period | 2,270,000.00 |
| Operating activities | |
| Accounts receivable (cash in) | 9,998,800.47 |
| Salaries and wages (cash out) | -5,313,000.00 |
| Accounts payable (cash out) | -2,586,893.44 |
| Training income (cash in) | 394,200.00 |
| Software sales (cash in) | 262,220.00 |
| Social security contributions (cash out) | -157,500.00 |
| Withholding tax prepaid (cash out) | -137,005.30 |
| Travel (cash out) | -126,480.00 |
| Withholding tax payable (cash in) | 61,518.70 |
| Output VAT (cash in) | 45,949.40 |
| Foreign exchange gain (cash in) | 45,028.29 |
| Interest expense (cash out) | -36,500.00 |
| Office supplies (cash out) | -34,460.00 |
| Foreign exchange loss (cash out) | -32,662.37 |
| Cost of services (cash out) | -28,370.00 |
| Interest income (cash in) | 10,240.00 |
| Bank charges (cash out) | -4,766.00 |
| Input VAT (cash out) | -4,398.10 |
| Net cash from operating activities | 2,355,921.65 |
| Investing activities | |
| Computer equipment (cash out) | -256,800.00 |
| Office equipment (cash out) | -128,400.00 |
| Net cash from investing activities | -385,200.00 |
| Financing activities | |
| Long-term bank loan (cash in) | 800,000.00 |
| Net cash from financing activities | 800,000.00 |
| Net change in cash | 2,770,721.65 |
| CASH AT THE END OF THE PERIOD | 5,040,721.65 |
Cash in and out by month
Cash inCash out
| Month | In | Out | Net |
|---|---|---|---|
| Jan 2026 | 52,911 | 731,869 | -678,959 |
| Feb 2026 | 2,075,805 | 790,024 | 1,285,781 |
| Mar 2026 | 1,631,987 | 843,992 | 787,994 |
| Apr 2026 | 856,144 | 1,050,358 | -194,213 |
| May 2026 | 1,605,451 | 891,897 | 713,554 |
| Jun 2026 | 1,818,226 | 1,291,531 | 526,695 |
| Jul 2026 | 527,441 | 841,327 | -313,886 |
| Aug 2026 | 1,704,366 | 865,397 | 838,970 |
| Sep 2026 | 1,268,681 | 1,007,959 | 260,723 |
| Oct 2026 | 394,606 | 850,544 | -455,938 |
Monthly in/out also counts transfers between your own bank accounts (they cancel out in the net).
How this works - feature 416 Where the cash came from and where it went.
Concepts
- Direct method from the ledger: in an entry that touches a cash account, the other lines explain the movement.
- Each account has a cf_class: OPERATING, INVESTING (fixed assets) or FINANCING (loan, capital).
- Transfers between two cash accounts have no other line, so they do not appear - as it should be.
- A bill payment only shows Accounts payable, so the query looks through the bill: paying for laptops is investing.
- Opening cash + net change = closing cash = the cash balance on the balance sheet.
Read the code
service/ReportService#cashFlow
SQL behind this page
WITH cash_entries AS (
SELECT DISTINCT entry_id FROM v_ledger WHERE is_cash = 1
), moves AS (
SELECT COALESCE(ba.cf_class, l.cf_class) AS cf_class,
COALESCE(ba.id, l.account_id) AS account_id,
COALESCE(ba.code, l.account_code) AS account_code,
COALESCE(ba.name, l.account_name) AS account_name,
l.credit - l.debit AS amount
FROM v_ledger l
JOIN cash_entries c ON c.entry_id = l.entry_id
JOIN account la ON la.id = l.account_id
LEFT JOIN bill_payment bp ON l.source_type = 'BILL_PAYMENT' AND la.system_role = 'AP' AND bp.payment_no = l.source_ref
LEFT JOIN bill b ON b.id = bp.bill_id
LEFT JOIN account ba ON ba.id = b.account_id AND ba.cf_class <> 'OPERATING'
WHERE l.is_cash = 0 AND l.source_type <> 'OPENING'
AND l.entry_date BETWEEN :from AND :to
)
SELECT cf_class, account_id, account_code, account_name, SUM(amount) AS amount
FROM moves
GROUP BY cf_class, account_id, account_code, account_name
HAVING SUM(amount) <> 0
ORDER BY cf_class, ABS(SUM(amount)) DESC