Bugzilla – Attachment 94122 Details for
Bug 23049
Replace MANUAL_INV authorised value with a dedicated table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency
Bug-23049-Update-HE-to-RESERVEEXPIRED-for-consiste.patch (text/plain), 7.93 KB, created by
Martin Renvoize (ashimema)
on 2019-10-15 07:23:29 UTC
(
hide
)
Description:
Bug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-15 07:23:29 UTC
Size:
7.93 KB
patch
obsolete
>From 64d582c9f709581153b197c22e34071b8b9bdfe4 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 10 Oct 2019 16:38:24 +0100 >Subject: [PATCH] Bug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > Koha/Account.pm | 6 +++--- > Koha/Hold.pm | 2 +- > installer/data/mysql/account_debit_types.sql | 4 ++-- > installer/data/mysql/atomicupdate/bug_23049_debit.perl | 9 ++++++++- > .../data/mysql/en/mandatory/account_debit_types.sql | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 2 +- > .../opac-tmpl/bootstrap/en/includes/account-table.inc | 2 +- > 7 files changed, 18 insertions(+), 11 deletions(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 183928a152..2c8c4a1e7d 100644 >--- a/Koha/Account.pm >+++ b/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', >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 30188ae69e..d50b008dff 100644 >--- a/Koha/Hold.pm >+++ b/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 > } > ); >diff --git a/installer/data/mysql/account_debit_types.sql b/installer/data/mysql/account_debit_types.sql >index 8f7d70a289..5176aa9253 100644 >--- a/installer/data/mysql/account_debit_types.sql >+++ b/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); >diff --git a/installer/data/mysql/atomicupdate/bug_23049_debit.perl b/installer/data/mysql/atomicupdate/bug_23049_debit.perl >index eb49506523..b5f6c94d66 100644 >--- a/installer/data/mysql/atomicupdate/bug_23049_debit.perl >+++ b/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{ >diff --git a/installer/data/mysql/en/mandatory/account_debit_types.sql b/installer/data/mysql/en/mandatory/account_debit_types.sql >index 8f7d70a289..5176aa9253 100644 >--- a/installer/data/mysql/en/mandatory/account_debit_types.sql >+++ b/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); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >index 8dbe0feed1..41a9a14895 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >+++ b/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 -%] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >index d4f16c29b1..354badbb07 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >+++ b/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 -%] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23049
:
93513
|
93514
|
93515
|
93516
|
93518
|
93519
|
93520
|
93521
|
93522
|
93523
|
93529
|
93557
|
93564
|
93565
|
93567
|
93568
|
93569
|
93570
|
93571
|
93572
|
93573
|
93574
|
93575
|
93576
|
93577
|
93578
|
93579
|
93960
|
93961
|
93962
|
93963
|
93964
|
93965
|
93966
|
93967
|
93968
|
93969
|
93970
|
93972
|
93973
|
93974
|
93975
|
93976
|
93977
|
93978
|
93979
|
93989
|
93990
|
93991
|
93992
|
93993
|
93994
|
93995
|
93996
|
93997
|
93998
|
93999
|
94000
|
94001
|
94002
|
94003
|
94004
|
94005
|
94006
|
94007
|
94008
|
94073
|
94074
|
94075
|
94076
|
94077
|
94078
|
94079
|
94080
|
94081
|
94082
|
94083
|
94084
|
94085
|
94086
|
94087
|
94088
|
94089
|
94090
|
94091
|
94092
|
94093
|
94111
|
94112
|
94113
|
94114
|
94115
|
94116
|
94117
|
94118
|
94119
|
94120
|
94121
|
94122
|
94123
|
94124
|
94125
|
94126
|
94127
|
94128
|
94129
|
94130
|
94131
|
94132
|
94133
|
94134
|
94135
|
94136
|
94137
|
94138
|
94139
|
94140
|
94141
|
94142
|
94143
|
94144
|
94145
|
94146
|
94147
|
94148
|
94149
|
94150
|
94151
|
94152
|
94165
|
94307
|
94308
|
94309
|
94310
|
94311
|
94312
|
94313
|
94314
|
94315
|
94316
|
94317
|
94318
|
94319
|
94320
|
94321
|
94323
|
94324
|
94325
|
94326
|
94327
|
94328
|
94329
|
94331
|
94332
|
94333
|
94334
|
94335
|
94336
|
94337
|
94338
|
94339
|
94340
|
94341
|
94342
|
94343
|
94344
|
94345
|
94346
|
94347
|
94348
|
94349
|
94350
|
94351
|
94352
|
94648