Budgeting
You know which two variables every work phase gives you, which one to use in a formula, and what happens to the budget when the schedule changes.
Every work phase on the **Timeline** gives you two variables: its work days and its total days. If a formula uses one of them instead of a typed day count, KOSMA updates the budget when the phase gets longer or shorter. KOSMA creates both variables with the phase. You do not add anything yourself.
| Variable | Same number as | Is | | ------------------ | -------------- | --------------------------------------------------- | | `<Phase>_workdays` | `<Phase>_WD` | the phase's **Work Days (WD)**: the days worked | | `<Phase>_duration` | `<Phase>_TD` | the phase's **Total Days (TD)**: every calendar day |
A phase named Shooting gives you `Shooting_workdays` and `Shooting_duration`. `Shooting_WD` and `Shooting_TD` return the same numbers, and you can use either spelling.
In a formula field, the dropdown lists the variables under **Variables** ▸ **Phases**. When you choose one, KOSMA inserts the long form, for example `Shooting_workdays`. The **Variables** dialog lists them in the group **Work Phases** as `Shooting_TD` and `Shooting_WD`, in days. There you can look up the exact name of a phase. You cannot change the values there. For how to write a formula, see [write a formula](/kb/article/write-a-formula).
Use `_workdays` for anything you pay per day worked, for example crew, cast or per diems. Use `_duration` for anything that runs for the whole calendar span of the phase, however many days are worked. Examples are equipment rental or a vehicle.
A camera rented for the shoot is billed by calendar days. If you budget it with `_workdays`, the budget leaves out the weekends.
In the budget of the Demo Project, two accounts use the Shooting phase in **Quantity**. Shooting has 35 total days and 25 work days.
| Account | **Quantity** | Gives | Price | Total | | ---------------------------- | ----------------- | ---------------- | ----- | ------ | | **5.02 Locations & Permits** | `Shooting_WD` | 25 work days | 900 | 22,500 | | **6.01 Camera Package** | `Shooting_TD / 7` | 5 calendar weeks | 6,500 | 32,500 |
You usually type a phase variable in **Quantity**. Every other field that accepts a formula accepts it too.
When you change the TD or WD of a phase, in its dialog or by dragging its bar, KOSMA immediately recalculates every formula that uses the phase. If you move a phase without changing its length, no amount changes. If you rename a phase, KOSMA rewrites every formula that uses it, in every spelling. A day count typed as a plain number, for example `25`, does not change with the schedule. In the grid, it looks the same as the result of a variable.
A phase and a milestone are not linked. When a phase gets longer, no milestone moves, and a payment tied to a milestone stays on that milestone's date. For the difference, see [what phases and milestones are](/kb/article/what-phases-and-milestones-are).
As long as a formula uses a phase, you cannot delete the phase. For how to delete a phase, see [set up work phases](/kb/article/set-up-work-phases).
With every licence, and as a guest, you can read phase variables and every formula that uses them. To enter or change a **Quantity** or a phase, you must be signed in and have a licence that covers Budgeting. In the Demo Project, you can change them with every licence. To use values of your own in formulas, see [use variables in a budget](/kb/article/use-variables-in-a-budget).
Markdown