[% PROCESS 'accounts.inc' %]
[% IF ( ACCOUNT_LINES ) %] [% IF ENABLE_OPAC_PAYMENTS %][% END %] [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %] [% IF ACCOUNT_LINE.amountoutstanding > 0 || ACCOUNT_LINE.amountoutstanding < 0 %][% ELSE %][% END%] [% IF ENABLE_OPAC_PAYMENTS %] [% END %] [% IF ( ACCOUNT_LINE.is_credit ) %] [% IF ( ACCOUNT_LINE.is_credit ) %] [% END %] [%- IF ENABLE_OPAC_PAYMENTS -%] [%- SET COLSPAN = 5 -%] [%- ELSE -%] [%- SET COLSPAN = 4 -%] [%- END -%] [% IF outstanding_credits.total_outstanding < 0 %] [% FOREACH outstanding_credit IN outstanding_credits %] [% IF outstanding_credit.amountoutstanding < 0 %][% ELSE %][% END%] [% IF ENABLE_OPAC_PAYMENTS %][% END %] [% END %] [% END %]
Your charges
 Date Type Description Amount Amount outstanding
[% IF ACCOUNT_LINE.amountoutstanding > 0 %] [% SET DISPLAY_PAYMENT_BLOCK = 1 %] [% END %] [% ACCOUNT_LINE.date | $KohaDates %] [% PROCESS account_type_description account=ACCOUNT_LINE %] [%- IF ACCOUNT_LINE.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', ACCOUNT_LINE.payment_type, 1) | html %][% END %] [%- IF ACCOUNT_LINE.description %][% ACCOUNT_LINE.description | html %][% END %] [% IF ACCOUNT_LINE.itemnumber %]([% ACCOUNT_LINE.item.biblio.title | html %])[% END %] [% ACCOUNT_LINE.amount * -1 | $Price %][% ELSE %][% ACCOUNT_LINE.amount | $Price %][% END %][% ACCOUNT_LINE.amountoutstanding * -1 | $Price %][% ELSE %][% ACCOUNT_LINE.amountoutstanding | $Price %][% END %]
Total due [% total | $Price %]
[% outstanding_credit.date | $KohaDates %] [% PROCESS account_type_description account=outstanding_credit %] [%- IF outstanding_credit.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', outstanding_credit.payment_type, 1) | html %][% END %] [%- IF outstanding_credit.description %][% outstanding_credit.description | html %][% END %] [% IF outstanding_credit.itemnumber %]([% outstanding_credit.item.biblio.title | html %])[% END %] [% outstanding_credit.amount * -1 | $Price %] [% outstanding_credit.amountoutstanding * -1 | $Price %]
Total due if credit(s) applied: [% total + outstanding_credits.total_outstanding | $Price %]
[% ELSE %]

You have no fines or charges

[% END # /IF ( ACCOUNT_LINES ) %] [% FOREACH r IN relatives %]

[% r.patron.firstname | html %] [% r.patron.surname | html %]'s fines and charges

[% IF ENABLE_OPAC_PAYMENTS %][% END %] [% SET account_sum = 0 %] [% FOREACH a IN r.accountlines %] [% SET account_sum = account_sum + a.amountoutstanding %] [% IF ENABLE_OPAC_PAYMENTS %] [% END %] [% IF ( a.amount < 0 ) %] [% IF ( a.amountoutstanding < 0 ) %] [% END %]
 Date Description Fine amount Amount outstanding
[% IF a.amountoutstanding > 0 %] [% SET DISPLAY_PAYMENT_BLOCK = 1 %] [% END %] [% a.date | $KohaDates %] [% PROCESS account_type_description account=a %] [%- IF a.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', a.payment_type, 1) | html %][% END %] [%- IF a.description %], [% a.description | html %][% END %] [% IF a.itemnumber %]([% a.item.biblio.title | html %])[% END %] [% ELSE %][% END %][% a.amount | $Price %][% ELSE %][% END %][% a.amountoutstanding | $Price %]
Total due [% account_sum | $Price %]
[% END # /FOREACH r %] [% IF ENABLE_OPAC_PAYMENTS && DISPLAY_PAYMENT_BLOCK %] [% END # /IF ENABLE_OPAC_PAYMENTS && DISPLAY_PAYMENT_BLOCK %]