From b45ae421c54e70b061cb81bb1619729f45eb1aae Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Nov 2019 14:50:12 +0000 Subject: [PATCH] Bug 24080: Payout account debit type --- installer/data/mysql/account_debit_types.sql | 1 + .../data/mysql/atomicupdate/bug_24080.perl | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_24080.perl diff --git a/installer/data/mysql/account_debit_types.sql b/installer/data/mysql/account_debit_types.sql index 731c461e80..a5b93cac7a 100644 --- a/installer/data/mysql/account_debit_types.sql +++ b/installer/data/mysql/account_debit_types.sql @@ -6,6 +6,7 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa ('NEW_CARD', 'New card fee', 1, NULL, 1), ('OVERDUE', 'Overdue fine', 0, NULL, 1), ('PROCESSING', 'Lost item processing fee', 0, NULL, 1), +('PAYOUT', 'Payment from library to patron', 0, NULL, 1), ('RENT', 'Rental fee', 0, NULL, 1), ('RENT_DAILY', 'Daily rental fee', 0, NULL, 1), ('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1), diff --git a/installer/data/mysql/atomicupdate/bug_24080.perl b/installer/data/mysql/atomicupdate/bug_24080.perl new file mode 100644 index 0000000000..4a040a2456 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24080.perl @@ -0,0 +1,20 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion($DBversion) ) { + + $dbh->do( + qq{ + INSERT IGNORE INTO account_debit_types ( + code, + description, + can_be_added_manually, + default_amount, + is_system + ) + VALUES + ('PAYOUT', 'Payment from library to patron', 0, NULL, 1) + } + ); + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 24080 - Add PAYOUT account_debit_type)\n"; +} -- 2.20.1