Commit graph

4648 commits

Author SHA1 Message Date
Craig Earls
94ce2f0fdb Fixed typo in doc/CMakeLists.txt line 58 "mesage" ==> "message" 2013-02-25 12:38:53 -07:00
Craig Earls
7a561f6b2e Bug 907. 2013-02-24 08:20:28 -07:00
Craig Earls
172a3076bc Updated README files 2013-02-23 18:07:23 -07:00
Craig Earls
aa10b6ea5d Cleanup dump variables 2013-02-22 21:00:41 -07:00
Craig Earls
fd2c6d87a2 Added ledger-mode-dump-variables to give me some instrumentation on users installs 2013-02-21 22:21:13 -07:00
Craig Earls
c68bdde19f Another buglet in the commodity handler. 2013-02-21 21:39:30 -07:00
Craig Earls
510a7c4e6c Position point at beginning of line on posting being reconciled. 2013-02-21 15:31:58 -07:00
Craig Earls
d638f8300f bug-905, inadvertently used an aquamacs function. 2013-02-21 14:59:32 -07:00
Craig Earls
023e245e9b Another attempt to deal with decimal-comma 2013-02-21 14:35:29 -07:00
Craig Earls
2fd1574cf2 Prevent point from being at the end of line when ledger-reconcile-toggle is called 2013-02-21 06:43:00 -07:00
Craig Earls
a4e76727be Put in more nil window protection. 2013-02-20 21:16:05 -07:00
Craig Earls
8029fd1149 Run ledger-highlight-xact-under-point when reconcile quits, so only one xact is highlighted 2013-02-20 20:46:38 -07:00
Craig Earls
f54c15bdf5 Bug 884. Highlight first line of file 2013-02-20 16:13:27 -07:00
Craig Earls
c7dd499a73 Merge commit 'e9416ca017902610d7646a4b8312b9d886ea9f31' into next 2013-02-20 14:01:18 -07:00
Craig Earls
988a41c3a4 Make ledger-reconcile a little cleaner.
The recon buffer is filled before asking for target, so there isn't a blank window showing while asking for target.
2013-02-20 14:00:46 -07:00
Craig Earls
e9416ca017 Merge pull request #159 from bkuhn/non-profit-audit-reports-updates-20130220
A few minor cleanups in non-profit-audit reports
2013-02-20 05:52:48 -08:00
Bradley M. Kuhn
88667ca0c5 Comment to expound more on what it means for <Adjustment> entries to be ignored by these reports.
Loïc Dachary <loic@dachary.org>, during patch review, pondered whether the
ignoring of <Adjustment> by these scripts could ever be used to hide funds,
ala the movies Superman III and Office Space.

After discussion, we both concluded that it would not be possible to hide
funds merely with this report.  Such hiding would have to also dig into the
main Ledger codebase and muck with how it handles auto-generated <Adjustment>
entries.
2013-02-20 08:10:27 -05:00
Bradley M. Kuhn
a8403eac53 Include better explanation of what this report is for in the comments. 2013-02-20 07:59:11 -05:00
Bradley M. Kuhn
e606dfd72f Fix typo in error output.
HT Loïc Dachary <loic@dachary.org>, who noticed this.
2013-02-20 07:49:50 -05:00
Bradley M. Kuhn
b378359f5f Use a Math::BigFloat() rather than a regular float for Adjustment comparison.
Based on patch review by Loïc Dachary <loic@dachary.org>, we discovered that
this script inconsistently used 0.02 as a float when comparing against
numbers from the Math::BigFloat() package.  While there were no known bugs
related to this (presumably the 0.02 got coerced into a BigFloat (or
vice-versa) and compared properly), this change nevertheless normalizes to
use of a BigFloat for comparison.
2013-02-20 07:49:50 -05:00
Craig Earls
f33d232ba3 Merge commit 'f8bec00d0b7487c4afe56a4f994e69ec8e91af8b' into next 2013-02-19 16:45:25 -07:00
Craig Earls
4ebd17efb3 Better way of splitting the commodity from the value.
Should allow no spaces between commodities and values.
2013-02-19 16:44:53 -07:00
John Wiegley
f8bec00d0b Merge pull request #158 from bkuhn/non-profit-audit-reports-updates-20130219
Equity and Adjustment accounts should not appear in these reports at all
2013-02-19 13:18:28 -08:00
Craig Earls
4f9c124540 Merge commit '3d90bfc4add2a85b80c2a90b7c0df9b95d77579d' into next 2013-02-19 09:31:12 -07:00
Craig Earls
cf39acfd8b Fix another null buffer problem when closing ledger buffers 2013-02-19 09:30:20 -07:00
Bradley M. Kuhn
c2bc7b6b9e Equity and Adjustment accounts should not appear in these reports at all.
There were a few spots where they were still sneaking in.
2013-02-19 09:13:05 -05:00
John Wiegley
3d90bfc4ad Fix formatting and typos 2013-02-18 20:54:23 -06:00
Craig Earls
34ed226c57 Merge pull request #157 from bkuhn/more-non-profit-audit-reports-updates
More non profit audit reports updates
2013-02-18 11:50:46 -08:00
Bradley M. Kuhn
cbdffb9a41 Catch a few additional accounts under Conference RBI category. 2013-02-18 14:36:39 -05:00
Bradley M. Kuhn
8fa91dcb31 Remove spurious print statement. 2013-02-18 14:20:15 -05:00
Bradley M. Kuhn
77827f9c80 Subtotaling of BRANCH DEPOSITs.
The auditors seem to like to see the check deposits made to be subtotaled, so
that's done here.  I attempted to aid this by using a --sort and/or
--sort-xacts option (or combo thereof) on the ledger command line, but this
didn't work as expected.  I opened a bug in ledger about this:
   http://bugs.ledger-cli.org/show_bug.cgi?id=901
