Sort by last gave date.
This commit is contained in:
parent
ced1501eab
commit
f3a6debdf7
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ my $dbh = DBI->connect("dbi:SQLite:dbname=$SUPPORTERS_SQLITE_DB_FILE", "", "",
|
||||||
my $sp = new Supporters($dbh, \@LEDGER_CMD_LINE, { monthly => $MONTHLY_SEARCH_REGEX, annual => $ANNUAL_SEARCH_REGEX});
|
my $sp = new Supporters($dbh, \@LEDGER_CMD_LINE, { monthly => $MONTHLY_SEARCH_REGEX, annual => $ANNUAL_SEARCH_REGEX});
|
||||||
my(@supporterIds) = $sp->findDonor({});
|
my(@supporterIds) = $sp->findDonor({});
|
||||||
|
|
||||||
foreach my $id (@supporterIds) {
|
foreach my $id (sort { $sp->donorLastGave($a) cmp $sp->donorLastGave($b) } @supporterIds) {
|
||||||
my $amount = $sp->donorTotalGaveInPeriod(donorId => $id);
|
my $amount = $sp->donorTotalGaveInPeriod(donorId => $id);
|
||||||
my $lastGaveDate = $sp->donorLastGave($id);
|
my $lastGaveDate = $sp->donorLastGave($id);
|
||||||
my $firstGaveDate = $sp->donorFirstGave($id);
|
my $firstGaveDate = $sp->donorFirstGave($id);
|
||||||
|
|
Loading…
Reference in a new issue