From 16f4db252a38ebb524bb8839552637b27916c0f3 Mon Sep 17 00:00:00 2001 From: Vassilis Kanellopoulos Date: Mon, 9 Nov 2015 11:20:21 +0200 Subject: [PATCH] Bug 15136: Add homebranch of borrowed items to patron accounts tab Test plan: 1 - View the accounts tab for a patron with fines 2 - Note there is no homebranch displayed to see where charges came from 3 - Apply patch 4 - Reload the page and note that you see the 'Home library' column Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- C4/Members.pm | 1 + .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 14 ++++++++------ members/boraccount.pl | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 5f71e89..1bedbbd 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1180,6 +1180,7 @@ sub GetMemberAccountRecords { my $biblio = GetBiblioFromItemNumber( $data->{itemnumber} ); $data->{biblionumber} = $biblio->{biblionumber}; $data->{title} = $biblio->{title}; + $data->{homebranch} = $biblio->{homebranch}; } $acctlines[$numlines] = $data; $numlines++; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index e115c59..75a67b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -40,7 +40,7 @@ $(document).ready(function() {
- +
@@ -62,6 +62,7 @@ $(document).ready(function() { Date Description of charges + Home library Note Amount Outstanding @@ -101,6 +102,7 @@ $(document).ready(function() { [%- END -%] [%- IF account.description %], [% account.description %][% END %]  [% IF ( account.itemnumber ) %]View item [% END %][% account.title |html %] + [%- IF account.homebranch %][% account.homebranch %][% END %] [% account.note | html_line_break %] [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount %] [% IF ( account.amountoutstandingcredit ) %][% ELSE %][% END %][% account.amountoutstanding %] @@ -125,18 +127,18 @@ $(document).ready(function() { [% END %] - Total due + Total due [% IF ( totalcredit ) %] [% IF ( reverse_col ) %] - + [% ELSE %] - + [% END %] [% ELSE %] [% IF ( reverse_col ) %] - + [% ELSE %] - + [% END %] [% END %] [% total %] diff --git a/members/boraccount.pl b/members/boraccount.pl index ea63f29..abe1c01 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -89,6 +89,9 @@ foreach my $accountline ( @{$accts}) { $accountline->{payment} = 1; $reverse_col = 1; } + if ($accountline->{homebranch}) { + $accountline->{homebranch} = C4::Branch::GetBranchName($accountline->{homebranch}); + } } $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); -- 2.1.0