| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
and reply #ifdev HAVE_ with #if HAVE_
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
| |
Ledger's expression parser considers quoted_rfc4180 to be an
amount (quantity 4180 of commodity "quoted_rfc").
Fixes #2007.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- commodity_price(NAME, DATE)
- set_commodity_price(NAME, DATE)
Using these two I am able to compute rate of return over a period of
transactions, taking additional deposits and withdrawals into account, using
the following automated transactions:
P 2019-12-31 12:00:00 ROI $1.00
2020-01-01 Start of record
(ROI) 0 ROI
= expr date >= [2020/01/01] && account =~ /Broker:Cash$/ and any(account =~ /Assets:Checking/)
(ROI) (1 ROI * (amount / commodity_price(1 ROI, date)))
= expr date >= [2020/01/01] && account =~ /:Capital:/
(ROI) (set_commodity_price(1 ROI, date, ((commodity_price(1 ROI, date) * account("ROI").amount) - amount) / account("ROI").amount) || 0 ROI)
|
|
|
|
|
| |
This joins together lots of the same underlying, averaging the reported price
and using the date of the oldest lot.
|
| |
|
| |
|
|\
| |
| | |
Fix handling of edge cases in trim function
|
| |
| |
| |
| | |
Fixes #520
|
|/
|
|
| |
[ci skip]
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
| |
This was reported as Bug #1109
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Appveyor is a continuous integration platform for Windows that is free for open source projects. See latest test build here: https://ci.appveyor.com/project/Evan/ledger/build/artifacts
* Changed WIN32 to _WIN32 because this article http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system claims that it is defined by the greatest number of compilers.
* Modified HAVE_ISATTY and other system defines so that system.hh compiles when cmake fails to find the relevant function.
* Add missing include in test/unit/t_value.cc
Almost all tests fail when you run them on msys32. I will address that in a future PR.
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
|
| |
std::isspace(*e) returns false for the end of c-string null-byte.
Bugzilla: 1106
|
|
|
|
|
|
| |
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}/"
|
|
|
|
|
|
|
|
|
|
|
| |
If set, the COLUMNS environment variable will take precedence over terminal
width. However, please note that COLUMNS is usually *not* exported by shells to
child processes, so in most cases COLUMNS will be undefined for ledger---hence
the motivation for this change.
Terminal width is queried using ioctl() on stdin. For the sake of portability
the querying is done only on platform where ioctl() is detected as supported at
compile-time.
|
|
|
|
| |
Bug fix for #747
|
|
|
|
| |
Thanks to Johann Klähn.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Fixes Bug634 by adding roundto(amount, places).
|
|
|
|
| |
Not sure how the changes to the options got into the repot.cc file, but this takes the changes out.
|
|
|
|
|
| |
Tags command reports all metadat tags in use. With the
values option it reports tags and their values.
|
| |
|
| |
|
| |
|
|
|
|
| |
This is only a partial fix for 634, since rounding is not fixed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
ledger 2.2 introduced the pricesdb command. This was renamed to
pricedb in ledger 3. Allow pricesdb as an alternative to pricedb
to provide backwards compatibility.
Fixes bug #728
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a rather basic option at the moment which only affects the
balance report. I use it as follows, for entering contractor hours into
a project planning application, where $1 is the contractor's timelog
file, and $2 is the date after which new entries appear in the file:
ledger -f $1 balance \
--account=payee \
--time-report \
-d "latest > [$2]" \
--datetime-format='%m/%d/%y %I:%M %p'
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #674
|