Bugzilla – Attachment 57318 Details for
Bug 17569
Move GetUpcomingMembershipExpires to Koha::Patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17569: Remove C4::Members::GetUpcomingMembershipExpires
SIGNED-OFF-Bug-17569-Remove-C4MembersGetUpcomingMe.patch (text/plain), 2.53 KB, created by
Josef Moravec
on 2016-11-08 12:38:46 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17569: Remove C4::Members::GetUpcomingMembershipExpires
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-11-08 12:38:46 UTC
Size:
2.53 KB
patch
obsolete
>From 4bd6c34a2b6e561a0556b561db02d36a0123abfe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 8 Nov 2016 08:02:38 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17569: Remove > C4::Members::GetUpcomingMembershipExpires > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/Members.pm | 49 ------------------------------------------------- > 1 file changed, 49 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index eecb653..757c5ed 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -80,8 +80,6 @@ BEGIN { > &GetBorrowersWhoHaveNeverBorrowed > &GetBorrowersWithIssuesHistoryOlderThan > >- &GetUpcomingMembershipExpires >- > &IssueSlip > GetBorrowersWithEmail > >@@ -1162,53 +1160,6 @@ sub GetNoticeEmailAddress { > return $data->{'primaryemail'} || ''; > } > >-=head2 GetUpcomingMembershipExpires >- >- my $expires = GetUpcomingMembershipExpires({ >- branch => $branch, before => $before, after => $after, >- }); >- >- $branch is an optional branch code. >- $before/$after is an optional number of days before/after the date that >- is set by the preference MembershipExpiryDaysNotice. >- If the pref would be 14, before 2 and after 3, you will get all expires >- from 12 to 17 days. >- >-=cut >- >-sub GetUpcomingMembershipExpires { >- my ( $params ) = @_; >- my $before = $params->{before} || 0; >- my $after = $params->{after} || 0; >- my $branch = $params->{branch}; >- >- my $dbh = C4::Context->dbh; >- my $days = C4::Context->preference("MembershipExpiryDaysNotice") || 0; >- my $date1 = dt_from_string->add( days => $days - $before ); >- my $date2 = dt_from_string->add( days => $days + $after ); >- $date1= output_pref({ dt => $date1, dateformat => 'iso', dateonly => 1 }); >- $date2= output_pref({ dt => $date2, dateformat => 'iso', dateonly => 1 }); >- >- my $query = q| >- SELECT borrowers.*, categories.description, >- branches.branchname, branches.branchemail FROM borrowers >- LEFT JOIN branches USING (branchcode) >- LEFT JOIN categories USING (categorycode) >- |; >- if( $branch ) { >- $query.= 'WHERE branchcode=? AND dateexpiry BETWEEN ? AND ?'; >- } else { >- $query.= 'WHERE dateexpiry BETWEEN ? AND ?'; >- } >- >- my $sth = $dbh->prepare( $query ); >- my @pars = $branch? ( $branch ): (); >- push @pars, $date1, $date2; >- $sth->execute( @pars ); >- my $results = $sth->fetchall_arrayref( {} ); >- return $results; >-} >- > =head2 GetAge > > $dateofbirth,$date = &GetAge($date); >-- >2.1.4
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 17569
:
57265
|
57266
|
57267
|
57294
|
57295
|
57315
|
57316
|
57317
|
57318
|
57319
|
57894
|
57895
|
57896
|
57897
|
57898
|
57908
|
57909
|
57910
|
57911
|
57912
|
57913
|
58478
|
58479
|
58480
|
58481
|
58482
|
58483