From 65e0c266bed3dd49be687471bb63b3072ad54bb7 Mon Sep 17 00:00:00 2001 From: Tom Marble Date: Fri, 7 Sep 2012 13:24:26 -0500 Subject: Changed general-ledger-report.plx to use tags for Receipt and Invoice (was %N) Added sample PDF artifacts for the example (see README) --- contrib/non-profit-audit-reports/README | 13 +++++++++++++ .../non-profit-audit-reports/general-ledger-report.plx | 3 +-- .../tests/Financial/Invoices/Invoice20110510.pdf | Bin 0 -> 13890 bytes .../tests/Financial/Invoices/Invoice20110510.txt | 5 +++++ .../Foo/Expenses/hosting/AprilHostingReceipt.pdf | Bin 0 -> 14813 bytes .../Foo/Expenses/hosting/AprilHostingReceipt.txt | 6 ++++++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 contrib/non-profit-audit-reports/README create mode 100644 contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.pdf create mode 100644 contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.txt create mode 100644 contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf create mode 100644 contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt (limited to 'contrib') diff --git a/contrib/non-profit-audit-reports/README b/contrib/non-profit-audit-reports/README new file mode 100644 index 00000000..e2bbfc62 --- /dev/null +++ b/contrib/non-profit-audit-reports/README @@ -0,0 +1,13 @@ +README + +This document provides backround on the enclosed example + +Sample PDF files +---------------- +The sample PDF files were created as follows: + +paps --font="Courier 12" --paper letter --top-margin=18 tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt | ps2pdf - tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf + +paps --font="Courier 12" --paper letter --top-margin=18 tests/Financial/Invoices/Invoice20110510.txt | ps2pdf - tests/Financial/Invoices/Invoice20110510.pdf + + diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx index d5bc1888..aead7c3d 100755 --- a/contrib/non-profit-audit-reports/general-ledger-report.plx +++ b/contrib/non-profit-audit-reports/general-ledger-report.plx @@ -108,8 +108,7 @@ foreach my $acct (@sortedAccounts) { print GL_CSV_OUT "\n\"ACCOUNT:\",\"$acct\"\n\"PERIOD START:\",\"$beginDate\"\n\"PERIOD END:\",\"$formattedEndDate\"\n"; print GL_CSV_OUT '"DATE","CHECK NUM","NAME","MEMO","TRANSACTION AMT","RUNNING TOTAL"', "\n"; @acctLedgerOpts = ('-F', - '"%(date)","%C","%P","%N","%t","%T"\n', '-w', '--sort', 'd', - '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg', $acct); + '"%(date)","%C","%P","%(tag(\'Receipt\'))","%(tag(\'Invoice\'))","%t","%T"\n', '-w', '--sort', 'd', '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg', $acct); open(GL_CSV_DATA, "-|", $LEDGER_CMD, @acctLedgerOpts) or die "Unable to run $LEDGER_CMD @acctLedgerOpts: $!"; diff --git a/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.pdf b/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.pdf new file mode 100644 index 00000000..e2e06c98 Binary files /dev/null and b/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.pdf differ diff --git a/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.txt b/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.txt new file mode 100644 index 00000000..4d5fc907 --- /dev/null +++ b/contrib/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.txt @@ -0,0 +1,5 @@ +Invoice + +Date: May 10, 2011 + +Donation to the General Fund: $50.00 diff --git a/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf b/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf new file mode 100644 index 00000000..8441f3e6 Binary files /dev/null and b/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf differ diff --git a/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt b/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt new file mode 100644 index 00000000..e2722c45 --- /dev/null +++ b/contrib/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt @@ -0,0 +1,6 @@ +Baz Hosting Services, LLC + +Date: April 20, 2011 + +Charge: $250.00 + -- cgit v1.2.3