Commit graph

661 commits

Author SHA1 Message Date
John Wiegley
dab2bfabc8 *** empty log message *** 2008-04-13 02:41:15 -04:00
John Wiegley
b79b3cf54b (report_budget_items): Removed an unused local variable. 2008-04-13 02:41:15 -04:00
John Wiegley
f9c2ddfd96 *** empty log message *** 2008-04-13 02:41:15 -04:00
John Wiegley
b22b655c34 (parse): Removed some unnecessary code which was actually causing
price histories to be parsed wrong when compiler optimizations were
used (at least on my machine).
2008-04-13 02:41:15 -04:00
John Wiegley
d4bdaa2d2b *** empty log message *** 2008-04-13 02:41:15 -04:00
John Wiegley
e00c568add When --input-date-format is seen, don't wipe out the rest of the date
formats, simply replace the first one.  Then, when --period is seen,
use the first date format as the template for what to pass to the
begin/end options.
2008-04-13 02:41:14 -04:00
John Wiegley
4e822d213f (derive_new_entry): If no argument were given but the payee, assume
the user wants to see the same transaction as last time.
2008-04-13 02:41:14 -04:00
John Wiegley
1e6bfc7796 (amount_t::value): Corrected a problem with commodity rounding after
market values are determined (was using the wrong commodity's
precision value).
(commodity_t::value): Fixed the market value calculation algorithm,
which was very broken (but only seemed to show up if the price history
was very small).
2008-04-13 02:41:14 -04:00
John Wiegley
6a98fa726a *** empty log message *** 2008-04-13 02:41:14 -04:00
John Wiegley
39a7aed8b1 Increased binary version number. 2008-04-13 02:41:14 -04:00
John Wiegley
e8df173270 (find_commodity): Don't copy over the NOMARKET flag from the default
commodity.
2008-04-13 02:41:14 -04:00
John Wiegley
cc2148a60d *** empty log message *** 2008-04-13 02:41:14 -04:00
John Wiegley
29eeae9b1c (process_options): Corrected a long-standing error with using "--" to
separate payee regexps from account regexps.
2008-04-13 02:41:14 -04:00
John Wiegley
66b4147958 (class format_account): Fixed initialization order 2008-04-13 02:41:14 -04:00
John Wiegley
8ed3aaacb7 *** empty log message *** 2008-04-13 02:41:13 -04:00
John Wiegley
609f6b195a (parse): Negate QIF amounts for which a category is specified, since
the category shows where the money went, not where it came from.
2008-04-13 02:41:13 -04:00
John Wiegley
6de82df3ae *** empty log message *** 2008-04-13 02:41:13 -04:00
John Wiegley
92e591c237 (parse): Set the beginning and ending line number for each entry as it
is parsed.
2008-04-13 02:41:13 -04:00
John Wiegley
afa807a678 (qif_parser_t::parse): Record the beginning and ending line/pos and
source index when reading QIF files.
2008-04-13 02:41:13 -04:00
John Wiegley
2a690c7c47 Removed unused code. 2008-04-13 02:41:13 -04:00
John Wiegley
ec329bfaae (Format strings): Added documentation about using %b and %e format
elements.
2008-04-13 02:41:13 -04:00
John Wiegley
ecdc02c5d3 (class entry_base_t): Added beg_line' and end_line' members. 2008-04-13 02:41:13 -04:00
John Wiegley
368549f76d (export_journal): Added basket' member for journals, and beg_line'
and `end_line' for entries (for Python).
2008-04-13 02:41:13 -04:00
John Wiegley
13524610c9 Record the beginning/ending line and position of entries parsed within
Gnucash files.
2008-04-13 02:41:13 -04:00
John Wiegley
b5726ac831 (struct element_t): Added BEG_LINE and END_LINE. 2008-04-13 02:41:12 -04:00
John Wiegley
f851642347 (parse_elements): The format codes %b and %e can be used to display
the beginning and ending line numbers of an entry.  (format): Output
beginning and ending line for BEG_LINE and END_LINE types.
2008-04-13 02:41:12 -04:00
John Wiegley
529604b204 Updated binary version number. (read_binary_entry_base): Read in
beginning and ending line information for each entry.
(write_binary_entry_base): Write out beginning and ending line
information for each entry.
2008-04-13 02:41:12 -04:00
John Wiegley
a10f3f02e7 (parse): Allow "-$100.00" as the equivalent of "$-100.00". 2008-04-13 02:41:12 -04:00
John Wiegley
a2015ee510 *** empty log message *** 2008-04-13 02:41:12 -04:00
John Wiegley
155685657f *** empty log message *** 2008-04-13 02:41:12 -04:00
John Wiegley
f05ef1085a (parse_inline_math): Parse amounts that use any
of ()/*+- as "inline math".  This causes "$100.00 * 20" to be
turned into the equivalent value expression "({$100.00} * {20})".
It is a shorthand, at the expense of a little textual parsing
speed.
(parse_amount): Call `parse_inline_math' if appropriate.
(parse_entry): Support transactions that follow immediately after
the payee name, separated by two or more spaces.  This makes it
possible -- when a basket account is being used -- to list off
entry transactions one per line.
(parse): Allow a basket account to be specified using the syntax
"A ACCOUNT".  From that point on in the file, any single
transactions entries will be balanced against that account.
2008-04-13 02:41:12 -04:00
John Wiegley
6ecec7eb1e (parse): Removed an unnecessary line of code. 2008-04-13 02:41:12 -04:00
John Wiegley
69881ae385 (chain_xact_handlers): When budgeting and forecasting are being used,
never update the binary cache (and don't create one if none was
there).  This is because certain intermediary accounts get created
during generation of these reports, which should never be recorded in
the cache as actual accounts.  Also, run the account filter both
before and after the budgeting and forecasting filters, to ensure that
only the accounts the user is interested in get included in the
report.
2008-04-13 02:41:12 -04:00
John Wiegley
62eb99ec5a (Budgeting and forecasting): Added a transaction to the example, to
show that budgeting transactions needn't be exact.
2008-04-13 02:41:12 -04:00
John Wiegley
86941556b8 (class journal_t): Added a "basket" account member, which if set is
the account to which all single-transaction entries are balanced.
2008-04-13 02:41:12 -04:00
John Wiegley
5175fdcd6c (finalize): If a "basket" account is being used,
balance single transaction entries into it.  Also, fixed two entry
balancing issues.
(finalize): If a "catch all" transaction (a transaction with no
amount) is present in an entry, it will now balance all unbalanced
quantities in the entry.  Before its use was much more restricted.
(journal_t::add_entry): Set the "journal" pointer before calling
the finalize hooks, so that the finalizers have access to the
proposed journal the entry wishes to be added to (if it fails, the
pointer is cleared).
2008-04-13 02:41:11 -04:00
John Wiegley
81e4851a6c Updated binary file version. (read_binary_journal): Read in the
"basket" account, if used.  (write_binary_journal): Write out the
"basket" account, if used.
2008-04-13 02:41:11 -04:00
John Wiegley
75f110f842 *** empty log message *** 2008-04-13 02:41:11 -04:00
John Wiegley
fdf73faff7 (parse): Accept CX as well as C*. Also, general improvements to Bank
type parser.
2008-04-13 02:41:11 -04:00
John Wiegley
6d14952e1e *** empty log message *** 2008-04-13 02:41:11 -04:00
John Wiegley
e9ea090035 (ledger-do-reconcile): Only allow toggling of reconcilation entries
that are found in the "main" ledger file (for now).
2008-04-13 02:41:11 -04:00
John Wiegley
b800e4e2f8 (parse): The src_idx field on journal entries was being set
incorrectly.
2008-04-13 02:41:11 -04:00
John Wiegley
889014dedc Increased binary file version number. 2008-04-13 02:41:11 -04:00
John Wiegley
600eb3f2e6 *** empty log message *** 2008-04-13 02:41:11 -04:00
John Wiegley
7109c9234e (parse): Parse price database entries using the fixed date format
"%Y/%m/%d %H:%M:%S".
2008-04-13 02:41:11 -04:00
John Wiegley
bff42f702a Added input_format' array, and made formats' external. 2008-04-13 02:41:10 -04:00
John Wiegley
6d7827af5a Added --input-date-format, which affects how dates in textual and QIF
files are parsed -- but not the dates inside a price database, whose
format is fixed.
2008-04-13 02:41:10 -04:00
John Wiegley
cc38fc235f *** empty log message *** 2008-04-13 02:41:10 -04:00
John Wiegley
c15c053787 *** empty log message *** 2008-04-13 02:41:10 -04:00
John Wiegley
0185e53b99 Separate out the arguments, to be more compatible. 2008-04-13 02:41:10 -04:00