diff --git a/tests/fixture/inr-beancount/allocation.json b/tests/fixture/inr-beancount/allocation.json index d06b5f37..1031b6b1 100644 --- a/tests/fixture/inr-beancount/allocation.json +++ b/tests/fixture/inr-beancount/allocation.json @@ -9,8 +9,20 @@ "Assets:Checking": { "date": "2022-02-07T23:59:59.999999999Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase": { + "date": "0001-01-01T00:00:00Z", + "account": "Assets:Coinbase", + "amount": 0, + "market_amount": 0 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-07T23:59:59.999999999Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity": { "date": "0001-01-01T00:00:00Z", @@ -27,8 +39,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-07T23:59:59.999999999Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-07T23:59:59.999999999Z", @@ -104,8 +116,14 @@ "Assets:Checking": { "date": "2022-01-08T00:00:00Z", "account": "Assets:Checking", - "amount": 1975.10129152, - "market_amount": 1975.10129152 + "amount": 1974.6485861976294, + "market_amount": 1974.6485861976294 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-08T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-08T00:00:00Z", @@ -116,8 +134,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-08T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-08T00:00:00Z", @@ -130,8 +148,14 @@ "Assets:Checking": { "date": "2022-01-09T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-09T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-09T00:00:00Z", @@ -142,8 +166,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-09T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-09T00:00:00Z", @@ -156,8 +180,14 @@ "Assets:Checking": { "date": "2022-01-10T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-10T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-10T00:00:00Z", @@ -168,8 +198,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-10T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-10T00:00:00Z", @@ -182,8 +212,14 @@ "Assets:Checking": { "date": "2022-01-11T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-11T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-11T00:00:00Z", @@ -194,8 +230,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-11T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-11T00:00:00Z", @@ -208,8 +244,14 @@ "Assets:Checking": { "date": "2022-01-12T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-12T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-12T00:00:00Z", @@ -220,8 +262,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-12T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-12T00:00:00Z", @@ -234,8 +276,14 @@ "Assets:Checking": { "date": "2022-01-13T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-13T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-13T00:00:00Z", @@ -246,8 +294,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-13T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-13T00:00:00Z", @@ -260,8 +308,14 @@ "Assets:Checking": { "date": "2022-01-14T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-14T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-14T00:00:00Z", @@ -272,8 +326,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-14T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-14T00:00:00Z", @@ -286,8 +340,14 @@ "Assets:Checking": { "date": "2022-01-15T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-15T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-15T00:00:00Z", @@ -298,8 +358,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-15T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-15T00:00:00Z", @@ -312,8 +372,14 @@ "Assets:Checking": { "date": "2022-01-16T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-16T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-16T00:00:00Z", @@ -324,8 +390,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-16T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-16T00:00:00Z", @@ -338,8 +404,14 @@ "Assets:Checking": { "date": "2022-01-17T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-17T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-17T00:00:00Z", @@ -350,8 +422,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-17T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-17T00:00:00Z", @@ -364,8 +436,14 @@ "Assets:Checking": { "date": "2022-01-18T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-18T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-18T00:00:00Z", @@ -376,8 +454,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-18T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-18T00:00:00Z", @@ -390,8 +468,14 @@ "Assets:Checking": { "date": "2022-01-19T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-19T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-19T00:00:00Z", @@ -402,8 +486,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-19T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-19T00:00:00Z", @@ -416,8 +500,14 @@ "Assets:Checking": { "date": "2022-01-20T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-20T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-20T00:00:00Z", @@ -428,8 +518,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-20T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-20T00:00:00Z", @@ -442,8 +532,14 @@ "Assets:Checking": { "date": "2022-01-21T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-21T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-21T00:00:00Z", @@ -454,8 +550,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-21T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-21T00:00:00Z", @@ -468,8 +564,14 @@ "Assets:Checking": { "date": "2022-01-22T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-22T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-22T00:00:00Z", @@ -480,8 +582,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-22T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-22T00:00:00Z", @@ -494,8 +596,14 @@ "Assets:Checking": { "date": "2022-01-23T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-23T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-23T00:00:00Z", @@ -506,8 +614,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-23T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-23T00:00:00Z", @@ -520,8 +628,14 @@ "Assets:Checking": { "date": "2022-01-24T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-24T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-24T00:00:00Z", @@ -532,8 +646,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-24T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-24T00:00:00Z", @@ -546,8 +660,14 @@ "Assets:Checking": { "date": "2022-01-25T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-25T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-25T00:00:00Z", @@ -558,8 +678,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-25T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-25T00:00:00Z", @@ -572,8 +692,14 @@ "Assets:Checking": { "date": "2022-01-26T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-26T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-26T00:00:00Z", @@ -584,8 +710,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-26T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-26T00:00:00Z", @@ -598,8 +724,14 @@ "Assets:Checking": { "date": "2022-01-27T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-27T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-27T00:00:00Z", @@ -610,8 +742,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-27T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-27T00:00:00Z", @@ -624,8 +756,14 @@ "Assets:Checking": { "date": "2022-01-28T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-28T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-28T00:00:00Z", @@ -636,8 +774,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-28T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-28T00:00:00Z", @@ -650,8 +788,14 @@ "Assets:Checking": { "date": "2022-01-29T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-29T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-29T00:00:00Z", @@ -662,8 +806,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-29T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-29T00:00:00Z", @@ -676,8 +820,14 @@ "Assets:Checking": { "date": "2022-01-30T00:00:00Z", "account": "Assets:Checking", - "amount": 12002.40129152, - "market_amount": 12002.40129152 + "amount": 12001.94858619763, + "market_amount": 12001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-30T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-30T00:00:00Z", @@ -688,8 +838,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-30T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-30T00:00:00Z", @@ -702,8 +852,14 @@ "Assets:Checking": { "date": "2022-01-31T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-01-31T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-01-31T00:00:00Z", @@ -714,8 +870,8 @@ "Assets:Equity:ABNB": { "date": "2022-01-31T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-01-31T00:00:00Z", @@ -728,8 +884,14 @@ "Assets:Checking": { "date": "2022-02-01T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-01T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-01T00:00:00Z", @@ -740,8 +902,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-01T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-01T00:00:00Z", @@ -754,8 +916,14 @@ "Assets:Checking": { "date": "2022-02-02T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-02T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-02T00:00:00Z", @@ -766,8 +934,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-02T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-02T00:00:00Z", @@ -780,8 +948,14 @@ "Assets:Checking": { "date": "2022-02-03T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-03T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-03T00:00:00Z", @@ -792,8 +966,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-03T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-03T00:00:00Z", @@ -806,8 +980,14 @@ "Assets:Checking": { "date": "2022-02-04T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-04T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-04T00:00:00Z", @@ -818,8 +998,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-04T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-04T00:00:00Z", @@ -832,8 +1012,14 @@ "Assets:Checking": { "date": "2022-02-05T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-05T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-05T00:00:00Z", @@ -844,8 +1030,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-05T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-05T00:00:00Z", @@ -858,8 +1044,14 @@ "Assets:Checking": { "date": "2022-02-06T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-06T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-06T00:00:00Z", @@ -870,8 +1062,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-06T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-06T00:00:00Z", @@ -884,8 +1076,14 @@ "Assets:Checking": { "date": "2022-02-07T00:00:00Z", "account": "Assets:Checking", - "amount": 13002.40129152, - "market_amount": 13002.40129152 + "amount": 13001.94858619763, + "market_amount": 13001.94858619763 + }, + "Assets:Coinbase:BTC": { + "date": "2022-02-07T00:00:00Z", + "account": "Assets:Coinbase:BTC", + "amount": 0.03440667277056, + "market_amount": 0.03440667277056 }, "Assets:Equity:AAPL": { "date": "2022-02-07T00:00:00Z", @@ -896,8 +1094,8 @@ "Assets:Equity:ABNB": { "date": "2022-02-07T00:00:00Z", "account": "Assets:Equity:ABNB", - "amount": 8024.89870848, - "market_amount": 8024.89870848 + "amount": 8025.3170071296, + "market_amount": 8025.3170071296 }, "Assets:Equity:NIFTY": { "date": "2022-02-07T00:00:00Z", diff --git a/tests/fixture/inr-beancount/assets_balance.json b/tests/fixture/inr-beancount/assets_balance.json index 732effed..3c097608 100644 --- a/tests/fixture/inr-beancount/assets_balance.json +++ b/tests/fixture/inr-beancount/assets_balance.json @@ -2,36 +2,58 @@ "asset_breakdowns": { "Assets": { "group": "Assets", - "investmentAmount": 98024.89870848, + "investmentAmount": 98025.35141380237, "withdrawalAmount": 10027.3, "marketAmount": 101245.7, "balanceUnits": 0, "latestPrice": 0, "xirr": 12.84, - "gainAmount": 13248.10129152, - "absoluteReturn": 0.1351503696108785 + "gainAmount": 13247.648586197629, + "absoluteReturn": 0.1351451272056578 }, "Assets:Checking": { "group": "Assets:Checking", "investmentAmount": 0, "withdrawalAmount": 0, - "marketAmount": 13002.40129152, + "marketAmount": 13001.94858619763, "balanceUnits": 0, "latestPrice": 0, "xirr": 46.91, - "gainAmount": 13002.40129152, + "gainAmount": 13001.94858619763, + "absoluteReturn": 0 + }, + "Assets:Coinbase": { + "group": "Assets:Coinbase", + "investmentAmount": 0.03440667277056, + "withdrawalAmount": 0, + "marketAmount": 0.03440667277056, + "balanceUnits": 0, + "latestPrice": 0, + "xirr": 0, + "gainAmount": 0, + "absoluteReturn": 0 + }, + "Assets:Coinbase:BTC": { + "group": "Assets:Coinbase:BTC", + "investmentAmount": 0.03440667277056, + "withdrawalAmount": 0, + "marketAmount": 0.03440667277056, + "balanceUnits": 1e-8, + "latestPrice": 0, + "xirr": 0, + "gainAmount": 0, "absoluteReturn": 0 }, "Assets:Equity": { "group": "Assets:Equity", - "investmentAmount": 98024.89870848, + "investmentAmount": 98025.3170071296, "withdrawalAmount": 10027.3, - "marketAmount": 88243.29870848, + "marketAmount": 88243.7170071296, "balanceUnits": 0, "latestPrice": 0, "xirr": 3.23, "gainAmount": 245.7, - "absoluteReturn": 0.0025065060330304 + "absoluteReturn": 0.0025064953371396 }, "Assets:Equity:AAPL": { "group": "Assets:Equity:AAPL", @@ -46,9 +68,9 @@ }, "Assets:Equity:ABNB": { "group": "Assets:Equity:ABNB", - "investmentAmount": 8024.89870848, + "investmentAmount": 8025.3170071296, "withdrawalAmount": 0, - "marketAmount": 8024.89870848, + "marketAmount": 8025.3170071296, "balanceUnits": 0.76, "latestPrice": 0, "xirr": 0, diff --git a/tests/fixture/inr-beancount/budget.json b/tests/fixture/inr-beancount/budget.json index dca10097..cef8ea35 100644 --- a/tests/fixture/inr-beancount/budget.json +++ b/tests/fixture/inr-beancount/budget.json @@ -1,5 +1,5 @@ { - "availableForBudgeting": 13002.40129152, + "availableForBudgeting": 13001.94858619763, "budgetsByMonth": {}, - "checkingBalance": 13002.40129152 + "checkingBalance": 13001.94858619763 } \ No newline at end of file diff --git a/tests/fixture/inr-beancount/cash_flow.json b/tests/fixture/inr-beancount/cash_flow.json index 04c42b7f..ceee8549 100644 --- a/tests/fixture/inr-beancount/cash_flow.json +++ b/tests/fixture/inr-beancount/cash_flow.json @@ -5,10 +5,10 @@ "income": 121027.3, "expenses": 20000, "liabilities": 0, - "investment": 88024.89870848, + "investment": 88025.35141380237, "tax": 0, - "checking": 13002.40129152, - "balance": 13002.40129152 + "checking": 13001.94858619763, + "balance": 13001.94858619763 }, { "date": "2022-02-01T00:00:00Z", @@ -18,7 +18,7 @@ "investment": 0, "tax": 0, "checking": 0, - "balance": 13002.40129152 + "balance": 13001.94858619763 } ] } \ No newline at end of file diff --git a/tests/fixture/inr-beancount/config.json b/tests/fixture/inr-beancount/config.json index c4398bb8..c6982b14 100644 --- a/tests/fixture/inr-beancount/config.json +++ b/tests/fixture/inr-beancount/config.json @@ -6,6 +6,7 @@ "Assets:Equity:NIFTY", "Assets:Equity:ABNB", "Assets:Equity:AAPL", + "Assets:Coinbase:BTC", "Income:CapitalGains:Equity:AAPL", "Income:Interest:Checking" ], diff --git a/tests/fixture/inr-beancount/dashboard.json b/tests/fixture/inr-beancount/dashboard.json index f4d479ad..946e680e 100644 --- a/tests/fixture/inr-beancount/dashboard.json +++ b/tests/fixture/inr-beancount/dashboard.json @@ -1,8 +1,8 @@ { "budget": { - "availableForBudgeting": 13002.40129152, + "availableForBudgeting": 13001.94858619763, "budgetsByMonth": {}, - "checkingBalance": 13002.40129152 + "checkingBalance": 13001.94858619763 }, "cashFlows": [ { @@ -10,10 +10,10 @@ "income": 121027.3, "expenses": 20000, "liabilities": 0, - "investment": 88024.89870848, + "investment": 88025.35141380237, "tax": 0, - "checking": 13002.40129152, - "balance": 13002.40129152 + "checking": 13001.94858619763, + "balance": 13001.94858619763 }, { "date": "2022-02-01T00:00:00Z", @@ -23,14 +23,14 @@ "investment": 0, "tax": 0, "checking": 0, - "balance": 13002.40129152 + "balance": 13001.94858619763 } ], "expenses": { "2022-01": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -40,8 +40,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -55,8 +55,8 @@ "networth": { "networth": { "date": "2022-02-07T23:59:59.999999999Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1245.7, "balanceAmount": 101245.7, "balanceUnits": 0, @@ -67,13 +67,13 @@ "transactionSequences": [], "transactions": [ { - "id": "921d64598f4c56b14b31d38082133a98", + "id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "postings": [ { - "id": 17, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 19, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Assets:Checking", @@ -83,8 +83,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -93,8 +93,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -104,8 +104,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -116,19 +116,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 52, - "endLine": 55, + "beginLine": 58, + "endLine": 61, "fileName": "main.beancount", "note": "" }, { - "id": "5791326dad5ac24abe481334280732b6", + "id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "postings": [ { - "id": 15, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 17, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Checking", @@ -138,8 +138,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -148,8 +148,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -159,8 +159,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -169,8 +169,8 @@ "balance": 0 }, { - "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -180,8 +180,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -192,30 +192,30 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 43, - "endLine": 47, + "beginLine": 49, + "endLine": 53, "fileName": "main.beancount", "note": "" }, { - "id": "caadd198feb7df74977c601338dda836", + "id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", + "payee": "Purchased 0.00000001 BTC", "postings": [ { - "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 13, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", - "account": "Assets:Equity:AAPL", - "commodity": "AAPL", - "quantity": 100, - "amount": 10000, + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", @@ -224,19 +224,19 @@ "balance": 0 }, { - "id": 12, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 14, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", + "payee": "Purchased 0.00000001 BTC", "account": "Assets:Checking", - "commodity": "INR", - "quantity": -10000, - "amount": -10000, + "commodity": "USD", + "quantity": -0.00042772, + "amount": -0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", @@ -247,30 +247,30 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 39, - "endLine": 42, + "beginLine": 45, + "endLine": 48, "fileName": "main.beancount", "note": "" }, { - "id": "893e3f4e15df851b08a93a83a38a5117", + "id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "postings": [ { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -280,18 +280,73 @@ }, { "id": 10, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Checking", "commodity": "USD", - "quantity": -99.76, - "amount": -8024.89870848, + "quantity": -99.7652, + "amount": -8025.3170071296, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 37, + "transaction_end_line": 40, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + } + ], + "tag_recurring": "", + "tag_period": "", + "beginLine": 37, + "endLine": 40, + "fileName": "main.beancount", + "note": "" + }, + { + "id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "postings": [ + { + "id": 11, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "account": "Assets:Equity:AAPL", + "commodity": "AAPL", + "quantity": 100, + "amount": 10000, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 41, + "transaction_end_line": 44, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 12, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "account": "Assets:Checking", + "commodity": "INR", + "quantity": -10000, + "amount": -10000, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -302,19 +357,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 35, - "endLine": 38, + "beginLine": 41, + "endLine": 44, "fileName": "main.beancount", "note": "" }, { - "id": "3968afa503cf4faabd0e5088e2f66e0a", + "id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "postings": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -324,8 +379,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -335,7 +390,7 @@ }, { "id": 7, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Checking", @@ -345,8 +400,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -357,19 +412,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 31, - "endLine": 34, + "beginLine": 33, + "endLine": 36, "fileName": "main.beancount", "note": "" }, { - "id": "fdfcf45cb83539494492acb348bead1e", + "id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "postings": [ { "id": 6, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Assets:Checking", @@ -379,8 +434,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -390,7 +445,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -400,8 +455,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -412,19 +467,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 27, - "endLine": 30, + "beginLine": 29, + "endLine": 32, "fileName": "main.beancount", "note": "" }, { - "id": "6a989bbbae4cf68c01310a88dc940ab5", + "id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "postings": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -434,8 +489,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -445,7 +500,7 @@ }, { "id": 3, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Assets:Checking", @@ -455,8 +510,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -467,19 +522,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 23, - "endLine": 26, + "beginLine": 25, + "endLine": 28, "fileName": "main.beancount", "note": "" }, { - "id": "b55f3fb49ff1273180674122d47419e2", + "id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "postings": [ { "id": 2, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Assets:Checking", @@ -489,8 +544,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -500,7 +555,7 @@ }, { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -510,8 +565,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -522,8 +577,8 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 19, - "endLine": 22, + "beginLine": 21, + "endLine": 24, "fileName": "main.beancount", "note": "" } diff --git a/tests/fixture/inr-beancount/expense.json b/tests/fixture/inr-beancount/expense.json index 89eedbde..16d74024 100644 --- a/tests/fixture/inr-beancount/expense.json +++ b/tests/fixture/inr-beancount/expense.json @@ -2,7 +2,7 @@ "expenses": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -12,8 +12,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -29,6 +29,10 @@ "id": 1, "name": "Assets:Checking" }, + { + "id": 10, + "name": "Assets:Coinbase:BTC" + }, { "id": 9, "name": "Assets:Equity:AAPL" @@ -54,23 +58,23 @@ "name": "Income" }, { - "id": 10, + "id": 11, "name": "Income:CapitalGains" }, { - "id": 11, + "id": 12, "name": "Income:CapitalGains:Equity" }, { - "id": 12, + "id": 13, "name": "Income:CapitalGains:Equity:AAPL" }, { - "id": 13, + "id": 14, "name": "Income:Interest" }, { - "id": 14, + "id": 15, "name": "Income:Interest:Checking" }, { @@ -96,7 +100,7 @@ { "source": 1, "target": 8, - "value": 8024.89870848 + "value": 8025.3170071296 }, { "source": 1, @@ -128,14 +132,9 @@ "target": 1, "value": 10000 }, - { - "source": 10, - "target": 2, - "value": 27.3 - }, { "source": 11, - "target": 10, + "target": 2, "value": 27.3 }, { @@ -145,12 +144,17 @@ }, { "source": 13, + "target": 12, + "value": 27.3 + }, + { + "source": 14, "target": 2, "value": 1000 }, { - "source": 14, - "target": 13, + "source": 15, + "target": 14, "value": 1000 } ] @@ -161,7 +165,7 @@ "2022-01": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -171,8 +175,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -186,7 +190,7 @@ "2022-01": [ { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -196,8 +200,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -207,7 +211,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -217,8 +221,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -227,8 +231,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -238,8 +242,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -248,8 +252,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -259,8 +263,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -274,7 +278,7 @@ "2022-01": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -284,8 +288,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -295,18 +299,18 @@ }, { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -316,7 +320,7 @@ }, { "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", "account": "Assets:Equity:AAPL", @@ -326,8 +330,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -337,7 +341,28 @@ }, { "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 45, + "transaction_end_line": 48, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -347,8 +372,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -365,7 +390,7 @@ "2021 - 22": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -375,8 +400,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -390,7 +415,7 @@ "2021 - 22": [ { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -400,8 +425,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -411,7 +436,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -421,8 +446,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -431,8 +456,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -442,8 +467,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -452,8 +477,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -463,8 +488,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -478,7 +503,7 @@ "2021 - 22": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -488,8 +513,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -499,18 +524,18 @@ }, { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -520,7 +545,7 @@ }, { "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", "account": "Assets:Equity:AAPL", @@ -530,8 +555,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -541,7 +566,28 @@ }, { "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 45, + "transaction_end_line": 48, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -551,8 +597,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", diff --git a/tests/fixture/inr-beancount/files.json b/tests/fixture/inr-beancount/files.json index 3ce827d8..c2d87302 100644 --- a/tests/fixture/inr-beancount/files.json +++ b/tests/fixture/inr-beancount/files.json @@ -6,6 +6,7 @@ "Assets:Equity:NIFTY", "Assets:Equity:ABNB", "Assets:Equity:AAPL", + "Assets:Coinbase:BTC", "Income:CapitalGains:Equity:AAPL", "Income:Interest:Checking" ], @@ -14,12 +15,13 @@ "NIFTY", "ABNB", "USD", - "AAPL" + "AAPL", + "BTC" ], "files": [ { "name": "main.beancount", - "content": "1970-01-01 open Assets:Checking\n1970-01-01 open Assets:Equity:AAPL\n1970-01-01 open Assets:Equity:ABNB\n1970-01-01 open Assets:Equity:NIFTY\n1970-01-01 open Expenses:Rent\n1970-01-01 open Income:CapitalGains:Equity:AAPL\n1970-01-01 open Income:Interest:Checking\n1970-01-01 open Income:Salary:Acme\n\n1970-01-01 commodity AAPL\n1970-01-01 commodity ABNB\n1970-01-01 commodity INR\n1970-01-01 commodity NIFTY\n1970-01-01 commodity USD\n\n2022-01-07 price NIFTY 100 INR\n2022-02-07 price NIFTY 100.273 INR\n\n2022-01-01 txn \"Salary\"\n Income:Salary:Acme -100,000 INR\n Assets:Checking 100,000 INR\n\n2022-01-03 txn \"Rent\"\n Assets:Checking -20,000 INR\n Expenses:Rent\n\n2022-01-06 txn \"Bonus\"\n Income:Salary:Acme -20,000 INR\n Assets:Checking 20,000 INR\n\n2022-01-07 txn \"Investment\"\n Assets:Checking -80,000 INR\n Assets:Equity:NIFTY 800 NIFTY {100 INR}\n\n2022-01-08 txn \"Buy ABNB\"\n Assets:Equity:ABNB 0.76 ABNB {131.27 USD}\n Assets:Checking\n\n2022-01-08 txn \"Buy Apple\"\n Assets:Equity:AAPL 100 AAPL {100 INR}\n Assets:Checking\n\n2022-01-09 txn \"Sell\"\n Assets:Equity:AAPL -100 AAPL {100 INR} @ 100.273 INR\n Income:CapitalGains:Equity:AAPL -27.3 INR\n Assets:Checking 10027.3 INR\n\n2022-01-08 price USD 80.442048 INR\n\n2022-01-31 txn \"Interest\"\n ; Global note\n ; :interest:\n Income:Interest:Checking -1,000 INR ; Posting note\n Assets:Checking\n\n2022/01/31 balance Assets:Equity:NIFTY 800 NIFTY", + "content": "1970-01-01 open Assets:Checking\n1970-01-01 open Assets:Equity:AAPL\n1970-01-01 open Assets:Equity:ABNB\n1970-01-01 open Assets:Equity:NIFTY\n1970-01-01 open Expenses:Rent\n1970-01-01 open Income:CapitalGains:Equity:AAPL\n1970-01-01 open Income:Interest:Checking\n1970-01-01 open Income:Salary:Acme\n1970-01-01 open Assets:Coinbase:BTC\n\n1970-01-01 commodity AAPL\n1970-01-01 commodity ABNB\n1970-01-01 commodity INR\n1970-01-01 commodity NIFTY\n1970-01-01 commodity USD\n1970-01-01 commodity BTC\n\n2022-01-07 price NIFTY 100 INR\n2022-02-07 price NIFTY 100.273 INR\n\n2022-01-01 txn \"Salary\"\n Income:Salary:Acme -100,000 INR\n Assets:Checking 100,000 INR\n\n2022-01-03 txn \"Rent\"\n Assets:Checking -20,000 INR\n Expenses:Rent\n\n2022-01-06 txn \"Bonus\"\n Income:Salary:Acme -20,000 INR\n Assets:Checking 20,000 INR\n\n2022-01-07 txn \"Investment\"\n Assets:Checking -80,000 INR\n Assets:Equity:NIFTY 800 NIFTY {100 INR}\n\n2022-01-08 txn \"Buy ABNB\"\n Assets:Equity:ABNB 0.76 ABNB {131.27 USD}\n Assets:Checking\n\n2022-01-08 txn \"Buy Apple\"\n Assets:Equity:AAPL 100 AAPL {100 INR}\n Assets:Checking\n\n2022-01-08 txn \"Purchased 0.00000001 BTC\"\n Assets:Coinbase:BTC 0.00000001 BTC {42772 USD}\n Assets:Checking -0.00042772 USD\n\n2022-01-09 txn \"Sell\"\n Assets:Equity:AAPL -100 AAPL {100 INR} @ 100.273 INR\n Income:CapitalGains:Equity:AAPL -27.3 INR\n Assets:Checking 10027.3 INR\n\n2022-01-08 price USD 80.442048 INR\n\n2022-01-31 txn \"Interest\"\n ; Global note\n ; :interest:\n Income:Interest:Checking -1,000 INR ; Posting note\n Assets:Checking\n\n2022/01/31 balance Assets:Equity:NIFTY 800 NIFTY\n", "versions": [], "operation": "" } @@ -31,6 +33,7 @@ "Investment", "Buy ABNB", "Buy Apple", + "Purchased 0.00000001 BTC", "Sell", "Interest" ] diff --git a/tests/fixture/inr-beancount/gain.json b/tests/fixture/inr-beancount/gain.json index c5b8eb14..d62064ad 100644 --- a/tests/fixture/inr-beancount/gain.json +++ b/tests/fixture/inr-beancount/gain.json @@ -1,5 +1,41 @@ { "gain_breakdown": [ + { + "account": "Assets:Coinbase:BTC", + "networth": { + "date": "2022-02-07T23:59:59.999999999Z", + "investmentAmount": 0.03440667277056, + "withdrawalAmount": 0, + "gainAmount": 0, + "balanceAmount": 0.03440667277056, + "balanceUnits": 0, + "netInvestmentAmount": 0.03440667277056 + }, + "xirr": 0, + "postings": [ + { + "id": 13, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 45, + "transaction_end_line": 48, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0.03440667277056, + "balance": 0 + } + ] + }, { "account": "Assets:Equity:AAPL", "networth": { @@ -15,7 +51,7 @@ "postings": [ { "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", "account": "Assets:Equity:AAPL", @@ -25,8 +61,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -35,8 +71,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -46,8 +82,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -56,8 +92,8 @@ "balance": 0 }, { - "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -67,8 +103,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -82,34 +118,34 @@ "account": "Assets:Equity:ABNB", "networth": { "date": "2022-02-07T23:59:59.999999999Z", - "investmentAmount": 8024.89870848, + "investmentAmount": 8025.3170071296, "withdrawalAmount": 0, "gainAmount": 0, - "balanceAmount": 8024.89870848, + "balanceAmount": 8025.3170071296, "balanceUnits": 0, - "netInvestmentAmount": 8024.89870848 + "netInvestmentAmount": 8025.3170071296 }, "xirr": 0, "postings": [ { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": 8024.89870848, + "market_amount": 8025.3170071296, "balance": 0 } ] @@ -129,7 +165,7 @@ "postings": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -139,8 +175,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", diff --git a/tests/fixture/inr-beancount/income.json b/tests/fixture/inr-beancount/income.json index 37ce029a..5b5a5c07 100644 --- a/tests/fixture/inr-beancount/income.json +++ b/tests/fixture/inr-beancount/income.json @@ -5,7 +5,7 @@ "postings": [ { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -15,8 +15,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -26,7 +26,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -36,8 +36,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -46,8 +46,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -57,8 +57,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -67,8 +67,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -78,8 +78,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -102,7 +102,7 @@ "postings": [ { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -112,8 +112,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -123,7 +123,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -133,8 +133,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -143,8 +143,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -154,8 +154,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -164,8 +164,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -175,8 +175,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", diff --git a/tests/fixture/inr-beancount/income_statement.json b/tests/fixture/inr-beancount/income_statement.json index 1ed105ce..ef3686f4 100644 --- a/tests/fixture/inr-beancount/income_statement.json +++ b/tests/fixture/inr-beancount/income_statement.json @@ -2,7 +2,7 @@ "yearly": { "2021 - 22": { "startingBalance": 0, - "endingBalance": 93221.56129152, + "endingBalance": 93221.10858620763, "date": "2021-04-01T00:00:00Z", "income": { "Income:Salary:Acme": -120000 @@ -12,8 +12,9 @@ }, "equity": {}, "pnl": { + "Assets:Coinbase:BTC": -0.03440666277056, "Assets:Equity:AAPL": 27.3, - "Assets:Equity:ABNB": -8024.13870848, + "Assets:Equity:ABNB": -8024.5570071296, "Assets:Equity:NIFTY": 218.4 }, "liabilities": {}, diff --git a/tests/fixture/inr-beancount/investment.json b/tests/fixture/inr-beancount/investment.json index dd5c30aa..a82edf6f 100644 --- a/tests/fixture/inr-beancount/investment.json +++ b/tests/fixture/inr-beancount/investment.json @@ -2,7 +2,7 @@ "assets": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -12,8 +12,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -23,18 +23,18 @@ }, { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -44,7 +44,7 @@ }, { "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", "account": "Assets:Equity:AAPL", @@ -54,8 +54,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -65,7 +65,28 @@ }, { "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 45, + "transaction_end_line": 48, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -75,8 +96,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -92,7 +113,7 @@ "postings": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -102,8 +123,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -113,18 +134,18 @@ }, { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -134,7 +155,7 @@ }, { "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", "account": "Assets:Equity:AAPL", @@ -144,8 +165,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -155,7 +176,28 @@ }, { "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 45, + "transaction_end_line": 48, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -165,8 +207,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -179,9 +221,9 @@ "gross_other_income": 1027.3, "net_tax": 0, "net_income": 121027.3, - "net_investment": 88024.89870848, + "net_investment": 88025.35141380237, "net_expense": 20000, - "savings_rate": 72.73144051670987 + "savings_rate": 72.73181456894632 } ] } \ No newline at end of file diff --git a/tests/fixture/inr-beancount/ledger.json b/tests/fixture/inr-beancount/ledger.json index 6ac0128f..9c67040e 100644 --- a/tests/fixture/inr-beancount/ledger.json +++ b/tests/fixture/inr-beancount/ledger.json @@ -1,8 +1,8 @@ { "postings": [ { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -12,8 +12,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -22,8 +22,8 @@ "balance": -1000 }, { - "id": 17, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 19, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Assets:Checking", @@ -33,18 +33,18 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", "market_amount": 1000, - "balance": 20927.54 + "balance": 20927.53437228 }, { - "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -54,8 +54,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -64,8 +64,8 @@ "balance": 0 }, { - "id": 15, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 17, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Checking", @@ -75,18 +75,18 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", "market_amount": 10027.3, - "balance": 19927.54 + "balance": 19927.53437228 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -96,8 +96,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -106,113 +106,134 @@ "balance": -27.3 }, { - "id": 12, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 11, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", - "account": "Assets:Checking", - "commodity": "INR", - "quantity": -10000, - "amount": -10000, + "account": "Assets:Equity:AAPL", + "commodity": "AAPL", + "quantity": 100, + "amount": 10000, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": -10000, - "balance": 10000 + "market_amount": 10000, + "balance": 100 + }, + { + "id": 9, + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy ABNB", + "account": "Assets:Equity:ABNB", + "commodity": "ABNB", + "quantity": 0.76, + "amount": 8025.3170071296, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 37, + "transaction_end_line": 40, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 8025.3170071296, + "balance": 0.76 }, { "id": 10, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Checking", "commodity": "USD", - "quantity": -99.76, - "amount": -8024.89870848, + "quantity": -99.7652, + "amount": -8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": -8024.89870848, - "balance": 9900.24 + "market_amount": -8025.3170071296, + "balance": 19900.2348 }, { - "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 12, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", "date": "2022-01-08T00:00:00Z", "payee": "Buy Apple", - "account": "Assets:Equity:AAPL", - "commodity": "AAPL", - "quantity": 100, - "amount": 10000, + "account": "Assets:Checking", + "commodity": "INR", + "quantity": -10000, + "amount": -10000, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": 10000, - "balance": 100 + "market_amount": -10000, + "balance": 9900.2348 }, { - "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "id": 14, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy ABNB", - "account": "Assets:Equity:ABNB", - "commodity": "ABNB", - "quantity": 0.76, - "amount": 8024.89870848, + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Checking", + "commodity": "USD", + "quantity": -0.00042772, + "amount": -0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": 8024.89870848, - "balance": 0.76 + "market_amount": -0.03440667277056, + "balance": 9900.23437228 }, { - "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", - "date": "2022-01-07T00:00:00Z", - "payee": "Investment", - "account": "Assets:Equity:NIFTY", - "commodity": "NIFTY", - "quantity": 800, - "amount": 80000, + "id": 13, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", + "date": "2022-01-08T00:00:00Z", + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": 80218.4, - "balance": 800 + "market_amount": 0.03440667277056, + "balance": 1e-8 }, { "id": 7, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Checking", @@ -222,8 +243,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -232,29 +253,29 @@ "balance": 20000 }, { - "id": 6, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", - "date": "2022-01-06T00:00:00Z", - "payee": "Bonus", - "account": "Assets:Checking", - "commodity": "INR", - "quantity": 20000, - "amount": 20000, + "id": 8, + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", + "date": "2022-01-07T00:00:00Z", + "payee": "Investment", + "account": "Assets:Equity:NIFTY", + "commodity": "NIFTY", + "quantity": 800, + "amount": 80000, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", "transaction_note": "", - "market_amount": 20000, - "balance": 100000 + "market_amount": 80218.4, + "balance": 800 }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -264,8 +285,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -273,9 +294,30 @@ "market_amount": -20000, "balance": -120000 }, + { + "id": 6, + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", + "date": "2022-01-06T00:00:00Z", + "payee": "Bonus", + "account": "Assets:Checking", + "commodity": "INR", + "quantity": 20000, + "amount": 20000, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 29, + "transaction_end_line": 32, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 20000, + "balance": 100000 + }, { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -285,8 +327,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -296,7 +338,7 @@ }, { "id": 3, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Assets:Checking", @@ -306,8 +348,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -317,7 +359,7 @@ }, { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -327,8 +369,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -338,7 +380,7 @@ }, { "id": 2, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Assets:Checking", @@ -348,8 +390,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", diff --git a/tests/fixture/inr-beancount/networth.json b/tests/fixture/inr-beancount/networth.json index b45930c0..e4e6de67 100644 --- a/tests/fixture/inr-beancount/networth.json +++ b/tests/fixture/inr-beancount/networth.json @@ -65,8 +65,8 @@ }, { "date": "2022-01-08T00:00:00Z", - "investmentAmount": 218024.89870848, - "withdrawalAmount": 118024.89870848, + "investmentAmount": 218025.35141380236, + "withdrawalAmount": 118025.35141380237, "gainAmount": 0, "balanceAmount": 100000, "balanceUnits": 0, @@ -74,8 +74,8 @@ }, { "date": "2022-01-09T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -83,8 +83,8 @@ }, { "date": "2022-01-10T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -92,8 +92,8 @@ }, { "date": "2022-01-11T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -101,8 +101,8 @@ }, { "date": "2022-01-12T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -110,8 +110,8 @@ }, { "date": "2022-01-13T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -119,8 +119,8 @@ }, { "date": "2022-01-14T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -128,8 +128,8 @@ }, { "date": "2022-01-15T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -137,8 +137,8 @@ }, { "date": "2022-01-16T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -146,8 +146,8 @@ }, { "date": "2022-01-17T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -155,8 +155,8 @@ }, { "date": "2022-01-18T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -164,8 +164,8 @@ }, { "date": "2022-01-19T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -173,8 +173,8 @@ }, { "date": "2022-01-20T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -182,8 +182,8 @@ }, { "date": "2022-01-21T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -191,8 +191,8 @@ }, { "date": "2022-01-22T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -200,8 +200,8 @@ }, { "date": "2022-01-23T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -209,8 +209,8 @@ }, { "date": "2022-01-24T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -218,8 +218,8 @@ }, { "date": "2022-01-25T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -227,8 +227,8 @@ }, { "date": "2022-01-26T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -236,8 +236,8 @@ }, { "date": "2022-01-27T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -245,8 +245,8 @@ }, { "date": "2022-01-28T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -254,8 +254,8 @@ }, { "date": "2022-01-29T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -263,8 +263,8 @@ }, { "date": "2022-01-30T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 27.3, "balanceAmount": 100027.3, "balanceUnits": 0, @@ -272,8 +272,8 @@ }, { "date": "2022-01-31T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -281,8 +281,8 @@ }, { "date": "2022-02-01T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -290,8 +290,8 @@ }, { "date": "2022-02-02T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -299,8 +299,8 @@ }, { "date": "2022-02-03T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -308,8 +308,8 @@ }, { "date": "2022-02-04T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -317,8 +317,8 @@ }, { "date": "2022-02-05T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -326,8 +326,8 @@ }, { "date": "2022-02-06T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1027.3, "balanceAmount": 101027.3, "balanceUnits": 0, @@ -335,8 +335,8 @@ }, { "date": "2022-02-07T00:00:00Z", - "investmentAmount": 228052.19870848, - "withdrawalAmount": 128052.19870848, + "investmentAmount": 228052.65141380238, + "withdrawalAmount": 128052.65141380238, "gainAmount": 1245.7, "balanceAmount": 101245.7, "balanceUnits": 0, diff --git a/tests/fixture/inr-beancount/price.json b/tests/fixture/inr-beancount/price.json index 38ce4b54..4fd43ab5 100644 --- a/tests/fixture/inr-beancount/price.json +++ b/tests/fixture/inr-beancount/price.json @@ -2,6 +2,7 @@ "prices": { "AAPL": [], "ABNB": [], + "BTC": [], "NIFTY": [ { "id": 2, diff --git a/tests/fixture/inr-beancount/transaction.json b/tests/fixture/inr-beancount/transaction.json index aa433be2..010f8482 100644 --- a/tests/fixture/inr-beancount/transaction.json +++ b/tests/fixture/inr-beancount/transaction.json @@ -1,13 +1,13 @@ { "transactions": [ { - "id": "921d64598f4c56b14b31d38082133a98", + "id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "postings": [ { - "id": 17, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 19, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Assets:Checking", @@ -17,8 +17,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -27,8 +27,8 @@ "balance": 0 }, { - "id": 16, - "transaction_id": "921d64598f4c56b14b31d38082133a98", + "id": 18, + "transaction_id": "a68e8db74c26e1543ba2b2f52af681d1", "date": "2022-01-31T00:00:00Z", "payee": "Interest", "account": "Income:Interest:Checking", @@ -38,8 +38,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 52, - "transaction_end_line": 55, + "transaction_begin_line": 58, + "transaction_end_line": 61, "file_name": "main.beancount", "forecast": false, "note": "", @@ -50,19 +50,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 52, - "endLine": 55, + "beginLine": 58, + "endLine": 61, "fileName": "main.beancount", "note": "" }, { - "id": "5791326dad5ac24abe481334280732b6", + "id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "postings": [ { - "id": 15, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 17, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Checking", @@ -72,8 +72,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -82,8 +82,8 @@ "balance": 0 }, { - "id": 14, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 16, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Income:CapitalGains:Equity:AAPL", @@ -93,8 +93,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -103,8 +103,8 @@ "balance": 0 }, { - "id": 13, - "transaction_id": "5791326dad5ac24abe481334280732b6", + "id": 15, + "transaction_id": "cf0433d80755efdea68d26506e86dc65", "date": "2022-01-09T00:00:00Z", "payee": "Sell", "account": "Assets:Equity:AAPL", @@ -114,8 +114,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 43, - "transaction_end_line": 47, + "transaction_begin_line": 49, + "transaction_end_line": 53, "file_name": "main.beancount", "forecast": false, "note": "", @@ -126,30 +126,30 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 43, - "endLine": 47, + "beginLine": 49, + "endLine": 53, "fileName": "main.beancount", "note": "" }, { - "id": "caadd198feb7df74977c601338dda836", + "id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", + "payee": "Purchased 0.00000001 BTC", "postings": [ { - "id": 11, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 13, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", - "account": "Assets:Equity:AAPL", - "commodity": "AAPL", - "quantity": 100, - "amount": 10000, + "payee": "Purchased 0.00000001 BTC", + "account": "Assets:Coinbase:BTC", + "commodity": "BTC", + "quantity": 1e-8, + "amount": 0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", @@ -158,19 +158,19 @@ "balance": 0 }, { - "id": 12, - "transaction_id": "caadd198feb7df74977c601338dda836", + "id": 14, + "transaction_id": "e0d3d39f83b50668b92ad25aac88582c", "date": "2022-01-08T00:00:00Z", - "payee": "Buy Apple", + "payee": "Purchased 0.00000001 BTC", "account": "Assets:Checking", - "commodity": "INR", - "quantity": -10000, - "amount": -10000, + "commodity": "USD", + "quantity": -0.00042772, + "amount": -0.03440667277056, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 39, - "transaction_end_line": 42, + "transaction_begin_line": 45, + "transaction_end_line": 48, "file_name": "main.beancount", "forecast": false, "note": "", @@ -181,30 +181,30 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 39, - "endLine": 42, + "beginLine": 45, + "endLine": 48, "fileName": "main.beancount", "note": "" }, { - "id": "893e3f4e15df851b08a93a83a38a5117", + "id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "postings": [ { "id": 9, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Equity:ABNB", "commodity": "ABNB", "quantity": 0.76, - "amount": 8024.89870848, + "amount": 8025.3170071296, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 37, + "transaction_end_line": 40, "file_name": "main.beancount", "forecast": false, "note": "", @@ -214,18 +214,73 @@ }, { "id": 10, - "transaction_id": "893e3f4e15df851b08a93a83a38a5117", + "transaction_id": "c1b0e83e369be2f6b1ad089b3b62f337", "date": "2022-01-08T00:00:00Z", "payee": "Buy ABNB", "account": "Assets:Checking", "commodity": "USD", - "quantity": -99.76, - "amount": -8024.89870848, + "quantity": -99.7652, + "amount": -8025.3170071296, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 37, + "transaction_end_line": 40, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + } + ], + "tag_recurring": "", + "tag_period": "", + "beginLine": 37, + "endLine": 40, + "fileName": "main.beancount", + "note": "" + }, + { + "id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "postings": [ + { + "id": 11, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "account": "Assets:Equity:AAPL", + "commodity": "AAPL", + "quantity": 100, + "amount": 10000, + "status": "cleared", + "tag_recurring": "", + "tag_period": "", + "transaction_begin_line": 41, + "transaction_end_line": 44, + "file_name": "main.beancount", + "forecast": false, + "note": "", + "transaction_note": "", + "market_amount": 0, + "balance": 0 + }, + { + "id": 12, + "transaction_id": "266960fc42ae079e572bd565bddc39b6", + "date": "2022-01-08T00:00:00Z", + "payee": "Buy Apple", + "account": "Assets:Checking", + "commodity": "INR", + "quantity": -10000, + "amount": -10000, "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 35, - "transaction_end_line": 38, + "transaction_begin_line": 41, + "transaction_end_line": 44, "file_name": "main.beancount", "forecast": false, "note": "", @@ -236,19 +291,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 35, - "endLine": 38, + "beginLine": 41, + "endLine": 44, "fileName": "main.beancount", "note": "" }, { - "id": "3968afa503cf4faabd0e5088e2f66e0a", + "id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "postings": [ { "id": 8, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Equity:NIFTY", @@ -258,8 +313,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -269,7 +324,7 @@ }, { "id": 7, - "transaction_id": "3968afa503cf4faabd0e5088e2f66e0a", + "transaction_id": "c737b07df53db0880eed87b1cbb8c28c", "date": "2022-01-07T00:00:00Z", "payee": "Investment", "account": "Assets:Checking", @@ -279,8 +334,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 31, - "transaction_end_line": 34, + "transaction_begin_line": 33, + "transaction_end_line": 36, "file_name": "main.beancount", "forecast": false, "note": "", @@ -291,19 +346,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 31, - "endLine": 34, + "beginLine": 33, + "endLine": 36, "fileName": "main.beancount", "note": "" }, { - "id": "fdfcf45cb83539494492acb348bead1e", + "id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "postings": [ { "id": 6, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Assets:Checking", @@ -313,8 +368,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -324,7 +379,7 @@ }, { "id": 5, - "transaction_id": "fdfcf45cb83539494492acb348bead1e", + "transaction_id": "ad18f7219d2dfae9b6eccaca4a50ae8a", "date": "2022-01-06T00:00:00Z", "payee": "Bonus", "account": "Income:Salary:Acme", @@ -334,8 +389,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 27, - "transaction_end_line": 30, + "transaction_begin_line": 29, + "transaction_end_line": 32, "file_name": "main.beancount", "forecast": false, "note": "", @@ -346,19 +401,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 27, - "endLine": 30, + "beginLine": 29, + "endLine": 32, "fileName": "main.beancount", "note": "" }, { - "id": "6a989bbbae4cf68c01310a88dc940ab5", + "id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "postings": [ { "id": 4, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Expenses:Rent", @@ -368,8 +423,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -379,7 +434,7 @@ }, { "id": 3, - "transaction_id": "6a989bbbae4cf68c01310a88dc940ab5", + "transaction_id": "c2160a8525ea6b909079fd22f091968a", "date": "2022-01-03T00:00:00Z", "payee": "Rent", "account": "Assets:Checking", @@ -389,8 +444,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 23, - "transaction_end_line": 26, + "transaction_begin_line": 25, + "transaction_end_line": 28, "file_name": "main.beancount", "forecast": false, "note": "", @@ -401,19 +456,19 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 23, - "endLine": 26, + "beginLine": 25, + "endLine": 28, "fileName": "main.beancount", "note": "" }, { - "id": "b55f3fb49ff1273180674122d47419e2", + "id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "postings": [ { "id": 2, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Assets:Checking", @@ -423,8 +478,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -434,7 +489,7 @@ }, { "id": 1, - "transaction_id": "b55f3fb49ff1273180674122d47419e2", + "transaction_id": "58b81f6fdf3f16622e7ef94305792377", "date": "2022-01-01T00:00:00Z", "payee": "Salary", "account": "Income:Salary:Acme", @@ -444,8 +499,8 @@ "status": "cleared", "tag_recurring": "", "tag_period": "", - "transaction_begin_line": 19, - "transaction_end_line": 22, + "transaction_begin_line": 21, + "transaction_end_line": 24, "file_name": "main.beancount", "forecast": false, "note": "", @@ -456,8 +511,8 @@ ], "tag_recurring": "", "tag_period": "", - "beginLine": 19, - "endLine": 22, + "beginLine": 21, + "endLine": 24, "fileName": "main.beancount", "note": "" }