Before we start to develop the logic for a cashflow or netincome corporate planning solution. We need to understand the basic economic rules that underlay this issue.
In the corporate world there are two worlds of watching a company. The „dreamy„ profit and loss view, where people think that money and cash flows directly (no time between writing an invoice and recieving the money) and the „real“ cashflow taking care about time delays for spending and revieving money in a company.
To build a solution in a database, taking care about those two worlds – we have to define a flag or sign, in which world each single value belongs. This means we build 5 types of values:
- NEUTRAL – Helper Fields, to build logics like amount * price = revenues -> so price is a helper field!
- TAX IN – Those Fields really contain an amount, that is a relevant profit and loss amount (e.g. revenues)
- TAX OUT – Fields like goods needed to build a product
- CASH IN – real payables calculated on the balance accounts-recievable
- CASH OUT – real payables calculated on the balance accounts-payable
Having those flags integrated, we have the possibility to sum up all TAX IN and TAX OUT, then build the saldation TI – TO = NI and we’ll become the NetIncome for a individual subset of the data.
Bevore we start with complex planning issues, it´s important to understand the basics of the „logic“ in the tool! So we build up a small personal budget where we take care about 2 income accounts (Salary and Family) and 4 expense accounts (Rent, Food, Fun and Communication).
For every dataset, a basic dimension is needed, here we call it „Basic Dimension„. Additional we need two more dimensions for „Income“ and another for „Expense„.
Inside the Dimensions we need the following Dimension-Elements:
Additional we need to define the relationship between the dimensions:
- Root – Basic Dimension
- Child – Income
- Child – Expense
This will build up an „virtual“ tree looking like this:
- My Personal Budget
Later you´ll see, that we have several visual helpers do divide them from each other. Those depend on the logical type of the related dimension. Those individual logics will be called structurelogic and we will use 3 seperate logics for our dimensions.
create structurlogic (calculation rules)
To make it simple, we only want to have a fact field, that allows to enter an absolut value for an individual period. This means, we build the following 3 structurtypes containing one fact field.
- no factfield, only for aggregation
- factfield, revenue (float)
- factfield, expense (float)
Later you’ll see how to build a calculation of Income–Expense.
„The only limitation is time“ – it’s a fact, that time is the limited fact in a human live. So nearly everything is adjusted to timemanagament and the available ressources for the focused moment. For our budget we want to focus on months as smallest viewport and the year as aggreagtion of the individual months. The framework has a special handling of periods, that you need to know for further datasets:
- -10001,-10002,…..,-10048 (All weeks from the first year, 7.5 days per week)
- 1,2,….,12 (All months from the first year, 30 days per month)
- –1,-2,-3,-4 (All quaters from the first year, 3 months, 12 weeks, 90 days per quater)
- 10001 (the first year, 12 months, 4 quaters, 48 weeks, 360 days)
After you have installed the framework and the tool, you have a „clean“ system that needs some settings to run! So first of all you need to login as poweruser and enable the needed module for this user.
Continue as followed:
- Go to the mainmenu „planlogiq“ – „My Account“ – „All Users„
- Select the user you want to enable modules for
- jump to the tab – „user rights“ and edit the line „mod_planung“ just check the „read“ checkbox
- reload the complete site by hitting „F5“ or the „reload„-Button of your Browser
At the mainmenu you will now see a new register „Planning„. Open it and go to „Administration“ – „Dimensionsmanagement„. Now you can continue to read the next top from intro.
Hello, this blog is a mix between a blog and a book, which is related to the open source corporate planning framework planlogiq.
You can download it from here: http://www.planlogiq.com
It’s based upon PRADO PHP Framework – http://www.pradosoft.com – UI DHTMLX – http://www.dhtmlx.com – and MySQL – http://www.mysql.com . All examples and textes are published under the CCL Commen Creative License and are published by Philipp Frenzel (pf(at)com[minus]x[minus]cha.com).
If you have any suggestions or feedback, feel free to contace me!