Download the PHP package byrokrat/accounting without Composer
On this page you can find all versions of the php package byrokrat/accounting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byrokrat/accounting
More information about byrokrat/accounting
Files in byrokrat/accounting
Package accounting
Short Description Analysis and generation of bookkeeping data according to Swedish standards
License GPL-3.0-or-later
Homepage https://github.com/byrokrat/accounting
Informations about the package accounting
Accounting
Analysis and generation of bookkeeping data according to Swedish standards.
Installation
Why?
Although it would be possible to build a general bookkeeping application on top of Accounting this was never the primary concern. The motivation for creating Accounting was to provide solutions for two scenarios:
- The need to generate bookkeeping data using templates (and possibly import to general bookkeeping).
- The need to analyze accounting data (possibly exported from general bookkeeping).
To enable import and export of bookkeeping data Accounting supports parsing and generating files in the SIE4 file format.
Usage
- Generating accounting data using templates
- Handling monetary amounts
- Writing SIE4 files
- Parsing SIE4 files
- Querying accounting data
- Writing macros
Handling monetary amounts
Accounting uses Moneyphp to hande monetary amounts. More
information on the money api can be found on their website. In these examples
we need to format amounts, wich we do using the simple DecimalMoneyFormatter
.
Generating accounting data using templates
First we create an accounting template. Values enclosed in curly braces {}
are placeholders for values supplied at render time.
Create an account plan, a set of accounts.
And to render verifications we supply a list of translation values and the account plan.
Writing SIE4 files
Parsing SIE4 files
Querying accounting data
Listing accounts
Calculate book magnitude
Sorting transactions into a ledger (huvudbok)
An example of how Accounting may be used to sort transactions inte a ledger (or huvudbok as it is known in swedish).
Writing macros
Macros expose the posibility to extend the query api on the fly, without having to subclass the Query class itself. It is suitable for adding project specific order and filter methods. If we for example whant to filter on description we can define a macro for this:
And then use it to query accounting data:
Hacking
With composer installed as composer
and
phive installed as phive
Or use something like