diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-02-19 09:11:08 -0500 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-02-19 09:13:05 -0500 |
commit | c2bc7b6b9ed28d2069ca80175a56ff9dcc849951 (patch) | |
tree | cfd3baf5050ae5f70a19641c475a7ea0cf74dd59 /contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx | |
parent | 3d90bfc4add2a85b80c2a90b7c0df9b95d77579d (diff) | |
download | fork-ledger-c2bc7b6b9ed28d2069ca80175a56ff9dcc849951.tar.gz fork-ledger-c2bc7b6b9ed28d2069ca80175a56ff9dcc849951.tar.bz2 fork-ledger-c2bc7b6b9ed28d2069ca80175a56ff9dcc849951.zip |
Equity and Adjustment accounts should not appear in these reports at all.
There were a few spots where they were still sneaking in.
Diffstat (limited to 'contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx')
-rwxr-xr-x | contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx b/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx index cb19a19e..58cc75a9 100755 --- a/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx +++ b/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx @@ -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 |