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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt (+23 lines)
Lines 67-72 Link Here
67
        </table>
67
        </table>
68
    [% END %]
68
    [% END %]
69
69
70
        [% IF ( reserves ) %]
71
            <table>
72
                <caption>Pending holds</caption>
73
                <tr>
74
                    <th>Title</th>
75
                    <th>Author</th>
76
                    <th>Placed on</th>
77
                    <th>Expires on</th>
78
                    <th>Pick up location</th>
79
                </tr>
80
81
                [% FOREACH reserve IN reserves %]
82
                    <tr>
83
                        <td>[% reserve.title %]</td>
84
                        <td>[% reserve.author %]</td>
85
                        <td>[% reserve.reservedate | $KohaDates %]</td>
86
                        <td>[% reserve.expirationdate | $KohaDates %]</td>
87
                        <td>[% reserve.waiting_at %]</td>
88
                    </tr>
89
                [% END %]
90
    </table>
91
    [% END %]
92
70
    [% IF ( accounts && ( totaldue != '0.00' ) ) %]
93
    [% IF ( accounts && ( totaldue != '0.00' ) ) %]
71
        <table>
94
        <table>
72
            <caption>Account fines and payments</caption>
95
            <caption>Account fines and payments</caption>
(-)a/members/summary-print.pl (-2 / +37 lines)
Lines 24-29 use C4::Output; Link Here
24
use C4::Members;
24
use C4::Members;
25
use C4::Koha qw( getitemtypeinfo );
25
use C4::Koha qw( getitemtypeinfo );
26
use C4::Circulation qw( GetIssuingCharges );
26
use C4::Circulation qw( GetIssuingCharges );
27
use C4::Reserves;
28
use C4::Items;
29
use Koha::Holds;
27
30
28
my $input          = CGI->new;
31
my $input          = CGI->new;
29
my $borrowernumber = $input->param('borrowernumber');
32
my $borrowernumber = $input->param('borrowernumber');
Lines 56-68 foreach my $accountline (@$accts) { Link Here
56
}
59
}
57
60
58
my $roadtype =
61
my $roadtype =
59
  C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} );
62
  C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ) // '';
60
$roadtype = '' if ( ! $roadtype );
63
$roadtype = '' if ( ! $roadtype );
61
64
62
our $totalprice = 0;
65
our $totalprice = 0;
63
my $total_format = '';
66
my $total_format = '';
64
$total_format = sprintf( "%.2f", $total ) if ($total);
67
$total_format = sprintf( "%.2f", $total ) if ($total);
65
68
69
my $holds_rs = Koha::Holds->search(
70
    { borrowernumber => $borrowernumber },
71
);
72
66
$template->param(
73
$template->param(
67
    %$data,
74
    %$data,
68
75
Lines 74-79 $template->param( Link Here
74
81
75
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
82
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
76
    totalprice => $totalprice,
83
    totalprice => $totalprice,
84
85
    reserves => build_reserve_data( $holds_rs ),
77
);
86
);
78
87
79
output_html_with_http_headers $input, $cookie, $template->output;
88
output_html_with_http_headers $input, $cookie, $template->output;
Lines 109-112 sub build_issue_data { Link Here
109
    @{$return} = sort { $a->{date_due} eq $b->{date_due} } @{$return};
118
    @{$return} = sort { $a->{date_due} eq $b->{date_due} } @{$return};
110
119
111
    return $return;
120
    return $return;
121
122
}
123
124
sub build_reserve_data {
125
    my $reserves = shift;
126
127
    my $return = [];
128
129
    my $today = DateTime->now( time_zone => C4::Context->tz );
130
    $today->truncate( to => 'day' );
131
132
    while ( my $reserve = $reserves->next() ) {
133
134
my $row = {
135
    title          => $reserve->biblio()->title(),
136
    author         => $reserve->biblio()->author(),
137
    reservedate    => $reserve->reservedate(),
138
    expirationdate => $reserve->expirationdate(),
139
    waiting_at     => $reserve->branch()->branchname(),
140
    };
141
142
        push( @{$return}, $row );
143
    }
144
145
    @{$return} = sort { $a->{reservedate} <=> $b->{reservedate} } @{$return};
146
147
    return $return;
112
}
148
}
113
- 

Return to bug 10468