From bd2b7e26fdf16a533e8955dc7cbbb2e75fcf982e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 20 May 2021 08:48:12 +0100 Subject: [PATCH] Bug 27779: Update 'REFUND' description in the database This patch simplified the REFUND description from 'Refund applied to a patrons fine' to simply 'Refund'.. this allows the description to be combined with debit type descriptions simply to denote what it was applied against instead of using the generic 'applied to a patrons fine' Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_27779.perl | 8 ++++++++ installer/data/mysql/mandatory/account_credit_types.sql | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27779.perl diff --git a/installer/data/mysql/atomicupdate/bug_27779.perl b/installer/data/mysql/atomicupdate/bug_27779.perl new file mode 100644 index 0000000000..c762799800 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27779.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + # REFUND + $dbh->do( "UPDATE account_credit_types SET description = 'Refund' WHERE code = 'REFUND'" ); + + NewVersion( $DBversion, 27779, "Simplify credit descriptions"); +} diff --git a/installer/data/mysql/mandatory/account_credit_types.sql b/installer/data/mysql/mandatory/account_credit_types.sql index 5ed88fdd2b..105575b425 100644 --- a/installer/data/mysql/mandatory/account_credit_types.sql +++ b/installer/data/mysql/mandatory/account_credit_types.sql @@ -5,7 +5,7 @@ INSERT INTO account_credit_types ( code, description, can_be_added_manually, is_ ('FORGIVEN', 'Forgiven', 1, 1), ('CREDIT', 'Credit', 1, 1), ('DISCOUNT', 'A discount applied to a patrons fine', 0, 1), -('REFUND', 'A refund applied to a patrons fine', 0, 1), +('REFUND', 'Refund', 0, 1), ('LOST_FOUND', 'Lost item fee refund', 0, 1), ('PURCHASE', 'Purchase', 0, 1), ('CANCELLATION', 'Cancellation', 0, 1); -- 2.20.1