Bugzilla – Attachment 54539 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), 7.71 KB, created by
Mark Tompsett
on 2016-08-17 14:47:17 UTC
(
hide
)
Description:
Bug 16258 Add a syspref to govern EDIFACT functionality
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-08-17 14:47:17 UTC
Size:
7.71 KB
patch
obsolete
>From 0827d8f5fcde6eab755c3b1e2a55809d9891970f 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. >--- > acqui/basketgroup.pl | 5 +++++ > installer/data/mysql/atomicupdate/addedifactsyspref.sql | 1 + > installer/data/mysql/sysprefs.sql | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 2 ++ > .../prog/en/modules/admin/preferences/acquisitions.pref | 7 +++++++ > 7 files changed, 20 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/addedifactsyspref.sql > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index 85422cb..f8fb544 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -55,6 +55,7 @@ use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsBy > use C4::Branch qw/GetBranches/; > use C4::Members qw/GetMember/; > use Koha::EDI qw/create_edi_order get_edifact_ean/; >+use Koha::Database; > > use Koha::Acquisition::Bookseller; > >@@ -232,6 +233,10 @@ my $op = $input->param('op') || 'display'; > # - display : display the list of all basketgroups for a vendor > my $booksellerid = $input->param('booksellerid'); > $template->param(booksellerid => $booksellerid); >+my $schema = Koha::Database->new()->schema(); >+my $rs = $schema->resultset('VendorEdiAccount')->search( >+ { vendor_id => $booksellerid, } ); >+$template->param( ediaccount => ($rs->count > 0)); > > if ( $op eq "add" ) { > # >diff --git a/installer/data/mysql/atomicupdate/addedifactsyspref.sql b/installer/data/mysql/atomicupdate/addedifactsyspref.sql >new file mode 100644 >index 0000000..0861f03 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/addedifactsyspref.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences VALUES( 'Edifact', '0', 'Enable Edifact Electronic Ordering', 'Enables use of Edifact electronic ordering', 'YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index f06ac19..c9e1d54 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -133,6 +133,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','Enable Edifact Electronic Ordering','Enables use of Edifact electronic ordering','YesNo'), > ('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'), > ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), > ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), >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 f61dfa8..8ed6a73 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >@@ -9,7 +9,9 @@ > [% IF ( CAN_user_parameters ) %] > <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></li> > [% END %] >+ [% IF Koha.Preference("Edifact") %] > [% IF CAN_user_acquisition_edi_manage %] > <li><a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a></li> > [% END %] >+ [% END %] > </ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index 100565c..c639b6c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -144,7 +144,9 @@ function submitForm(form) { > <div class="btn-group"><a href="[% script_name %]?op=reopen&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]&mode=singlebg" class="btn btn-small" id="reopenbutton"><i class="fa fa-download"></i> Reopen this basket group</a></div> > <div class="btn-group"><a href="[% script_name %]?op=export&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket group as CSV</a></div> > <div class="btn-group"><a href="[% script_name %]?op=print&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="printbutton"><i class="fa fa-download"></i> Print this basket group in PDF</a></div> >+ [% IF ediaccount %] > <div class="btn-group"><a href="[% script_name %]?op=ediprint&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="printbutton"><i class="fa fa-download"></i> Generate EDIFACT order</a></div> >+ [% END %] > </div> > [% END %] > [% IF (name && closedbg) %] >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 bd951bc..6f26471 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 >@@ -98,10 +98,12 @@ > <dt><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></dt> > <dd>Define funds within your budgets</dd> > >+ [% IF Koha.Preference("Edifact") %] > <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> > <dd>Manage library EDI EANs</dd> >+ [% END %] > </dl> > > <h3>Additional parameters</h3> >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 26ec49a..75057d2 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 >@@ -68,6 +68,13 @@ Acquisitions: > yes: Send > no: Don't send > - blind copy (BCC) to logged in user when sending serial or acquisitions claims notices. >+ - >+ - pref: Edifact >+ default: no >+ choices: >+ yes: Enable >+ no: Disable >+ - Enable electronic ordering using EDIFACT format messages > > Printing: > - >-- >2.1.4
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