fix(admin): shorten the receipt letter, show the account id
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m16s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m49s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m16s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m49s
The receipt letter repeated what the receipt itself states. It now carries the amount, the moment of payment with its offset, and the link — the receipt is the document, and it opens without authentication, so there is nothing for the two to disagree about. Subject reworded to name what it is. The ledger and tax-export tables labelled the account link "card", meaning the user card. On pages about payments that reads as a bank card, which is exactly how it was misread. Both now show the first eight characters of the account id, so the column carries data — two rows from the same buyer are visible at a glance — while the link still holds the whole id.
This commit is contained in:
@@ -164,7 +164,7 @@ func (m *Mailer) sendReceiptMails(ctx context.Context, cancelled bool) {
|
||||
m.stampReceipt(ctx, mark, r.LedgerID)
|
||||
continue
|
||||
}
|
||||
subject, body := "Эрудит — чек от налоговой", receiptText(r, stored.INN, m.baseURL, m.loc)
|
||||
subject, body := "Эрудит — Ваш чек покупки", receiptText(r, stored.INN, m.baseURL, m.loc)
|
||||
if cancelled {
|
||||
subject, body = "Эрудит — чек аннулирован", cancelText(r, m.loc)
|
||||
}
|
||||
@@ -232,19 +232,19 @@ func purchaseText(p payments.PurchaseMail) string {
|
||||
|
||||
// receiptText is the fiscal receipt letter, which is how the receipt is actually handed to the
|
||||
// buyer as the professional-income tax regime requires.
|
||||
//
|
||||
// It is deliberately bare: the amount, the moment of payment with its offset, and the link. The
|
||||
// receipt itself is the document and it opens without authentication, so repeating its contents
|
||||
// here would only add something for the two to disagree about.
|
||||
func receiptText(r payments.ReceiptMail, inn, baseURL string, loc *time.Location) string {
|
||||
return fmt.Sprintf(`Здравствуйте!
|
||||
|
||||
По вашей покупке сформирован чек в налоговой службе.
|
||||
Покупка на сумму: %s от %s
|
||||
Ссылка на чек: %s
|
||||
|
||||
%s
|
||||
Дата: %s
|
||||
Чек: %s
|
||||
|
||||
Продавец применяет налог на профессиональный доход; чек сформирован в сервисе
|
||||
«Мой налог» Федеральной налоговой службы.
|
||||
`, describe(r.Title, r.AmountMinor, r.Currency),
|
||||
r.OperationTime.In(loc).Format("02.01.2006 15:04"),
|
||||
Спасибо, что играете в «Эрудит».
|
||||
`, formatAmount(r.AmountMinor, r.Currency),
|
||||
r.OperationTime.In(loc).Format("02.01.2006 15:04 -07:00"),
|
||||
mynalog.ReceiptURL(baseURL, inn, r.ReceiptUUID))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user