5 use FS::UID qw(adminsuidsetup);
6 use FS::Record qw(qsearch);
10 my $user = shift or die &usage;
13 my @credits = grep { $_->credited < 0 } qsearch('cust_credit', {});
14 my @payments = grep { $_->unapplied < 0 } qsearch('cust_pay', {});
17 print scalar(@credits). " overapplied credits:\n". Dumper(@credits). "\n";
21 print scalar(@payments). " overapplied payments:\n". Dumper(@payments). "\n";
25 die "Usage:\n\n find-overapplied user\n";