Bug 31722: Fixed EDIFACT message to only display if EDIFACT is turned on

This patch makes a small change to the display of the note
"No EDIFACT configuration for..." on the basket group page to
only display if the system preference EDIFACT is set to "Enable".

To Test:
1. apply patch
2. navigate to a vendor over Acquisitions -> Vendor e.g. My Vendor
3. create a basket group (doesn't have to have any baskets, an empty one will do)
4. close the basket group
5. set system preference "EDIFACT" to "Enable"
6. navigate to Administration -> EDI Accounts and make sure the vendor doesn't have
   an EDI account configured
7. navigate to your vendor's closed basket groups
   over Acquisitions -> Vendor -> Basket groups (left panel) -> Tab "Closed"
8. you should see a message "No EDIFACT configuration for (name of vendor)" in the
   Action column
9. set system preference "EDIFACT" to "Disable"
10. go back to your vendor's closed basket groups
11. you shouldn't see the message "No EDIFACT configuration for (name of vendor)"

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2626d8a07f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Philip Orr 2023-03-30 10:09:32 +00:00 committed by Matt Blenkinsop
parent 30260ece2f
commit 8a5ff6c1f0

View file

@ -2,6 +2,7 @@
[% USE Asset %] [% USE Asset %]
[% USE Branches %] [% USE Branches %]
[% USE Price %] [% USE Price %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %] [% INCLUDE 'doc-head-open.inc' %]
<title>Basket grouping for [% booksellername | html %] &rsaquo; Koha</title> <title>Basket grouping for [% booksellername | html %] &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'doc-head-close.inc' %]
@ -323,7 +324,7 @@
<div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="newbasketgroup"><i class="fa fa-plus"></i> New basket group</a></div> <div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="newbasketgroup"><i class="fa fa-plus"></i> New basket group</a></div>
</div> </div>
<h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1> <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
[% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %] [% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
[% WRAPPER tabs id= "basket_groups" %] [% WRAPPER tabs id= "basket_groups" %]
[% WRAPPER tabs_nav %] [% WRAPPER tabs_nav %]
@ -403,11 +404,13 @@
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Reopen" /></form> <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Reopen" /></form>
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Export as PDF" /></form> <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Export as PDF" /></form>
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="export" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Export as CSV" /></form> <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="export" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Export as CSV" /></form>
[% IF (ediaccount) %] [% IF Koha.Preference('EDIFACT') %]
<form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="ediprint" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Generate EDIFACT order" /></form> [% IF (ediaccount) %]
[% ELSE %] <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="ediprint" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="Generate EDIFACT order" /></form>
<div>No EDIFACT configuration for [% booksellername | html %]</div> [% ELSE %]
[% END %] <div>No EDIFACT configuration for [% booksellername | html %]</div>
[% END %]
[% END %]
</td> </td>
</tr> </tr>
[% END %] [% END %]