use Modern::Perl; return { bug_number => "31713", description => "Add ACCOUNTS_SUMMARY slip notice", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; my $slip_content = <<~'END_CONTENT'; [% USE Branches %] [% USE Koha %] [% USE KohaDates %] [% USE Price %] [% PROCESS 'accounts.inc' %]
[% Koha.Preference('LibraryName') | html %] |
||||
---|---|---|---|---|
[% Branches.GetName( borrower.branchcode ) | html %] |
||||
Outstanding accounts |
||||
Debts |
||||
Date | Charge | Amount | Outstanding | |
[% debit.date | $KohaDates %] | [% PROCESS account_type_description account=debit %] [%- IF debit.description %], [% debit.description | html %][% END %] | [% debit.amount | $Price %] | [% debit.amountoutstanding | $Price %] | |
There are no outstanding debts on your account | ||||
Credits |
||||
Date | Credit | Amount | Outstanding | |
[% credit.date | $KohaDates %] | [% PROCESS account_type_description account=credit %] [%- IF credit.description %], [% credit.description | html %][% END %] | [% credit.amount *-1 | $Price %] | [% credit.amountoutstanding *-1 | $Price %] | |
There are no outstanding credits on your account | ||||
[% IF borrower.account.balance < 0 %] Total credit as of [% today | $KohaDates %]: [% ELSE %] Total outstanding dues as of [% today | $KohaDates %]: [% END %] | [% IF ( borrower.account.balance <= 0 ) %][% borrower.account.balance * -1 | $Price %] | [% ELSE %][% borrower.account.balance | $Price %] | [% END %]