mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* 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
33 lines
1.1 KiB
Plaintext
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>
|