Bugzilla – Attachment 57294 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]
Bug 17569: Remove C4::Members::GetUpcomingMembershipExpires
Bug-17569-Remove-C4MembersGetUpcomingMembershipExp.patch (text/plain), 2.46 KB, created by
Jonathan Druart
on 2016-11-08 08:08:00 UTC
(
hide
)
Description:
Bug 17569: Remove C4::Members::GetUpcomingMembershipExpires
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-08 08:08:00 UTC
Size:
2.46 KB
patch
obsolete
>From 62667e7f2582e300c1c0347eed00262100ae3815 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] Bug 17569: Remove C4::Members::GetUpcomingMembershipExpires > >--- > C4/Members.pm | 49 ------------------------------------------------- > 1 file changed, 49 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 8953d85..a8ebaf9 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -82,8 +82,6 @@ BEGIN { > &GetBorrowersWhoHaveNeverBorrowed > &GetBorrowersWithIssuesHistoryOlderThan > >- &GetUpcomingMembershipExpires >- > &IssueSlip > GetBorrowersWithEmail > >@@ -1164,53 +1162,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