GEWIS / sudosos-backend

SudoSOS is a Node.js-based Bar and POS system made for study association GEWIS.
https://sudosos.gewis.nl
GNU Affero General Public License v3.0
6 stars 3 forks source link

[BUG] Fines without warning in some situations #159

Closed rinkp closed 6 months ago

rinkp commented 6 months ago

Consider the following scenario:

  1. During borrel x, the user has a balance of -€4,-, so they don't get an email that they will be fined next week
  2. The user buys two beers
  3. During borrel x+1, the user has a balance of -€6,-, so the user is fined €1,-

Solution 1 (my preference):

  1. The user receives a notification that their balance is negative and that if they have a balance <-€5 next week, they will receive a fine

Solution 2 (alternative);

  1. The user does not receive a fine in week x+1, but only in week x+2
rinkp commented 6 months ago

Example:

Okay, the situation is a bit better than I expected (because the TOS specifies fines to be computed based on the balance of last week), but for some reason not always emails are sent.

User 14595 did not receive a warning on March 21st with a balance of -€7,05, but did receive a fine on March 28th when the balance was -€7,85

CodeNamedRobin commented 6 months ago

Hi Rink, solution 1 is already how we do it, but I didn't hand out fines on March 21st as there was an outage at ABN AMRO.

rinkp commented 6 months ago

Check