@@ -, +, @@ --- 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 | 4 ++-- .../prog/en/modules/admin/admin-home.tt | 2 +- .../modules/admin/preferences/acquisitions.pref | 8 ++++++++ 6 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_16258.pl --- a/acqui/basketgroup.pl +++ a/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; --- a/installer/data/mysql/atomicupdate/bug_16258.pl +++ a/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') + }); + }, +}; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/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), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -6,7 +6,7 @@ [% IF ( CAN_user_acquisition_order_receive ) %]
  • Late orders
  • [% END %] [% IF ( suggestion && CAN_user_suggestions_suggestions_manage ) %]
  • Suggestions
  • [% END %]
  • Invoices
  • - [% IF CAN_user_acquisition_edi_manage %] + [% IF Koha.Preference("Edifact") && CAN_user_acquisition_edi_manage %]
  • EDIFACT messages
  • [% END %] @@ -34,7 +34,7 @@ [% IF ( CAN_user_acquisition_currencies_manage ) %]
  • Currencies
  • [% END %] - [% IF CAN_user_acquisition_edi_manage %] + [% IF Koha.Preference("Edifact") && CAN_user_acquisition_edi_manage %]
  • EDI accounts
  • Library EANs
  • [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -214,7 +214,7 @@
    Funds
    Define funds within your budgets
    [% END %] - [% IF ( CAN_user_acquisition_edi_manage ) %] + [% IF ( Koha.Preference("Edifact") && CAN_user_acquisition_edi_manage ) %]
    EDI accounts
    Manage vendor EDI accounts for import/export
    Library EANs
    --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -112,6 +112,14 @@ Acquisitions: - 'If you choose EmailAddressForSuggestions you have to enter a valid email address:' - pref: EmailAddressForSuggestions class: email + - + - pref: Edifact + default: no + choices: + yes: Enable + no: Disable + - Enable electronic ordering using EDIFACT format messages + Printing: - - Use the --