next LINE;
}
+ my $relationship = $borrower{relationship};
+ my $guarantor_id = $borrower{guarantor_id};
+ delete $borrower{relationship};
+ delete $borrower{guarantor_id};
+
if ($borrowernumber) {
# borrower exists
);
}
}
+
+ # Add a guarantor if we are given a relationship
+ if ( $guarantor_id ) {
+ Koha::Patron::Relationship->new(
+ {
+ guarantee_id => $borrowernumber,
+ relationship => $relationship,
+ guarantor_id => $guarantor_id,
+ }
+ )->store();
+ }
}
return {