Bugzilla – Attachment 138966 Details for
Bug 31017
Add type field for vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31017: Update field name to 'type'
Bug-31017-Update-field-name-to-type.patch (text/plain), 5.17 KB, created by
Jonathan Druart
on 2022-08-10 09:35:35 UTC
(
hide
)
Description:
Bug 31017: Update field name to 'type'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-10 09:35:35 UTC
Size:
5.17 KB
patch
obsolete
>From 965c2ec565d47368f21bfd8a4e26ed53c23f05e7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 9 Aug 2022 19:17:14 +0000 >Subject: [PATCH] Bug 31017: Update field name to 'type' > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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 @@ > <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber | html %]" /></li> > <li> > <label for="vendor_type">Vendor type: </label> >- [% 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 %] > </li> > </ol> > </fieldset> >@@ -321,7 +321,7 @@ > <div class="row"> > <div id="supplier-company-details" class="col-sm-6"> > <h2>Vendor details</h2> >- <p><span class="label">Type: </span>[% vendor_type | html %]</p> >+ <p><span class="label">Type: </span>[% type | html %]</p> > <p><span class="label">Company name: </span>[% name | html %]</p> > <p><span class="label">Postal address: </span>[% postal | html %]</p> > <p><span class="label">Physical address: </span>[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</p> >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31017
:
136443
|
136444
|
136445
|
136903
|
137134
|
138116
|
138117
|
138118
|
138942
|
138943
|
138944
|
138945
|
138964
|
138965
| 138966 |
138967
|
139007