From e510b55480b208d0812b4fe02a5ecf48d05446c4 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 10 Oct 2019 16:31:17 +0100 Subject: [PATCH] Bug 23049: Capitalise type passed to add_debit for account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE --- Koha/Account.pm | 12 ++++++------ Koha/Patron.pm | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 8dfd3a4d4d..183928a152 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -444,8 +444,8 @@ my $debit_line = Koha::Account->new({ patron_id => $patron_id })->add_debit( ); $debit_type can be any of: - - account - - account_renew + - ACCOUNT + - ACCOUNT_RENEW - hold_expired - lost_item - sundry @@ -709,8 +709,8 @@ our $offset_type = { 'lost_item_return' => 'Lost Item', 'payment' => 'Payment', 'writeoff' => 'Writeoff', - 'account' => 'Account Fee', - 'account_renew' => 'Account Fee', + 'ACCOUNT' => 'Account Fee', + 'ACCOUNT_RENEW' => 'Account Fee', 'RESERVE' => 'Reserve Fee', 'PROCESSING' => 'Processing Fee', 'lost_item' => 'Lost Item', @@ -740,8 +740,8 @@ our $account_type_credit = { =cut our $account_type_debit = { - 'account' => 'ACCOUNT', - 'account_renew' => 'ACCOUNT_RENEW', + 'ACCOUNT' => 'ACCOUNT', + 'ACCOUNT_RENEW' => 'ACCOUNT_RENEW', 'hold_expired' => 'HE', 'lost_item' => 'LOST', 'sundry' => 'M', diff --git a/Koha/Patron.pm b/Koha/Patron.pm index fca796ff28..d4dcec986e 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -887,7 +887,7 @@ sub add_enrolment_fee_if_needed { my ($self, $renewal) = @_; my $enrolment_fee = $self->category->enrolmentfee; if ( $enrolment_fee && $enrolment_fee > 0 ) { - my $type = $renewal ? 'account_renew' : 'account'; + my $type = $renewal ? 'ACCOUNT_RENEW' : 'ACCOUNT'; $self->account->add_debit( { amount => $enrolment_fee, -- 2.20.1