Financing
You can size a source from figures of the budget it finances, and you know what happens to the formula when the budget changes or the plan moves to another budget.
In a source's **Amount**, you can write a formula that takes a figure from the linked budget, the budget the plan finances. When the budget changes, the amount changes with it. The functions in this article read only the linked budget, never the financing plan. To total the plan's own sources, see [aggregate financing sources in a formula](/kb/article/aggregate-financing-sources-in-a-formula). For how to enter a formula, see [write a source amount formula](/kb/article/write-a-source-amount-formula).
| Function | Returns | | -------- | --------------------------------------------------------------------------- | | `NPC` | The net production costs: the sum of all budget categories, without markups | | `GT` | The grand total: the budget's accounts plus its markups |
You can write both with or without brackets: `NPC` and `NPC()` give the same result.
In the demo project, the net production costs are 1,256,805.49 EUR. For a fund that pays 20 percent of them, enter this formula:
KOSMA calculates 251,361.10 EUR.
For a source that covers what remains of the grand total, subtract the other amounts from `GT`. In the demo project, the source **Producer Equity** holds this formula:
The grand total is 1,407,622.15 EUR, and the source receives 110,622.15 EUR.
`ACCOUNT("3.01")` returns the total of the budget account with the number 3.01. Use it when a funder pays towards one line item. `ACCOUNT` reads budget accounts only. It does not total a category or a markup: with the number of a markup, **Amount** stays empty.
`SUM_COMPANY("Northlight")` adds up the budget money assigned to the company Northlight. If a budget line is split between several companies, only the company's share of that line counts, see [split costs between companies](/kb/article/split-costs-between-companies). Markups do not count. In the demo project, `SUM_COMPANY("Northlight")` gives 989,484.39 EUR and `SUM_COMPANY("Edelweiss")` gives 267,321.10 EUR.
`SUM_TAG("Swiss Spend")` adds up the budget money on every account and subaccount with the tag Swiss Spend. A subaccount counts when its account has the tag. A fund that pays 20 percent of the money spent in its region needs this formula:
A tag suits a funding rule better than a list of accounts. When you add an account to the budget and give it the tag, the amount includes it. A formula such as `ACCOUNT("3.01") + ACCOUNT("3.02")` does not include an account added later, and you have to extend the formula.
`COUNT_COMPANY` and `COUNT_TAG` count budget lines instead of adding up money. A budget line is an account without subaccounts, or a subaccount.
If the budget has no company or tag with the name in the formula, **Amount** stays empty. If the name exists but no budget line uses it, the function gives 0.
The variables of the linked budget also work in a source amount. The financing plan has no variables of its own. See [use variables in a financing plan](/kb/article/use-variables-in-a-financing-plan).
If you renumber an account in the budget, KOSMA changes the number in every formula that names the account, the formulas of financing plans included. If you rename a company or a tag, KOSMA changes the name in every formula in the same way. If you delete an account, a company or a tag that a formula names, the source's **Amount** stays empty.
When you copy a plan onto another budget, KOSMA copies every formula as text, unchanged. A formula that names an account, a company, a tag or a variable the new budget does not have gives no value there. Before the copy, **Some Details Cannot Come Across** lists what cannot come across. Of the formulas, it counts only the missing accounts, in this line:
{number} amount references to budget accounts the selected budget does not have
The dialog does not count a missing company, tag or variable in a formula, and KOSMA shows no warning for it. After the copy, switch to the formula view to see which sources hold a formula, and correct each one whose amount is empty. For the formula view, see [switch between values and formulas](/kb/article/switch-between-financing-values-and-formulas). For the copy itself, see [relink a plan to another budget](/kb/article/relink-a-plan-to-another-budget).
Markdown