On the ledger page header (ViewLedger.vue), the balance label currently shows only the ledger's ISK balance (IskLabel :amount="ledger.balance"). Add an appraised estimate of the items held in the ledger as a second, separate figure beside/under the existing ISK balance, so the header reflects both liquid ISK and inventory value. The existing ISK balance keeps its current meaning and display — this is purely additive.
Scope
In ViewLedger.vue, fetch the ledger's held items via getLedgerBalance(ledgerId) → BalanceResponse.itemBalances ({ typeId, quantity }). This fetch lives in the header component; the Balance tab (ViewLedgerBalance.vue) keeps its own independent fetch unchanged.
Resolve the held type ids to MarketTypes (getMarketTypes) and appraise via the market prices path (getPrices(types) from @/market/appraisal), which returns { buy, sell, orderCount } per type. Price at Jita (call with no locationId — the endpoint defaults to Jita).
Compute both a buy total and a sell total: Σ quantity × buy and Σ quantity × sell across the held stacks. Render both in the header (e.g. ~305M buy / ~340M sell), reusing IskLabel for formatting.
Behaviour applies to both main and combined ledgers — the balance endpoint returns itemBalances for any ledger id and the header is shared, so use one code path with no isMain branching.
Edge cases
No items (empty itemBalances, or both totals resolve to 0): do not render the item figure at all — show only the ISK balance.
Partial / failed price lookups: best-effort — sum only the stacks that resolved to a price and ignore the rest. No error UI.
Explicitly out of scope
Any new or changed mammon endpoint — the existing balance + market prices endpoints are sufficient; frontend-only change.
Combining ISK and item value into a single "total worth" number — the two are shown as distinct figures.
A location picker / per-ledger pricing location — Jita is fixed for now; configurability can be a later issue.
Per-item valuation UI — the Balance tab already lists items; this issue is only the aggregate on the header label.
Acceptance criteria
The ledger header shows an appraised item estimate as a separate figure alongside the existing ISK balance, for both main and combined ledgers.
The estimate shows both a buy total and a sell total, computed as Σ quantity × unit price from BalanceResponse.itemBalances × getPrices(types) at Jita, formatted with IskLabel.
The item figure is hidden when there are no held items / both totals are 0; partial price failures sum only the resolved stacks with no error UI.
The estimate updates with the selected ledger.
Component/test coverage consistent with the ledger page.
## Summary
On the ledger page header (`ViewLedger.vue`), the balance label currently shows only the ledger's ISK balance (`IskLabel :amount="ledger.balance"`). Add an **appraised estimate of the items held in the ledger** as a second, separate figure beside/under the existing ISK balance, so the header reflects both liquid ISK and inventory value. The existing ISK balance keeps its current meaning and display — this is purely additive.
## Scope
- In `ViewLedger.vue`, fetch the ledger's held items via `getLedgerBalance(ledgerId)` → `BalanceResponse.itemBalances` (`{ typeId, quantity }`). This fetch lives in the header component; the Balance tab (`ViewLedgerBalance.vue`) keeps its own independent fetch unchanged.
- Resolve the held type ids to `MarketType`s (`getMarketTypes`) and appraise via the market prices path (`getPrices(types)` from `@/market/appraisal`), which returns `{ buy, sell, orderCount }` per type. Price at **Jita** (call with no `locationId` — the endpoint defaults to Jita).
- Compute **both** a buy total and a sell total: `Σ quantity × buy` and `Σ quantity × sell` across the held stacks. Render both in the header (e.g. `~305M buy / ~340M sell`), reusing `IskLabel` for formatting.
- Behaviour applies to **both main and combined** ledgers — the balance endpoint returns `itemBalances` for any ledger id and the header is shared, so use one code path with no `isMain` branching.
## Edge cases
- **No items** (empty `itemBalances`, or both totals resolve to 0): do not render the item figure at all — show only the ISK balance.
- **Partial / failed price lookups**: best-effort — sum only the stacks that resolved to a price and ignore the rest. No error UI.
## Explicitly out of scope
- Any new or changed mammon endpoint — the existing balance + market prices endpoints are sufficient; frontend-only change.
- Combining ISK and item value into a single "total worth" number — the two are shown as distinct figures.
- A location picker / per-ledger pricing location — Jita is fixed for now; configurability can be a later issue.
- Per-item valuation UI — the Balance tab already lists items; this issue is only the aggregate on the header label.
## Acceptance criteria
- [x] The ledger header shows an appraised item estimate as a separate figure alongside the existing ISK balance, for both main and combined ledgers.
- [x] The estimate shows both a buy total and a sell total, computed as `Σ quantity × unit price` from `BalanceResponse.itemBalances` × `getPrices(types)` at Jita, formatted with `IskLabel`.
- [x] The item figure is hidden when there are no held items / both totals are 0; partial price failures sum only the resolved stacks with no error UI.
- [x] The estimate updates with the selected ledger.
- [x] Component/test coverage consistent with the ledger page.
## Related
- Same ledger page as gemory #39 (Statistics tab).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
On the ledger page header (
ViewLedger.vue), the balance label currently shows only the ledger's ISK balance (IskLabel :amount="ledger.balance"). Add an appraised estimate of the items held in the ledger as a second, separate figure beside/under the existing ISK balance, so the header reflects both liquid ISK and inventory value. The existing ISK balance keeps its current meaning and display — this is purely additive.Scope
ViewLedger.vue, fetch the ledger's held items viagetLedgerBalance(ledgerId)→BalanceResponse.itemBalances({ typeId, quantity }). This fetch lives in the header component; the Balance tab (ViewLedgerBalance.vue) keeps its own independent fetch unchanged.MarketTypes (getMarketTypes) and appraise via the market prices path (getPrices(types)from@/market/appraisal), which returns{ buy, sell, orderCount }per type. Price at Jita (call with nolocationId— the endpoint defaults to Jita).Σ quantity × buyandΣ quantity × sellacross the held stacks. Render both in the header (e.g.~305M buy / ~340M sell), reusingIskLabelfor formatting.itemBalancesfor any ledger id and the header is shared, so use one code path with noisMainbranching.Edge cases
itemBalances, or both totals resolve to 0): do not render the item figure at all — show only the ISK balance.Explicitly out of scope
Acceptance criteria
Σ quantity × unit pricefromBalanceResponse.itemBalances×getPrices(types)at Jita, formatted withIskLabel.Related