Print request data if it exists.

This commit is contained in:
Bradley M. Kuhn 2016-03-11 11:05:05 -08:00
parent 9a82f72aa9
commit 6615abe535

View file

@ -30,14 +30,29 @@ if ($CRITERION ne 'id') {
} else { } else {
push(@supporterIds, $SEARCH_PARAMETER); push(@supporterIds, $SEARCH_PARAMETER);
} }
my @requestTypes = $sp->getRequestType();
foreach my $id (@supporterIds) { foreach my $id (@supporterIds) {
print "Found: $id, ", $sp->getLedgerEntityId($id), "\n"; print "Found: $id, ", $sp->getLedgerEntityId($id), "\n";
my(%addr) = $sp->getEmailAddresses($id); my(%addr) = $sp->getEmailAddresses($id);
print " Email Addresses: ", join(", ", keys %addr), "\n"; print " Email Addresses: ", join(", ", keys %addr), "\n";
my(%postalAddresses) = $sp->getPostalAddresses($id); my(%postalAddresses) = $sp->getPostalAddresses($id);
print " Postal Addresses: ", join("\n\n", keys %postalAddresses), "\n"; print " Postal Addresses: ", join("\n\n", keys %postalAddresses), "\n";
$found = 1; $found = 1;
foreach my $requestType (@requestTypes) {
my $req = $sp->getRequest({ donorId => $id, requestType => $requestType});
if (defined $req) {
print " Request $req->{requestType}";
print "($req->{requestConfiguration})" if defined $req->{requestConfiguration};
print " made on $req->{requestDate}";
if (not defined $req->{fulfillDate}) {
print "\n";
} else {
print "...\n fulfilled on $req->{fulfillDate}";
print "...\n notes: $req->{notes}" if defined $req->{notes};
print "\n";
}
}
}
} }
print "No entries found\n" unless $found; print "No entries found\n" unless $found;
############################################################################### ###############################################################################