@@ -, +, @@ using the new 'Details' button available on boraccount.pl --- Koha/Account/Offset.pm | 23 ++++ .../prog/en/includes/account_offset_type.inc | 8 ++ .../intranet-tmpl/prog/en/includes/accounttype.inc | 23 ++++ .../prog/en/modules/members/accountline-details.tt | 137 +++++++++++++++++++++ .../prog/en/modules/members/boraccount.tt | 25 +--- members/accountline-details.pl | 66 ++++++++++ 6 files changed, 259 insertions(+), 23 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt create mode 100755 members/accountline-details.pl --- a/Koha/Account/Offset.pm +++ a/Koha/Account/Offset.pm @@ -20,6 +20,7 @@ use Modern::Perl; use Carp; use Koha::Database; +use Koha::Account::Line; use base qw(Koha::Object); @@ -35,6 +36,28 @@ Account offsets are used to track the changes in account lines =cut +=head3 debit + +=cut + +sub debit { + my ( $self ) = @_; + my $debit_rs = $self->_result->debit; + return unless $debit_rs; + return Koha::Account::Line->_new_from_dbic( $debit_rs ); +} + +=head3 credit + +=cut + +sub credit { + my ( $self ) = @_; + my $credit_rs = $self->_result->credit; + return unless $credit_rs; + return Koha::Account::Line->_new_from_dbic( $credit_rs ); +} + =head3 type =cut --- a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc @@ -0,0 +1,8 @@ +[% SWITCH account_offset.type %] + [% CASE 'Payment' %]Payment + [% CASE 'Manual Debit' %]Manual invoice + [% CASE 'Lost Item Return' %]Lost item returned + [% CASE 'Writeoff' %]Writeoff + [% CASE 'Void Payment' %]Void payment + [% CASE %][% account_offset.type %] +[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc @@ -0,0 +1,23 @@ +[% SWITCH accountline.accounttype %] + [% CASE 'Pay' %]Payment, thanks + [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) + [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) + [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) + [% CASE 'VOID' %]Payment, Voided + [% CASE 'N' %]New card + [% CASE 'F' %]Fine + [% CASE 'A' %]Account management fee + [% CASE 'M' %]Sundry + [% CASE 'L' %]Lost item + [% CASE 'W' %]Writeoff + [% CASE 'FU' %]Accruing fine + [% CASE 'HE' %]Hold waiting too long + [% CASE 'Rent' %]Rental fee + [% CASE 'FOR' %]Forgiven + [% CASE 'LR' %]Lost item fee refund + [% CASE 'PAY' %]Payment + [% CASE 'WO' %]Writeoff + [% CASE 'C' %]Credit + [% CASE 'CR' %]Credit + [% CASE %][% accountline.accounttype %] +[%- 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 @@ -0,0 +1,137 @@ +[%- USE Price -%] +[%- USE KohaDates -%] +[%- USE AuthorisedValues -%] + +[% INCLUDE 'doc-head-open.inc' %] +
Date | +Description of charges | +Note | +Amount | +Outstanding | +
---|---|---|---|---|
+ [% accountline.date |$KohaDates %] + | ++ [% INCLUDE 'accounttype.inc' accountline => accountline %] + [%- IF accountline.payment_type -%] + , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) %] + [%- END =%] + [%- IF accountline.description -%] + , [% accountline.description %] + [%- END -%] + + + [% IF ( accountline.itemnumber ) %] + [% accountline.title |html %] + [% END %] + | + ++ [% accountline.note | html_line_break %] + | + ++ [% accountline.amount | $Price %] + | + ++ [% accountline.amountoutstanding | $Price %] + | +
Date created | +Date updated | +Amount | +Amount outstanding | +Type | +Note | +Transacting librarian id |
+ 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 %] | +[% INCLUDE 'accounttype.inc' accountline => offset_accountline %] | +[% offset_accountline.note %] | +[% IF offset_accountline.manager_id %][% offset_accountline.manager_id %][% END %] | +[% ao.created_on | $KohaDates with_hours => 1 %] | +[% ao.amount | $Price %] | +[% INCLUDE 'account_offset_type.inc' account_offset => ao %] | +Details | +