From 85f7156240dacacd60b102898f76550778ee1001 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Sat, 15 May 2021 08:34:05 +0100 Subject: [PATCH] Bug 22435: Further refinements to account-details table --- Koha/Account/Line.pm | 13 +++++++++ .../en/modules/members/accountline-details.tt | 28 +++++++++++-------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 1d91cef2f7..949bd23c09 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -58,6 +58,19 @@ sub patron { return Koha::Patron->_new_from_dbic( $rs ); } +=head3 manager + +Return the manager linked to this account line + +=cut + +sub manager { + my ( $self ) = @_; + my $rs = $self->_result->manager; + return unless $rs; + return Koha::Patron->_new_from_dbic( $rs ); +} + =head3 item Return the item linked to this account line if exists diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt index ba4ce08a52..502b6a78a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -139,11 +139,11 @@ Date - Change amount - Change type + Change + Action + Relation Transacting librarian Note -   @@ -169,19 +169,25 @@ [% ao.created_on | $KohaDates with_hours => 1%] [% ao.amount | $Price %] - [%- IF offset_accountline -%] - [% PROCESS account_type_description account=offset_accountline %] ([% PROCESS ao_description ao=ao %]) - [%- ELSE -%] - [% PROCESS ao_description ao=ao %] - [%- END -%] + [% PROCESS ao_description ao=ao %] - [% IF offset_accountline.manager_id %][% offset_accountline.manager_id | html %][% END %] - [% offset_accountline.note | html %] [%- IF offset_accountline -%] - Details + [% PROCESS account_type_description account=offset_accountline %] ([% offset_accountline.id | html %]) [%- END -%] + + [% IF offset_accountline.manager_id %] + + [% IF offset_accountline.manager.firstname %] + [% offset_accountline.manager.firstname | html %] [% offest_accountline.manager.surname | html %] + [% ELSE %] + [% offset_accountline.manager.surname | html %] + [% END %] + + [% END %] + + [% offset_accountline.note | html %] [% END %] -- 2.20.1