@@ -, +, @@ instead) --- acqui/basketgroup.pl | 2 +- acqui/neworderempty.pl | 4 ++-- acqui/orderreceive.pl | 4 ++-- acqui/parcels.pl | 2 +- acqui/supplier.pl | 4 ++-- .../data/mysql/atomicupdate/bug_27485-rename_syspref.perl | 13 +++++++++++++ installer/data/mysql/localization/de-DE/custom.sql | 2 +- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../system_preferences_full_optimal_for_install_only.sql | 2 +- .../system_preferences_optimal_values_insert_only.sql | 2 +- .../intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 2 +- .../prog/en/modules/admin/preferences/acquisitions.pref | 2 +- t/Prices.t | 2 +- 13 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27485-rename_syspref.perl --- a/acqui/basketgroup.pl +++ a/acqui/basketgroup.pl @@ -208,7 +208,7 @@ sub printbasketgrouppdf{ -type => 'application/pdf', -attachment => ( $basketgroup->{name} || $basketgroupid ) . '.pdf' ); - my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->tax_rate // C4::Context->preference("gist")) || die "pdf generation failed"; + my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->tax_rate // C4::Context->preference("TaxRates")) || die "pdf generation failed"; print $pdf; } --- a/acqui/neworderempty.pl +++ a/acqui/neworderempty.pl @@ -405,10 +405,10 @@ if ( defined $from_subscriptionid ) { my (undef, $barcode_subfield) = GetMarcFromKohaField( 'items.barcode' ); -# get option values for gist syspref +# get option values for TaxRates syspref my @gst_values = map { option => $_ + 0.0 -}, split( '\|', C4::Context->preference("gist") ); +}, split( '\|', C4::Context->preference("TaxRates") ); my $quantity = $input->param('rr_quantity_to_order') ? $input->param('rr_quantity_to_order') : --- a/acqui/orderreceive.pl +++ a/acqui/orderreceive.pl @@ -124,10 +124,10 @@ my $budget = GetBudget( $order->budget_id ); my $datereceived = $order->datereceived ? dt_from_string( $order->datereceived ) : dt_from_string; -# get option values for gist syspref +# get option values for TaxRates syspref my @gst_values = map { option => $_ + 0.0 -}, split( '\|', C4::Context->preference("gist") ); +}, split( '\|', C4::Context->preference("TaxRates") ); my $order_internalnote = $order->order_internalnote; my $order_vendornote = $order->order_vendornote; --- a/acqui/parcels.pl +++ a/acqui/parcels.pl @@ -201,7 +201,7 @@ $template->param( name => $bookseller->name, shipmentdate_today => dt_from_string, booksellerid => $booksellerid, - GST => C4::Context->preference('gist'), + GST => C4::Context->preference('TaxRates'), budgets => $budget_loop, ); --- a/acqui/supplier.pl +++ a/acqui/supplier.pl @@ -100,10 +100,10 @@ if ( $op eq 'display' ) { } else { my @currencies = Koha::Acquisition::Currencies->search; - # get option values from gist syspref + # get option values from TaxRates syspref my @gst_values = map { option => $_ + 0.0 - }, split( '\|', C4::Context->preference("gist") ); + }, split( '\|', C4::Context->preference("TaxRates") ); $template->param( # set active ON by default for supplier add (id empty for add) --- a/installer/data/mysql/atomicupdate/bug_27485-rename_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27485-rename_syspref.perl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + $dbh->do(q{UPDATE systempreferences set variable="TaxRates" WHERE variable="gist"}); + + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, XXXXX, "Description"); +} --- a/installer/data/mysql/localization/de-DE/custom.sql +++ a/installer/data/mysql/localization/de-DE/custom.sql @@ -33,7 +33,7 @@ UPDATE systempreferences SET value = WHERE variable = 'OPACSearchForTitleIn'; -- Sunday = 0, Monday = 1, etc. UPDATE systempreferences SET value = '1' WHERE variable = 'CalendarFirstDayOfWeek'; -UPDATE systempreferences SET value = '0.07|0.19|0.00' WHERE variable = 'gist'; +UPDATE systempreferences SET value = '0.07|0.19|0.00' WHERE variable = 'TaxRates'; UPDATE systempreferences SET value = 'Dieser Text wird über den Systemparameter RoutingListNote konfiguriert.' where variable = 'RoutingListNote'; UPDATE systempreferences SET value = 'barcode stocknumber' WHERE variable = 'uniqueitemfields'; UPDATE systempreferences SET value = 'de-DE,en' WHERE variable = 'language'; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -211,7 +211,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines). Requires accruefines cronjob.','Choice'), ('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), ('GDPR_Policy','','Enforced|Permissive|Disabled','General Data Protection Regulation - policy', 'Choice'), -('gist','0','','Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','Integer'), +('TaxRates','0','','Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','Integer'), ('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'), ('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'), ('GoogleOAuth2ClientID', '', NULL, 'Client ID for the web app registered with Google', 'Free'), --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -22,7 +22,7 @@ UPDATE systempreferences SET value = 'Господин|Госпожа|Мисте UPDATE systempreferences SET value = 'metric' WHERE variable = 'dateformat'; UPDATE systempreferences SET value = 'udc' WHERE variable = 'DefaultClassificationSource'; UPDATE systempreferences SET value = '1' WHERE variable = 'ExtendedPatronAttributes'; -UPDATE systempreferences SET value = '0.20' WHERE variable = 'gist'; +UPDATE systempreferences SET value = '0.20' WHERE variable = 'TaxRates'; UPDATE systempreferences SET value = '942hv' WHERE variable = 'itemcallnumber'; UPDATE systempreferences SET value = 'ru-RU,uk-UA,en,fr-FR,de-DE' WHERE variable = 'language'; UPDATE systempreferences SET value = 'ru-RU,uk-UA,en,fr-FR,de-DE' WHERE variable = 'opaclanguages'; --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_optimal_values_insert_only.sql +++ a/installer/data/mysql/ru-RU/mandatory/system_preferences_optimal_values_insert_only.sql @@ -6,7 +6,7 @@ UPDATE systempreferences SET value='OPENOFFICE.ORG' WHERE variable='MIME'; -- Acquisitions - Поступления -UPDATE systempreferences SET value='0.20' WHERE variable='gist'; +UPDATE systempreferences SET value='0.20' WHERE variable='TaxRates'; -- EnhancedContent - Расширенное содержимое --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -406,7 +406,7 @@ [% END %] - [% IF !gst_found %]Tax rate not defined in system preference gist![% END %] + [% IF !gst_found %]Tax rate not defined in system preference TaxRates![% END %] [% ELSE %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -36,7 +36,7 @@ Acquisitions: CH: 360'000.00 (CH) - - Tax rates are - - pref: gist + - pref: TaxRates - . Enter in numeric form, 0.12 for 12%. The first item in the list will be selected by default. For more than one value, separate with | (pipe). - "Please note: The database will only accept values up to 4 decimals precision, further values will be rounded." - --- a/t/Prices.t +++ a/t/Prices.t @@ -18,7 +18,7 @@ use_ok('C4::Acquisition'); use_ok('C4::Context'); use_ok('Koha::Number::Price'); -t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' ); +t::lib::Mocks::mock_preference( 'TaxRates', '0.02|0.05|0.196' ); use Test::DBIx::Class; --