From 4162c2614c1dd9dd041cd7347b62d86c122f53d8 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Nov 2019 15:20:45 +0000 Subject: [PATCH] Bug 23442: Add account credit types --- installer/data/mysql/account_credit_types.sql | 2 ++ installer/data/mysql/atomicupdate/bug_23442.perl | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23442.perl diff --git a/installer/data/mysql/account_credit_types.sql b/installer/data/mysql/account_credit_types.sql index 1105ab9b85..03954025b4 100644 --- a/installer/data/mysql/account_credit_types.sql +++ b/installer/data/mysql/account_credit_types.sql @@ -3,4 +3,6 @@ INSERT INTO account_credit_types ( code, description, can_be_added_manually, is_ ('WRITEOFF', 'Writeoff', 0, 1), ('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), ('LOST_RETURN', 'Lost item fee refund', 0, 1); diff --git a/installer/data/mysql/atomicupdate/bug_23442.perl b/installer/data/mysql/atomicupdate/bug_23442.perl new file mode 100644 index 0000000000..fbaf81f265 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23442.perl @@ -0,0 +1,15 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion($DBversion) ) { + + $dbh->do( + qq{ + INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system) + VALUES + ('DISCOUNT', 'A discount applied to a patrons fine', 0, 1), + ('REFUND', 'A refund applied to a patrons fine', 0, 1) + } + ); + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 24080 - Add PAYOUT account_credit_type)\n"; +} -- 2.20.1