From 397fc4cd99e000ef8e39d7110ff44818444ac8ab 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 + .../prog/en/modules/members/boraccount.tt | 20 ++++++++++++++++++-- members/boraccount.pl | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 2729d36..e326ced 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -770,6 +770,7 @@ sub GetMemberAccountRecords { my $biblio = $item->biblio; $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 38873d0..702b5b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -45,7 +45,7 @@ $(document).ready(function() {
- +
@@ -67,6 +67,7 @@ $(document).ready(function() { Date Description of charges + Home library Note Amount Outstanding @@ -109,6 +110,7 @@ $(document).ready(function() { [%- END -%] [%- IF account.description %], [% account.description %][% END %]  [% IF ( account.itemnumber ) %][% account.title |html %][% END %] + [%- IF account.homebranch %][% account.homebranch %][% END %] [% account.note | html_line_break %] [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | $Price %] [% IF ( account.amountoutstandingcredit ) %][% ELSE %][% END %][% account.amountoutstanding | $Price %] @@ -131,11 +133,25 @@ $(document).ready(function() { [% END %] - Total due + Total due [% IF ( totalcredit ) %] +<<<<<<< HEAD [% total | $Price %] [% ELSE %] [% total | $Price %] +======= + [% IF ( reverse_col ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ( reverse_col ) %] + + [% ELSE %] + + [% END %] +>>>>>>> Bug 15136: Add homebranch of borrowed items to patron accounts tab [% END %] diff --git a/members/boraccount.pl b/members/boraccount.pl index 7f6bfda..6214508 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -94,6 +94,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 ( $patron->category->category_type =~ /^(A|I)$/ ); -- 2.1.4