Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
1 result

getraenkekasse

  • Clone with SSH
  • Clone with HTTPS
  • Getränkekasse

    Building

    First, rename the .env.example file to .env and the docker-compose.yml.example to docker-compose.yml. Then fill in the values in the .env file. The docker-compose.yml file should be fine as it is, but you can change the ports and volume locations if you want to.

    To build the app, compile the docker container.

    docker compose build

    Afterwards you can start the app.

    docker compose up

    Setup

    Go to [url]/setup. There you can create your first user with admin priviliges.

    Money

    Money is stored in cents. This is done to avoid floating point errors. Every input in the admin panel is in cents. So whenever you need to enter a money value, you have to input the amount in cents. For example 1€ are 100 cents, 1.50€ are 150 cents. The output however is in euros, so you can read the values without having to do any calculations.

    Whenever there are calculations with money that result in a floating point number, the number is rounded, either up or down, depending on the context. Premium fees for negative balances are always rounded up.

    Custom Codes

    There is no low/negative balance penalty on custom codes.

    Pfand

    Use the code #PFAND-[amount] to add Pfand to your shopping cart.

    Example: #PFAND-8 adds a Pfand item to the shopping cart worth eight cents.

    Custom

    For anything that is not listed in the shop page you can use this custom code. #CUSTOM-[amount] adds the item to your cart. It works exactly the same way as the Pfand code, the only difference is the semantics.

    Example: #CUSTOM-200 adds a custom item to the shopping cart worth two euros.

    Transfer

    Unless you log in with a card that has the CANT_TRANSFER flag set, you can transfer money to other people. Thus paying your part in some purchase made by one for multiple people gets fairly easy. To do that use the #TRANSFER-[userId]-[amount] code.

    Example: #TRANSFER-4-90 transfers 90 cents from your account to the user with the id 4.

    Important: You can only transfer money that you currently have. While spending money you don't have to buy items is possible, sending money you don't have to someone is not.