Commit graph

4622 commits

Author SHA1 Message Date
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
Craig Earls
7fc291aaf1 Merge branch 'next' of https://github.com/ledger/ledger into next 2013-02-18 08:46:01 -07:00
Craig Earls
21cdc04ab3 Fixes Bug 900
If the buffer being reconciles was killed with the *Reconcile* buffer still
around their were dirty hooks left around that caused bug problems.
This fix adds a local kill-buffer hook that calls the ledger-quit routines
2013-02-18 08:45:24 -07:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
Craig Earls
2c69aa1ff5 A better try to deal with decimal-comma from ledger 2013-02-17 19:47:16 -07:00
John Wiegley
12db87f4c0 Merge pull request #156 from tubaman/embedded_python_doc_fix
Small corrections in the Embedded Python section
2013-02-17 14:24:10 -08:00
Ryan Nowakowski
2b8743d502 Small corrections in the Embedded Python section 2013-02-17 15:43:48 -06:00
Craig Earls
0357f92f81 Make sure ledger-fully-complete-entry copies the rest of the payee line 2013-02-16 08:56:25 -07:00
Craig Earls
d37a369c12 Changed prompt for reconciliation target. 2013-02-15 12:43:56 -07:00
Craig Earls
adfb03cac0 Fixed overrun when ledger report would expand argument and cmd would get short 2013-02-15 12:11:50 -07:00
Craig Earls
2a7d1c83dd Corrects problem clearing a transaction
toggle-current in the payee line will override all posting statuses and clear or unclear the entire transaction.
2013-02-15 09:04:34 -07:00
Craig Earls
9d2b2e3ceb Fixes Bug 897. toggle now works correctly if there are comment lines in the xact 2013-02-15 08:54:04 -07:00
Craig Earls
8116ef4781 Oops. This adds missing parenthesis to the last commit. 2013-02-15 08:07:41 -07:00
Craig Earls
7f0693bcdc Improved error reporting 2013-02-15 06:14:33 -07:00
Craig Earls
089716fb13 Bug 894 Changing reconciliation account now repositions point in the Reconcile buffer correctly. 2013-02-14 19:38:42 -07:00
Craig Earls
d8f0b0fa83 Code commenting cleanup. 2013-02-14 15:37:13 -07:00
Craig Earls
6eb97a7c38 Added a copy transaction function to ledger-mode 2013-02-14 13:20:16 -07:00
Craig Earls
67201ee850 Add highlighting in the report window if the line is mapped to a file 2013-02-14 11:40:08 -07:00
Craig Earls
30dc7e349d Fix to target change function in leg-reconcile
Took out the (interactive) statement and it needed to be there.
2013-02-14 10:05:53 -07:00
Craig Earls
1074dec8ad Improved ledger-report visit source capabilities 2013-02-14 09:49:00 -07:00
Craig Earls
c031fa4943 Added menu entry for complete entry.
Refactored leg-complete to get rid of some side effect usage
2013-02-13 20:45:22 -07:00
Craig Earls
d31913871f Added rudimentary target checking to reconcile. 2013-02-13 15:53:16 -07:00
Craig Earls
15d838d1f8 Bug 893 Ledger reconcile loses alignment
An earlier change to multi-file support stored the actual markers to the beginnings of the transaction/postings.
When reconcile would insert characters it would invalidate those marker and after many items and been
cleared could result in severe misalignment.  This change brings back storing the line-numbers as reported by emacs.
2013-02-13 13:23:04 -07:00
Craig Earls
6315c60e43 Correct behavior of ledger report when entering a new report
ledger-report-save would fail if you entered a new report with a name.  It wouldn't save the customization to the disk, and if you tried to save manually it would complain about an identical command.
2013-02-13 12:34:09 -07:00
Craig Earls
822970a7ae Merge pull request #155 from vanicat/t/reconcile_and_windows
T/reconcile and windows
2013-02-13 09:03:58 -08:00
Craig Earls
db9ae7dd04 Fixes workflow for using toggle-pending with clear-whole-transactions 2013-02-13 09:36:44 -07:00
Rémi Vanicat
6967374801 Ensure that the reconcile buffer is shown when ledger-reconcile is called. 2013-02-13 17:09:14 +01:00