Files
sure/app/views/holdings/_cash.html.erb
Zach Gollwitzer e657c40d19 Account:: namespace simplifications and cleanup (#2110)
* Flatten Holding model

* Flatten balance model

* Entries domain renames

* Fix valuations reference

* Fix trades stream

* Fix brakeman warnings

* Fix tests

* Replace existing entryable type references in DB
2025-04-14 11:40:34 -04:00

33 lines
1.1 KiB
Plaintext

<%# locals: (account:) %>
<% currency = Money::Currency.new(account.currency) %>
<div class="grid grid-cols-12 items-center text-primary text-sm font-medium p-4">
<div class="col-span-4 flex items-center gap-4">
<%= render "shared/circle_logo", name: currency.iso_code %>
<div class="space-y-0.5">
<%= tag.p t(".brokerage_cash"), class: "text-primary" %>
<%= tag.p account.currency, class: "text-secondary text-xs uppercase" %>
</div>
</div>
<div class="col-span-2 flex justify-end items-center gap-2">
<% cash_weight = account.balance.zero? ? 0 : account.cash_balance / account.balance * 100 %>
<%= render "shared/progress_circle", progress: cash_weight %>
<%= tag.p number_to_percentage(cash_weight, precision: 1) %>
</div>
<div class="col-span-2 text-right">
<%= tag.p "--", class: "text-secondary" %>
</div>
<div class="col-span-2 text-right">
<%= tag.p format_money account.cash_balance_money %>
</div>
<div class="col-span-2 text-right">
<%= tag.p "--", class: "text-secondary" %>
</div>
</div>