1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Multi-Currency Part 2 (#543)

* Support all currencies, handle outside DB

* Remove currencies from seed

* Fix account balance namespace

* Set default currency on authentication

* Cache currency instances

* Implement multi-currency syncs with tests

* Series fallback, passing tests

* Fix conflicts

* Make value group concrete class that works with currency values

* Fix migration conflict

* Update tests to expect multi-currency results

* Update account list to use group method

* Namespace updates

* Fetch unknown exchange rates from API

* Fix date range bug

* Ensure demo data works without external API

* Enforce cascades only at DB level
This commit is contained in:
Zach Gollwitzer 2024-03-21 13:39:10 -04:00 committed by GitHub
parent de0cba9fed
commit 110855d077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1226 additions and 714 deletions

View file

@ -2,3 +2,7 @@ checking:
id: "123e4567-e89b-12d3-a456-426614174000"
savings:
id: "123e4567-e89b-12d3-a456-426614174001"
eur_checking:
id: "123e4567-e89b-12d3-a456-426614174004"
multi_currency:
id: "123e4567-e89b-12d3-a456-426614174005"

View file

@ -0,0 +1,32 @@
date_offset,collectable,checking,savings_with_valuation_overrides,credit_card,eur_checking_eur,eur_checking_usd,multi_currency
-30,400,4000,21250,1040,11850,12947.31,10721.26
-29,400,3985,21750,940,12050,13182.7,10921.26
-28,400,3985,21750,940,12050,13194.75,10921.26
-27,400,3985,21750,940,12050,13132.09,10921.26
-26,400,3985,21750,940,12050,13083.89,10921.26
-25,400,3985,21000,940,12050,13081.48,10921.26
-24,400,3985,21000,940,12050,13062.2,10921.26
-23,400,3985,21000,940,12050,13022.435,10921.26
-22,400,5060,21000,940,12050,13060.995,10921.26
-21,400,5060,21000,940,12050,13068.225,10921.26
-20,400,5060,21000,940,12050,13079.07,10921.26
-19,400,5060,21000,940,11950,12932.29,10813.04
-18,400,5060,19000,940,11950,12934.68,10813.04
-17,400,5060,19000,940,11950,12927.51,10813.04
-16,400,5060,19000,940,11950,12916.755,10813.04
-15,400,5040,19000,960,11950,12882.1,10813.04
-14,400,5040,19000,960,11950,12879.71,10813.04
-13,400,5040,19000,960,11950,12873.735,10813.04
-12,700,5010,19500,990,11950,12821.155,10813.04
-11,700,5010,19500,990,11950,12797.255,10813.04
-10,700,5010,19500,990,11950,12873.735,10813.04
-9,700,5010,19500,990,12000,12939.6,10863.04
-8,700,5010,19500,990,12000,12933.6,10863.04
-7,700,5010,19500,990,12000,12928.8,10863.04
-6,700,5010,19500,990,12000,12906,10863.04
-5,700,5000,19700,1000,12000,12891.6,10863.04
-4,550,5000,19700,1000,12000,12945.6,10000
-3,550,5000,20500,1000,12000,13046.4,10000
-2,550,5000,20500,1000,12000,12982.8,10000
-1,550,5000,20500,1000,12000,13014,10000
0,550,5000,20000,1000,12000,13000.8,10000
1 date_offset collectable checking savings_with_valuation_overrides credit_card eur_checking_eur eur_checking_usd multi_currency
2 -30 400 4000 21250 1040 11850 12947.31 10721.26
3 -29 400 3985 21750 940 12050 13182.7 10921.26
4 -28 400 3985 21750 940 12050 13194.75 10921.26
5 -27 400 3985 21750 940 12050 13132.09 10921.26
6 -26 400 3985 21750 940 12050 13083.89 10921.26
7 -25 400 3985 21000 940 12050 13081.48 10921.26
8 -24 400 3985 21000 940 12050 13062.2 10921.26
9 -23 400 3985 21000 940 12050 13022.435 10921.26
10 -22 400 5060 21000 940 12050 13060.995 10921.26
11 -21 400 5060 21000 940 12050 13068.225 10921.26
12 -20 400 5060 21000 940 12050 13079.07 10921.26
13 -19 400 5060 21000 940 11950 12932.29 10813.04
14 -18 400 5060 19000 940 11950 12934.68 10813.04
15 -17 400 5060 19000 940 11950 12927.51 10813.04
16 -16 400 5060 19000 940 11950 12916.755 10813.04
17 -15 400 5040 19000 960 11950 12882.1 10813.04
18 -14 400 5040 19000 960 11950 12879.71 10813.04
19 -13 400 5040 19000 960 11950 12873.735 10813.04
20 -12 700 5010 19500 990 11950 12821.155 10813.04
21 -11 700 5010 19500 990 11950 12797.255 10813.04
22 -10 700 5010 19500 990 11950 12873.735 10813.04
23 -9 700 5010 19500 990 12000 12939.6 10863.04
24 -8 700 5010 19500 990 12000 12933.6 10863.04
25 -7 700 5010 19500 990 12000 12928.8 10863.04
26 -6 700 5010 19500 990 12000 12906 10863.04
27 -5 700 5000 19700 1000 12000 12891.6 10863.04
28 -4 550 5000 19700 1000 12000 12945.6 10000
29 -3 550 5000 20500 1000 12000 13046.4 10000
30 -2 550 5000 20500 1000 12000 12982.8 10000
31 -1 550 5000 20500 1000 12000 13014 10000
32 0 550 5000 20000 1000 12000 13000.8 10000

View file

@ -29,3 +29,20 @@ credit_card:
balance: 1000
accountable_type: Account::Credit
accountable_id: "123e4567-e89b-12d3-a456-426614174003"
eur_checking:
family: dylan_family
name: Euro Checking Account
currency: EUR
balance: 12000
accountable_type: Account::Depository
accountable_id: "123e4567-e89b-12d3-a456-426614174004"
# Multi-currency account (e.g. Wise, Revolut, etc.)
multi_currency:
family: dylan_family
name: Multi Currency Account
currency: USD # multi-currency accounts still have a "primary" currency
balance: 10000
accountable_type: Account::Depository
accountable_id: "123e4567-e89b-12d3-a456-426614174005"

View file

@ -1,9 +0,0 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# one:
# name: MyString
# iso_code: MyString
# two:
# name: MyString
# iso_code: MyString

View file

@ -1,13 +1,310 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# one:
# base_currency: one
# converted_currency: one
# rate: 9.99
# date: 2024-02-09
# two:
# base_currency: two
# converted_currency: two
# rate: 9.99
# date: 2024-02-09
day_30_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0926
date: <%= 30.days.ago.to_date %>
day_29_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.094
date: <%= 29.days.ago.to_date %>
day_28_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.095
date: <%= 28.days.ago.to_date %>
day_27_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0898
date: <%= 27.days.ago.to_date %>
day_26_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0858
date: <%= 26.days.ago.to_date %>
day_25_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0856
date: <%= 25.days.ago.to_date %>
day_24_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.084
date: <%= 24.days.ago.to_date %>
day_23_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0807
date: <%= 23.days.ago.to_date %>
day_22_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0839
date: <%= 22.days.ago.to_date %>
day_21_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0845
date: <%= 21.days.ago.to_date %>
day_20_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0854
date: <%= 20.days.ago.to_date %>
day_19_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0822
date: <%= 19.days.ago.to_date %>
day_18_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0824
date: <%= 18.days.ago.to_date %>
day_17_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0818
date: <%= 17.days.ago.to_date %>
day_16_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0809
date: <%= 16.days.ago.to_date %>
day_15_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.078
date: <%= 15.days.ago.to_date %>
day_14_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0778
date: <%= 14.days.ago.to_date %>
day_13_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0773
date: <%= 13.days.ago.to_date %>
day_12_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0729
date: <%= 12.days.ago.to_date %>
day_11_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0709
date: <%= 11.days.ago.to_date %>
day_10_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0773
date: <%= 10.days.ago.to_date %>
day_9_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0783
date: <%= 9.days.ago.to_date %>
day_8_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0778
date: <%= 8.days.ago.to_date %>
day_7_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0774
date: <%= 7.days.ago.to_date %>
day_6_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0755
date: <%= 6.days.ago.to_date %>
day_5_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0743
date: <%= 5.days.ago.to_date %>
day_4_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0788
date: <%= 4.days.ago.to_date %>
day_3_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0872
date: <%= 3.days.ago.to_date %>
day_2_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0819
date: <%= 2.days.ago.to_date %>
day_1_ago_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0845
date: <%= 1.days.ago.to_date %>
today_eur_to_usd:
base_currency: EUR
converted_currency: USD
rate: 1.0834
date: <%= Date.current %>
day_30_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9179
date: <%= 30.days.ago.to_date %>
day_29_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9154
date: <%= 29.days.ago.to_date %>
day_28_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9107
date: <%= 28.days.ago.to_date %>
day_27_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9139
date: <%= 27.days.ago.to_date %>
day_26_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9082
date: <%= 26.days.ago.to_date %>
day_25_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9077
date: <%= 25.days.ago.to_date %>
day_24_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9054
date: <%= 24.days.ago.to_date %>
day_23_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9004
date: <%= 23.days.ago.to_date %>
day_22_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9040
date: <%= 22.days.ago.to_date %>
day_21_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9060
date: <%= 21.days.ago.to_date %>
day_20_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9052
date: <%= 20.days.ago.to_date %>
day_19_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9139
date: <%= 19.days.ago.to_date %>
day_18_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9155
date: <%= 18.days.ago.to_date %>
day_17_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9135
date: <%= 17.days.ago.to_date %>
day_16_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9141
date: <%= 16.days.ago.to_date %>
day_15_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9131
date: <%= 15.days.ago.to_date %>
day_14_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9147
date: <%= 14.days.ago.to_date %>
day_13_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9112
date: <%= 13.days.ago.to_date %>
day_12_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9115
date: <%= 12.days.ago.to_date %>
day_11_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9132
date: <%= 11.days.ago.to_date %>
day_10_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9130
date: <%= 10.days.ago.to_date %>
day_9_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9192
date: <%= 9.days.ago.to_date %>
day_8_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9188
date: <%= 8.days.ago.to_date %>
day_7_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9194
date: <%= 7.days.ago.to_date %>
day_6_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9177
date: <%= 6.days.ago.to_date %>
day_5_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9187
date: <%= 5.days.ago.to_date %>
day_4_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9213
date: <%= 4.days.ago.to_date %>
day_3_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9186
date: <%= 3.days.ago.to_date %>
day_2_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9218
date: <%= 2.days.ago.to_date %>
day_1_ago_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9213
date: <%= 1.days.ago.to_date %>
today_usd_to_eur:
base_currency: USD
converted_currency: EUR
rate: 0.9141
date: <%= Date.current %>

View file

@ -1,32 +1,32 @@
date_offset,net_worth,assets,liabilities,depositories,investments,loans,credits,properties,vehicles,other_assets,other_liabilities
-30,24610,25650,1040,25250,0,0,1040,0,0,400,0
-29,25195,26135,940,25735,0,0,940,0,0,400,0
-28,25195,26135,940,25735,0,0,940,0,0,400,0
-27,25195,26135,940,25735,0,0,940,0,0,400,0
-26,25195,26135,940,25735,0,0,940,0,0,400,0
-25,24445,25385,940,24985,0,0,940,0,0,400,0
-24,24445,25385,940,24985,0,0,940,0,0,400,0
-23,24445,25385,940,24985,0,0,940,0,0,400,0
-22,25520,26460,940,26060,0,0,940,0,0,400,0
-21,25520,26460,940,26060,0,0,940,0,0,400,0
-20,25520,26460,940,26060,0,0,940,0,0,400,0
-19,25520,26460,940,26060,0,0,940,0,0,400,0
-18,23520,24460,940,24060,0,0,940,0,0,400,0
-17,23520,24460,940,24060,0,0,940,0,0,400,0
-16,23520,24460,940,24060,0,0,940,0,0,400,0
-15,23480,24440,960,24040,0,0,960,0,0,400,0
-14,23480,24440,960,24040,0,0,960,0,0,400,0
-13,23480,24440,960,24040,0,0,960,0,0,400,0
-12,24220,25210,990,24510,0,0,990,0,0,700,0
-11,24220,25210,990,24510,0,0,990,0,0,700,0
-10,24220,25210,990,24510,0,0,990,0,0,700,0
-9,24220,25210,990,24510,0,0,990,0,0,700,0
-8,24220,25210,990,24510,0,0,990,0,0,700,0
-7,24220,25210,990,24510,0,0,990,0,0,700,0
-6,24220,25210,990,24510,0,0,990,0,0,700,0
-5,24400,25400,1000,24700,0,0,1000,0,0,700,0
-4,24250,25250,1000,24700,0,0,1000,0,0,550,0
-3,25050,26050,1000,25500,0,0,1000,0,0,550,0
-2,25050,26050,1000,25500,0,0,1000,0,0,550,0
-1,25050,26050,1000,25500,0,0,1000,0,0,550,0
0,24550,25550,1000,25000,0,0,1000,0,0,550,0
-30,48278.57,49318.57,1040.00,48918.57,0.00,0.00,1040.00,0.00,0.00,400.00,0.00
-29,49298.96,50238.96,940.00,49838.96,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-28,49311.01,50251.01,940.00,49851.01,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-27,49248.35,50188.35,940.00,49788.35,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-26,49200.15,50140.15,940.00,49740.15,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-25,48447.74,49387.74,940.00,48987.74,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-24,48428.46,49368.46,940.00,48968.46,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-23,48388.70,49328.70,940.00,48928.70,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-22,49502.26,50442.26,940.00,50042.26,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-21,49509.49,50449.49,940.00,50049.49,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-20,49520.33,50460.33,940.00,50060.33,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-19,49265.33,50205.33,940.00,49805.33,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-18,47267.72,48207.72,940.00,47807.72,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-17,47260.55,48200.55,940.00,47800.55,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-16,47249.80,48189.80,940.00,47789.80,0.00,0.00,940.00,0.00,0.00,400.00,0.00
-15,47175.14,48135.14,960.00,47735.14,0.00,0.00,960.00,0.00,0.00,400.00,0.00
-14,47172.75,48132.75,960.00,47732.75,0.00,0.00,960.00,0.00,0.00,400.00,0.00
-13,47166.78,48126.78,960.00,47726.78,0.00,0.00,960.00,0.00,0.00,400.00,0.00
-12,47854.20,48844.20,990.00,48144.20,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-11,47830.30,48820.30,990.00,48120.30,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-10,47906.78,48896.78,990.00,48196.78,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-9,48022.64,49012.64,990.00,48312.64,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-8,48016.64,49006.64,990.00,48306.64,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-7,48011.84,49001.84,990.00,48301.84,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-6,47989.04,48979.04,990.00,48279.04,0.00,0.00,990.00,0.00,0.00,700.00,0.00
-5,48154.64,49154.64,1000.00,48454.64,0.00,0.00,1000.00,0.00,0.00,700.00,0.00
-4,47195.60,48195.60,1000.00,47645.60,0.00,0.00,1000.00,0.00,0.00,550.00,0.00
-3,48096.40,49096.40,1000.00,48546.40,0.00,0.00,1000.00,0.00,0.00,550.00,0.00
-2,48032.80,49032.80,1000.00,48482.80,0.00,0.00,1000.00,0.00,0.00,550.00,0.00
-1,48064.00,49064.00,1000.00,48514.00,0.00,0.00,1000.00,0.00,0.00,550.00,0.00
0,47550.80,48550.80,1000.00,48000.80,0.00,0.00,1000.00,0.00,0.00,550.00,0.00
1 date_offset net_worth assets liabilities depositories investments loans credits properties vehicles other_assets other_liabilities
2 -30 24610 48278.57 25650 49318.57 1040 1040.00 25250 48918.57 0 0.00 0 0.00 1040 1040.00 0 0.00 0 0.00 400 400.00 0 0.00
3 -29 25195 49298.96 26135 50238.96 940 940.00 25735 49838.96 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
4 -28 25195 49311.01 26135 50251.01 940 940.00 25735 49851.01 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
5 -27 25195 49248.35 26135 50188.35 940 940.00 25735 49788.35 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
6 -26 25195 49200.15 26135 50140.15 940 940.00 25735 49740.15 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
7 -25 24445 48447.74 25385 49387.74 940 940.00 24985 48987.74 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
8 -24 24445 48428.46 25385 49368.46 940 940.00 24985 48968.46 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
9 -23 24445 48388.70 25385 49328.70 940 940.00 24985 48928.70 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
10 -22 25520 49502.26 26460 50442.26 940 940.00 26060 50042.26 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
11 -21 25520 49509.49 26460 50449.49 940 940.00 26060 50049.49 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
12 -20 25520 49520.33 26460 50460.33 940 940.00 26060 50060.33 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
13 -19 25520 49265.33 26460 50205.33 940 940.00 26060 49805.33 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
14 -18 23520 47267.72 24460 48207.72 940 940.00 24060 47807.72 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
15 -17 23520 47260.55 24460 48200.55 940 940.00 24060 47800.55 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
16 -16 23520 47249.80 24460 48189.80 940 940.00 24060 47789.80 0 0.00 0 0.00 940 940.00 0 0.00 0 0.00 400 400.00 0 0.00
17 -15 23480 47175.14 24440 48135.14 960 960.00 24040 47735.14 0 0.00 0 0.00 960 960.00 0 0.00 0 0.00 400 400.00 0 0.00
18 -14 23480 47172.75 24440 48132.75 960 960.00 24040 47732.75 0 0.00 0 0.00 960 960.00 0 0.00 0 0.00 400 400.00 0 0.00
19 -13 23480 47166.78 24440 48126.78 960 960.00 24040 47726.78 0 0.00 0 0.00 960 960.00 0 0.00 0 0.00 400 400.00 0 0.00
20 -12 24220 47854.20 25210 48844.20 990 990.00 24510 48144.20 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
21 -11 24220 47830.30 25210 48820.30 990 990.00 24510 48120.30 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
22 -10 24220 47906.78 25210 48896.78 990 990.00 24510 48196.78 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
23 -9 24220 48022.64 25210 49012.64 990 990.00 24510 48312.64 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
24 -8 24220 48016.64 25210 49006.64 990 990.00 24510 48306.64 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
25 -7 24220 48011.84 25210 49001.84 990 990.00 24510 48301.84 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
26 -6 24220 47989.04 25210 48979.04 990 990.00 24510 48279.04 0 0.00 0 0.00 990 990.00 0 0.00 0 0.00 700 700.00 0 0.00
27 -5 24400 48154.64 25400 49154.64 1000 1000.00 24700 48454.64 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 700 700.00 0 0.00
28 -4 24250 47195.60 25250 48195.60 1000 1000.00 24700 47645.60 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 550 550.00 0 0.00
29 -3 25050 48096.40 26050 49096.40 1000 1000.00 25500 48546.40 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 550 550.00 0 0.00
30 -2 25050 48032.80 26050 49032.80 1000 1000.00 25500 48482.80 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 550 550.00 0 0.00
31 -1 25050 48064.00 26050 49064.00 1000 1000.00 25500 48514.00 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 550 550.00 0 0.00
32 0 24550 47550.80 25550 48550.80 1000 1000.00 25000 48000.80 0 0.00 0 0.00 1000 1000.00 0 0.00 0 0.00 550 550.00 0 0.00

View file

@ -5,6 +5,7 @@ checking_one:
amount: 10
account: checking
category: food_and_drink
currency: USD
checking_two:
name: Chipotle
@ -12,12 +13,14 @@ checking_two:
amount: 30
account: checking
category: food_and_drink
currency: USD
checking_three:
name: Amazon
date: <%= 15.days.ago.to_date %>
amount: 20
account: checking
currency: USD
checking_four:
name: Paycheck
@ -25,12 +28,14 @@ checking_four:
amount: -1075
account: checking
category: income
currency: USD
checking_five:
name: Netflix
date: <%= 29.days.ago.to_date %>
amount: 15
account: checking
currency: USD
# Savings account that has these transactions and valuation overrides
savings_one:
@ -39,6 +44,7 @@ savings_one:
amount: -200
account: savings_with_valuation_overrides
category: income
currency: USD
savings_two:
name: Check Deposit
@ -46,12 +52,14 @@ savings_two:
amount: -50
account: savings_with_valuation_overrides
category: income
currency: USD
savings_three:
name: Withdrawal
date: <%= 18.days.ago.to_date %>
amount: 2000
account: savings_with_valuation_overrides
currency: USD
savings_four:
name: Check Deposit
@ -59,6 +67,7 @@ savings_four:
amount: -500
account: savings_with_valuation_overrides
category: income
currency: USD
# Credit card account transactions
credit_card_one:
@ -67,6 +76,7 @@ credit_card_one:
amount: 10
account: credit_card
category: food_and_drink
currency: USD
credit_card_two:
name: Chipotle
@ -74,15 +84,69 @@ credit_card_two:
amount: 30
account: credit_card
category: food_and_drink
currency: USD
credit_card_three:
name: Amazon
date: <%= 15.days.ago.to_date %>
amount: 20
account: credit_card
currency: USD
credit_card_four:
name: CC Payment
date: <%= 29.days.ago.to_date %>
amount: -100
account: credit_card
currency: USD
# eur_checking transactions
eur_checking_one:
name: Check
date: <%= 9.days.ago.to_date %>
amount: -50
currency: EUR
account: eur_checking
eur_checking_two:
name: Shopping trip
date: <%= 19.days.ago.to_date %>
amount: 100
currency: EUR
account: eur_checking
eur_checking_three:
name: Check
date: <%= 29.days.ago.to_date %>
amount: -200
currency: EUR
account: eur_checking
# multi_currency transactions
multi_currency_one:
name: Outflow 1
date: <%= 4.days.ago.to_date %>
amount: 800
currency: EUR
account: multi_currency
multi_currency_two:
name: Inflow 1
date: <%= 9.days.ago.to_date %>
amount: -50
currency: USD
account: multi_currency
multi_currency_three:
name: Outflow 2
date: <%= 19.days.ago.to_date %>
amount: 100
currency: EUR
account: multi_currency
multi_currency_four:
name: Inflow 2
date: <%= 29.days.ago.to_date %>
amount: -200
currency: USD
account: multi_currency