From 965c2ec565d47368f21bfd8a4e26ed53c23f05e7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 9 Aug 2022 19:17:14 +0000 Subject: [PATCH] Bug 31017: Update field name to 'type' Signed-off-by: Jonathan Druart --- acqui/booksellers.pl | 2 +- acqui/updatesupplier.pl | 2 +- installer/data/mysql/atomicupdate/bug_31017.pl | 6 +++--- installer/data/mysql/kohastructure.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 83076b44eee..43407ddad84 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -150,7 +150,7 @@ for my $vendor (@suppliers) { booksellerid => $vendor->id, name => $vendor->name, active => $vendor->active, - vendor_type => $vendor->vendor_type, + vendor_type => $vendor->type, basketcount => $vendor->baskets->count, subscriptioncount => $vendor->subscriptions->count, }; diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index 5d1114df833..75dca3c22bb 100755 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -76,7 +76,7 @@ $data{'address3'}=$addresses[2]; $data{'address4'}=$addresses[3]; $data{'phone'}=$input->param('company_phone'); $data{'accountnumber'}=$input->param('accountnumber'); -$data{'vendor_type'}=$input->param('vendor_type'); +$data{'type'}=$input->param('vendor_type'); $data{'fax'}=$input->param('company_fax'); $data{'url'}=$input->param('website'); # warn "".$data{'contnotes'}; diff --git a/installer/data/mysql/atomicupdate/bug_31017.pl b/installer/data/mysql/atomicupdate/bug_31017.pl index bf97b870e1d..4347bd682a4 100755 --- a/installer/data/mysql/atomicupdate/bug_31017.pl +++ b/installer/data/mysql/atomicupdate/bug_31017.pl @@ -6,11 +6,11 @@ return { up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - unless( column_exists('aqbooksellers','vendor_type') ){ + unless( column_exists('aqbooksellers','type') ){ $dbh->do(q{ - ALTER TABLE aqbooksellers ADD COLUMN vendor_type varchar(255) DEFAULT NULL AFTER accountnumber + ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber }); - say $out "Added vendor_type column"; + say $out "Added type column to aqbooksellers"; } $dbh->do(q{ INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 097bebb8615..7eafe844131 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -404,7 +404,7 @@ CREATE TABLE `aqbooksellers` ( `address4` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'fourth line of vendor physical address', `phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor phone number', `accountnumber` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor account number', - `vendor_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'order notes', `postal` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor postal address (all lines)', `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor web address', diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index b836a435e5e..45562467db6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -175,7 +175,7 @@
  • - [% PROCESS 'av-build-dropbox.inc' name="vendor_type", category="VENDOR_TYPE", default=vendor_type, empty=1, size = 20 %] + [% PROCESS 'av-build-dropbox.inc' name="vendor_type", category="VENDOR_TYPE", default=type, empty=1, size = 20 %]
  • @@ -321,7 +321,7 @@

    Vendor details

    -

    Type: [% vendor_type | html %]

    +

    Type: [% type | html %]

    Company name: [% name | html %]

    Postal address: [% postal | html %]

    Physical address: [% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]

    -- 2.25.1