diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
index 3a3b90c803..88b0f3f986 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
@@ -8,7 +8,9 @@
[%- borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %]
[%- END -%]
[%- END -%]
- ([% borrower.cardnumber %])
+ [% IF ( borrower.cardnumber ) %]
+ ([% borrower.cardnumber %])
+ [% END %]
[%- ELSIF ( borrowernumber ) %]
[%- IF category_type == 'I' %]
[%- surname %] [% IF othernames %] ([% othernames %]) [% END %]
@@ -19,5 +21,7 @@
[%- firstname %] [% IF othernames %] ([% othernames %]) [% END %] [% surname %]
[%- END %]
[%- END -%]
- ([% cardnumber -%])
+ [% IF ( cardnumber ) %]
+ ([% cardnumber %])
+ [% END %]
[%- END -%]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
index e519289ef1..00b02af4b7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
@@ -13,7 +13,7 @@
"dt_cardnumber":
"[% data.cardnumber %]",
"dt_name":
- "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]
[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]
[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]
[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]
Email: [% data.email %][% END %]",
+ "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1%]
[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]
[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]
[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]
Email: [% data.email %][% END %]",
"dt_category":
"[% data.category_description |html %] ([% data.category_type |html %])",
"dt_branch":