Bug 15928 - Show unlinked guarantor

To test:
1 - Add guarantor data to patron account by typing it in but do not 'Set to patron'
2 - Note it is not displayed on patron details
3 - Apply patch
4 - Note the info is displayed
5 - Test that linked guarantors show as expected

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit bebb61739f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Nick Clemens 2016-02-26 21:08:55 +00:00 committed by Frédéric Demians
parent d3faa9cc53
commit 3c76bf5a76
2 changed files with 7 additions and 0 deletions

View File

@ -243,6 +243,8 @@ function validate1(date) {
[% ELSE %]
[% IF ( guarantorborrowernumber ) %]
<li><span class="label">Guarantor:</span><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorborrowernumber %]">[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %] [% END %]</a></li>
[% ELSIF (guarantorsurname || guarantorfirstname) %]
<li><span class="label">Guarantor:</span>[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %][% END %]</li>
[% END %]
[% END %]
</ol>

View File

@ -197,6 +197,11 @@ else {
foreach (qw(borrowernumber cardnumber firstname surname)) {
$template->param("guarantor$_" => $guarantor->{$_});
}
} elsif ($data->{contactname} || $data->{contactfirstname}) {
$template->param(
guarantorfirstname => $data->{contactfirstname},
guarantorsurname => $data->{contactname},
);
}
if ($category_type eq 'C'){
$template->param('C' => 1);