Commit graph

34 commits

Author SHA1 Message Date
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
eb45a0a4f4 Normalized how account totals are calculated 2009-03-03 17:08:11 -04:00
John Wiegley
c49b98fc4c Added an --unround option, to show full precision 2009-02-27 03:04:05 -04:00
John Wiegley
d58797e98c The -B, -G, -V reports now show rounding amounts
This way, if the running total is off by a penny or two due to rounding
of one or more commodities in the account, the user will see it.

This commit also reorganizes the testing code a bit, which I did after
adding the ninth test series (ConfirmTests), to validate the new
rounding code.
2009-02-26 03:16:39 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
a576842865 Added --revalued-total option, used by --gain
This option sets the total by which revalued transactions are
determined.  Only needed if the display total is not appropriate.
2009-02-23 15:37:39 -04:00
John Wiegley
9f53efbf5f Many fixes to both --market and --exchange 2009-02-23 01:51:23 -04:00
John Wiegley
cebc1da256 Restored the --invert option 2009-02-22 04:51:08 -04:00
John Wiegley
d0ac3a2e4e Added a new --exact option
The purpose of this option is that usually when you do a --monthly
periodic report, you see dates ranges from the first day of each month,
to the last day.  With --exact, the first day of each range will be the
date of the first transaction found in that range, and likewise with the
end of the range.  Essentially it "contracts" the reported period dates
to reflect the exact begin and end dates.
2009-02-21 02:14:53 -04:00
John Wiegley
23725ffafb Restored --forecast, now also --forecast-while 2009-02-21 00:12:22 -04:00
John Wiegley
c1b25fcf86 Rewrote the equity command, which is working again
The old implementation used an account formatter, and was very
specialized.  The new is done as a transaction filter, and works along
with everything else, eliminating bugs special to the equity report.
2009-02-20 02:53:54 -04:00
John Wiegley
26ddb8343c Don't sort or subtotal xacts for account reports 2009-02-19 15:47:54 -04:00
John Wiegley
e1c37aeee8 Improved the --collapse filter
It now takes the --display and --only predicates into account, so that
it never appears to be collapsing single transactions.

There are cases where there are multiple transactions, but the display
or only predicate filters them out, so that if collapse didn't consider
this, the user would wonder why a single transaction was being collapsed
-- since they'd never see that collapse saw more than two.
2009-02-17 05:22:59 -04:00
John Wiegley
72cdb41727 Added new --set-acount and --set-payee options
These fully generalize the previous --payee-as-account and such options,
which, for example, is now implemented to be the same as saying,
"--set-account payee".
2009-02-16 20:50:20 -04:00
John Wiegley
15bfeb3cb1 Added several new reporting options
To help with gathering specific reports:

 - --payee-as-account copies the entry's payee field to the account,
   allowing the subtotal report to show unique payees for each period.
 - --comm-as-account copies the transaction's amount's commodity to the
   account.
 - --code-as-account copies the entry's code to the account

Also created aliases for some of these options, for conistency's sake:

 - --commodity-as-payee is now an alias for --comm-as-payee
 - --commodity-as-account is now an alias for --comm-as-account
2009-02-16 18:11:23 -04:00
John Wiegley
275da22752 Fixed the --head and --tail options 2009-02-16 17:17:57 -04:00
John Wiegley
8c2a70e197 Made several of the filters more context aware
This resolves certain issues where value expressions were not being
looked up within their full context.
2009-02-15 23:00:16 -04:00
John Wiegley
14ffc2b31a Don't apply all filters for account-wise reports
This creates its own problems; instead, only most are used.
2009-02-15 22:57:23 -04:00
John Wiegley
bfa6a643a1 Improved handling of --empty option
For example, in period reports null transactions are only generated for
empty periods if --empty is used.  Otherwise, the presence of such
transactions can get confusing.
2009-02-15 20:59:13 -04:00
John Wiegley
78e57ac4cf item_predicate now operates on scope_t
This means item_predicate is no longer a template.
2009-02-15 20:56:48 -04:00
John Wiegley
5d4ac67920 chain_xact_handlers now always operators the same
Previously, account-wise reports used a subset of the total number of
transaction filters, but this could cause confusing results, and made
some reports immpossible (such as account-wise monthly averages).
2009-02-15 20:45:09 -04:00
John Wiegley
36b96c47ac Have interval_xacts construct temps on a list 2009-02-14 23:38:14 -04:00
John Wiegley
c8cd2c468e Re-enabled some code, and removed a bunch of deadwood. 2009-02-12 03:30:41 -04:00
John Wiegley
ba95808ab0 Sort period transactions by "date", not by "d". 2009-02-10 05:05:36 -04:00
John Wiegley
37a1989ca0 Added a new --collapse-if-zero option. 2009-02-09 15:07:28 -04:00
John Wiegley
02110394b4 Use the report's amount_expr everywhere that computes an xact's amount. 2009-02-09 14:53:29 -04:00
John Wiegley
391300aea2 Had to step back from a change that was breaking regular reports. 2009-02-09 00:57:56 -04:00
John Wiegley
0cb8049c41 Pass amount expression to calc_xacts, to be used for computing the total. 2009-02-08 23:57:30 -04:00
John Wiegley
e8d2409430 Removed --reconcile and --reconcile-date. 2009-02-07 00:03:58 -04:00
John Wiegley
cdcd52dbaf Removed the nearly unknown --descend and --descend-if options. 2009-02-06 23:36:32 -04:00
John Wiegley
cf6babcf90 Restored all the option handlers from 2.6.2, but not the options themselves. 2009-02-06 03:31:41 -04:00
John Wiegley
408b819c6e Greatly simplified the way option and command handlers are defined. 2009-02-05 21:20:09 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
e61696a91b Moved chain_xact_handlers into its own file, chain.h and chain.cc. 2009-02-01 18:29:30 -04:00