diff --git a/Koha/Account.pm b/Koha/Account.pm index 729ded1eee..0491325f5a 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -130,7 +130,7 @@ sub pay { my $patron = Koha::Patrons->find( $self->{patron_id} ); my @account_offsets = $payment->credit_offsets( { type => 'APPLY' } )->as_list; - if ( C4::Context->preference('UseEmailReceipts') ) { + if ( C4::Context->preference('AutomaticEmailReceipts') ) { if ( my $letter = C4::Letters::GetPreparedLetter( module => 'circulation', diff --git a/installer/data/mysql/atomicupdate/bug_33473-Add-option-to-resend-email-receipt-when-UseEmailReceipts-is-enabled.pl b/installer/data/mysql/atomicupdate/bug_33473-Add-option-to-resend-email-receipt-when-UseEmailReceipts-is-enabled.pl new file mode 100755 index 0000000000..54aeb66e6f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33473-Add-option-to-resend-email-receipt-when-UseEmailReceipts-is-enabled.pl @@ -0,0 +1,17 @@ + use Modern::Perl; + + return { + bug_number => "33473", + description => "Allow to send email receipts for payments/writeoff manually instead of automatically", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + UPDATE systempreferences SET variable = 'AutomaticEmailReceipts' WHERE variable = 'UseEmailReceipts'; + } + ); + say $out "Renamed system preference 'UseEmailReceipts' to 'AutomaticEmailReceipts'"; + }, + } diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c463f31f26..e706d1b737 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -859,7 +859,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('useDaysMode','Calendar','Calendar|Days|Datedue|Dayweek','Choose the method for calculating due date: select Calendar, Datedue or Dayweek to use the holidays module, and Days to ignore the holidays module','Choice'), ('useDefaultReplacementCost', '0', NULL, 'default replacement cost defined in item type', 'YesNo'), ('useDischarge','0','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), -('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), +('AutomaticEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), ('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'), ('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'), ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 671b4f4d41..b222517dfe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -187,7 +187,7 @@ Patrons: 0: "Don't notify" - patrons whenever their password is changed. - - - pref: UseEmailReceipts + - pref: AutomaticEmailReceipts choices: 1: Send 0: "Don't send" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index d1dd2ed8e8..0eb50f138d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -157,7 +157,7 @@