diff --git a/lib/RevBank/Messages.pm b/lib/RevBank/Messages.pm index 09ff0bf..97139ef 100644 --- a/lib/RevBank/Messages.pm +++ b/lib/RevBank/Messages.pm @@ -64,7 +64,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 < -2300 ? " \e[5;1m(!!)\e[0m" : ""; + my $warn = $new->cents < -1337 ? " \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", diff --git a/plugins/deposit b/plugins/deposit index 0bac34d..2e81e7f 100644 --- a/plugins/deposit +++ b/plugins/deposit @@ -46,6 +46,10 @@ sub how :Tab(&how_tab) ($self, $cart, $input, @) { return shift @{ $how->{prompts} }, \&how_prompt; } + if ( ($input eq "iban") && ($self->{amount} < 10 || $self->{amount} == 25) ) { + return REJECT, "\n\e[31;1mPlease transfer at least 10 EUR and not 25 or 32 EUR when using iban\e[0m\n\n"; + } + my $contra = $how->{_key} eq 'cash' ? '-cash' : $how->{_key} eq 'reimburse' ? '-expenses/reimbursed' diff --git a/plugins/deposit_iban_qr b/plugins/deposit_iban_qr index bd63556..09055bd 100644 --- a/plugins/deposit_iban_qr +++ b/plugins/deposit_iban_qr @@ -20,8 +20,8 @@ use IPC::Open2 qw(open2); use List::Util qw(sum); -my $iban = "NL99ABCD1234567890"; -my $beneficiary = "Account Name"; +my $iban = "NL89RABO0111741386"; +my $beneficiary = "Stichting Bitlair"; sub hook_checkout($class, $cart, $user, $transaction_id, @) { my @entries = $cart->entries("is_deposit"); @@ -41,7 +41,7 @@ sub hook_checkout($class, $cart, $user, $transaction_id, @) { "EUR" . $amount, # Amount "", "", - "rb $user", + "Deposit $user (RB QR)", "", ); close $in; @@ -57,6 +57,8 @@ sub hook_checkout($class, $cart, $user, $transaction_id, @) { $lines[3] =~ s/$/ EPC QR codes. N26 also works./; $lines[5] =~ s/$/ For manual transfers, use this/; $lines[6] =~ s/$/ IBAN: $iban/; + $lines[7] =~ s/$/ Benificiary: $beneficiary/; + $lines[8] =~ s/$/ Description: Deposit $user/; print @lines; } diff --git a/plugins/deposit_methods b/plugins/deposit_methods index dca74fd..445d53c 100644 --- a/plugins/deposit_methods +++ b/plugins/deposit_methods @@ -5,10 +5,11 @@ sub hook_deposit_methods($class, $message, $hash, @) { Please type one of the following: -'iban': IBAN transfer (NL 69 ABNA 0431 1582 07) +'iban': IBAN transfer (Min 10 EUR / NL89 RABO 0111 7413 86) 'cash': Cash in the cash box 'reimburse': Reimbursement of expenses agreed upon in advance - Note: we require an invoice or receipt with this exact amount! + Note #1: we require an invoice or receipt with this exact amount! + Note #2: please do not use this plugin for amounts >20 EUR 'other': Provide a manual description END diff --git a/plugins/idle b/plugins/idle index d46c79a..1cb9fe5 100644 --- a/plugins/idle +++ b/plugins/idle @@ -1,6 +1,6 @@ #!perl -my $timeout = 10; +my $timeout = 20; sub hook_prompt_idle($class, $cart, $plugin, $seconds, $readline, @) { return unless $seconds >= $timeout and $cart->size and not $plugin; diff --git a/plugins/revspace_saldo b/plugins/revspace_saldo index 80529e2..f1cb9db 100644 --- a/plugins/revspace_saldo +++ b/plugins/revspace_saldo @@ -17,7 +17,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 < -22.00) { + if ($balance < -13.37) { _box( "Hoi $user,", "",