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> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f0010cb39d
commit
bfa2a1a148
5 changed files with 13 additions and 1 deletions
acqui
koha-tmpl/intranet-tmpl/prog/en/modules
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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'};
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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' %]
|
||||
|
|
Loading…
Reference in a new issue