From 78eebbef03790c0a970908d62a6657848b28d2dc Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 10 Oct 2019 16:17:48 +0100 Subject: [PATCH] Bug 23049: Capitalise 'rent' calls to add_debit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This works towards making type codes consistent Signed-off-by: Séverine QUEUNE --- C4/Circulation.pm | 8 ++++---- Koha/Account.pm | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index befdc3e986..9533fd79d6 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1468,14 +1468,14 @@ sub AddIssue { # If it costs to borrow this book, charge it to the patron's account. my ( $charge, $itemtype ) = GetIssuingCharges( $item_object->itemnumber, $borrower->{'borrowernumber'} ); if ( $charge > 0 ) { - AddIssuingCharge( $issue, $charge, 'rent' ); + AddIssuingCharge( $issue, $charge, 'RENT' ); } my $itemtype_object = Koha::ItemTypes->find( $item_object->effective_itemtype ); if ( $itemtype_object ) { my $accumulate_charge = $fees->accumulate_rentalcharge(); if ( $accumulate_charge > 0 ) { - AddIssuingCharge( $issue, $accumulate_charge, 'rent_daily' ) if $accumulate_charge > 0; + AddIssuingCharge( $issue, $accumulate_charge, 'RENT_DAILY' ) if $accumulate_charge > 0; $charge += $accumulate_charge; $item_unblessed->{charge} = $charge; } @@ -2908,7 +2908,7 @@ sub AddRenewal { # Charge a new rental fee, if applicable my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); if ( $charge > 0 ) { - AddIssuingCharge($issue, $charge, 'rent_renew'); + AddIssuingCharge($issue, $charge, 'RENT_RENEW'); } # Charge a new accumulate rental fee, if applicable @@ -2916,7 +2916,7 @@ sub AddRenewal { if ( $itemtype_object ) { my $accumulate_charge = $fees->accumulate_rentalcharge(); if ( $accumulate_charge > 0 ) { - AddIssuingCharge( $issue, $accumulate_charge, 'rent_daily_renew' ) + AddIssuingCharge( $issue, $accumulate_charge, 'RENT_DAILY_RENEW' ) } $charge += $accumulate_charge; } diff --git a/Koha/Account.pm b/Koha/Account.pm index af05b51016..c6776c6e3f 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -452,10 +452,10 @@ $debit_type can be any of: - new_card - overdue - processing - - rent - - rent_daily - - rent_renew - - rent_daily_renew + - RENT + - RENT_DAILY + - RENT_RENEW + - RENT_DAILY_RENEW - RESERVE - manual_debit @@ -714,10 +714,10 @@ our $offset_type = { 'RESERVE' => 'Reserve Fee', 'processing' => 'Processing Fee', 'lost_item' => 'Lost Item', - 'rent' => 'Rental Fee', - 'rent_daily' => 'Rental Fee', - 'rent_renew' => 'Rental Fee', - 'rent_daily_renew' => 'Rental Fee', + 'RENT' => 'Rental Fee', + 'RENT_DAILY' => 'Rental Fee', + 'RENT_RENEW' => 'Rental Fee', + 'RENT_DAILY_RENEW' => 'Rental Fee', 'overdue' => 'OVERDUE', 'manual_debit' => 'Manual Debit', 'hold_expired' => 'Hold Expired' @@ -748,10 +748,10 @@ our $account_type_debit = { 'new_card' => 'N', 'overdue' => 'OVERDUE', 'processing' => 'PF', - 'rent' => 'RENT', - 'rent_daily' => 'RENT_DAILY', - 'rent_renew' => 'RENT_RENEW', - 'rent_daily_renew' => 'RENT_DAILY_RENEW', + 'RENT' => 'RENT', + 'RENT_DAILY' => 'RENT_DAILY', + 'RENT_RENEW' => 'RENT_RENEW', + 'RENT_DAILY_RENEW' => 'RENT_DAILY_RENEW', 'RESERVE' => 'RESERVE', 'manual_debit' => 'M' }; -- 2.20.1