[%- IF ( borrower.borrowernumber ) %] [%- IF borrower.category_type == 'I' %] [%- borrower.surname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] [%- ELSE %] [%- IF invert_name %] [%- borrower.surname | html %], [% borrower.firstname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] [%- ELSE %] [%- borrower.firstname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] [% borrower.surname | html %] [%- END -%] [%- END -%] [%- IF ( borrower.cardnumber ) -%] ([% borrower.cardnumber | html %]) [%- END %] [%- ELSIF ( borrowernumber ) %] [%- IF category_type == 'I' %] [%- surname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] [%- ELSE %] [%- IF invert_name %] [%- surname | html %], [% firstname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] [%- ELSE %] [%- firstname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] [% surname | html %] [%- END %] [%- END -%] [%- IF ( cardnumber ) -%] ([% cardnumber | html %]) [%- END %] [%- END -%]