Кабинет клиента: портфель как у брокера — «Онлайн» по QUIK, «Архив» на дату и операции по SPECTRE
- lkclient.go: договор → код QUIK (БР-1545 → BR1545, +OUT), договор → D_B_CONTRACTS SPECTRE - lkonline.go: позиции DepoLimits (T2, свежая строка на счёт), средняя цена покупки, деньги MoneyLimits по валютам, цены и P&L; стоимость, доли - lkarchive.go: портфель на дату по остаткам OD_RESTS (REG_3 = договор, раздел 39, счета 50/51/52/55 и 58.01/58.02; 58.05 НКД не показываем) с откатом по OD_TURNS после даты (индекс REST+WIRDATE, знак TYPE_ проверен: сумма оборотов = остаток); оценка по котировке OD_VALUES_RATES ≤ 90 дней (в рублях за бумагу), иначе балансовая; операции из OD_WIRING (покупка/продажа/ввод/вывод/погашение/конвертация, продажа — по счёту ВЫРУЧКА) и пополнения/выводы денег; рецепт — InvestControl Hub (build_portfolio_base, deals_report) - API: /api/lk/portfolio2?view=online|archive&date=, /api/lk/ops (сделки + выплаты дохода); без клиента в QUIK онлайн падает на брокерский учёт за сегодня - кабинет: разделы Портфель (вкладки Онлайн/Архив с датой), Операции, Поручения, Документы, Профиль; депозитарные реестр и доходы из клиентского вида убраны (/portfolio → /, /income → /operations); проверено на БР-704 и БР-1545 - настройка Fancy.SpectreDatabase (по умолчанию BJ_SPECTRE_DATA) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4YVo4UMopqT5DzicqpPjL
This commit is contained in:
+60
-133
@@ -33,6 +33,13 @@ a{color:var(--acc)}a:hover{color:#1e3395}
|
||||
.top .who{color:var(--dim);font-size:12px;white-space:nowrap}
|
||||
.top .exit{color:var(--dim);text-decoration:none}
|
||||
.lnk{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
|
||||
.tabs{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 0 16px}
|
||||
.tab{font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;padding:8px 14px;border:1px solid var(--line-2);border-radius:3px;text-decoration:none;color:var(--ink-2)}
|
||||
.tab.on{background:var(--ink);color:#f3f0e7;border-color:var(--ink)}
|
||||
.tabform{display:flex;gap:8px;align-items:center;margin-left:8px}
|
||||
.tabform input[type=date]{padding:7px 10px;border:1px solid var(--line-2);border-radius:3px;background:#fff;font:inherit;font-size:14px}
|
||||
.pos{color:var(--ok-tx)}.neg{color:var(--err-tx)}
|
||||
.kind{font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
|
||||
.cta{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 14px;background:var(--amber);color:var(--ink);text-decoration:none;border:0;border-radius:3px;cursor:pointer;font:inherit}
|
||||
.cta:hover{filter:brightness(1.05);color:var(--ink)}
|
||||
.board{background:var(--board-2);color:#f3f0e7;border-bottom:3px solid var(--amber);padding:22px 20px}
|
||||
@@ -96,11 +103,9 @@ input[type=checkbox]{width:20px;min-height:20px;height:20px}
|
||||
<a class="brand" href="/" title="На табло" style="text-decoration:none;color:inherit">{{template "mark" .}}<span class="lbl" style="font-size:12px;letter-spacing:.14em">{{.Title}}</span></a>
|
||||
<nav>
|
||||
{{if .IsAdmin}}<a href="/clients" class="lbl {{if eq .Nav "a"}}on{{end}}">Клиенты</a>{{end}}
|
||||
<a href="/" class="lbl {{if eq .Nav "b"}}on{{end}}">Табло</a>
|
||||
<a href="/portfolio" class="lbl {{if eq .Nav "p"}}on{{end}}">Реестр</a>
|
||||
<a href="/orders" class="lbl {{if eq .Nav "c"}}on{{end}}">Поручения</a>
|
||||
<a href="/" class="lbl {{if eq .Nav "b"}}on{{end}}">Портфель</a>
|
||||
<a href="/operations" class="lbl {{if eq .Nav "o"}}on{{end}}">Операции</a>
|
||||
<a href="/income" class="lbl {{if eq .Nav "i"}}on{{end}}">Доходы</a>
|
||||
<a href="/orders" class="lbl {{if eq .Nav "c"}}on{{end}}">Поручения</a>
|
||||
<a href="/documents" class="lbl {{if eq .Nav "d"}}on{{end}}">Документы</a>
|
||||
<a href="/profile" class="lbl {{if eq .Nav "u"}}on{{end}}">Профиль</a>
|
||||
</nav>
|
||||
@@ -141,86 +146,51 @@ input[type=checkbox]{width:20px;min-height:20px;height:20px}
|
||||
</div>
|
||||
</body></html>{{end}}
|
||||
|
||||
{{define "board"}}{{template "head" .}}{{template "nav" .}}
|
||||
{{define "portfolio"}}{{template "head" .}}{{template "nav" .}}{{$p := .P}}
|
||||
<section class="board"><div class="board-row">
|
||||
<div>
|
||||
<span class="lbl" style="color:var(--dim)">{{if gt .Value 0.0}}Стоимость бумаг{{else}}Бумаг в реестре{{end}}</span>
|
||||
<div class="big" style="margin-top:8px">{{if gt .Value 0.0}}{{fmtmoney .Value}} ₽{{else}}{{.Total}}{{end}}</div>
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">{{with .FullName}}{{.}} · {{end}}договор {{.Contract}}{{if gt .Value 0.0}} · оценка по {{.Priced}} из {{.Total}} бумаг{{end}}</div>
|
||||
<span class="lbl" style="color:var(--dim)">Стоимость портфеля{{if eq .View "archive"}} на {{$p.AsOf}}{{end}}</span>
|
||||
<div class="big" style="margin-top:8px">{{fmtmoney $p.Total}} ₽</div>
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">{{with .FullName}}{{.}} · {{end}}договор {{.Contract}}{{if and (ne .View "archive") $p.AsOf}} · данные на {{$p.AsOf}}{{end}}{{if $p.Note}} · {{$p.Note}}{{end}}</div>
|
||||
</div>
|
||||
<div class="stats">
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Свободно к переводу</span><span class="v">{{.Free}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">С ограничением</span><span class="v" style="color:var(--amber)">{{.Blocked}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Поручений в работе</span><span class="v">{{.Active}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Бумаги</span><span class="v">{{fmtmoney $p.Securities}} ₽</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Деньги</span><span class="v">{{fmtmoney $p.CashRUB}} ₽</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Результат</span><span class="v" style="color:{{if lt $p.PnL 0.0}}#f0a090{{else if gt $p.PnL 0.0}}#8fd19e{{else}}inherit{{end}}">{{if ne $p.Cost 0.0}}{{fmtsigned $p.PnL}} ₽ · {{fmtpct $p.PnLPct}}{{else}}—{{end}}</span></span>
|
||||
</div>
|
||||
</div></section>
|
||||
<main>
|
||||
{{if .Flash}}<div class="msg ok">{{.Flash}}</div>{{end}}
|
||||
{{if .Error}}<div class="msg err">{{.Error}}</div>{{end}}
|
||||
<section class="sec">
|
||||
<div class="sec-h"><h1 class="lbl" style="font-size:12px;letter-spacing:.14em">Последние поручения</h1><a href="/orders" style="font-size:13px;text-decoration:none">все поручения</a></div>
|
||||
{{if .Claims}}<div class="tw"><table>
|
||||
<thead><tr><th>Номер</th><th>Дата</th><th>Вид поручения</th><th class="num">Бумаг</th><th>Состояние</th></tr></thead>
|
||||
<tbody>{{range .Claims}}<tr>
|
||||
<td class="n">{{shortid .GUID}}</td>
|
||||
<td class="n">{{.CreatedAt}}</td>
|
||||
<td>Перевод в другой депозитарий</td>
|
||||
<td class="num">{{.Securit}}</td>
|
||||
<td><span class="chip {{if eq .Status "done"}}ok{{else if eq .Status "rejected"}}err{{else if eq .Status "declined"}}err{{else if eq .Status "error"}}err{{else}}go{{end}}">{{.StatusRu}}</span>{{with .Reason}}<div class="mut">{{.}}</div>{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
{{else}}<p class="empty">Поручений пока нет. Нажмите «Новое поручение», чтобы перевести бумаги в другой депозитарий.</p>{{end}}
|
||||
</section>
|
||||
<div class="tabs">
|
||||
<a class="tab {{if ne .View "archive"}}on{{end}}" href="/">Онлайн</a>
|
||||
<a class="tab {{if eq .View "archive"}}on{{end}}" href="/?view=archive">Архив</a>
|
||||
{{if eq .View "archive"}}<form method="get" action="/" class="tabform"><input type="hidden" name="view" value="archive"><input type="date" name="date" value="{{.Date}}" max="{{.Today}}"><button class="btn sm" type="submit">Показать</button></form>{{end}}
|
||||
<span class="mut" style="margin-left:auto;font-size:12.5px">{{if eq .View "archive"}}Портфель по брокерскому учёту на выбранную дату{{else if eq $p.Source "quik"}}Позиции и деньги в торговой системе, цены биржи{{else}}Портфель по брокерскому учёту{{end}}</span>
|
||||
</div>
|
||||
|
||||
{{if $p.Cash}}<section class="sec" style="margin-bottom:18px">
|
||||
<div class="sec-h"><h2 class="lbl" style="font-size:12px;letter-spacing:.14em">Денежные средства</h2></div>
|
||||
<div style="display:flex;gap:8px;flex-wrap:wrap">{{range $p.Cash}}<span class="chip" style="font-size:13px;text-transform:none;letter-spacing:0"><b class="n">{{fmtmoney .Amount}}</b> {{if eq .Currency "SUR"}}₽{{else}}{{.Currency}}{{end}}</span>{{end}}</div>
|
||||
</section>{{end}}
|
||||
|
||||
<section class="sec">
|
||||
<div class="sec-h"><h2 class="lbl" style="font-size:12px;letter-spacing:.14em">Реестр бумаг</h2><a href="/portfolio" style="font-size:13px;text-decoration:none">весь реестр</a></div>
|
||||
{{if .Positions}}<div class="tw"><table>
|
||||
<thead><tr><th>Выпуск</th><th>Счёт депо</th><th class="num">Количество</th><th class="num">Свободно</th><th class="num">Оценка</th><th>Состояние</th></tr></thead>
|
||||
<tbody>{{range .Positions}}<tr>
|
||||
<td><a href="/security?isin={{.ISIN}}" style="text-decoration:none;font-weight:600">{{.SecurityName}}</a><div class="n" style="font-size:12.5px;color:var(--mut)">{{.ISIN}}</div></td>
|
||||
<td class="n" style="font-size:13px">{{if .AccountID}}{{.AccountID}}{{else}}—{{end}}</td>
|
||||
<div class="sec-h"><h2 class="lbl" style="font-size:12px;letter-spacing:.14em">Бумаги</h2><span class="mut" style="font-size:12.5px">{{len $p.Positions}} позиций{{if $p.Positions}}, с ценой {{$p.Priced}}{{end}}</span></div>
|
||||
{{if $p.Positions}}<div class="tw"><table>
|
||||
<thead><tr><th>Бумага</th><th class="num">Кол-во</th><th class="num">Средняя</th><th class="num">Цена</th><th class="num">Стоимость</th><th class="num">Результат</th><th class="num">Доля</th></tr></thead>
|
||||
<tbody>{{range $p.Positions}}<tr>
|
||||
<td>{{if .ISIN}}<a href="/security?isin={{.ISIN}}" style="text-decoration:none;font-weight:600">{{.Name}}</a>{{else}}<b>{{.Name}}</b>{{end}}<div class="kind">{{.Kind}}{{if .ISIN}} · <span class="n" style="text-transform:none;letter-spacing:0">{{.ISIN}}</span>{{end}}{{if .Note}} · {{.Note}}{{end}}</div></td>
|
||||
<td class="num">{{fmtnum .Quantity}}</td>
|
||||
<td class="num">{{fmtnum .Available}}</td>
|
||||
<td class="num">{{if gt .AvgPrice 0.0}}{{fmtprice .AvgPrice}}{{if .InPct}}%{{end}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{if gt .Price 0.0}}{{fmtprice .Price}}{{if .InPct}}%{{end}}{{if ne .DayPct 0.0}}<div class="{{if lt .DayPct 0.0}}neg{{else}}pos{{end}}" style="font-size:11.5px">{{fmtpct .DayPct}}</div>{{end}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{template "money" .Value}}</td>
|
||||
<td>{{if not .Transferable}}<span class="chip">не переводится</span>{{else if gt .Blocked 0.0}}<span class="chip go">{{fmtnum .Blocked}} с ограничением</span>{{else}}<span class="chip ok">свободно</span>{{end}}</td>
|
||||
<td class="num">{{if ne .Cost 0.0}}<span class="{{if lt .PnL 0.0}}neg{{else if gt .PnL 0.0}}pos{{end}}">{{fmtsigned .PnL}}<div style="font-size:11.5px">{{fmtpct .PnLPct}}</div></span>{{else}}—{{end}}</td>
|
||||
<td class="num">{{if gt .Share 0.0}}{{fmtpct1 .Share}}{{else}}—{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
{{else}}<p class="empty">Бумаг на счетах депо не найдено. Если это ошибка — напишите в депозитарий.</p>{{end}}
|
||||
{{else}}<p class="empty">{{if eq .View "archive"}}На эту дату бумаг на счёте не было.{{else}}Бумаг на счёте нет.{{end}}</p>{{end}}
|
||||
</section>
|
||||
</main></body></html>{{end}}
|
||||
|
||||
{{define "portfolio"}}{{template "head" .}}{{template "nav" .}}
|
||||
<section class="board"><div class="board-row">
|
||||
<div><span class="lbl" style="color:var(--dim)">Реестр бумаг</span>
|
||||
{{if gt .Value 0.0}}<div class="big" style="margin-top:8px;font-size:32px">{{fmtmoney .Value}} ₽</div>{{end}}
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">{{.Source}}{{with .UpdatedAt}} · {{.}}{{end}}{{if gt .Value 0.0}} · цены торговой системы{{end}}</div></div>
|
||||
<div class="stats">
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Выпусков</span><span class="v">{{.Total}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Свободно к переводу</span><span class="v">{{.Free}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">С ограничением</span><span class="v" style="color:var(--amber)">{{.Blocked}}</span></span>
|
||||
</div>
|
||||
</div></section>
|
||||
<main>
|
||||
{{if .Flash}}<div class="msg ok">{{.Flash}}</div>{{end}}
|
||||
{{if .Error}}<div class="msg err">{{.Error}}</div>{{end}}
|
||||
{{if .ReadOnly}}<div class="msg">Кабинет открыт в режиме просмотра: подача поручений по этому договору выключена депозитарием.</div>{{end}}
|
||||
{{if .Positions}}
|
||||
<div class="tw"><table>
|
||||
<thead><tr><th>Выпуск</th><th>Счёт депо</th><th class="num">Количество</th><th class="num">С ограничением</th><th class="num">Свободно</th><th class="num">Цена</th><th class="num">Оценка</th><th>Состояние</th><th></th></tr></thead>
|
||||
<tbody>{{range .Positions}}<tr>
|
||||
<td><a href="/security?isin={{.ISIN}}" style="text-decoration:none;font-weight:600">{{.SecurityName}}</a><div class="n" style="font-size:12.5px;color:var(--mut)">{{.ISIN}}{{with .SecurityCode}} · {{.}}{{end}}</div></td>
|
||||
<td class="n" style="font-size:13px">{{if .AccountID}}{{.AccountID}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{fmtnum .Quantity}}</td>
|
||||
<td class="num">{{if gt .Blocked 0.0}}<span style="color:var(--amber-tx)">{{fmtnum .Blocked}}</span>{{else}}—{{end}}</td>
|
||||
<td class="num">{{fmtnum .Available}}</td>
|
||||
<td class="num">{{if gt .Price 0.0}}{{fmtmoney .Price}}{{if ne .ChangePct 0.0}}<div style="font-size:12px;{{if gt .ChangePct 0.0}}color:var(--ok-tx){{else}}color:var(--err-tx){{end}}">{{fmtpct .ChangePct}}</div>{{end}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{template "money" .Value}}</td>
|
||||
<td>{{if not .Transferable}}<span class="chip">иностранный выпуск</span>{{else if gt .Blocked 0.0}}<span class="chip go">частично ограничено</span>{{else}}<span class="chip ok">свободно</span>{{end}}{{with .Note}}<div class="mut">{{.}}</div>{{end}}</td>
|
||||
<td style="text-align:right">{{if and .Transferable (gt .Available 0.0) (not $.ReadOnly)}}<a href="/order?isin={{.ISIN}}" class="lbl" style="text-decoration:none">перевести</a>{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
<p class="mut" style="margin-top:18px"><b>С ограничением</b> — бумаги в расчётах по сделке, под обременением или ограниченные в обращении: перевести их нельзя, пока ограничение не снято.
|
||||
<b>Иностранный выпуск</b> — перевод между депозитариями по MOEX МОСТ работает только с российскими выпусками, код ISIN начинается на RU.</p>
|
||||
{{else}}<p class="empty">Бумаг на счетах депо не найдено.</p>{{end}}
|
||||
</main></body></html>{{end}}
|
||||
|
||||
{{define "transfer"}}{{template "head" .}}{{template "nav" .}}
|
||||
<main>
|
||||
{{if .Error}}<div class="msg err">{{.Error}}</div>{{end}}
|
||||
@@ -520,81 +490,38 @@ input[type=checkbox]{width:20px;min-height:20px;height:20px}
|
||||
</main></body></html>{{end}}
|
||||
{{define "operations"}}{{template "head" .}}{{template "nav" .}}
|
||||
<section class="board"><div class="board-row">
|
||||
<div><span class="lbl" style="color:var(--dim)">Операции по счетам депо</span>
|
||||
<div class="big" style="margin-top:8px;font-size:32px">{{.Total}}</div>
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">за период {{.From}} — {{.To}}</div></div>
|
||||
<div>
|
||||
<span class="lbl" style="color:var(--dim)">Операции</span>
|
||||
<div class="big" style="margin-top:8px">{{len .Rows}}</div>
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">за период {{.From}} — {{.To}}</div>
|
||||
</div>
|
||||
<div class="stats">
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Зачислений</span><span class="v">{{.In}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Списаний</span><span class="v">{{.Out}}</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Покупки</span><span class="v">{{fmtmoney .BuyRUB}} ₽</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Продажи</span><span class="v">{{fmtmoney .SellRUB}} ₽</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Выплаты</span><span class="v">{{fmtmoney .IncomeRUB}} ₽</span></span>
|
||||
</div>
|
||||
</div></section>
|
||||
<main>
|
||||
{{if .Error}}<div class="msg err">{{.Error}}</div>{{end}}
|
||||
<form method="get" action="/operations" style="display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:18px">
|
||||
<div><label for="from">Период с</label><input id="from" type="date" name="from" value="{{.From}}" style="width:auto"></div>
|
||||
<div><label for="to">по</label><input id="to" type="date" name="to" value="{{.To}}" style="width:auto"></div>
|
||||
<button class="btn" type="submit">Показать</button>
|
||||
{{if .Note}}<div class="msg ok">{{.Note}}</div>{{end}}
|
||||
<form method="get" action="/operations" class="tabform" style="margin:0 0 18px">
|
||||
<div><label for="from">Период с</label><input id="from" type="date" name="from" value="{{.From}}"></div>
|
||||
<div><label for="to">по</label><input id="to" type="date" name="to" value="{{.To}}"></div>
|
||||
<button class="btn sm" type="submit" style="align-self:flex-end">Показать</button>
|
||||
</form>
|
||||
{{if .Operations}}<div class="tw"><table>
|
||||
<thead><tr><th>Дата</th><th>Операция</th><th>Выпуск</th><th>Счёт депо</th><th class="num">Количество</th><th>Состояние</th><th>Основание</th></tr></thead>
|
||||
<tbody>{{range .Operations}}<tr>
|
||||
<td class="n">{{.Date}}{{if and .DoneAt (ne .DoneAt .Date)}}<div class="mut">проведено {{.DoneAt}}</div>{{end}}</td>
|
||||
<td>{{.Kind}}{{with .Number}}<div class="n mut">№ {{.}}</div>{{end}}</td>
|
||||
<td>{{if .ISIN}}<a href="/security?isin={{.ISIN}}" style="text-decoration:none">{{.Security}}</a><div class="n mut">{{.ISIN}}</div>{{else}}{{.Security}}{{end}}</td>
|
||||
<td class="n" style="font-size:13px">{{.Account}}</td>
|
||||
<td class="num">{{if lt .Quantity 0.0}}<span style="color:var(--err-tx)">{{fmtnum .Quantity}}</span>{{else}}<span style="color:var(--ok-tx)">+{{fmtnum .Quantity}}</span>{{end}}</td>
|
||||
<td>{{if eq .State "исполнено"}}<span class="chip ok">исполнено</span>{{else if eq .State "отменено"}}<span class="chip err">отменено</span>{{else}}<span class="chip go">{{.State}}</span>{{end}}</td>
|
||||
<td class="mut">{{if .Note}}{{.Note}}{{else}}—{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
<p class="mut" style="margin-top:18px">Показаны зачисления, списания и переводы между вашими счетами депо по данным учёта депозитария. Выписку за период можно заказать у депозитария.</p>
|
||||
{{else}}<p class="empty">За выбранный период операций по счетам депо нет.</p>{{end}}
|
||||
</main></body></html>{{end}}
|
||||
|
||||
{{define "income"}}{{template "head" .}}{{template "nav" .}}
|
||||
<section class="board"><div class="board-row">
|
||||
<div><span class="lbl" style="color:var(--dim)">Выплачено дохода</span>
|
||||
<div class="big" style="margin-top:8px">{{fmtmoney .Paid}} ₽</div>
|
||||
<div class="n" style="font-size:13px;color:var(--dim);margin-top:6px">за период {{.From}} — {{.To}}</div></div>
|
||||
<div class="stats">
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Начислено</span><span class="v">{{fmtmoney .Accrued}} ₽</span></span>
|
||||
<span class="stat"><span class="lbl" style="color:var(--dim)">Удержан налог</span><span class="v" style="color:var(--amber)">{{fmtmoney .Tax}} ₽</span></span>
|
||||
</div>
|
||||
</div></section>
|
||||
<main>
|
||||
{{if .Error}}<div class="msg err">{{.Error}}</div>{{end}}
|
||||
<form method="get" action="/income" style="display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:18px">
|
||||
<div><label for="from">Период с</label><input id="from" type="date" name="from" value="{{.From}}" style="width:auto"></div>
|
||||
<div><label for="to">по</label><input id="to" type="date" name="to" value="{{.To}}" style="width:auto"></div>
|
||||
<button class="btn" type="submit">Показать</button>
|
||||
</form>
|
||||
{{if .Income}}<div class="tw"><table>
|
||||
<thead><tr><th>Дата</th><th>Выпуск</th><th>Вид дохода</th><th class="num">Бумаг</th><th class="num">Начислено</th><th class="num">Налог</th><th class="num">К выплате</th></tr></thead>
|
||||
<tbody>{{range .Income}}<tr>
|
||||
{{if .Rows}}<div class="tw"><table>
|
||||
<thead><tr><th>Дата</th><th>Операция</th><th>Инструмент</th><th class="num">Кол-во</th><th class="num">Цена</th><th class="num">Сумма</th></tr></thead>
|
||||
<tbody>{{range .Rows}}<tr>
|
||||
<td class="n">{{.Date}}</td>
|
||||
<td>{{if .ISIN}}<a href="/security?isin={{.ISIN}}" style="text-decoration:none">{{.Security}}</a><div class="n mut">{{.ISIN}}</div>{{else}}{{.Security}}{{end}}</td>
|
||||
<td>{{.Kind}}</td>
|
||||
<td class="num">{{if gt .Quantity 0.0}}{{fmtnum .Quantity}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{fmtmoney .Accrued}}</td>
|
||||
<td class="num">{{if gt .Tax 0.0}}{{fmtmoney .Tax}}{{else}}—{{end}}</td>
|
||||
<td class="num" style="font-weight:700">{{fmtmoney .Paid}} ₽</td>
|
||||
<td><span class="chip {{if eq .Side "in"}}ok{{else}}go{{end}}">{{.Kind}}</span></td>
|
||||
<td>{{if .ISIN}}<a href="/security?isin={{.ISIN}}" style="text-decoration:none;font-weight:600">{{.Name}}</a><div class="n" style="font-size:12px;color:var(--mut)">{{.ISIN}}</div>{{else}}{{.Name}}{{end}}</td>
|
||||
<td class="num">{{if ne .Quantity 0.0}}{{fmtnum .Quantity}}{{else}}—{{end}}</td>
|
||||
<td class="num">{{if gt .Price 0.0}}{{fmtprice .Price}}{{else}}—{{end}}</td>
|
||||
<td class="num"><span class="{{if eq .Side "in"}}pos{{else}}neg{{end}}">{{if eq .Side "in"}}+{{else}}−{{end}}{{fmtmoney .AmountRUB}} ₽</span>{{if and .Currency (ne .Currency "SUR")}}<div style="font-size:11.5px;color:var(--mut)">{{fmtmoney .Amount}} {{.Currency}}</div>{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
<p class="mut" style="margin-top:18px">Суммы и удержанный налог — по данным учёта депозитария как налогового агента по выплатам эмитентов. По купонам государственных облигаций налог может удерживать брокер при выплате, тогда здесь он нулевой. Справку о доходах можно запросить у депозитария.</p>
|
||||
{{else}}<p class="empty">За выбранный период выплат дохода нет.</p>{{end}}
|
||||
|
||||
{{if .Actions}}<section class="sec" style="margin-top:30px">
|
||||
<h2 class="lbl" style="font-size:12px;letter-spacing:.14em">Корпоративные действия по вашим бумагам</h2>
|
||||
<div class="tw"><table>
|
||||
<thead><tr><th>Дата фиксации</th><th>Выпуск</th><th>Событие</th><th>Дата операции</th><th>Примечание</th></tr></thead>
|
||||
<tbody>{{range .Actions}}<tr>
|
||||
<td class="n">{{if .FixDate}}{{.FixDate}}{{else}}—{{end}}</td>
|
||||
<td>{{if .ISIN}}<a href="/security?isin={{.ISIN}}" style="text-decoration:none">{{.Security}}</a><div class="n mut">{{.ISIN}}</div>{{else}}{{.Security}}{{end}}</td>
|
||||
<td>{{.Kind}}</td>
|
||||
<td class="n">{{if .OperDate}}{{.OperDate}}{{else}}—{{end}}</td>
|
||||
<td class="mut">{{if .Note}}{{.Note}}{{else}}—{{end}}</td>
|
||||
</tr>{{end}}</tbody></table></div>
|
||||
<p class="mut" style="margin-top:14px">События по бумагам вашего портфеля из справочника депозитария. Если по действию нужно ваше решение — например, предъявить бумаги к выкупу по оферте, — подайте заявление через раздел «Документы» или обратитесь к своему менеджеру.</p>
|
||||
</section>{{end}}
|
||||
{{else}}<p class="empty">За выбранный период операций нет.</p>{{end}}
|
||||
</main></body></html>{{end}}
|
||||
|
||||
{{define "documents"}}{{template "head" .}}{{template "nav" .}}
|
||||
<section class="board"><div class="board-row">
|
||||
<div><span class="lbl" style="color:var(--dim)">Документы депозитария</span>
|
||||
|
||||
Reference in New Issue
Block a user