Bank: a larger ring, the stocks without a picture, today's interest as a note
The ring of the bank page is drawn larger and carries the shares and the sum in its middle. The stocks page begins with its list. The passbook has a pencilled note of the interest of a year; the bank read states the rates, derived from the rule that books the interest each day. The office building has a picture of its own. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
964a4ae35d
commit
f25abc2e16
7 files changed
+67
-25
No files matched your search
@@ -9508,8 +9508,16 @@ cli::Json ModernSession::ui_read(const cli::Json& request, uint64_t revision) co
|
||||
funds.push_back(O{{"id", "fund:" + std::to_string(i)}, {"name", property}, {"price", modern::ui_money(f.price)},
|
||||
{"owned", int(f.owned)}, {"paid", modern::ui_money(f.paid)}, {"maxToBuy", f.max_to_buy}});
|
||||
}
|
||||
// the interest of a year in hundredths of a percent, read off the rule that books it
|
||||
// every day: what one day costs or earns on a sum of 36.5 million
|
||||
constexpr int32_t probe = 36500000;
|
||||
const auto per_year = [](int32_t a_day) { return int(std::abs(int64_t(a_day)) * 365 * 10000 / probe); };
|
||||
const O interest{{"cash", per_year(daily_interest_amounts(probe, 0, 0).cash_and_deposit)},
|
||||
{"deposit", per_year(daily_interest_amounts(0, probe, 0).cash_and_deposit)},
|
||||
{"overdraft", per_year(daily_interest_amounts(-probe, 0, probe).borrowing)},
|
||||
{"beyondLine", per_year(daily_interest_amounts(-probe, 0, 0).borrowing)}};
|
||||
return modern::ui_snapshot(g_, context, request_id,
|
||||
O{{"kind", "bank"}, {"teamId", modern::ui_team_id(g_, team)},
|
||||
O{{"kind", "bank"}, {"teamId", modern::ui_team_id(g_, team)}, {"interest", interest},
|
||||
{"accounts", O{{"cash", modern::ui_money(b.balance)}, {"deposit", modern::ui_money(b.deposit)},
|
||||
{"creditLine", modern::ui_money(b.credit_line)}, {"investments", modern::ui_money(b.investment_balance)}}},
|
||||
{"stocks", std::move(stocks)}, {"funds", std::move(funds)},
|
||||
|
||||
Reference in new issue
Block a user