From e618a8ae66352385d3be264d31424ffef3a6645c Mon Sep 17 00:00:00 2001 From: Vassilis Kanellopoulos Date: Mon, 9 Nov 2015 11:20:21 +0200 Subject: [PATCH] add homebranch of borrowed items http://bugs.koha-community.org/show_bug.cgi?id=15136 --- 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 9166b75..c518a44 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..616cad1 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 + Item Homebranch 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