@@ -, +, @@ history --- Koha/Account/Line.pm | 13 ++ .../prog/en/includes/accounts.inc | 14 --- .../en/modules/members/accountline-details.tt | 119 ++++++++++-------- .../bootstrap/en/includes/accounts.inc | 14 --- members/accountline-details.pl | 17 +-- 5 files changed, 92 insertions(+), 85 deletions(-) --- a/Koha/Account/Line.pm +++ a/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 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -56,17 +56,3 @@ [%- CASE -%] [%- END -%] [%- END -%] - -[%- BLOCK offset_type_description -%] - [%- SWITCH account_offset.type -%] - [%- CASE 'Credit Applied' -%]Credit applied - [%- CASE 'Payment' -%]Payment - [%- CASE 'Manual Credit' -%]Manual credit - [%- CASE 'Manual Debit' -%]Manual invoice - [%- CASE 'Lost Item' -%]Lost item returned - [%- CASE 'Writeoff' -%]Writeoff - [%- CASE 'Void Payment' -%]Void payment - [%- CASE 'CANCELLATION' -%]Cancelled charge - [%- CASE -%][% account_offset.type | html %] - [%- END -%] -[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -7,7 +7,7 @@ [% SET footerjs = 1 %] [% PROCESS 'accounts.inc' %] [% INCLUDE 'doc-head-open.inc' %] -
Date | -Description of charges | +Description | Barcode | Due date | Return date | @@ -83,7 +86,7 @@
---|---|---|---|---|---|
- [% accountline.date |$KohaDates %] + [% accountline.date | $KohaDates %] | [%- PROCESS account_type_description account=accountline -%] @@ -134,63 +137,81 @@ |
Date created | -Date updated | -Amount | -Amount outstanding | +Date | +Change | +Action | +Related transaction | +|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Increase | +Decrease | Type | +Amount | +Librarian | Note | -Transacting librarian | -Date/time of change | -Amount of change | -Type of change | -|||||||||||
[% offset_accountline.date | $KohaDates %] | -[% offset_accountline.timestamp | $KohaDates with_hours => 1 %] | -[% offset_accountline.amount | $Price %] | -[% offset_accountline.amountoutstanding | $Price %] | -[% PROCESS account_type_description account=offset_accountline %] | +[% ao.created_on | $KohaDates with_hours => 1%] | +[%- IF ao.amount > 0 -%][% ao.amount | $Price %][% END %] | +[%- IF ao.amount < 0 -%][% ao.amount | $Price %][% END %] | ++ [% PROCESS ao_description ao=ao %] + | + [%- IF offset_accountline -%] ++ [% PROCESS account_type_description account=offset_accountline %] ([% offset_accountline.id | html %]) + | ++ [% offset_accountline.amount | $Price %] + | ++ [% 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 %] + | + [%- ELSE -%] ++ | + | + [%- END -%] | [% offset_accountline.note | html %] | -[% IF offset_accountline.manager_id %][% offset_accountline.manager_id | html %][% END %] | -[% ao.created_on | $KohaDates with_hours => 1 %] | -[% ao.amount | $Price %] | -[% PROCESS offset_type_description account_offset=ao %] | -Details |