From 24062e23c2060a3c99c89ce8164fecc667835e7a Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 18 Feb 2023 10:25:04 +0000 Subject: [PATCH] Bug 33003: Show the vendor type on vendor detail page When using an authorised value VENDOR_TYPE for the vendor type, we should show the AV description everywhere instead of the code. It already works on the vendor search, but not on the vendor detail page. With this patch it will also work there. To test: 1. Add at least one authorized value in VENDOR_TYPE 1.1. Go to Administration > Authorized values 1.2. Search for VENDOR_TYPE 1.3. Click 'Add' 1.4. Fill out the form - Authorized value: BOOK - Description: Print books 1.5. Click 'Save' 2. Add a new vendor 2.1. Go to Acquisitions 2.2. Click 'New vendor' 2.3. Fill out the form - Name: ABC Bookstore - Vendor type: Print books 2.4. Click 'Save' 3. Go to the vendor page 3.1. Click on the vendor name --> The value in "Type" is BOOK, it should be "Print books" 4. Apply patch 4.1. Repeat test, now it should show the description --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 0a49619121..9dd49954e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE KohaDates %] +[% USE AuthorisedValues %] [% BLOCK edit_contact %]
    @@ -306,7 +307,10 @@

    Vendor details

    -

    Type: [% type | html %]

    +

    + Type: + [% IF (type) %][% AuthorisedValues.GetByCode( 'VENDOR_TYPE', type ) | html %][% END %] +

    Company name: [% name | html %]

    Postal address: [% postal | html %]

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

    -- 2.30.2