Finance

Finance

The financial position of the business in one screen, and the reports behind it.

Last updated 2026-10-13

DigitalKey ERP — Docs · digital-key.co/docs/finance

Requires subscriptionfinance.view3,000 IQD / month

Overview

Where the dashboard answers “how is trading today”, finance answers “is the business actually making money”. Every figure is for a period you choose.

Finance — Finance summary
Finance summary
Finance summary — Revenue, cost of goods, profit, receivables and payables for the selected period.

The summary

GET /api/v1/finance/summary
ParameterTypeRequiredDescription
periodstringOptionalThe period being reported on.
from_datedateOptionalStart of the period.
to_datedateOptionalEnd of the period.
revenuedecimalOptionalValue of everything sold in the period, less returns made in the period.
cogsdecimalOptionalCost of goods sold — what those items cost you at the moment each was sold, less the cost of goods returned.
gross_profitdecimalOptionalRevenue less cost of goods.
total_expensesdecimalOptionalExpenses recorded in the period.
net_profitdecimalOptionalGross profit less expenses. The bottom line.
invoice_countintegerOptionalNumber of invoices in the period.
total_receivablesdecimalOptionalMoney owed to you by customers.
total_payablesdecimalOptionalMoney you owe suppliers.
cash_collecteddecimalOptionalCash actually received in the period.
inventory_valuedecimalOptionalValue of stock on hand, at today's average cost.

What the figures count

Finance, the reports and the dashboard all follow the same rules, so the same period gives the same answer on every screen.

ParameterTypeRequiredDescription
A saleruleRequiredA POS sale or a completed sales order that is not void. A draft, pending or approved order is not revenue and carries no cost.
ReturnsruleOptionalReduce revenue and cost of goods in the period the return happened — never the period of the original sale.
Cost of goodsruleOptionalThe cost frozen on each line when it was sold. Changing a product's cost later does not rewrite past profit.
DamageruleOptionalA loss in profit and loss, but not cash going out.
Landed costsruleOptionalThe share for goods still in stock raises their cost; the share for goods already sold is an expense.
CurrencyruleOptionalEverything is in the business's main currency. Showing one invoice in another currency is display only and is never read here.
Warningrevenue and cash_collected are different numbers and both matter. Revenue counts what you sold; cash collected counts what you were actually paid. Sell heavily on credit and revenue can look healthy while very little money has arrived.

Receivables and payables

These are the two sides of what is outstanding. Receivables come from postpaid sales; payables come from buying on credit.

Requires subscriptionfinance.debts2,000 IQD / month
TipCompare the two. Receivables far above payables means you are financing your customers — chasing collections will do more for cash than raising prices.

Monthly trend

GET /api/v1/finance/monthly-trend
ParameterTypeRequiredDescription
monthstringOptionalThe month, as yyyy-MM.
revenuedecimalOptionalRevenue that month.
cogsdecimalOptionalCost of goods that month.
expensesdecimalOptionalExpenses that month.
profitdecimalOptionalNet profit that month.

The ledger

The ledger is your cash book: every movement of money in the period, one row each, newest first, with the balance after each one. It is the Cash Flow report itemised — its money in and money out are the Cash Flow totals for the same period, so when a cash figure looks wrong, this is where you find the sale, payment or expense behind it.

Opening balance + money in − money out = closing balance. Filtering by type or searching narrows the rows but never changes the balance column: it is always the real cash after that row.

ParameterTypeRequiredDescription
SaleinOptionalWhat was paid at the till, or when a sales order completed.
Customer paymentinOptionalA customer settling their debt.
RefundoutOptionalMoney handed back on a return of a paid sale.
PurchaseoutOptionalWhat was paid when the purchase was recorded.
Supplier paymentoutOptionalA later payment to a supplier, on the day it was made.
Landed costoutOptionalCustoms or freight carried into stock (the share expensed shows as an expense).
ExpenseoutOptionalAny expense except a damage write-off.
NoteCredit sales, refunds on credit sales and damaged stock are not in the ledger — no money moved. They change what is owed, or what you own, not the cash.

In this section