Bugzilla – Attachment 51185 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]
Proposed Patch
0001-Bug-16258-Add-a-syspref-to-govern-EDIFACT-functional.patch (text/plain), 7.45 KB, created by
Colin Campbell
on 2016-05-04 12:44:23 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2016-05-04 12:44:23 UTC
Size:
7.45 KB
patch
obsolete
>From fe5014bd3bc920dd3a2ef7458549c428b09ab021 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 | 4 ++++ > installer/data/mysql/atomicupdate/addedifactsyspref.sql | 2 ++ > installer/data/mysql/sysprefs.sql | 2 ++ > 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, 21 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/addedifactsyspref.sql > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index 85422cb..b6725fb 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -232,6 +232,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..f07d45b >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/addedifactsyspref.sql >@@ -0,0 +1,2 @@ >+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 d95754d..3e2e09b 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -132,6 +132,8 @@ 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'), >+ > ('EDIInvoicesShippingBudget',NULL,NULL,'The budget code used to allocate shipping charges to when processing EDI Invoice messages','free'), > ('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'), > ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','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 c33d6d4..110aaa4 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 e4f7b75..c580537 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 0c924b4..5c930c8 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 >@@ -67,6 +67,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.5.5 >
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