Merge pull request #158 from bkuhn/non-profit-audit-reports-updates-20130219
Equity and Adjustment accounts should not appear in these reports at all
This commit is contained in:
commit
f8bec00d0b
2 changed files with 7 additions and 1 deletions
|
|
@ -64,6 +64,8 @@ open(CHART_DATA, "-|", $LEDGER_CMD, @chartOfAccountsOpts)
|
|||
my @accounts;
|
||||
while (my $line = <CHART_DATA>) {
|
||||
chomp $line;
|
||||
next if $line =~ /^\s*\<\s*Adjustment\s*\>\s*$/;
|
||||
next if $line =~ /^Equity:/; # Stupid auto-account made by ledger.
|
||||
$line =~ s/^\s*//; $line =~ s/\s*$//;
|
||||
push(@accounts, $line);
|
||||
|
||||
|
|
@ -127,6 +129,10 @@ foreach my $typeData ({ name => 'disbursements', query => 'a<=0' },
|
|||
while (my $line = <CSV_DATA>) {
|
||||
$line =~ s/"link:"/""/g;
|
||||
|
||||
# Skip lines that have Adjustment or Equity: in them.
|
||||
next if $line =~
|
||||
/^\s*"[^"]*","[^"]*","[^"]*","(\s*\<\s*Adjustment\s*\>\s*|Equity:)/;
|
||||
|
||||
my $date = $line; chomp $date;
|
||||
$date =~ s/^\s*"([^"]*)"\s*,.*$/$1/;
|
||||
if (defined $date and $date !~ /^\s*$/ and
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ my @accounts;
|
|||
while (my $line = <CHART_DATA>) {
|
||||
chomp $line;
|
||||
next if $line =~ /^\s*\<\s*Adjustment\s*\>\s*$/;
|
||||
next if $line =~ /^\s*Equity:/; # Stupid auto-account made by ledger.
|
||||
$line =~ s/^\s*//; $line =~ s/\s*$//;
|
||||
push(@accounts, $line);
|
||||
|
||||
|
|
@ -119,7 +120,6 @@ sub preferredAccountSorting ($$) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
my @sortedAccounts;
|
||||
foreach my $acct ( sort preferredAccountSorting @accounts) {
|
||||
print CHART_OUTPUT "\"$acct\"\n";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue