Bug 16258: Add a syspref to govern EDIFACT functionality
Adds an "Edifact" systempreference to govern whether edifact processing is enabled. In most places this is hidden if the current vendor does not appear in the edi vendors table. This preference hides the admin screens which define this and a couple of links. Also fixes an anomaly whereby the basketgroup screen was not making the same check on whether edi ordering should be enabled as the basket screen. Both now use the same logic. Rebased-by: Mark Tompsett <mtompset@hotmail.com> Rebased-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
1ff45fdf85
commit
491c8708c4
|
|
@ -52,6 +52,7 @@ use CGI qw ( -utf8 );
|
|||
use File::Spec;
|
||||
|
||||
use C4::Acquisition qw( GetOrders GetOrder get_rounded_price GetBasket GetBasketgroup GetBasketsByBasketgroup GetBasketgroups GetBasketsByBookseller ModBasket CloseBasketgroup GetBasketGroupAsCSV DelBasketgroup ReOpenBasketgroup ModBasketgroup NewBasket NewBasketgroup );
|
||||
use Koha::Database;
|
||||
use Koha::EDI qw( get_edifact_ean create_edi_order );
|
||||
|
||||
use Koha::Biblioitems;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "16258",
|
||||
description => "A preference to enabled/disable edifact",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
|
||||
('Edifact', '0', NULL, 'Enables edifact acquisitions functions', 'YesNo')
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
@ -187,6 +187,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
|
|||
('DumpTemplateVarsIntranet', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the staff intranet.', 'YesNo'),
|
||||
('DumpTemplateVarsOpac', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.', 'YesNo'),
|
||||
('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'),
|
||||
('Edifact','0','Enables edifact acquisitions functions','Enables use of Edifact electronic message exchange for acquisitions','YesNo'),
|
||||
('EdifactInvoiceImport', 'automatic', 'automatic|manual', "If on, don't auto-import EDI invoices, just keep them in the database with the status 'new'", 'Choice'),
|
||||
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
|
||||
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
[% USE Koha %]
|
||||
<div id="navmenu">
|
||||
<div id="navmenulist">
|
||||
<h5>Acquisitions</h5>
|
||||
|
|
@ -6,7 +7,7 @@
|
|||
[% IF ( CAN_user_acquisition_order_receive ) %]<li><a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a></li>[% END %]
|
||||
[% IF ( suggestion && CAN_user_suggestions_suggestions_manage ) %]<li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a></li>[% END %]
|
||||
<li><a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a></li>
|
||||
[% IF CAN_user_acquisition_edi_manage %]
|
||||
[% IF Koha.Preference('Edifact') && CAN_user_acquisition_edi_manage %]
|
||||
<li><a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
|
@ -22,7 +23,7 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_currencies_manage || CAN_user_acquisition_edi_manage || CAN_user_parameters_manage_additional_fields ) %]
|
||||
[% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_currencies_manage || ( Koha.Preference('Edifact') && CAN_user_acquisition_edi_manage ) || CAN_user_parameters_manage_additional_fields ) %]
|
||||
<h5>Administration</h5>
|
||||
<ul>
|
||||
[% IF ( CAN_user_acquisition_period_manage ) %]
|
||||
|
|
@ -34,7 +35,7 @@
|
|||
[% IF ( CAN_user_acquisition_currencies_manage ) %]
|
||||
<li><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></li>
|
||||
[% END %]
|
||||
[% IF CAN_user_acquisition_edi_manage %]
|
||||
[% IF Koha.Preference('Edifact') && CAN_user_acquisition_edi_manage %]
|
||||
<li><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></li>
|
||||
<li><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></li>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@
|
|||
</dl>
|
||||
[% END %]
|
||||
|
||||
[% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_edi_manage ) %]
|
||||
[% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || ( Koha.Preference('Edifact') && CAN_user_acquisition_edi_manage ) ) %]
|
||||
<h3>Acquisition parameters</h3>
|
||||
<dl>
|
||||
[% IF ( CAN_user_acquisition_currencies_manage ) %]
|
||||
|
|
@ -214,7 +214,7 @@
|
|||
<dt><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></dt>
|
||||
<dd>Define funds within your budgets</dd>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_acquisition_edi_manage ) %]
|
||||
[% IF ( Koha.Preference('Edifact') && CAN_user_acquisition_edi_manage ) %]
|
||||
<dt><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></dt>
|
||||
<dd>Manage vendor EDI accounts for import/export</dd>
|
||||
<dt><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></dt>
|
||||
|
|
|
|||
|
|
@ -112,6 +112,14 @@ Acquisitions:
|
|||
- 'If you choose <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailAddressForSuggestions">EmailAddressForSuggestions</a> you have to enter a valid email address:'
|
||||
- pref: EmailAddressForSuggestions
|
||||
class: email
|
||||
-
|
||||
- pref: Edifact
|
||||
default: no
|
||||
choices:
|
||||
1: Enable
|
||||
0: Disable
|
||||
- edifact message exchange for acquisitions
|
||||
|
||||
Printing:
|
||||
-
|
||||
- Use the
|
||||
|
|
|
|||
Loading…
Reference in New Issue