summaryrefslogtreecommitdiff
path: root/src/textual.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in commentsMartin Michlmayr2020-05-211-1/+1
|
* Improve conditional for exclusive optionsMartin Michlmayr2020-05-071-1/+1
|
* Ensure that apply directives have an argumentMartin Michlmayr2020-04-271-0/+2
| | | | | | | | The directive `apply account` and similar directives (fixed, year...) require an argument. Ensure that an argument is given. Fixes #553 Fixes #1854
* fix: Fix #543 by tracking an account's real balanceDaraul2020-04-051-2/+2
| | | | | | | | | | | | | | Without these changes, whether an account's balance is virtual or real is not considered when asserting it's balance. This lead to situations where the user must consider their virtual postings when attemping to assert the real balance of the account. See test/regress/543_a.test for that testcase, taken from the original issue. This commit also includes other, fringe, situations that I noticed while working on the fix. It essentially just adds a separate attribute to the account class(?) that hold's the account's "real" balance, which is only updated when the user attempts an assertion on a real account. The virtual account's balance is updated the way it always was.
* Switch from using utf8::is_bom to utf8::starts_with_bomJohn Wiegley2019-08-181-1/+3
| | | | Fixes #1816
* Reject postings with comment after flagMichael Budde2019-03-301-1/+1
| | | | Fixes #1753
* Merge pull request #1736 from scfc/drop-conditionals-for-boost-earlier-than-1-49John Wiegley2019-01-251-21/+0
|\ | | | | | | | | Drop conditionals for Boost earlier than 1.49
| * Drop conditionals for Boost earlier than 1.49Tim Landscheidt2019-01-171-22/+1
| | | | | | | | | | | | | | Ledger requires Boost 1.49 or later and enforces this in CMakeLists.txt. This means BOOST_VERSION will always be 104900 or higher. Also, since Boost 1.46, BOOST_FILESYSTEM_VERSION is 3.
* | Drop support for gcc 2 and earlierTim Landscheidt2019-01-251-5/+5
|/
* Merge remote-tracking branch 'origin/master' into nextJohn Wiegley2018-07-191-1/+6
|\
| * Ensure that parse errors produce useful RuntimeErrors for Python code.Manuel Amador (Rudd-O)2016-02-061-1/+6
| |
* | fix regression of test 1147_aPascal Fleury2018-07-171-17/+18
| |
* | amount_t -> balance_t.Pascal Fleury2018-07-171-13/+30
| |
* | [misc] Update year in copyright notice to 2017Alexis Hildebrandt2018-01-271-1/+1
| | | | | | | | [ci skip]
* | The "format" directive for commodities now disables "style observation"John Wiegley2018-01-011-0/+1
| |
* | Merge pull request #484 from mk12/bug-1182-ptrJohn Wiegley2017-10-261-0/+3
|\ \ | | | | | | Fix Bug 1182: Error message for parse failure after '='
| * | Print error message if parsing predicate after '='Mitchell Kember2016-12-201-0/+3
| | |
* | | [misc] Update year in copyright notice to 2017Alexis Hildebrandt2017-01-051-1/+1
|/ / | | | | | | [ci skip]
* | Fix bug 1187: Allow balance assertions with multiple posts to same accountMitchell Kember2016-10-071-1/+12
| |
* | Use boost parent_path() method instead of manual computationEvan Mallory2016-10-021-8/+5
| | | | | | | | This fixes error-in-include.test, dir-apply.test, 6188B0EC.test, and 89233B6D.test when running under msys2 on Windows. The manual computation is incorrect when there are both forward slash and backward slash characters in the path.
* | Fix Bug 1147: Check balance assertions against the amount AFTERMitchell Kember2016-03-221-10/+12
|/
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-021-1/+1
| | | | [ci skip]
* Bugfix 1038: empty reg report for this month periodAlexis Hildebrandt2014-12-291-0/+5
| | | | | when year was specified with literal Y or year directive, but not when using apply year.
* Improve error handling when parsing year directivesAlexis Hildebrandt2014-12-281-9/+14
| | | | | | | A literal Y directive or ‘year’ directive with an empty or invalid argument, e.g. ‘2o14’ (that is a small letter ‘oh’ instead of a zero) would fail with the following rather unhelpful error message: Error: bad lexical cast: source type value could not be interpreted as target
* Fix plain year directiveAlexis Hildebrandt2014-12-281-0/+7
| | | | Only Y2014 or apply year 2014 would actually set the year for the following transactions; year 2014 would silently do nothing.
* Bump copyright notice to 2015Alexis Hildebrandt2014-12-271-1/+1
| | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
* Correct no-python error messagesAlexis Hildebrandt2014-12-251-2/+2
| | | | [ci skip]
* Fix off by one error in textual.ccAdrian Lang2014-12-111-1/+1
| | | This fixes parsing of transactions with single-character payees and comments.
* Preserve the given cost for printMartin Michlmayr2014-07-141-0/+2
| | | | Patch from John Wiegley
* When a status flag (! or *) is explicitly specified for an individual ↵Max Satula2014-06-301-2/+1
| | | | posting, it always has a priority over entire transaction status.
* Don't lose commodity when cost is not separated by whitespaceMartin Michlmayr2014-06-051-3/+2
| | | | | | | | When a cost was specified without a whitespace after the @ symbol, as in @$5.01, this was incorrectly parsed as 5.01 (losing the commodity) rather than $5.01. Bug fix for #1050
* Fix bug introduced by commit AA2FF2Bthdox2014-05-171-4/+3
| | | | Correction is to not use uninitialized amount
* Ensure that high-levels directives have arguments if they need oneMartin Michlmayr2014-05-141-0/+8
| | | | | Ensure that high-levels directives, such as account, alias and commodity, have arguments if they need one. Bug fix for #1036
* Ensure that directives have arguments if they need oneMartin Michlmayr2014-05-141-0/+11
| | | | | Ensure that account, commodity and payee directives have arguments if they need one. Bug fix for #785
* support payee uuid directiveChristophe Rhodes2014-05-131-0/+21
| | | | | | | | | | | | | The semantics of this are a little bit tricky: we want, if we come across a transaction with exactly the given UUID, to set the transaction's payee to be the specified one. We need to set that payee before the first post in the transaction is parsed, otherwise that post will inherit the wrong payee; however, we need to do it after the transaction's tags have been parsed. The implementation as it is in this commit is potentially a little wasteful, if there are post-like (non-comment non-assertion) entries in the transaction that don't successfully parse as posts.
* rename payee_mappings to payee_alias_mappingsChristophe Rhodes2014-05-121-2/+2
| | | | (and similar renames) in preparation for payee_uuid_mappings
* Improve an error message relating to balance assertionsJohn Wiegley2014-04-161-3/+8
|
* Apply any outstanding deferred postings at the end of parsingJohn Wiegley2014-04-141-0/+3
|
* Add the concept of "deferred postings"John Wiegley2014-04-131-0/+6
| | | | | This is pretty much exclusively for allowing one to use balance assertions with replicated transactions across multiple files.
* The option --permissive now quiets balance assertionsJohn Wiegley2014-04-131-6/+9
|
* Adding support for recursive aliases.Peter Feigl2014-02-251-0/+5
| | | | | | | | | | | Alias expansion is now a loop. If you define alias A=B:A alias B=C:B then A will expand to C:B:A. Also added a short section to the manual about this.
* Fix apply_year_directiveAlexis Hildebrandt2014-02-121-2/+2
| | | | | | Using the Y 2014 syntax works fine, but using apply year 2014 resulted in the following error: Error: Year is out of valid range: 1400..10000 since part of the given year string was chopped off.
* Bump copyright information to 2014Alexis Hildebrandt2014-02-021-1/+1
|
* Fixed parsing of the "fixed" directiveJohn Wiegley2013-05-191-4/+7
|
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* Added missing call to timelog.close()John Wiegley2013-01-301-0/+4
|
* Properly handle metadata tags on auto-postingsJohn Wiegley2012-11-121-1/+1
|
* Corrected a typoJohn Wiegley2012-10-311-2/+2
|
* fix bucket directive (bug 765)Johann Klähn2012-10-231-4/+4
| | | | | | | | This was caused by both 'A' and 'bucket' using default_account_directive. This function was still stripping the 'A' directive, so the first character of the account name used with 'bucket' was cut off. Maybe the code for the other directives should be changed accordingly for consistency (put line + 1 in call instead of function).
* Always store absolute paths internallyJohn Wiegley2012-08-021-3/+2
|