diff options
author | John Wiegley <johnw@newartisans.com> | 2013-02-19 13:18:28 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2013-02-19 13:18:28 -0800 |
commit | f8bec00d0b7487c4afe56a4f994e69ec8e91af8b (patch) | |
tree | cdd612c3496abbdc428d88a9921f31c03e12591b /contrib | |
parent | 4f9c12454072190f7e0f26ebbfc6af35a69fd8f3 (diff) | |
parent | c2bc7b6b9ed28d2069ca80175a56ff9dcc849951 (diff) | |
download | fork-ledger-f8bec00d0b7487c4afe56a4f994e69ec8e91af8b.tar.gz fork-ledger-f8bec00d0b7487c4afe56a4f994e69ec8e91af8b.tar.bz2 fork-ledger-f8bec00d0b7487c4afe56a4f994e69ec8e91af8b.zip |
Merge pull request #158 from bkuhn/non-profit-audit-reports-updates-20130219
Equity and Adjustment accounts should not appear in these reports at all
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx | 6 | ||||
-rwxr-xr-x | contrib/non-profit-audit-reports/general-ledger-report.plx | 2 |
2 files changed, 7 insertions, 1 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 diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx index 1e6d9caf..dce855b4 100755 --- a/contrib/non-profit-audit-reports/general-ledger-report.plx +++ b/contrib/non-profit-audit-reports/general-ledger-report.plx @@ -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"; |