diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/csv2ods.py | 3 | ||||
-rwxr-xr-x | contrib/non-profit-audit-reports/general-ledger-report.plx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/contrib/non-profit-audit-reports/csv2ods.py b/contrib/non-profit-audit-reports/csv2ods.py index c0c5c6d3..f6150158 100755 --- a/contrib/non-profit-audit-reports/csv2ods.py +++ b/contrib/non-profit-audit-reports/csv2ods.py @@ -3,6 +3,7 @@ # Convert example csv file to ods # # Copyright (c) 2012 Tom Marble +# Copyright (c) 2012 Bradley M. Kuhn # # This program gives you software freedom; you can copy, modify, convey, # and/or redistribute it under the terms of the GNU General Public License @@ -55,7 +56,7 @@ def csv2ods(csvname, odsname, verbose = False): if len(val) > 0 and val[0] == '$': doc.set_cell_value(col + 1, row, 'currency', val[1:]) else: - if ( (col == 3) and (val != 'Receipt') and len(val) > 0) or ( (col == 4) and (val != 'Invoice') and len(val) > 0): + if ( (col == 5) and (val != 'Receipt') and len(val) > 0) or ( (col == 6) and (val != 'Invoice') and len(val) > 0): linkrel = '../' + val # ../ means remove the name of the *.ods linkname = os.path.basename(val) # name is just the last component doc.set_cell_value(col + 1, row, 'link', (linkrel, linkname)) diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx index cc3dc087..5286d625 100755 --- a/contrib/non-profit-audit-reports/general-ledger-report.plx +++ b/contrib/non-profit-audit-reports/general-ledger-report.plx @@ -107,8 +107,8 @@ foreach my $acct (@sortedAccounts) { close(GL_TEXT_DATA); die "error reading ledger output for chart of accounts: $!" unless $? == 0; print GL_CSV_OUT "\n\"ACCOUNT:\",\"$acct\"\n\"PERIOD START:\",\"$beginDate\"\n\"PERIOD END:\",\"$formattedEndDate\"\n"; - print GL_CSV_OUT '"DATE","CHECK NUM","NAME","Receipt","Invoice","TRANSACTION AMT","RUNNING TOTAL"', "\n"; - @acctLedgerOpts = ('-F', '"%(date)","%C","%P","%(tag(\'Receipt\'))","%(tag(\'Invoice\'))","%t","%T"\n', '-w', '--sort', 'd', '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg', $acct); + print GL_CSV_OUT '"DATE","CHECK NUM","NAME","TRANSACTION AMT","RUNNING TOTAL","Receipt","Invoice"', "\n"; + @acctLedgerOpts = ('-F', '"%(date)","%C","%P","%t","%T","%(tag(\'Receipt\'))","%(tag(\'Invoice\'))"\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: $!"; |