A money in money out thing

v2.1.9 2017-12-15 19:31 UTC

This package is auto-updated.

Last update: 2021-12-04 15:36:25 UTC


Build Status Code Coverage Scrutinizer Code Quality
A simple service for storing money in and money out.


Install the package using composer:

composer require delboy1978uk/expenses

Database Setup

Create a migrant-cfg.php based on vendor/delboy1978uk/common/migrant-cfg.php.dist and add delboy1978uk/expenses in the packages section. Then run:

migrant migrate

Common Package Registration

Expenses works with delboy1978uk/common, which has a Doctrine Entity Manager and a Pimple DIC. Register with the Del\Expenses\ExpensesPackage to the container.

use Del\Common\ContainerService;
use Del\Expenses\ExpensesPackage;

$package = new ExpensesPackage();

The Expenses Service

$container = ContainerService::getInstance()->getContainer();
$svc = $container['service.expenses'];

Service Methods



There are three types of entity, which all extend abstract class Entry, Income, Expenditure, and Expense Claim. Income and Expenditure are enough for a sole trader, someone with a limited company can use a ExpenseClaim entity to make an Expenditure that came out your own pocket that you can claim back from the business. All in order to figure out your taxable pay. An EntryInterface has the following methods:



Searching the DB is simple using a Criteria object:

use Del\Expenses\Criteria\EntryCriteria;

$criteria = new Criteria();
$criteria->setType('IN'); // also OUT or CLAIM

$results = $svc->findByCriteria($criteria);