Bugzilla – Attachment 138965 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: Add new vendor_type field to edit screen and display
Bug-31017-Add-new-vendortype-field-to-edit-screen-.patch (text/plain), 6.24 KB, created by
Jonathan Druart
on 2022-08-10 09:35:30 UTC
(
hide
)
Description:
Bug 31017: Add new vendor_type field to edit screen and display
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-10 09:35:30 UTC
Size:
6.24 KB
patch
obsolete
>From 18eb80edc6cc13477f8b63b34675f6ea541f7191 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 23 Jun 2022 10:58:31 +0000 >Subject: [PATCH] Bug 31017: Add new vendor_type field to edit screen and > display > >This patch adds a new vendor_type field when creating/editing vendors >and displays the field on search and details for a vendor > >To test: > 1 - Apply patch, update database > 2 - Edit/create a vendor in acquisitions > 3 - Note new 'Vendor type' field, free text in editor > 4 - Save a value > 5 - Confirm it displays in vendor search results and vendor main page > 6 - In Authorised values add a new value to 'VENDOR_TYPE' category > 7 - Confirm the description of VENDOR_TYPE shows and makes sense > 8 - Add/Edit a vendor, note the vendor type is now a dropdown selection > 9 - Save with a value >10 - Confirm the description shows in results and vendor page and vendor details > >Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com> > >Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > acqui/booksellers.pl | 1 + > acqui/updatesupplier.pl | 1 + > .../intranet-tmpl/prog/en/modules/acqui/booksellers.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt | 8 +++++++- > .../prog/en/modules/admin/authorised_values.tt | 2 ++ > 5 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index f2a7f56b1f6..83076b44eee 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -150,6 +150,7 @@ for my $vendor (@suppliers) { > booksellerid => $vendor->id, > name => $vendor->name, > active => $vendor->active, >+ vendor_type => $vendor->vendor_type, > basketcount => $vendor->baskets->count, > subscriptioncount => $vendor->subscriptions->count, > }; >diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl >index b195c88fb6b..5d1114df833 100755 >--- a/acqui/updatesupplier.pl >+++ b/acqui/updatesupplier.pl >@@ -76,6 +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{'fax'}=$input->param('company_fax'); > $data{'url'}=$input->param('website'); > # warn "".$data{'contnotes'}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >index c1e5fc8af0f..1ef745795cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -1,6 +1,7 @@ > [% PROCESS 'i18n.inc' %] > [% USE raw %] > [% USE Asset %] >+[% USE AuthorisedValues %] > [% USE KohaDates %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -86,6 +87,7 @@ > [% END %] > </a> > <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]"></a> >+ [% IF (supplier.vendor_type) %]([% AuthorisedValues.GetByCode( 'VENDOR_TYPE', supplier.vendor_type ) | html %])[% END %] > [% IF ( !supplier.active ) %]<span class="vendor_inactive">(inactive)</span>[% END %] > </h2> > <span class="basketcounts"> >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 1ccc71b4ce5..b836a435e5e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -172,7 +172,12 @@ > <li><label for="website">Website: </label> > <input type="text" size="40" id="website" name="website" value="[% url | html %]" class="url" /></li> > <li><label for="accountnumber">Account number: </label> >- <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber | html %]" /></li></ol> >+ <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 %] >+ </li> >+ </ol> > </fieldset> > <fieldset class="rows"> > <legend>Contacts</legend> >@@ -316,6 +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">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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 46653abec40..3f05f5e4a6e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -548,6 +548,8 @@ > <p>Terms to be used in Course Reserves module. Enter terms that will show in the drop down menu when setting up a Course reserve. (For example: Spring, Summer, Winter, Fall).</p> > [% CASE 'UPLOAD' %] > <p>Categories to be assigned to file uploads. Without a category an upload is considered temporary and may be removed during automated cleanup.</p> >+ [% CASE 'VENDOR_TYPE' %] >+ <p>Values that can be entered to fill in the 'Vendor type' field in the acquisitions module, that can be used for statistical purposes</p> > [% CASE 'WITHDRAWN' %] > <p>Description of a withdrawn item (appears when adding or editing an item)</p> > [% CASE 'YES_NO' %] >-- >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