summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-19 16:45:25 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-19 16:45:25 -0700
commitf33d232ba34e46e17a39e08ee2f2ad78b5aafb1a (patch)
tree3f44e58b7dbe4bd4b8a7e448002487140c455b91 /contrib
parent4ebd17efb391b5236c69f5d7eb3b5852a962fe58 (diff)
parentf8bec00d0b7487c4afe56a4f994e69ec8e91af8b (diff)
downloadfork-ledger-f33d232ba34e46e17a39e08ee2f2ad78b5aafb1a.tar.gz
fork-ledger-f33d232ba34e46e17a39e08ee2f2ad78b5aafb1a.tar.bz2
fork-ledger-f33d232ba34e46e17a39e08ee2f2ad78b5aafb1a.zip
Merge commit 'f8bec00d0b7487c4afe56a4f994e69ec8e91af8b' into next
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx6
-rwxr-xr-xcontrib/non-profit-audit-reports/general-ledger-report.plx2
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";