support is_supporter setting, add findSupporter method.

This commit is contained in:
Bradley M. Kuhn 2021-04-18 15:29:48 -07:00
parent fdf58bb729
commit 391fb0d3f2

View file

@ -1531,6 +1531,12 @@ sub releaseRequestHold($$) {
return $holdRecord->{$requestId}{id};
}
######################################################################
sub findSupporter($$) {
my($self, $params) = @_;
$params->{isSupporter} = 1;
$self->findDonor{$params};
}
######################################################################
=begin findDonor
@ -1593,6 +1599,7 @@ sub findDonor($$) {
$sql .= " AND d.ledger_entity_id = " . $self->dbh->quote($params->{ledgerEntityId})
if (defined $params->{ledgerEntityId});
$sql .= " AND d.is_supporter" if defined $params->{isSupporter} and $params->{isSupporter};
my $val = $self->dbh()->selectall_hashref($sql, 'id');
push(@donorIds, keys %{$val}) if (defined $val);
}