Budgeting
You can take the work days for a daily fringe limit from the quantity of an account or of one of its subaccounts, without typing the number again.
`ACCOUNT_QTY` and `SUBACCOUNT_QTY` use a quantity that is already entered on an account, so you do not type the number a second time. Both work only in **Timebase (days) for fringe limits**, the field for the work days of a daily fringe limit (see [apply fringes and supplements](/kb/article/apply-fringes-and-supplements)).
| Function | Returns | | ------------------- | ----------------------------------------------- | | `ACCOUNT_QTY` | the quantity of the account | | `SUBACCOUNT_QTY(2)` | the quantity of the account's second subaccount |
A daily fringe limit applies over a number of work days. That number is often already the quantity of the account or of one of its subaccounts. Enter the function in **Timebase (days) for fringe limits**, and KOSMA takes the days from that quantity.
Click in the field. KOSMA opens a menu that offers `ACCOUNT_QTY` under  **Functions**, and `SUBACCOUNT_QTY` only if the account has subaccounts. The field offers no variables and no other function.
For the account's own quantity, pick `ACCOUNT_QTY`. KOSMA inserts it ready to use:
When you pick `SUBACCOUNT_QTY`, KOSMA inserts only the name. Type the subaccount's position in brackets right after it:
Besides the two functions, the field accepts numbers and the operators `+ - * / ( )`. If you enter any other name, KOSMA does not save the entry and shows:
Only ACCOUNT\_QTY and SUBACCOUNT\_QTY are allowed — '{what you entered}' is not.
To remove the timebase, empty the field.
An actor is paid per shoot day but works more days, because rehearsals and fittings count too. The account holds only the paid shoot days, and the fringe limit needs the larger number of work days. Set the timebase to the quantity that holds the work days, so that KOSMA calculates the fringe limit from them. In the demo project, a timebase is set in the budget How KOSMA Calculates: account 202 (Wage line with a capped charge) has the timebase 1.
`SUBACCOUNT_QTY(2)` returns the quantity of the subaccount in position 2, whatever its name. Counting starts at 1. If you move a subaccount to another position, the same formula returns the quantity of a different subaccount, and KOSMA recalculates the timebase with it. When you move a subaccount that a timebase refers to, change the number in the formula to its new position.
Markdown