View | Details | Raw Unified | Return to bug 9406
Collapse All | Expand All

(-)a/circ/circulation.pl (-2 / +1 lines)
Lines 132-138 my $issueconfirmed = $query->param('issueconfirmed'); Link Here
132
my $cancelreserve  = $query->param('cancelreserve');
132
my $cancelreserve  = $query->param('cancelreserve');
133
my $organisation   = $query->param('organisations');
133
my $organisation   = $query->param('organisations');
134
my $print          = $query->param('print') || q{};
134
my $print          = $query->param('print') || q{};
135
my $newexpiry      = $query->param('dateexpiry');
136
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
135
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
137
my $charges        = $query->param('charges') || q{};
136
my $charges        = $query->param('charges') || q{};
138
137
Lines 682-688 $template->param( Link Here
682
    surname           => $borrower->{'surname'},
681
    surname           => $borrower->{'surname'},
683
    showname          => $borrower->{'showname'},
682
    showname          => $borrower->{'showname'},
684
    category_type     => $borrower->{'category_type'},
683
    category_type     => $borrower->{'category_type'},
685
    dateexpiry        => format_date($newexpiry),
684
    was_renewed       => $query->param('was_renewed') ? 1 : 0,
686
    expiry            => format_date($borrower->{'dateexpiry'}),
685
    expiry            => format_date($borrower->{'dateexpiry'}),
687
    categorycode      => $borrower->{'categorycode'},
686
    categorycode      => $borrower->{'categorycode'},
688
    categoryname      => $borrower->{description},
687
    categoryname      => $borrower->{description},
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +1 lines)
Lines 131-137 function searchToHold(){ Link Here
131
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
131
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
132
            <ul class="dropdown-menu">
132
            <ul class="dropdown-menu">
133
                [% IF ( CAN_user_borrowers ) %]
133
                [% IF ( CAN_user_borrowers ) %]
134
                    <li><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew patron</a></li>
134
                    <li><a id="renewpatron" href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=[% destination %]&amp;reregistration=y">Renew patron</a></li>
135
                [% ELSE %]
135
                [% ELSE %]
136
                    <li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
136
                    <li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
137
                [% END %]
137
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 291-297 function validate1(date) { Link Here
291
</form>
291
</form>
292
</div>
292
</div>
293
293
294
[% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
294
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
295
295
296
[% IF additional_materials %]
296
[% IF additional_materials %]
297
    <div id="materials" class="dialog message">Note about the accompanying materials: <br />
297
    <div id="materials" class="dialog message">Note about the accompanying materials: <br />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt (-1 / +1 lines)
Lines 76-82 Link Here
76
    <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li>
76
    <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li>
77
    <li><span class="label">Registration date: </span>[% dateenrolled %]</li>
77
    <li><span class="label">Registration date: </span>[% dateenrolled %]</li>
78
    <li><span class="label">Expiration date: </span>
78
    <li><span class="label">Expiration date: </span>
79
    [% IF ( reregistration ) %]
79
    [% IF ( was_renewed ) %]
80
            <strong class="reregistrinfo">[% dateexpiry %]</strong>
80
            <strong class="reregistrinfo">[% dateexpiry %]</strong>
81
    [% ELSE %]
81
    [% ELSE %]
82
            [% dateexpiry %]
82
            [% dateexpiry %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +2 lines)
Lines 181-187 function validate1(date) { Link Here
181
[% IF ( unknowuser ) %]
181
[% IF ( unknowuser ) %]
182
   <div class="dialog message">This patron does not exist.</div>
182
   <div class="dialog message">This patron does not exist.</div>
183
[% ELSE %]
183
[% ELSE %]
184
    [% IF ( reregistration ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
184
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
185
185
186
    [% IF ( flagged ) %]
186
    [% IF ( flagged ) %]
187
    <div id="circmessages" class="circmessage attention">
187
    <div id="circmessages" class="circmessage attention">
Lines 358-364 function validate1(date) { Link Here
358
    <li><span class="label">Registration date: </span>[% dateenrolled %]</li>
358
    <li><span class="label">Registration date: </span>[% dateenrolled %]</li>
359
    
359
    
360
    <li><span class="label">Expiration date: </span>
360
    <li><span class="label">Expiration date: </span>
361
    [% IF ( reregistration ) %]
361
    [% IF ( was_renewed ) %]
362
            <strong class="reregistrinfo">[% dateexpiry %]</strong>
362
            <strong class="reregistrinfo">[% dateexpiry %]</strong>
363
    [% ELSE %]
363
    [% ELSE %]
364
            [% dateexpiry %]
364
            [% dateexpiry %]
(-)a/members/moremember.pl (-7 / +1 lines)
Lines 118-124 my $borrowernumber = $input->param('borrowernumber'); Link Here
118
118
119
#start the page and read in includes
119
#start the page and read in includes
120
my $data           = GetMember( 'borrowernumber' => $borrowernumber );
120
my $data           = GetMember( 'borrowernumber' => $borrowernumber );
121
my $reregistration = $input->param('reregistration');
122
121
123
if ( not defined $data ) {
122
if ( not defined $data ) {
124
    $template->param (unknowuser => 1);
123
    $template->param (unknowuser => 1);
Lines 126-136 if ( not defined $data ) { Link Here
126
    exit;
125
    exit;
127
}
126
}
128
127
129
# re-reregistration function to automatic calcul of date expiry
130
if ( $reregistration eq 'y' ) {
131
	$data->{'dateexpiry'} = ExtendMemberSubscriptionTo( $borrowernumber );
132
}
133
134
my $category_type = $data->{'category_type'};
128
my $category_type = $data->{'category_type'};
135
129
136
### $category_type
130
### $category_type
Lines 412-418 $template->param( Link Here
412
    borrowernumber  => $borrowernumber,
406
    borrowernumber  => $borrowernumber,
413
    othernames      => $data->{'othernames'},
407
    othernames      => $data->{'othernames'},
414
    categoryname    => $data->{'description'},
408
    categoryname    => $data->{'description'},
415
    reregistration  => $reregistration,
409
    was_renewed     => $input->param('was_renewed') ? 1 : 0,
416
    branch          => $branch,
410
    branch          => $branch,
417
    todaysdate      => C4::Dates->today(),
411
    todaysdate      => C4::Dates->today(),
418
    totalprice      => sprintf("%.2f", $totalprice),
412
    totalprice      => sprintf("%.2f", $totalprice),
(-)a/members/setstatus.pl (-3 / +2 lines)
Lines 58-70 if ( $reregistration eq 'y' ) { Link Here
58
58
59
if($destination eq "circ"){
59
if($destination eq "circ"){
60
	if($dateexpiry){
60
	if($dateexpiry){
61
		print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&dateexpiry=$dateexpiry");
61
        print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&was_renewed=1");
62
	} else {
62
	} else {
63
		print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
63
		print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
64
	}
64
	}
65
} else {
65
} else {
66
	if($dateexpiry){
66
	if($dateexpiry){
67
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&dateexpiry=$dateexpiry");
67
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&was_renewed=1");
68
	} else {
68
	} else {
69
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
69
        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
70
	}
70
	}
71
- 

Return to bug 9406