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

(-)a/C4/Members.pm (-10 lines)
Lines 242-257 sub GetMemberDetails { Link Here
242
    $borrower->{'flags'}     = $flags;
242
    $borrower->{'flags'}     = $flags;
243
    $borrower->{'authflags'} = $accessflagshash;
243
    $borrower->{'authflags'} = $accessflagshash;
244
244
245
    # For the purposes of making templates easier, we'll define a
246
    # 'showname' which is the alternate form the user's first name if 
247
    # 'other name' is defined.
248
    if ($borrower->{category_type} eq 'I') {
249
        $borrower->{'showname'} = $borrower->{'othernames'};
250
        $borrower->{'showname'} .= " $borrower->{'firstname'}" if $borrower->{'firstname'};
251
    } else {
252
        $borrower->{'showname'} = $borrower->{'firstname'};
253
    }
254
255
    # Handle setting the true behavior for BlockExpiredPatronOpacActions
245
    # Handle setting the true behavior for BlockExpiredPatronOpacActions
256
    $borrower->{'BlockExpiredPatronOpacActions'} =
246
    $borrower->{'BlockExpiredPatronOpacActions'} =
257
      C4::Context->preference('BlockExpiredPatronOpacActions')
247
      C4::Context->preference('BlockExpiredPatronOpacActions')
(-)a/admin/aqbudgets.pl (-1 / +1 lines)
Lines 89-95 if ( $budget_period_id ) { Link Here
89
89
90
# USED FOR PERMISSION COMPARISON LATER
90
# USED FOR PERMISSION COMPARISON LATER
91
my $borrower_id         = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'};
91
my $borrower_id         = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'};
92
my $user                = GetMemberDetails($borrower_id);
92
my $user                = C4::Members::GetMember( borrowernumber => $borrower_id );
93
my $user_branchcode     = $user->{'branchcode'};
93
my $user_branchcode     = $user->{'branchcode'};
94
94
95
$template->param(
95
$template->param(
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 226-232 foreach my $item (@items) { Link Here
226
226
227
    # checking for holds
227
    # checking for holds
228
    my ($reservedate,$reservedfor,$expectedAt,undef,$wait) = GetReservesFromItemnumber($item->{itemnumber});
228
    my ($reservedate,$reservedfor,$expectedAt,undef,$wait) = GetReservesFromItemnumber($item->{itemnumber});
229
    my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0);
229
    my $ItemBorrowerReserveInfo = C4::Members::GetMember( borrowernumber => $reservedfor);
230
    
230
    
231
    if (C4::Context->preference('HidePatronName')){
231
    if (C4::Context->preference('HidePatronName')){
232
	$item->{'hidepatronname'} = 1;
232
	$item->{'hidepatronname'} = 1;
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 270-276 if ($findborrower) { Link Here
270
270
271
# get the borrower information.....
271
# get the borrower information.....
272
if ($borrowernumber) {
272
if ($borrowernumber) {
273
    $borrower = GetMemberDetails( $borrowernumber, 0 );
273
    $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
274
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
274
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
275
275
276
    # Warningdate is the date that the warning starts appearing
276
    # Warningdate is the date that the warning starts appearing
(-)a/circ/returns.pl (-4 / +4 lines)
Lines 163-169 if ( $query->param('resbarcode') ) { Link Here
163
#   check if we have other reserves for this document, if we have a return send the message of transfer
163
#   check if we have other reserves for this document, if we have a return send the message of transfer
164
    my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
164
    my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
165
165
166
    my ($borr) = GetMemberDetails( $nextreservinfo, 0 );
166
    my $borr = GetMember( borrowernumber => $nextreservinfo );
167
    my $name   = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'};
167
    my $name   = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'};
168
    if ( $messages->{'transfert'} ) {
168
    if ( $messages->{'transfert'} ) {
169
        $template->param(
169
        $template->param(
Lines 388-394 if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { Link Here
388
388
389
    my $reserve    = $messages->{'ResFound'};
389
    my $reserve    = $messages->{'ResFound'};
390
    my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'};
390
    my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'};
391
    my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 );
391
    my $borr = C4::Members::GetMember( borrowernumber => $reserve->{'borrowernumber'} );
392
    my $name = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'};
392
    my $name = $borr->{'surname'} . ", " . $borr->{'title'} . " " . $borr->{'firstname'};
393
    $template->param(
393
    $template->param(
394
            wname           => $name,
394
            wname           => $name,
Lines 414-420 if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { Link Here
414
if ( $messages->{'ResFound'}) {
414
if ( $messages->{'ResFound'}) {
415
    my $reserve    = $messages->{'ResFound'};
415
    my $reserve    = $messages->{'ResFound'};
416
    my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'};
416
    my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'};
417
    my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 );
417
    my $borr = C4::Members::GetMember( borrowernumber => $reserve->{'borrowernumber'} );
418
418
419
    if ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) {
419
    if ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) {
420
        if ( $reserve->{'ResFound'} eq "Waiting" ) {
420
        if ( $reserve->{'ResFound'} eq "Waiting" ) {
Lines 554-560 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
554
            $ri{hour}   = $duedate->hour();
554
            $ri{hour}   = $duedate->hour();
555
            $ri{minute}   = $duedate->minute();
555
            $ri{minute}   = $duedate->minute();
556
            $ri{duedate} = output_pref($duedate);
556
            $ri{duedate} = output_pref($duedate);
557
            my ($b)      = GetMemberDetails( $riborrowernumber{$_}, 0 );
557
            my $b      = C4::Members::GetMember( borrowernumber => $riborrowernumber{$_} );
558
            unless ( $dropboxmode ) {
558
            unless ( $dropboxmode ) {
559
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1);
559
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1);
560
            } else {
560
            } else {
(-)a/circ/transferstoreceive.pl (-1 / +1 lines)
Lines 101-107 foreach my $br ( keys %$branches ) { Link Here
101
            # we check if we have a reserv for this transfer
101
            # we check if we have a reserv for this transfer
102
            my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'});
102
            my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'});
103
            if ( $checkreserv[0] ) {
103
            if ( $checkreserv[0] ) {
104
                my $getborrower = GetMemberDetails( $checkreserv[1] );
104
                my $getborrower = C4::Members::GetMember( borrowernumber => $checkreserv[1] );
105
                $getransf{'borrowernum'}       = $getborrower->{'borrowernumber'};
105
                $getransf{'borrowernum'}       = $getborrower->{'borrowernumber'};
106
                $getransf{'borrowername'}      = $getborrower->{'surname'};
106
                $getransf{'borrowername'}      = $getborrower->{'surname'};
107
                $getransf{'borrowerfirstname'} = $getborrower->{'firstname'};
107
                $getransf{'borrowerfirstname'} = $getborrower->{'firstname'};
(-)a/circ/waitingreserves.pl (-1 / +1 lines)
Lines 185-191 sub cancel { Link Here
185
    # if we have a result
185
    # if we have a result
186
    if ($nextreservinfo) {
186
    if ($nextreservinfo) {
187
        my %res;
187
        my %res;
188
        my $borrowerinfo = GetMemberDetails( $nextreservinfo );
188
        my $borrowerinfo = C4::Members::GetMember( borrowernumber => $nextreservinfo );
189
        my $iteminfo = GetBiblioFromItemNumber($item);
189
        my $iteminfo = GetBiblioFromItemNumber($item);
190
        if ( $messages->{'transfert'} ) {
190
        if ( $messages->{'transfert'} ) {
191
            $res{messagetransfert} = $messages->{'transfert'};
191
            $res{messagetransfert} = $messages->{'transfert'};
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt (-1 / +1 lines)
Lines 13-19 Link Here
13
<div class="main">
13
<div class="main">
14
    <ul class="breadcrumb">
14
    <ul class="breadcrumb">
15
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
15
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
16
        <li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
16
        <li>[% IF BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
17
        <li><a href="#">Your fines and charges</a></li>
17
        <li><a href="#">Your fines and charges</a></li>
18
    </ul>
18
    </ul>
19
19
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +1 lines)
Lines 10-16 Link Here
10
<div class="main">
10
<div class="main">
11
    <ul class="breadcrumb">
11
    <ul class="breadcrumb">
12
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
13
        <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
13
        <li><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
14
        <li><a href="#">Your messaging settings</a></li>
14
        <li><a href="#">Your messaging settings</a></li>
15
    </ul>
15
    </ul>
16
16
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-21 / +18 lines)
Lines 12-18 Link Here
12
<div class="main">
12
<div class="main">
13
    <ul class="breadcrumb">
13
    <ul class="breadcrumb">
14
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
14
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
15
        <li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
15
        <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a> <span class="divider">&rsaquo;</span></li>
16
        <li><a href="#">Your summary</a></li>
16
        <li><a href="#">Your summary</a></li>
17
    </ul>
17
    </ul>
18
18
Lines 40-50 Link Here
40
                                </ul>
40
                                </ul>
41
                        </div>
41
                        </div>
42
                    [% END # / IF bor_messages %]
42
                    [% END # / IF bor_messages %]
43
                    [% FOREACH BORROWER_INF IN BORROWER_INFO %]
43
                    <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]
44
                    <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
45
                    </h2>
44
                    </h2>
46
45
47
                    <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INF.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a></p>
46
                    <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INFO.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a></p>
48
47
49
                    [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
48
                    [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
50
49
Lines 55-70 Link Here
55
                        </div>
54
                        </div>
56
                    [% END %]
55
                    [% END %]
57
56
58
                    [% IF ( BORROWER_INF.warndeparture ) %]
57
                    [% IF ( BORROWER_INFO.warndeparture ) %]
59
                        <div class="alert" id="warndeparture">
58
                        <div class="alert" id="warndeparture">
60
                            <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
59
                            <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INFO.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
61
                                [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
60
                                [% IF ( BORROWER_INFO.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
62
                        </div>
61
                        </div>
63
                    [% END %]
62
                    [% END %]
64
63
65
                    [% IF ( BORROWER_INF.warnexpired ) %]
64
                    [% IF ( BORROWER_INFO.warnexpired ) %]
66
                        <div class="alert" id="warnexpired">
65
                        <div class="alert" id="warnexpired">
67
                            <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span>
66
                            <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INFO.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span>
68
                        </div>
67
                        </div>
69
                    [% END %]
68
                    [% END %]
70
69
Lines 90-101 Link Here
90
                        <div class="alert">
89
                        <div class="alert">
91
                            <ul>
90
                            <ul>
92
                                [% IF ( userdebarred ) %]
91
                                [% IF ( userdebarred ) %]
93
                                    <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
92
                                    <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INFO.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
94
                                [% END %]
93
                                [% END %]
95
                                [% IF ( BORROWER_INF.gonenoaddress ) %]
94
                                [% IF ( BORROWER_INFO.gonenoaddress ) %]
96
                                    <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
95
                                    <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF OPACPatronDetails %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
97
                                [% END %]
96
                                [% END %]
98
                                [% IF ( BORROWER_INF.lost ) %]
97
                                [% IF ( BORROWER_INFO.lost ) %]
99
                                    <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
98
                                    <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
100
                                [% END %]
99
                                [% END %]
101
                                [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
100
                                [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
Lines 292-332 Link Here
292
291
293
                        [% IF ( OPACFinesTab ) %]
292
                        [% IF ( OPACFinesTab ) %]
294
                            <!-- FINES BOX -->
293
                            <!-- FINES BOX -->
295
                            [% IF ( BORROWER_INF.amountoverfive ) %]
294
                            [% IF BORROWER_INFO.amountoverfive %]
296
                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
295
                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
297
                                    <table class="table table-bordered table-striped">
296
                                    <table class="table table-bordered table-striped">
298
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
297
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
299
                                        <tbody>
298
                                        <tbody>
300
                                            <tr>
299
                                            <tr>
301
                                                <td>You currently owe fines and charges amounting to:</td>
300
                                                <td>You currently owe fines and charges amounting to:</td>
302
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
301
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
303
                                            </tr>
302
                                            </tr>
304
                                        </tbody>
303
                                        </tbody>
305
                                    </table>
304
                                    </table>
306
                                </div>
305
                                </div>
307
                            [% END %]
306
                            [% END %]
308
307
309
                            [% IF ( BORROWER_INF.amountoverzero ) %]
308
                            [% IF BORROWER_INFO.amountoverzero %]
310
                               <div id="opac-user-fines"> <h3>Fines and charges</h3>
309
                               <div id="opac-user-fines"> <h3>Fines and charges</h3>
311
                                    <table class="table table-bordered table-striped">
310
                                    <table class="table table-bordered table-striped">
312
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
311
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
313
                                        <tbody>
312
                                        <tbody>
314
                                            <tr>
313
                                            <tr>
315
                                                <td>You currently owe fines and charges amounting to:</td>
314
                                                <td>You currently owe fines and charges amounting to:</td>
316
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
315
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
317
                                            </tr>
316
                                            </tr>
318
                                        </tbody>
317
                                        </tbody>
319
                                    </table>
318
                                    </table>
320
                                </div>
319
                                </div>
321
                            [% END %]
320
                            [% END %]
322
321
323
                            [% IF ( BORROWER_INF.amountlessthanzero ) %]
322
                            [% IF BORROWER_INFO.amountlessthanzero %]
324
                                <div id="opac-user-fines">  <h3>Credits</h3>
323
                                <div id="opac-user-fines">  <h3>Credits</h3>
325
                                    <table class="table table-bordered table-striped">
324
                                    <table class="table table-bordered table-striped">
326
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
325
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
327
                                        <tbody>
326
                                        <tbody>
328
                                            <tr>
327
                                            <tr>
329
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
328
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
330
                                            </tr>
329
                                            </tr>
331
                                        </tbody>
330
                                        </tbody>
332
                                    </table>
331
                                    </table>
Lines 334-341 Link Here
334
                            [% END %]
333
                            [% END %]
335
                        [% END # / OPACFinesTab %]
334
                        [% END # / OPACFinesTab %]
336
335
337
                    [% END # / FOREACH BORROWER_INFO %]
338
339
                        [% IF ( waiting_count && atdestination ) %]
336
                        [% IF ( waiting_count && atdestination ) %]
340
                            <div id="opac-user-waiting">
337
                            <div id="opac-user-waiting">
341
                                <table id="waitingt" class="table table-bordered table-striped">
338
                                <table id="waitingt" class="table table-bordered table-striped">
(-)a/offline_circ/list.pl (-1 / +1 lines)
Lines 47-53 for (@$operations) { Link Here
47
    my $biblio             = GetBiblioFromItemNumber(undef, $_->{'barcode'});
47
    my $biblio             = GetBiblioFromItemNumber(undef, $_->{'barcode'});
48
    $_->{'bibliotitle'}    = $biblio->{'title'};
48
    $_->{'bibliotitle'}    = $biblio->{'title'};
49
    $_->{'biblionumber'}   = $biblio->{'biblionumber'};
49
    $_->{'biblionumber'}   = $biblio->{'biblionumber'};
50
    my $borrower           = GetMemberDetails(undef,$_->{'cardnumber'});
50
    my $borrower           = C4::Members::GetMember( cardnumber => $_->{'cardnumber'} );
51
    if ($borrower) {
51
    if ($borrower) {
52
        $_->{'borrowernumber'} = $borrower->{'borrowernumber'};
52
        $_->{'borrowernumber'} = $borrower->{'borrowernumber'};
53
        $_->{'borrower'}       = ($borrower->{'firstname'}?$borrower->{'firstname'}:'').' '.$borrower->{'surname'};
53
        $_->{'borrower'}       = ($borrower->{'firstname'}?$borrower->{'firstname'}:'').' '.$borrower->{'surname'};
(-)a/opac/opac-account.pl (-6 / +2 lines)
Lines 38-49 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
38
    }
38
    }
39
);
39
);
40
40
41
# get borrower information ....
41
my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
42
my $borr = GetMemberDetails( $borrowernumber );
42
$template->param( BORROWER_INFO => $borrower );
43
my @bordat;
44
$bordat[0] = $borr;
45
46
$template->param( BORROWER_INFO => \@bordat );
47
43
48
#get account details
44
#get account details
49
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
45
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
(-)a/opac/opac-ics.pl (-3 lines)
Lines 47-55 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
47
    }
47
    }
48
);
48
);
49
49
50
# get borrower information ....
51
my ( $borr ) =  GetMemberDetails( $borrowernumber );
52
53
# Create Calendar
50
# Create Calendar
54
my $calendar = Data::ICal->new();
51
my $calendar = Data::ICal->new();
55
52
(-)a/opac/opac-messaging.pl (-3 / +3 lines)
Lines 44-50 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
44
    }
44
    }
45
);
45
);
46
46
47
my $borrower = GetMemberDetails( $borrowernumber );
47
my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
48
my $messaging_options = C4::Members::Messaging::GetMessagingOptions();
48
my $messaging_options = C4::Members::Messaging::GetMessagingOptions();
49
49
50
if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) {
50
if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) {
Lines 52-58 if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { Link Here
52
    if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms ) {
52
    if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms ) {
53
        ModMember( borrowernumber => $borrowernumber,
53
        ModMember( borrowernumber => $borrowernumber,
54
                   smsalertnumber => $sms );
54
                   smsalertnumber => $sms );
55
        $borrower = GetMemberDetails( $borrowernumber );
55
        $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
56
    }
56
    }
57
57
58
    C4::Form::MessagingPreferences::handle_form_action($query, { borrowernumber => $borrowernumber }, $template);
58
    C4::Form::MessagingPreferences::handle_form_action($query, { borrowernumber => $borrowernumber }, $template);
Lines 60-66 if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { Link Here
60
60
61
C4::Form::MessagingPreferences::set_form_values({ borrowernumber     => $borrower->{'borrowernumber'} }, $template);
61
C4::Form::MessagingPreferences::set_form_values({ borrowernumber     => $borrower->{'borrowernumber'} }, $template);
62
62
63
$template->param( BORROWER_INFO         => [ $borrower ],
63
$template->param( BORROWER_INFO         => $borrower,
64
                  messagingview         => 1,
64
                  messagingview         => 1,
65
                  SMSnumber => $borrower->{'smsalertnumber'},
65
                  SMSnumber => $borrower->{'smsalertnumber'},
66
                  SMSSendDriver                =>  C4::Context->preference("SMSSendDriver"),
66
                  SMSSendDriver                =>  C4::Context->preference("SMSSendDriver"),
(-)a/opac/opac-passwd.pl (-2 / +1 lines)
Lines 44-51 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
44
    }
44
    }
45
);
45
);
46
46
47
# get borrower information ....
47
my $borr = C4::Members::GetMember( borrowernumber => $borrowernumber );
48
my ( $borr ) = GetMemberDetails( $borrowernumber );
49
my $minpasslen = C4::Context->preference("minPasswordLength");
48
my $minpasslen = C4::Context->preference("minPasswordLength");
50
if ( C4::Context->preference("OpacPasswordChange") ) {
49
if ( C4::Context->preference("OpacPasswordChange") ) {
51
    my $sth =  $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?");
50
    my $sth =  $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?");
(-)a/opac/opac-privacy.pl (-1 / +2 lines)
Lines 65-72 if ($op eq "delete_record") { Link Here
65
        $template->param( 'err_history_not_deleted' => 1 );
65
        $template->param( 'err_history_not_deleted' => 1 );
66
    }
66
    }
67
}
67
}
68
68
# get borrower privacy ....
69
# get borrower privacy ....
69
my ( $borr ) = GetMemberDetails( $borrowernumber );
70
my $borr = C4::Members::GetMember( borrowernumber => $borrowernumber );
70
71
71
$template->param( 'Ask_data'       => '1',
72
$template->param( 'Ask_data'       => '1',
72
                    'privacy'.$borr->{'privacy'} => 1,
73
                    'privacy'.$borr->{'privacy'} => 1,
(-)a/opac/opac-user.pl (-6 / +1 lines)
Lines 123-131 if ( $borr->{'amountoutstanding'} < 0 ) { Link Here
123
123
124
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
124
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
125
125
126
my @bordat;
127
$bordat[0] = $borr;
128
129
# Warningdate is the date that the warning starts appearing
126
# Warningdate is the date that the warning starts appearing
130
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
127
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
131
    my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );
128
    my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );
Lines 144-155 if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') Link Here
144
# pass on any renew errors to the template for displaying
141
# pass on any renew errors to the template for displaying
145
my $renew_error = $query->param('renew_error');
142
my $renew_error = $query->param('renew_error');
146
143
147
$template->param(   BORROWER_INFO     => \@bordat,
144
$template->param(   BORROWER_INFO     => $borr,
148
                    borrowernumber    => $borrowernumber,
145
                    borrowernumber    => $borrowernumber,
149
                    patron_flagged    => $borr->{flagged},
146
                    patron_flagged    => $borr->{flagged},
150
                    OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
147
                    OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
151
                    surname           => $borr->{surname},
148
                    surname           => $borr->{surname},
152
                    showname          => $borr->{showname},
153
                    RENEW_ERROR       => $renew_error,
149
                    RENEW_ERROR       => $renew_error,
154
                    borrower          => $borr,
150
                    borrower          => $borr,
155
                );
151
                );
156
- 

Return to bug 15344