From 7f0cdb83cfb7dacd3978f4bb7124cd87d96e4c50 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 10 Oct 2019 16:53:52 +0100 Subject: [PATCH] Bug 23049: Update 'N' to 'NEW_CARD' for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- Koha/Account.pm | 4 ++-- installer/data/mysql/account_debit_types.sql | 2 +- installer/data/mysql/atomicupdate/bug_23049_debit.perl | 9 ++++++++- .../data/mysql/en/mandatory/account_debit_types.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 2 +- .../opac-tmpl/bootstrap/en/includes/account-table.inc | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 91f5879c1c..48ddd829b7 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -449,7 +449,7 @@ $debit_type can be any of: - RESERVE_EXPIRED - LOST - sundry - - new_card + - NEW_CARD - OVERDUE - PROCESSING - RENT @@ -742,7 +742,7 @@ our $account_type_debit = { 'ACCOUNT_RENEW' => 'ACCOUNT_RENEW', 'RESERVE_EXPIRED' => 'RESERVE_EXPIRED', 'LOST_ITEM' => 'LOST', - 'new_card' => 'N', + 'NEW_CARD' => 'NEW_CARD', 'OVERDUE' => 'OVERDUE', 'PROCESSING' => 'PROCESSING', 'RENT' => 'RENT', diff --git a/installer/data/mysql/account_debit_types.sql b/installer/data/mysql/account_debit_types.sql index 5176aa9253..7391a1f9a6 100644 --- a/installer/data/mysql/account_debit_types.sql +++ b/installer/data/mysql/account_debit_types.sql @@ -3,7 +3,7 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa ('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1), ('LOST', 'Lost item', 1, NULL, 1), ('M', 'Manual fee', 1, NULL, 0), -('N', 'New card fee', 1, NULL, 1), +('NEW_CARD', 'New card fee', 1, NULL, 1), ('OVERDUE', 'Overdue fine', 0, NULL, 1), ('PROCESSING', 'Lost item processing fee', 0, NULL, 1), ('RENT', 'Rental fee', 0, NULL, 1), diff --git a/installer/data/mysql/atomicupdate/bug_23049_debit.perl b/installer/data/mysql/atomicupdate/bug_23049_debit.perl index d0e0a9cb70..8e250af5e6 100644 --- a/installer/data/mysql/atomicupdate/bug_23049_debit.perl +++ b/installer/data/mysql/atomicupdate/bug_23049_debit.perl @@ -43,7 +43,7 @@ if ( CheckVersion($DBversion) ) { ('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), + ('NEW_CARD', 'New card fee', 1, NULL, 1), ('OVERDUE', 'Overdue fine', 0, NULL, 1), ('PROCESSING', 'Lost item processing fee', 0, NULL, 1), ('RENT', 'Rental fee', 0, NULL, 1), @@ -75,6 +75,13 @@ if ( CheckVersion($DBversion) ) { } ); + # Update accountype 'N' to 'NEW_CARD' + $dbh->do( + qq{ + UPDATE accountlines SET accounttype = 'NEW_CARD' WHERE accounttype = 'N' + } + ); + # 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 5176aa9253..7391a1f9a6 100644 --- a/installer/data/mysql/en/mandatory/account_debit_types.sql +++ b/installer/data/mysql/en/mandatory/account_debit_types.sql @@ -3,7 +3,7 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa ('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1), ('LOST', 'Lost item', 1, NULL, 1), ('M', 'Manual fee', 1, NULL, 0), -('N', 'New card fee', 1, NULL, 1), +('NEW_CARD', 'New card fee', 1, NULL, 1), ('OVERDUE', 'Overdue fine', 0, NULL, 1), ('PROCESSING', 'Lost item processing fee', 0, NULL, 1), ('RENT', 'Rental fee', 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 41a9a14895..b7f67b05da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -17,7 +17,7 @@ [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee [%- CASE 'LOST' -%]Lost item [%- CASE 'M' -%]Sundry - [%- CASE 'N' -%]New card + [%- CASE 'NEW_CARD' -%]New card [%- CASE 'OVERDUE' -%]Fine [%- CASE 'PROCESSING' -%]Lost item processing fee [%- CASE 'RENT' -%]Rental fee 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 354badbb07..b3496ed141 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -188,7 +188,7 @@ [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee [%- CASE 'LOST' -%]Lost item [%- CASE 'M' -%]Sundry - [%- CASE 'N' -%]New card + [%- CASE 'NEW_CARD' -%]New card [%- CASE 'OVERDUE' -%]Fine [%- CASE 'PROCESSING' -%]Lost item processing fee [%- CASE 'RENT' -%]Rental fee -- 2.39.5