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 <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2022-02-21 16:25:44 +00:00 committed by Fridolin Somers
parent 6f101d68b6
commit be7b4dffb9
2 changed files with 20 additions and 0 deletions

View file

@ -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' )
});
}
},
};

View file

@ -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,