[freeside-commits] freeside/bin find-overapplied,NONE,1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Fri Jul 13 16:59:41 PDT 2007
Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail:/tmp/cvs-serv7864
Added Files:
Tag: FREESIDE_1_7_BRANCH
find-overapplied
Log Message:
adding quick find-overapplied script
--- NEW FILE: find-overapplied ---
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch);
use FS::cust_credit;
use FS::cust_pay;
my $user = shift or die &usage;
adminsuidsetup $user;
my @credits = grep { $_->credited < 0 } qsearch('cust_credit', {});
my @payments = grep { $_->unapplied < 0 } qsearch('cust_pay', {});
if ( @credits ) {
print scalar(@credits). " overapplied credits:\n". Dumper(@credits). "\n";
}
if ( @payments ) {
print scalar(@payments). " overapplied credits:\n". Dumper(@payments). "\n";
}
sub usage {
die "Usage:\n\n find-overapplied user\n";
}
More information about the freeside-commits
mailing list