summaryrefslogtreecommitdiff
path: root/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-20 14:01:18 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-20 14:01:18 -0700
commitc7dd499a737ba7eb2bb7321d0b9c148a38d0d8d5 (patch)
treedae4be2c10886d4156758a69d6e6bf4e0e60acde /contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
parent988a41c3a4e9dbc131bb3e0d2fca18f796468777 (diff)
parente9416ca017902610d7646a4b8312b9d886ea9f31 (diff)
downloadfork-ledger-c7dd499a737ba7eb2bb7321d0b9c148a38d0d8d5.tar.gz
fork-ledger-c7dd499a737ba7eb2bb7321d0b9c148a38d0d8d5.tar.bz2
fork-ledger-c7dd499a737ba7eb2bb7321d0b9c148a38d0d8d5.zip
Merge commit 'e9416ca017902610d7646a4b8312b9d886ea9f31' into next
Diffstat (limited to 'contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx')
-rwxr-xr-xcontrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx27
1 files changed, 26 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 58cc75a9..6234542c 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
@@ -1,9 +1,21 @@
#!/usr/bin/perl
# cash-receipts-and-disbursments-journals -*- Perl -*-
#
-# Script to generate a General Ledger report that accountants like
+# Script to generate a cash receipts and disbursement joural reports
# using Ledger.
#
+# Accountants sometimes ask for a report called the "cash receipts and
+# disbursements journals". From a programmer's perspective, these are two
+# reports that have the following properties:
+#
+# * Receipts: "a list of all transactions in the period where funds
+# enter a cash account (i.e., the amount reconciled
+# against the cash account is > 0"
+#
+# * Disbursements: "a list of all transactions in the period where
+# funds leave a cash account (i.e., the amount
+# reconciled against the cash account is < 0)
+#
# Copyright (C) 2011, 2012, 2013 Bradley M. Kuhn
#
# This program gives you software freedom; you can copy, modify, convey,
@@ -133,6 +145,19 @@ foreach my $typeData ({ name => 'disbursements', query => 'a<=0' },
next if $line =~
/^\s*"[^"]*","[^"]*","[^"]*","(\s*\<\s*Adjustment\s*\>\s*|Equity:)/;
+ # Note that we don't do our usual "$TWO_CENTS" check on Adjustment
+ # here. That's by design: if we consistently ignore Adjustements in
+ # the same way, it might have the appearance that a Superman
+ # III/Office Space -style movement of funds is going on. By just
+ # straight "ignoring" them here, and not doing the TWO_CENTS test, it
+ # helps to assure that.
+
+ # However, it's worth noting that the ignoring of "Adjustment" in these
+ # scripts is not that meaningful and doesn't indicate as Superman
+ # III/Office Space -style scheme, because such a scheme would also have
+ # to be implemented in the main Ledger codebase.
+
+
my $date = $line; chomp $date;
$date =~ s/^\s*"([^"]*)"\s*,.*$/$1/;
if (defined $date and $date !~ /^\s*$/ and