Bugzilla – Attachment 13913 Details for
Bug 9151
Renewal notice according to patron alert preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] BUG 9151 - Renewal notice according to patron alert preferences
BUG-9151---Renewal-notice-according-to-patron-aler.patch (text/plain), 3.33 KB, created by
Kyle M Hall (khall)
on 2012-12-07 12:58:50 UTC
(
hide
)
Description:
[SIGNED-OFF] BUG 9151 - Renewal notice according to patron alert preferences
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-12-07 12:58:50 UTC
Size:
3.33 KB
patch
obsolete
>From fda9c62684818a0666786fcbda991953fd143657 Mon Sep 17 00:00:00 2001 >From: Vitor FERNANDES <vfernandes@keep.pt> >Date: Tue, 27 Nov 2012 12:42:18 +0000 >Subject: [PATCH] BUG 9151 - Renewal notice according to patron alert preferences > >Modifications on AddRenewals and SendCirculationAlert in order to send a renewal notice to the patron according to the patron checkout alert preference. >Added a new notice template for renewals notices. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 22 +++++++++++++++++++++- > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > 2 files changed, 31 insertions(+), 1 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index afe7a6a..4154786 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2581,6 +2581,25 @@ sub AddRenewal { > "Renewal of Rental Item $item->{'title'} $item->{'barcode'}", > 'Rent', $charge, $itemnumber ); > } >+ >+ # Send a renewal slip according to checkout alert preference >+ my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ); >+ my $circulation_alert = 'C4::ItemCirculationAlertPreference'; >+ my %conditions = ( >+ branchcode => $branch, >+ categorycode => $borrower->{categorycode}, >+ item_type => $item->{itype}, >+ notification => 'CHECKOUT', >+ ); >+ if ($circulation_alert->is_enabled_for(\%conditions)) { >+ SendCirculationAlert({ >+ type => 'RENEWAL', >+ item => $item, >+ borrower => $borrower, >+ branch => $branch, >+ }); >+ } >+ > # Log the renewal > UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber, undef, $item->{'ccode'}); > return $datedue; >@@ -2902,12 +2921,13 @@ sub SendCirculationAlert { > my %message_name = ( > CHECKIN => 'Item_Check_in', > CHECKOUT => 'Item_Checkout', >+ RENEWAL => 'Item_Checkout', > ); > my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences({ > borrowernumber => $borrower->{borrowernumber}, > message_name => $message_name{$type}, > }); >- my $issues_table = ( $type eq 'CHECKOUT' ) ? 'issues' : 'old_issues'; >+ my $issues_table = ( $type eq 'CHECKOUT' || $type eq 'RENEWAL' ) ? 'issues' : 'old_issues'; > my $letter = C4::Letters::GetPreparedLetter ( > module => 'circulation', > letter_code => $type, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6080ff2..9260262 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6134,6 +6134,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "XXXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do(q{ >+ INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES >+ ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'); >+ }); >+ print "Upgrade to $DBversion done (Bug 9151 - Renewal notice according to patron alert preferences)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.2.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 9151
:
13704
|
13705
|
13913
|
13914
|
13915
|
14215
|
14216
|
14217
|
14218
|
14477
|
14638
|
14639