@@ -, +, @@ --- installer/data/mysql/account_debit_types.sql | 1 + installer/data/mysql/account_offset_types.sql | 3 ++- .../data/mysql/atomicupdate/bug_24080.perl | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_24080.perl --- a/installer/data/mysql/account_debit_types.sql +++ a/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), --- a/installer/data/mysql/account_offset_types.sql +++ a/installer/data/mysql/account_offset_types.sql @@ -16,4 +16,5 @@ INSERT INTO account_offset_types ( type ) VALUES ('OVERDUE_DECREASE'), ('OVERDUE'), ('Void Payment'), -('Credit Applied'); +('Credit Applied'), +('PAYOUT'); --- a/installer/data/mysql/atomicupdate/bug_24080.perl +++ a/installer/data/mysql/atomicupdate/bug_24080.perl @@ -0,0 +1,25 @@ +$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) + } + ); + + $dbh->do(qq{ + INSERT IGNORE INTO account_offset_types ( type ) VALUES ('PAYOUT'); + }); + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 24080 - Add PAYOUT account_debit_type)\n"; + print "Upgrade to $DBversion done (Bug 24080 - Add PAYOUT account_offset_type)\n"; +} --