Warn from 19.84 instead of 13.37

This should probably not be hardcoded, but revbank currently has no
configuration mechanism.
This commit is contained in:
Juerd Waalboer 2022-04-12 19:39:14 +02:00
parent 21788feb38
commit e71df9b092
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ sub hook_user_balance($class, $username, $old, $delta, $new, @) {
my $sign = $delta->cents >= 0 ? '+' : '-';
my $rood = $new->cents < 0 ? '31;' : '';
my $abs = $delta->abs;
my $warn = $new->cents < -1337 ? " \e[5;1m(!!)\e[0m" : "";
my $warn = $new->cents < -1984 ? " \e[5;1m(!!)\e[0m" : "";
$_ = $_->string("+") for $old, $new;
printf "New balance for $username: $old $sign $abs = \e[${rood}1m$new\e[0m$warn\n",

View file

@ -16,7 +16,7 @@ sub hook_checkout_done($class, $cart, $user, $transaction_id, @) {
my $balance = RevBank::Users::balance($user) or return;
my $since = RevBank::Users::since($user);
if ($balance < -13.37) {
if ($balance < -19.84) {
_box(
"Hoi $user,",
"",