use C4::Members::Messaging;
use C4::Reports::Guided;
use C4::Templates;
-use Koha::Borrower::Debarments;
+use Koha::Patron::Debarments;
use Koha::DateUtils;
use Text::CSV;
);
$csv->combine(@columnkeys);
print $csv->string, "\n";
- exit 1;
+ exit 0;
}
my $uploadborrowers = $input->param('uploadborrowers');
my $matchpoint = $input->param('matchpoint');
$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(
{
);
}
}
+
if ($extended) {
if ($ext_preserve) {
my $old_attributes = GetBorrowerAttributes($borrowernumber);