Browse Source

Bug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency

This patch updates all cases where debit_type_code was 'HE' to
'RESERVE_EXPIRED' which is more informative and consistent with the
new style guidelines.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remotes/origin/19.11.x
Martin Renvoize 3 years ago
parent
commit
fbd640fa32
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 6
      Koha/Account.pm
  2. 2
      Koha/Hold.pm
  3. 4
      installer/data/mysql/account_debit_types.sql
  4. 9
      installer/data/mysql/atomicupdate/bug_23049_debit.perl
  5. 4
      installer/data/mysql/en/mandatory/account_debit_types.sql
  6. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
  7. 2
      koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

6
Koha/Account.pm

@ -446,7 +446,7 @@ my $debit_line = Koha::Account->new({ patron_id => $patron_id })->add_debit(
$debit_type can be any of:
- ACCOUNT
- ACCOUNT_RENEW
- hold_expired
- RESERVE_EXPIRED
- lost_item
- sundry
- new_card
@ -720,7 +720,7 @@ our $offset_type = {
'RENT_DAILY_RENEW' => 'Rental Fee',
'overdue' => 'OVERDUE',
'manual_debit' => 'Manual Debit',
'hold_expired' => 'Hold Expired'
'RESERVE_EXPIRED' => 'Hold Expired'
};
=head3 $account_type_credit
@ -742,7 +742,7 @@ our $account_type_credit = {
our $account_type_debit = {
'ACCOUNT' => 'ACCOUNT',
'ACCOUNT_RENEW' => 'ACCOUNT_RENEW',
'hold_expired' => 'HE',
'RESERVE_EXPIRED' => 'RESERVE_EXPIRED',
'lost_item' => 'LOST',
'sundry' => 'M',
'new_card' => 'N',

2
Koha/Hold.pm

@ -373,7 +373,7 @@ sub cancel {
user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
interface => C4::Context->interface,
library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
type => 'hold_expired',
type => 'RESERVE_EXPIRED',
item_id => $self->itemnumber
}
);

4
installer/data/mysql/account_debit_types.sql

@ -1,7 +1,6 @@
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('HE', 'Hold waiting too long', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('N', 'New card fee', 1, NULL, 1),
@ -11,4 +10,5 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
('RESERVE', 'Hold fee', 0, NULL, 1);
('RESERVE', 'Hold fee', 0, NULL, 1),
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1);

9
installer/data/mysql/atomicupdate/bug_23049_debit.perl

@ -40,7 +40,7 @@ if ( CheckVersion($DBversion) ) {
VALUES
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('HE', 'Hold waiting too long', 0, NULL, 1),
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('N', 'New card fee', 1, NULL, 1),
@ -68,6 +68,13 @@ if ( CheckVersion($DBversion) ) {
}
);
# Update accountype 'HE' to 'RESERVE_EXPIRED'
$dbh->do(
qq{
UPDATE accountlines SET accounttype = 'RESERVE_EXPIRED' WHERE accounttype = 'HE'
}
);
# Moving MANUAL_INV to account_debit_types
$dbh->do(
qq{

4
installer/data/mysql/en/mandatory/account_debit_types.sql

@ -1,7 +1,6 @@
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('HE', 'Hold waiting too long', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('N', 'New card fee', 1, NULL, 1),
@ -11,4 +10,5 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
('RESERVE', 'Hold fee', 0, NULL, 1);
('RESERVE', 'Hold fee', 0, NULL, 1),
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1);

2
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

@ -15,7 +15,6 @@
[%- SWITCH account.debit_type -%]
[%- CASE 'ACCOUNT' -%]Account creation fee
[%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee
[%- CASE 'HE' -%]Hold waiting too long
[%- CASE 'LOST' -%]Lost item
[%- CASE 'M' -%]Sundry
[%- CASE 'N' -%]New card
@ -26,6 +25,7 @@
[%- CASE 'RENT_RENEW' -%]Renewal of rental item
[%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
[%- CASE 'RESERVE' -%]Hold fee
[%- CASE 'RESERVE_EXPIRED' -%]Hold waiting too long
[%- CASE -%][% account.debit_type.description | html %]
[%- END -%]
[%- END -%]

2
koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

@ -186,7 +186,6 @@
[%- SWITCH account.debit_type -%]
[%- CASE 'ACCOUNT' -%]Account creation fee
[%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee
[%- CASE 'HE' -%]Hold waiting too long
[%- CASE 'LOST' -%]Lost item
[%- CASE 'M' -%]Sundry
[%- CASE 'N' -%]New card
@ -197,6 +196,7 @@
[%- CASE 'RENT_RENEW' -%]Renewal of rental item
[%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
[%- CASE 'RESERVE' -%]Hold fee
[%- CASE 'RESERVE_EXPIRED' -%]Hold waiting too long
[%- CASE -%][% account.debit_type.description | html %]
[%- END -%]
[%- END -%]

Loading…
Cancel
Save