my $cancelreserve = $query->param('cancelreserve');
my $organisation = $query->param('organisations');
my $print = $query->param('print') || q{};
-my $newexpiry = $query->param('dateexpiry');
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
my $charges = $query->param('charges') || q{};
surname => $borrower->{'surname'},
showname => $borrower->{'showname'},
category_type => $borrower->{'category_type'},
- dateexpiry => format_date($newexpiry),
+ was_renewed => $query->param('was_renewed') ? 1 : 0,
expiry => format_date($borrower->{'dateexpiry'}),
categorycode => $borrower->{'categorycode'},
categoryname => $borrower->{description},
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
<ul class="dropdown-menu">
[% IF ( CAN_user_borrowers ) %]
- <li><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=[% borrowernumber %]">Renew patron</a></li>
+ <li><a id="renewpatron" href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=[% destination %]&reregistration=y">Renew patron</a></li>
[% ELSE %]
<li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
[% END %]
</form>
</div>
-[% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
+[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
[% IF additional_materials %]
<div id="materials" class="dialog message">Note about the accompanying materials: <br />
<li><span class="label">Category: </span>[% description %] ([% categorycode %])</li>
<li><span class="label">Registration date: </span>[% dateenrolled %]</li>
<li><span class="label">Expiration date: </span>
- [% IF ( reregistration ) %]
+ [% IF ( was_renewed ) %]
<strong class="reregistrinfo">[% dateexpiry %]</strong>
[% ELSE %]
[% dateexpiry %]
[% IF ( unknowuser ) %]
<div class="dialog message">This patron does not exist.</div>
[% ELSE %]
- [% IF ( reregistration ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
+ [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
[% IF ( flagged ) %]
<div id="circmessages" class="circmessage attention">
<li><span class="label">Registration date: </span>[% dateenrolled %]</li>
<li><span class="label">Expiration date: </span>
- [% IF ( reregistration ) %]
+ [% IF ( was_renewed ) %]
<strong class="reregistrinfo">[% dateexpiry %]</strong>
[% ELSE %]
[% dateexpiry %]
#start the page and read in includes
my $data = GetMember( 'borrowernumber' => $borrowernumber );
-my $reregistration = $input->param('reregistration');
if ( not defined $data ) {
$template->param (unknowuser => 1);
exit;
}
-# re-reregistration function to automatic calcul of date expiry
-if ( $reregistration eq 'y' ) {
- $data->{'dateexpiry'} = ExtendMemberSubscriptionTo( $borrowernumber );
-}
-
my $category_type = $data->{'category_type'};
### $category_type
borrowernumber => $borrowernumber,
othernames => $data->{'othernames'},
categoryname => $data->{'description'},
- reregistration => $reregistration,
+ was_renewed => $input->param('was_renewed') ? 1 : 0,
branch => $branch,
todaysdate => C4::Dates->today(),
totalprice => sprintf("%.2f", $totalprice),
if($destination eq "circ"){
if($dateexpiry){
- print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&dateexpiry=$dateexpiry");
+ print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&was_renewed=1");
} else {
print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
}
} else {
if($dateexpiry){
- print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&dateexpiry=$dateexpiry");
+ print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&was_renewed=1");
} else {
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
}