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 55-63 foreach my $accountline (@$accts) { Link Here
55
}
58
}
56
59
57
my $roadtype =
60
my $roadtype =
58
  C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} );
61
  C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ) // '';
59
62
60
our $totalprice = 0;
63
our $totalprice = 0;
64
my $holds_rs = Koha::Holds->search(
65
    { borrowernumber => $borrowernumber },
66
);
67
61
$template->param(
68
$template->param(
62
    %$data,
69
    %$data,
63
70
Lines 69-74 $template->param( Link Here
69
76
70
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
77
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
71
    totalprice => $totalprice,
78
    totalprice => $totalprice,
79
80
    reserves => build_reserve_data( $holds_rs ),
72
);
81
);
73
82
74
output_html_with_http_headers $input, $cookie, $template->output;
83
output_html_with_http_headers $input, $cookie, $template->output;
Lines 103-106 sub build_issue_data { Link Here
103
    @{$return} = sort { $a->{date_due} <=> $b->{date_due} } @{$return};
112
    @{$return} = sort { $a->{date_due} <=> $b->{date_due} } @{$return};
104
113
105
    return $return;
114
    return $return;
115
116
}
117
118
sub build_reserve_data {
119
    my $reserves = shift;
120
121
    my $return = [];
122
123
    my $today = DateTime->now( time_zone => C4::Context->tz );
124
    $today->truncate( to => 'day' );
125
126
    while ( my $reserve = $reserves->next() ) {
127
128
        my $row = {
129
            title          => $reserve->biblio()->title(),
130
	    author         => $reserve->biblio()->author(),
131
	    reservedate    => $reserve->reservedate(),
132
	    expirationdate => $reserve->expirationdate(),
133
	    waiting_at     => $reserve->branch()->branchname(),
134
	};
135
        
136
        push( @{$return}, $row );
137
    }   
138
    
139
    @{$return} = sort { $a->{reservedate} <=> $b->{reservedate} } @{$return};
140
  
141
    return $return;
106
}
142
}
107
- 

Return to bug 10468