From b213d7937f939f0f9fcdbe537425db8fdc60be70 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 12 Oct 2022 04:01:20 +0000 Subject: [PATCH] Bug 23012: Database updates for PROCESSING_FOUND account credit type Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- ...-_add_PROCESSING_FOUND_to_account_credit_types.pl | 12 ++++++++++++ .../data/mysql/mandatory/account_credit_types.sql | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23012_-_add_PROCESSING_FOUND_to_account_credit_types.pl diff --git a/installer/data/mysql/atomicupdate/bug_23012_-_add_PROCESSING_FOUND_to_account_credit_types.pl b/installer/data/mysql/atomicupdate/bug_23012_-_add_PROCESSING_FOUND_to_account_credit_types.pl new file mode 100644 index 0000000000..269d96ae3c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23012_-_add_PROCESSING_FOUND_to_account_credit_types.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "23012", + description => "Add PROCESSING_FOUND to account_credit_types", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO account_credit_types ( code, description, can_be_added_manually, is_system ) VALUES ('PROCESSING_FOUND', 'Lost item processing fee refund', 0, 1) }); + }, +}; diff --git a/installer/data/mysql/mandatory/account_credit_types.sql b/installer/data/mysql/mandatory/account_credit_types.sql index 105575b425..c0b1516099 100644 --- a/installer/data/mysql/mandatory/account_credit_types.sql +++ b/installer/data/mysql/mandatory/account_credit_types.sql @@ -8,6 +8,7 @@ INSERT INTO account_credit_types ( code, description, can_be_added_manually, is_ ('REFUND', 'Refund', 0, 1), ('LOST_FOUND', 'Lost item fee refund', 0, 1), ('PURCHASE', 'Purchase', 0, 1), -('CANCELLATION', 'Cancellation', 0, 1); +('CANCELLATION', 'Cancellation', 0, 1), +('PROCESSING_FOUND', 'Lost item processing fee refund', 0, 1); INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('PAYMENT_TYPE','CASH','Cash'); -- 2.39.5