From be7b4dffb9dd9cb2d0d81833c7ea51227b323a70 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 21 Feb 2022 16:25:44 +0000 Subject: [PATCH] Bug 30130: Add standard field to edi_account This patch add a 'standard' field to the edifact account configuration table to allow setting the message standard as either 'EDItEUR' or 'BiC'. Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Fridolin Somers --- .../data/mysql/atomicupdate/bug_30130.pl | 19 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_30130.pl diff --git a/installer/data/mysql/atomicupdate/bug_30130.pl b/installer/data/mysql/atomicupdate/bug_30130.pl new file mode 100644 index 0000000000..7dfd3dce17 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30130.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "30130", + description => "A standard to edi_account", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + unless ( column_exists('vendor_edi_accounts', 'standard') ) { + $dbh->do(q{ + ALTER TABLE vendor_edi_accounts ADD standard varchar(3) DEFAULT 'EUR' AFTER san + }); + + $dbh->do(q{ + UPDATE vendor_edi_accounts SET standard = 'BIC' WHERE san IN ( '5013546025065', '9377779308820' ) + }); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5a7616c8d9..a7b71dfcf1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -5263,6 +5263,7 @@ CREATE TABLE `vendor_edi_accounts` ( `download_directory` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `upload_directory` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `san` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `standard` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT 'EUR', `id_code_qualifier` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT '14', `transport` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT 'FTP', `quotes_enabled` tinyint(1) NOT NULL DEFAULT 0, -- 2.39.5