diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-02 16:39:26 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-02 16:39:26 -0400 |
commit | 1c7de0f9e4d6372ab80a90f0ccd8ce7314466686 (patch) | |
tree | 48aa139446af98005c983b94de70d73acdf3d61c /src/commodity.h | |
parent | c10c01e5a5eef1963d5ba7d97831e3185fb7cf30 (diff) | |
download | fork-ledger-1c7de0f9e4d6372ab80a90f0ccd8ce7314466686.tar.gz fork-ledger-1c7de0f9e4d6372ab80a90f0ccd8ce7314466686.tar.bz2 fork-ledger-1c7de0f9e4d6372ab80a90f0ccd8ce7314466686.zip |
Added "fixated commodity pricing"
If you put '=' before an annotated commodity's price, it will cause any
future market valuation of that commodity to use that price, and ignore
whatever changes may have happened since in the market price. This can
be useful if you are tracking gas expenses based on a standard rate
which, although it changes over time, should not adjust the historical
valuation of how much the gas cost at the time it was purchased:
2009/01/01 Payee
Expenses:Gas 100 GAL {=$2}
Liabilities:MasterCard $-200
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commodity.h b/src/commodity.h index 310a0a89..c152dfc7 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -363,8 +363,9 @@ struct annotation_t : public supports_flags<>, public equality_comparable<annotation_t> { #define ANNOTATION_PRICE_CALCULATED 0x01 -#define ANNOTATION_DATE_CALCULATED 0x02 -#define ANNOTATION_TAG_CALCULATED 0x04 +#define ANNOTATION_PRICE_FIXATED 0x02 +#define ANNOTATION_DATE_CALCULATED 0x04 +#define ANNOTATION_TAG_CALCULATED 0x08 optional<amount_t> price; optional<date_t> date; |