2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
a08dd787de Remove extra newline 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
aea1445b04 Rework report to be just two files (disbursements and receipts).
Ensure that tagged linked files appear for all lines.
2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
e87b6abb7f Sort solution by date in output. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
afe912f163 Searching is better when you can set the begin date, end date and then go back from begin date. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
11639785bb Improve spreadsheet and debugging output. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
7d04b92ad1 This could be for any period, not just the FY. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
ccd0685b6d Correct account names due to renaming of Conference accounts in chart of accounts. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
86b2043042 Remove output of TXT files. CSV output is adequate. 2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
c0206418f7 Correct regular expression for account queries to avoid inclusion of sub-accounts.
The previous queries had a bug whereby an account in the form "A:B" would
include all transactions for sub accounts such as "A:B:C".

That's not the intended effect.  Entries should appear in the lowest level
account, and not in their parent.

The regular expression now is anchored at start and finish in both queries to
ensure this works correctly.
2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
9fcdfc893c Support for title: field, to name sheets in the ODS file.
If "title:SOMETHING" occurs in the CSV file, use SOMETHING as the title of
the sheet.
2013-02-18 14:08:46 -05:00
Bradley M. Kuhn
8ebb54638c Start search from date: easy way to resume searches.
Instead of always starting a search from the end date, allow a CLI option
that is the data to use for the start of searching (back from the end date).
This is useful when resuming a search (since they take a long time).
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
94094ce365 Finish reporting details for STDOUT; change command line arg to bank balance.
Report in CSV now goes to STDOUT.

The command line argument that was the difference to seek is now the bank
balance.
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
0530b729e2 Default to brute-force subset sum solution.
The dynamic programming version of the subset sum problem required far too
much RAM for larger bank balances.  Meanwhile, the brute-force is not to bad
now that the loop tries the closer dates *first*.
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
d13ab6a402 Support for a list of known checksums of files already copied over.
For the times when we want to make shorter names of files by doing copies of
the documentation files for hyperlink usage, allow input of a new command
line option which is a list in the form of:

  PATH_TO_FILE : sha25sum

so that those files can be used rather than new copies made.
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
18d2867a63 Rename the function to note it's the dynamic programming one. 2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
b1b807fcfa Loop through to build smaller sets when testing.
Usually, transactions that didn't appear are nearby in date to the statement
date.  This loop cycles through.  Overall, this would take longer to find a
solution, but since most solutions are in the early dates "back" from the
statement date, this will probably be faster in typical cases.
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
6962fc4c57 Basic implementation probably correct, but needs much RAM.
This is the basic implementation but for large numbers, it needs a *LOT*
of RAM.
2013-02-18 14:08:45 -05:00
Bradley M. Kuhn
b214a2db5b Began work on script to reconcile bank accounts.
The goal here is to take as input an account, a monthly balance amount
that appears on a bank statement, and the date of that bank statement and
output the list of transactions that likely weren't cleared properly as of
that date that caused the balance in the accounts to fail to match the
balance that appeared on the statement.

Note that determining this answer requires solving the known NP-Complete
problem called the subset sum problem.  There is a known pseudo-polynomial
dynamic programming solution to this problem, but it's still exponential
in the size of the numbers you have to balance.

So, if you have *big* account balances, this will make take quite a while
to run.  For smaller accounts, the pseudo-polynomial solution might be
helpful.  (BTW, the wikipedia entry on the subset sum problem isn't, at
the time of this commit, particularly good, but it's "good enough" to give
you a sense of what the subset sum problem is:
    http://en.wikipedia.org/wiki/Subset_sum_problem

)

I originally wrote the subset sum problem solution implementation here:
  2dca069d81

The code is just cut and pasted in here with some minor modifications.

This rest of this first commit just has that aforementioned paste, plus the
beginnings of the CLI and query to run to get the proper entries.
2013-02-18 14:08:44 -05:00
Bradley M. Kuhn
34a6279baa Add --single-file-directory option: create single directory with all linked files.
This new option copies all files to the directory specified as an argument
to the --single-file-directory option, and also creates dummy shorter
filenames for the files.

This feature was implemented to get around a problem found when zip'ing
the spreadsheet up with the supporting files for users on Windows.  The
Windows users encounter the error 0x80010135 related to some of the ZIP
files going beyond the maximum path name length on windows.  Apparently,
opening ZIP files with long path names just doesn't work on Microsoft
systems.  I've suggested our accountants switch to a Free Software
operating system, but they declined.
2013-02-18 14:08:44 -05:00