{{define "content" -}}

My Nalog

{{with .Data}}

Rouble income taken through the direct rail has to be registered with the professional-income tax service by hand — the payment provider does not do it. Times are shown and sent in {{.TimeZone}}, because the offset decides which tax month an income falls into. The tax API is unofficial: if it stops working, use “Export CSV” and file by hand, then enter each receipt number back here so a refund can still annul it.

{{if .Backlog.Count}}

{{if .Backlog.Overdue}}Overdue{{else}}Closed month still unfiled{{end}}

{{.Backlog.Count}} income(s) totalling {{.Backlog.Amount}} from a month that has already ended are still not registered. Oldest: {{.Backlog.Oldest}}. {{if .Backlog.Overdue}}The 9th of the month has passed.{{end}}

{{end}}

Tax cabinet

{{if .SignedIn}}

Signed in as {{.INN}}. {{if .LastOK}}Last successful exchange: {{.LastOK}}.{{else}}No successful exchange yet.{{end}}

{{if .Paused}}

The export has taken itself out of service: {{.PauseReason}}

{{end}}
Export CSV ↓

Automatic export is {{if .AutoEnabled}}on{{else}}off{{end}}. It only ever runs when there is something to file, so an idle installation sends the tax service nothing.

{{else}}

Not signed in. The password is used once to obtain a refresh token and is not stored.

{{end}}
{{if .Attention}}

Needs attention

The outcome of these could not be established — the receipt may or may not exist. New income is not filed while any remain, because filing an income twice is as wrong as not filing it at all. Re-check asks the tax service again; “Back to queue” means you are sure nothing was created; entering a receipt number means you filed it by hand.

{{range .Attention}} {{end}}
TimeAmountService nameTriesLast error
{{.At}} {{.Amount}} {{.Name}} {{.Attempts}} {{.LastError}}
{{end}}

To annul

{{range .Cancels}} {{else}} {{end}}
AccountReceiptState
card {{.ReceiptUUID}} {{if .Failed}}a previous attempt was refused{{else}}awaiting{{end}}
nothing to annul

To file

{{range .Owed}} {{else}} {{end}}
TimeAccountAmountService nameTriesLast error
{{.At}} card {{.Amount}} {{.Name}} {{.Attempts}} {{.LastError}}
nothing to file
{{end}} {{- end}}