Skip to content

BudgetInput

Hannes Diercks edited this page Aug 24, 2020 · 6 revisions

Whats a BudgetInput?

It's the input field that is used to assign the budgeted value for a specific category in a given month.
You activate a BudgetInput by clicking on the budgeted amount of a category.

BudgetBudget application window with highlighted BudgetInput-field

In the above picture, the pink highlighted field with the value 123,00 is a BudgetInput.

Increase or decrease numbers in BudgetInputs

If the text input curser is placed in or at a number in the BudgetInput,
it can be increased using the ⬆️ Up Arrow key or decreased using ⬇️ Down Arrow.

Show me how this would look budget value being increased and decreased using arrow keys

Normally all numbers are increased/decreased by steps of 1 but when a number has fractions like 12.34
and the curser is placed in the right part of the number 12.3|4 then the fraction is increased by 0.01.

How to do Math in BudgetInputs

The input can not only handle numeric values but will also evaluate mathematic statements.
For example (1 + 2.3) * 4 will be evaluated to 13.20.

See all possible syntax in the documentation of expr-eval

Use other budget values/amounts

Nearly every value displayed in the BudgetBudget Interface can be accessed in BudgetInputs using a getter.
spend() for example will resolve to the amount that has been spend in this category, this month.
These can also be used in combination with math.

Parameters

the getter functions take two sorts of parameters:

  • A category specifier (cat)
    • name or id of a category or category group as a string
      spend("Wake") (amount spend in "Wake" category this month)
    • t or total to get the total amount across all categories this month
      spend(t) (total amount spend this month)
  • A time specifier (time)
    • Date of a specific month in YYYY-MM format
      spend("2020-01") (amount spend in January 2020 in this category)
    • X months ago using a negative integer
      spend(-1) (amount spend last month in this category)
    • the average of the past X months using a tilde-prefixed positive integer
      spend(~5) (average spend of past 5 months in this category)
    • the sum of the past X months using a positive integer
      spend(3) (sum of past 3 months spending in this category)

Available getters

All parameters are optional

  • budgeted(cat | time, time)
    The budgeted amount of a category. Defaults to current category in this month.
  • spend(cat | time, time)
    The amount spend in a category. Defaults to current category in this month.
  • balance(cat | time, time)
    The balance a category. Defaults to current category in this month.
  • available(time)
    The total amount available in a month, which is the combination of this months income + last months toBudget. Defaults to this month.
  • income(time)
    The income available in a month. Defaults to this month.
  • toBudget(time)
    The un-budgeted or over-budgeted amount of a month. Defaults to this month.
  • overspend(time)
    The overspend amount of a month. Defaults to this month.
  • uncategorized(time)
    The sum of uncategorized transactions of a month. Defaults to this month.

Disable direct assigning of value

Normally all amounts are updated while entering a value into a BudgetInput.
In some cases this is irritating and therefore can be disabled by prefixing the value with a single =.

Clone this wiki locally