Bugzilla – Attachment 132391 Details for
Bug 16258
Add a preference to turn EDIFACT off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16258: Add a syspref to govern EDIFACT functionality
Bug-16258-Add-a-syspref-to-govern-EDIFACT-function.patch (text/plain), 8.67 KB, created by
Nick Clemens (kidclamp)
on 2022-03-29 11:38:10 UTC
(
hide
)
Description:
Bug 16258: Add a syspref to govern EDIFACT functionality
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-03-29 11:38:10 UTC
Size:
8.67 KB
patch
obsolete
>From 7c461ea6909ccf462770364ea13f58e25edac7d6 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 4 May 2016 13:31:01 +0100 >Subject: [PATCH] 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> >--- > acqui/basketgroup.pl | 1 + > installer/data/mysql/atomicupdate/bug_16258.pl | 15 +++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/includes/acquisitions-menu.inc | 7 ++++--- > .../prog/en/modules/admin/admin-home.tt | 4 ++-- > .../modules/admin/preferences/acquisitions.pref | 8 ++++++++ > 6 files changed, 31 insertions(+), 5 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_16258.pl > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index 2d4241e025..336a8fb4d2 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -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; >diff --git a/installer/data/mysql/atomicupdate/bug_16258.pl b/installer/data/mysql/atomicupdate/bug_16258.pl >new file mode 100755 >index 0000000000..521b1ef2cf >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16258.pl >@@ -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') >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index deaf6b6fc2..02e50f42cd 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -186,6 +186,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), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >index a83bc21d96..feabd0861d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >@@ -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 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >index afdae6c399..3ba67e8368 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >@@ -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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 7d6a3c3bc4..951de6305d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -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 >-- >2.30.2
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 16258
:
51185
|
51228
|
54539
|
54567
|
130451
|
130453
|
130454
|
130455
|
130470
|
130471
|
130472
|
130473
|
130474
|
130475
|
130833
|
130834
|
130835
|
130836
|
130837
|
130838
|
130839
|
130840
|
130841
|
130842
|
130952
|
130980
|
130981
|
130982
|
130983
|
130984
|
130985
|
130986
|
130987
|
130988
|
130989
|
130990
| 132391 |
132392
|
132393
|
132394
|
132395
|
132396
|
132397
|
132398
|
132399
|
132400
|
132401
|
132402