Commit graph

2597 commits

Author SHA1 Message Date
John Wiegley
65ba928a59 Removed unnecessary code 2009-11-12 05:11:09 -05:00
John Wiegley
f217e50ab6 Set call policies for accessing post.xdata.account 2009-11-12 05:11:09 -05:00
John Wiegley
86daa41a90 Added a collect_posts handler 2009-11-12 05:11:09 -05:00
John Wiegley
cd0a040778 Reordered the export_ calls in pyinterp.cc 2009-11-12 05:11:09 -05:00
John Wiegley
9858b4957f Reorganized a bit of the reporting code 2009-11-12 05:11:09 -05:00
John Wiegley
48dc654eda Added has_xdata() methods for journal_t and xact_t 2009-11-12 05:11:06 -05:00
John Wiegley
0068ac8fc0 Made ~post_t virtual 2009-11-12 05:08:43 -05:00
John Wiegley
b2b0ae37e8 session_t now holds a std::auto_prt<journal_t> 2009-11-12 03:32:10 -05:00
John Wiegley
b5dca67396 Moved report normalization into report.cc 2009-11-12 03:31:53 -05:00
John Wiegley
fea1b42fa9 All commands are now documented in the man page 2009-11-12 02:40:29 -05:00
John Wiegley
013965d0ce Removed unused code 2009-11-12 01:43:59 -05:00
John Wiegley
c182b7051b Renamed the pricesdb command to pricedb 2009-11-12 01:43:57 -05:00
John Wiegley
95cc364961 Added new value expressions for value conversion
They are:

  to_boolean
  to_int
  to_datetime
  to_date
  to_amount
  to_balance
  to_string
  to_mask
  to_sequence
2009-11-11 21:33:53 -05:00
John Wiegley
b6ff8f19d5 Transactions now verified after applying auto xacts
This way you cannot violate the balancing rules, not even by adding a
stray posting via an automated transaction.
2009-11-11 21:33:07 -05:00
John Wiegley
67c9cf134d Added --date, similar to --account and --payee
This lets you do things like store a date as the value of a tag, then
run:

  ledger --date='has_tag("Foo") ? to_date(tag("Foo")) : date' reg
2009-11-11 21:32:32 -05:00
John Wiegley
c22b8457ef Did away with the "finalizer" abstraction
This was from an earlier time, when it was intended to be used by
Python.  But it's not needed anymore.
2009-11-11 18:29:21 -05:00
John Wiegley
31f85cc803 Use ledger::string only if VERIFY_ON or BOOST_PYTHON 2009-11-11 18:02:47 -05:00
John Wiegley
a8bc4728fe Restore the Doxygen documentation build 2009-11-11 18:02:12 -05:00
John Wiegley
a034435c42 Merge branch 'next' 2009-11-11 14:45:14 -05:00
John Wiegley
f0f1b0cdfa Value.to_sequence returns a valid Python sequence 2009-11-11 04:46:38 -05:00
John Wiegley
f1b495abfe Added some missing calls to add_post 2009-11-11 04:35:18 -05:00
John Wiegley
dae24c259b Added floor() value expression function 2009-11-11 04:22:41 -05:00
John Wiegley
e8ea2d4938 Automated postings defer amount expression calculation
This allows for value expressions to be used which reference the
incoming posting, for example:

  = Income:Clients:
    (Liabilities:Taxes:VAT1)  (floor(amount) * 1)
    (Liabilities:Taxes:VAT2)  0.19

  2009/07/27 * Invoice
    Assets:Bank:Checking                           $1,190.45
    Income:Clients:ACME_Inc

The automated posting for VAT1 will use the floored amount multiplied by
a factor, while the posting for VAT2 multiples the whole amount as
before.
2009-11-11 04:22:37 -05:00
John Wiegley
afe87280e0 Added floored() and in_place_floor() methods 2009-11-11 03:39:53 -05:00
John Wiegley
4a4ff9d4b2 Value.basetype in Python returns a Value's base type 2009-11-11 02:58:06 -05:00
John Wiegley
ed9209cc27 Timeclock events now record their file position 2009-11-11 02:01:34 -05:00
John Wiegley
a4b1e7c5ab Added a --prepend-format option
This lets you, for example, debug registers that cull data from many
different sources, without having to change the basic formatting
string.  You can locate each posting's location with this:

  ledger reg --prepend-format='%-25(filename + ":" + beg_line)'
2009-11-11 02:01:24 -05:00
John Wiegley
eb772893b0 Timeclock entries can now have notes
Example of a tagged entry:

i 2009/11/01 12:00:00 Account  Payee  ; :Foo:
o 2009/11/01 13:00:00

Two spaces or a tab must separate account from payee, and payee from
note.
2009-11-11 01:17:29 -05:00
John Wiegley
b62b03335f Removed "account" as a report query keyword 2009-11-11 01:16:42 -05:00
John Wiegley
acb69193d8 Added a few missing explicit instantiations 2009-11-10 20:57:08 -05:00
John Wiegley
7d15b1ed5a Fixed automated posts not appearing in bal reports 2009-11-10 20:56:27 -05:00
John Wiegley
5bb376b3f9 Added implicit Python conversion of time_duration_t 2009-11-10 20:52:36 -05:00
John Wiegley
048845184a Added a --no-git flag to acprep 2009-11-10 18:58:32 -05:00
John Wiegley
ac885a9075 All strings passed to Python are now Unicode objects 2009-11-10 18:44:08 -05:00
John Wiegley
0ac2dc2810 Fixed an erroneous use of operator>> in textual.cc 2009-11-10 18:43:53 -05:00
John Wiegley
7cd37b1d50 Moving the #include of unistring.h into format.h 2009-11-10 18:43:38 -05:00
John Wiegley
a345f9edb7 Python Unicode objects are now handled 2009-11-10 14:20:00 -05:00
John Wiegley
91e8378f04 Fixes to Python importing; removed "hello" precommand 2009-11-10 14:16:40 -05:00
John Wiegley
5ffa987daf Merge branch 'next' 2009-11-10 12:22:19 -05:00
John Wiegley
3f638d355c In tools/push, run acprep upload from master 2009-11-10 03:55:36 -05:00
John Wiegley
8f0f6e59cc Moved automatic acprep upload call to tools/push 2009-11-10 03:44:12 -05:00
John Wiegley
2163ee0da2 Added new file relating to query_t -> predicate_t 2009-11-10 02:59:23 -05:00
John Wiegley
39532bdf35 Automated transactions now use report query syntax
This returns their behavior back very close to what 2.x accepts.
2009-11-10 02:44:16 -05:00
John Wiegley
a779751fc7 query_t objects are now convertible to predicate_t 2009-11-10 02:43:52 -05:00
John Wiegley
294bf5a83d Whitespace fix 2009-11-10 02:42:09 -05:00
John Wiegley
329a0dfcc5 Corrected the parsing of data file directives 2009-11-10 02:26:34 -05:00
John Wiegley
bf24b93818 Fixes to the value expression parser and evaluator 2009-11-10 02:26:20 -05:00
John Wiegley
f49b7b2166 If -v is used, valexpr errors are more informative 2009-11-10 02:25:49 -05:00
John Wiegley
c8013c04d4 Whitespace fix 2009-11-10 02:25:36 -05:00
John Wiegley
3e39329eff Added "bucket" directive, as alt for A 2009-11-10 01:28:57 -05:00