Skip to content

Cash Expenses

singularName: cash-expensepluralName: cash-expenses

Holds the cash expenses for every run which are paid at the runsite in Cash. Used to generate cash-flow statement per run

Schema

NameTypeDetails
runrelationmanyToOne → Hareline
expense_typeenumerationone of [Beer Provider Ice & Tipp, OnDown Beer, Free Text Item]
free_text_item_contentstring
amount_spentdecimal

Lifecycles

beforeCreate (async)

Before creating a new cash expense entry, this method checks:
- For a Free text item you MUST enter item Content
- If the amount spent is greater than 0, it multiplies it by -1
- If the amount spent is 0 or not provided, throws an error

Throws an error if the checks fail.

Parameters:

  • event: - The event object containing the parameters for the new cash expense entry.

Released under the MIT License.