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.

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)
  • spend(cat | time, time)
  • balance(cat | time, time)
  • available(time)
  • income(time)
  • toBudget(time)
  • overspend(time)
  • uncategorized(time)

Note that

Disable direct assigning of value

Clone this wiki locally