+
+ - [% address %]
[% address2 %]
+ - [% city %], [% zipcode %]
+ - [% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]
+ - [% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]
+ [% IF ( emailpro ) %]
+ - [% emailpro %]
+ [% END %]
+ - Registration date: [% dateenrolled | $KohaDates %]
+ - Expiration date: [% dateexpiry | $KohaDates %]
+ - Library: [% Branches.GetName( branchcode ) %]
+ - Category: [% description %]
+
-
+ [% IF ( issues ) %]
+
+ Items checked out
+
+ Title |
+ Author |
+ Call no |
+ Item type |
+ Date due |
+ Barcode |
+ Charge |
+ Price |
+ Status |
+
-- [% address %]
[% address2 %] - [% city %], [% zipcode %]
-- [% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]
-- [% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]
-[% IF ( emailpro ) %]- [% emailpro %]
[% END %]
-- Registration date: [% dateenrolled %]
-- Expiration date: [% dateexpiry %]
-- Library: [% branchname %]
-- Category: [% description %]
-
+ [% FOREACH issueloo IN issues %]
+ [% IF ( issueloo.red ) %][% ELSE %]
[% END %]
+
+ [% issueloo.title |html %]
+
+ |
+ [% issueloo.author %] |
+ [% issueloo.itemcallnumber %] |
+ [% issueloo.itemtype_description %] |
+ [% issueloo.date_due %] |
+ [% issueloo.barcode %] |
+ [% issueloo.charge %] |
+ [% issueloo.replacementprice %] |
+ [% IF ( issueloo.red ) %]Overdue![% ELSE %] [% END %] |
+
+ [% END %]
-[% IF ( issueloop ) %]
-
- Items checked out
-
- Title |
- Author |
- Call no |
- Item type |
- Date due |
- Barcode |
- Charge |
- Price |
- Status |
-
+
+ Totals: |
+ [% totaldue %] |
+ [% totalprice %] |
+ |
+
+
+ [% END %]
- [% FOREACH issueloo IN issueloop %]
- [% IF ( issueloo.red ) %][% ELSE %]
[% END %]
-
- [% issueloo.title |html %]
-
-
- |
- [% issueloo.author %] |
- [% issueloo.itemcallnumber %] |
- [% issueloo.itemtype_description %] |
- [% issueloo.date_due %] |
- [% issueloo.barcode %] |
- [% issueloo.charge %] |
- [% issueloo.replacementprice %] |
- [% IF ( issueloo.red ) %]Overdue![% ELSE %] [% END %] |
-
- [% END %]
-
- Totals: |
- [% totaldue %] |
- [% totalprice %] |
- |
-
-
- [% END %]
-
-[% IF ( reserveloop ) %]
-
- Items on Reserve
-
- Title |
- Author |
- Format |
- Requested |
-
+ [% IF ( accounts && ( totaldue != '0.00' ) ) %]
+
+ Account fines and payments
+
+ Description of charges |
+ Date |
+ Amount |
+ Outstanding |
+
-[% FOREACH reserveloo IN reserveloop %]
-
- [% reserveloo.btitle %] |
- [% reserveloo.author %] |
- [% reserveloo.description %] |
- [% reserveloo.reservedate2 %] |
-
- [% END %]
-
-[% END %]
+ [% FOREACH account IN accounts %]
+ [% NEXT IF account.amountoutstanding == '0.00' %]
+
+
+ [% IF ( account.itemnumber ) %][% END %]
+ [% account.description %] [% IF ( account.printtitle ) %] [% account.title |html %][% END %]
+ [% IF ( account.itemnumber ) %][% END %]
+ |
+ [% account.date | $KohaDates %] |
+ [% account.amount %] |
+ [% account.amountoutstanding %] |
+
+ [% END %]
-[% IF ( accounts && ( totaldue != '0.00' ) ) %]
-
[% END %]
-
-
- Total due |
- [% totaldue %] |
-
-
-
-[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
--- a/members/summary-print.pl
+++ a/members/summary-print.pl
@@ -0,0 +1,101 @@
+#!/usr/bin/perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+
+use CGI;
+
+use C4::Auth;
+use C4::Output;
+use C4::Members;
+use C4::Koha qw( getitemtypeinfo );
+use C4::Circulation qw( GetIssuingCharges );
+
+my $input = CGI->new;
+my $borrowernumber = $input->param('borrowernumber');
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "members/moremember-print.tt",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { circulate => "circulate_remaining_permissions" },
+ debug => 1,
+ }
+);
+
+my $data = GetMember( 'borrowernumber' => $borrowernumber );
+
+my ( $total, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber);
+foreach my $accountline (@$accts) {
+ $accountline->{amount} = sprintf '%.2f', $accountline->{amount};
+ $accountline->{amountoutstanding} = sprintf '%.2f',
+ $accountline->{amountoutstanding};
+
+ if ( $accountline->{accounttype} ne 'F'
+ && $accountline->{accounttype} ne 'FU' )
+ {
+ $accountline->{printtitle} = 1;
+ }
+}
+
+my $roadtype =
+ C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} );
+
+our $totalprice = 0;
+$template->param(
+ %$data,
+
+ borrowernumber => $borrowernumber,
+ address => $data->{'streetnumber'} . " $roadtype " . $data->{'address'},
+
+ accounts => $accts,
+ totaldue => sprintf( "%.2f", $total ),
+
+ issues => build_issue_data( GetPendingIssues($borrowernumber) ),
+ totalprice => $totalprice,
+);
+
+output_html_with_http_headers $input, $cookie, $template->output;
+
+sub build_issue_data {
+ my $issues = shift;
+
+ my $return;
+
+ my $today = DateTime->now( time_zone => C4::Context->tz );
+ $today->truncate( to => 'day' );
+
+ foreach my $issue ( @{$issues} ) {
+
+ my %row = %{$issue};
+ $totalprice += $issue->{replacementprice};
+
+ #find the charge for an item
+ my ( $charge, $itemtype ) =
+ GetIssuingCharges( $issue->{itemnumber}, $borrowernumber );
+
+ my $itemtypeinfo = getitemtypeinfo($itemtype);
+ $row{'itemtype_description'} = $itemtypeinfo->{description};
+
+ $row{'charge'} = sprintf( "%.2f", $charge );
+
+ push( @{$return}, \%row );
+ }
+ return $return;
+}
--