@@ -, +, @@ date and description --- tools/import_borrowers.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) --- a/tools/import_borrowers.pl +++ a/tools/import_borrowers.pl @@ -283,7 +283,9 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { $template->param('lastinvalid'=>$borrower{'surname'}.' / '.$borrowernumber); next LINE; } - if ( $borrower{debarred} ) { + + # Don't add a new restriction if the existing 'combined' restriction matches this one + if ( $borrower{debarred} && ( ( $borrower{debarred} ne $member->{debarred} ) || ( $borrower{debarredcomment} ne $member->{debarredcomment} ) ) ) { # Check to see if this debarment already exists my $debarrments = GetDebarments( { @@ -303,6 +305,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { ); } } + if ($extended) { if ($ext_preserve) { my $old_attributes = GetBorrowerAttributes($borrowernumber); --