Contrib: non-profit annual audit reports #80

Merged
merged 18 commits into from Sep 9, 2012

Projects

None yet

3 participants

@bkuhn
Contributor
bkuhn commented Sep 8, 2012

This is a first draft of a small application to generate a General Ledger ODS file, suitable to send to a non-profit auditor (or anyone else who needs to review the General Ledger of your accounts in an ODS format).

The current code could use some refactoring (it currently relies on my old Perl script, adapted for Ledger 3.0) and then uses a Python script on top to generate the ODS file properly.

Long term, I'd like to adapt this to use the Python API, but for now, it's usable as a small demo application that might be of interest to users.

As discussed on IRC, and noted in the commit log of the LICENSE file herein, this application is GPLv3-or-later. However, we've made it abundantly clear that the GPLv3-or-later-ness is contained properly to the contrib/non-profit-annual-audit-reports directory.

I'll send another pull request when we have another useful release. Development will continue in our branch over on gitorious:

https://gitorious.org/ledger/ledger/commits/contrib-non-profit-annual-audit-reports

bkuhn and others added some commits Sep 6, 2012
@bkuhn bkuhn Correct cmake variable for install prefix is "CMAKE_INSTALL_PREFIX", …
…not "CMAKE_PREFIX_PATH".

CMAKE_PREFIX_PATH is for searching for other programs, not for the place
to install this one.  Based on acprep's --help, I think the intention was
to use CMAKE_INSTALL_PREFIX here.
cd2fef1
@bkuhn bkuhn FAQ entry on how build your own Boost and/or CMake for use with Ledger.
Debian squeeze, which is currently the stable distribution at the time of
this commit, has both a Boost and a CMake that is too old for Ledger.
This FAQ entry explains how to build your own Boost and CMake for use with
Ledger, and the exact commands to type to build and install each, and then
configure, build and install Ledger against those new versions.
41a7184
@bkuhn bkuhn contrib/non-profit-audit-reports/ directory will be a small GPLv3'd a…
…pplication.

Upon discussion with John Wiegley <johnw@newartisans.com> on #ledger on
irc.freenode.net, the following was indicated:

<johnw> bkuhn: as long as the GPL infection stays in contrib, I see no problem
        with it
...
<bkuhn> ... I got the ... answer, which is "johnw will accept GPL'd stuff
        in contrib/..., as long as it's careful to not cause GPL to cover
        the main Ledger codebase that's not in contrib/..."

Therefore, the non-profit-audit-reports/ application will be licensed
GPLv3-or-later.
e98fcf3
@bkuhn bkuhn Initial test data for the non-profit-audit-reports contrib application.
The basic idea here is that given non-profit-test-data.ledger herein,
there should be a script that I could run, in this fashion:

    $ general-ledger-report -b 2011/03/01 -e 2012/03/01  -f tests/non-profit-test-data.ledger

that would generate:

   non-profit-test-data_chart-of-accounts.txt
   non-profit-test-data_general-ledger.ods

Note that the ODS file currently has placeholders, as I haven't fully
figured out how to use the =hyperlink() function to make relative
hyperlinks.
7c57cf4
@bkuhn bkuhn General ledger reporting script, used for preparing a report for non-…
…profit auditors.

I developed this, and therefore have the full git commit history, in my
personal "Small-Hacks" repository, which can be cloned from:
      git://gitorious.org/bkuhn/small-hacks.git

More details on that are available by visiting:
      https://gitorious.org/bkuhn/small-hacks
8c8973e
@bkuhn bkuhn Switch ledger binary to /usr/local/bin/ledger. 6a104ec
@bkuhn bkuhn A few fixes to make this work with Ledger 3.x instead of 2.6.2
  * --wide-register-format is no long an option, use -F
  * %D now must be %(date)
0e8a0e8
@bkuhn bkuhn There needs to be at least 3 args here, clearly. fb6f604
@bkuhn bkuhn Make test data slightly more realistic. ca77b08
@bkuhn bkuhn Don't use all caps for tags in test data. 5aea044
@tmarble tmarble Changed general-ledger-report.plx to use tags for Receipt and Invoice…
… (was %N)

Added sample PDF artifacts for the example (see README)
65e0c26
@bkuhn bkuhn Merge branch 'contrib-non-profit-annual-audit-reports' of gitorious.o…
…rg:ledger/ledger into contrib-non-profit-annual-audit-reports
8900ba0
@bkuhn bkuhn Fixed 2010/01/01 test data and added an invoice for it. b9e534d
@bkuhn bkuhn Added additional transaction to test data, this one has both Receipt …
…and Invoice.
7f565df
@bkuhn bkuhn Updated copyright notice to reflect reality.
Both Tom and I have made copyrightable changes to this file this year.
fb601e2
@tmarble tmarble First pass technical study of creating ODS from ledger 47130b2
@bkuhn bkuhn Add to .gitignore items generated by contrib/non-profit-audit-reports…
…/demo.sh
8dd41dc
@bkuhn bkuhn Receipt/Invoice are additional information thus better if they're fin…
…al columns.

Change the column of Receipt and Invoice in the CSV file first, then the
generated ODS file must have the same change propagated, which requires
changes to the column numbers hard-coding in csv2ods.py.

Perhaps if/when this application is refactored these things shouldn't be
hard-coded in this way in the first place.
613eb6b
@jwiegley jwiegley merged commit d1fadf0 into ledger:next Sep 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment