summaryrefslogtreecommitdiff
path: root/src/xact.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add support for --hashes=sha512_256 as another algorithmJohn Wiegley2024-08-051-2/+3
|
* Make xact hashes independent of posting orderJohn Wiegley2024-08-051-3/+31
| | | | | Also, support matching provided hashes against a prefixed of the generated hash.
* Add support for hash chaining to detect modifications in postingsJohn Wiegley2024-08-051-0/+15
| | | | | | | | | | | | | | | | | | | The following details of a posting contribute to its hash: fullname of account string representation of amount Each posting hashes contributes to the transaction hash, which is compromised of: previous transaction’s hash (as encountered in parsing order) actual date optional auxiliary date optional code payee hashes of all postings Note that this means that changes in the “code” or any of the comments
* fix #2220, bucket transactions ignored with reg --relatedTavis Ormandy2023-04-181-1/+1
| | | | | | This adds a new item flag, `ITEM_INFERRED`, that differentiates generated items from bucket items. This makes them show up as related items in reports.
* Update copyright yearAlexis Hildebrandt2023-02-021-1/+1
| | | | [skip ci]
* Fix balancing commodity with smaller unit.Maria2022-10-111-1/+1
|
* Update copyright statement for 2022Alexis Hildebrandt2022-07-021-1/+1
|
* Add an assertion to src/xact.ccJohn Wiegley2020-03-271-0/+2
|
* Simple whitespace fixJohn Wiegley2020-03-271-1/+1
|
* Ignore null deferred postingsMichael Budde2019-01-231-3/+5
| | | | | | | | | | | | | | | | | | All-null transactions (i.e. a transaction where all postings have a null amount) are discarded during parsing and the `xact` object is free'd. But if the transaction contains a deferred posting this results in a use-after-free vulnerability because a reference to the deferred posting is stored in the account object which is later read when deferred postings are applied after parsing is finished. Ignore null deferred postings to prevent this – they should not have any effect any way. Thanks to Cory Duplantis for reporting this issue and providing an initial analysis. Ref TALOS-2017-0304, CVE-2017-2808 Fixes #1723
* Make automated transactions work with assertionsChristoph Dittmann2018-06-091-1/+2
| | | | | | | | | | | | | | | This fixes issue #1127. In my understanding, PR #552 was meant to fix this, but was incomplete. Without this patch, automated transactions are invisible to assertions. This patch fixes this by adding a flag to the account to tell it that there is a new posting, analogous to the behavior of finalize(). I dug up issue #1127 too late to find that this is the same solution proposed by @tbm. Although I wrote this independently, credit goes to Martin Michlmayr (@tbm).
* Fix auto xact posts not getting applied to account total durring journal parseDJ Edmonson2018-03-231-3/+6
|
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2018-01-271-1/+1
| | | | [ci skip]
* Transfer null_post flags to generated postingsAaron Lindsay2018-01-091-1/+1
| | | Resolve issue where generated balanced postings would become real when the original null post was virtual.
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2017-01-051-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-021-1/+1
| | | | [ci skip]
* 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}/"
* "mispelled" was misspelledJoseph Mornin2014-09-081-1/+1
|
* Preserve original cost basis when gain or loss is madeMartin Michlmayr2014-07-141-2/+4
| | | | | | | | | | | | | | | | | | Change the definition of cost: in the past, if you bought 1 AAA for $10 and then sold it for $12, ledger would take $12 as the cost. With the patch, the original cost of $10 is preserved ss the cost basis. In my opinion, this brings ledger in line with accounting expectations. This change fixes bugs #712 and #713. Bug #712 is about Equity:Capital Gains and Equity:Capital Loss entries ledger automatically generates that are in my opinion incorrect. Bug #713 is about strange behaviour with -B after a capital gain or loss is made. Patch from John Wiegley.
* Use the POST_COST_VIRTUAL flag when exchange commoditiesJohn Wiegley2014-05-081-3/+3
| | | | Fixes #999
* Add the concept of "deferred postings"John Wiegley2014-04-131-1/+4
| | | | | This is pretty much exclusively for allowing one to use balance assertions with replicated transactions across multiple files.
* Bump copyright information to 2014Alexis Hildebrandt2014-02-021-1/+1
|
* Remove some unnecessary and complicated logicJohn Wiegley2013-05-191-34/+5
| | | | Fixes #712
* fix ledger xml output, remove ledger json commandJohann Klähn2013-03-081-12/+6
| | | | | | | | | | | | As the format used by property trees to represent valid JSON and that for valid XML is too different and given that there are more requests for valid XML output I decided to pursue a quick fix and remove the json command in favor of a working xml command. See bug #782, #909, recent discussion on mailing list. JSON support is postponed until I or someone else finds time to work on this or the python bindings are more stable.
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* whitespace cleanupJohann Klähn2013-01-161-5/+5
|
* Properly handle metadata tags on auto-postingsJohn Wiegley2012-11-121-6/+21
|
* Account names in auto-xacts can be format stringsJohn Wiegley2012-11-121-0/+9
|
* Implemented Bug551 Automatic Transactions are cleared base on parentCraig Earls2012-10-231-0/+8
|
* Fixed a subtle memory overwriteJohn Wiegley2012-06-271-8/+10
| | | | Fixes #608
* Converted the Ledger build system to use CMakeJohn Wiegley2012-05-201-5/+5
|
* Switched to Boost.PropertyTree for XML generationJohn Wiegley2012-05-181-42/+16
|
* Switch to using Boost.FormatJohn Wiegley2012-05-141-5/+4
|
* Resolve some issues with proof buildsJohn Wiegley2012-04-151-1/+2
|
* Add 'data' member to account/journal objectsJohn Wiegley2012-04-131-0/+3
|
* Simplified some code in xact.ccJohn Wiegley2012-03-231-62/+42
|
* Improved error reporting for bad account namesJohn Wiegley2012-03-161-2/+21
| | | | Fixes #374
* Added the notion of "virtual costs"John Wiegley2012-03-091-1/+1
|
* Added some missing DEBUG #if'sJohn Wiegley2012-03-071-0/+2
|
* Deferred notes were being processed too lateJohn Wiegley2012-03-071-8/+8
|
* Added parsing support for the many value directivesJohn Wiegley2012-03-071-0/+2
|
* Call register_account for posts created by auto xactsJohn Wiegley2012-03-071-2/+3
|
* Corrected several compile and link problemsJohn Wiegley2012-03-061-0/+2
|
* Added (disabled) code to stop sorting generated balancing postingsJohn Wiegley2012-03-051-3/+25
|
* Added some DEBUG statementsJohn Wiegley2012-03-051-0/+2
|
* When deleting a post from an xact, remove it from its accountJohn Wiegley2012-03-051-0/+2
|
* Refactored the notion of "the current parsing context"John Wiegley2012-03-011-2/+4
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Renamed actual/effective dates to primary/auxiliaryJohn Wiegley2012-02-281-3/+3
|
* Added a TODO commentJohn Wiegley2012-02-271-0/+2
|