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:
@@ -675,8 +675,22 @@ func TestMyNalogBuyerMails(t *testing.T) {
|
||||
if got := len(box.to(addr)); got != 2 {
|
||||
t.Fatalf("letters after filing = %d, want 2", got)
|
||||
}
|
||||
if !strings.Contains(box.to(addr)[1].Text, "/api/v1/receipt/770000000000/") {
|
||||
t.Errorf("the receipt letter carries no receipt link:\n%s", box.to(addr)[1].Text)
|
||||
receipt := box.to(addr)[1]
|
||||
if receipt.Subject != "Эрудит — Ваш чек покупки" {
|
||||
t.Errorf("receipt letter subject = %q", receipt.Subject)
|
||||
}
|
||||
if !strings.Contains(receipt.Text, "/api/v1/receipt/770000000000/") {
|
||||
t.Errorf("the receipt letter carries no receipt link:\n%s", receipt.Text)
|
||||
}
|
||||
// The amount carries its time-zone offset, because that offset is what decides the tax period
|
||||
// the receipt belongs to and the buyer should see the same moment the receipt states.
|
||||
if !strings.Contains(receipt.Text, "Покупка на сумму: 149.00 ₽ от ") ||
|
||||
!strings.Contains(receipt.Text, "+03:00") {
|
||||
t.Errorf("the receipt letter's amount line is wrong:\n%s", receipt.Text)
|
||||
}
|
||||
// Nothing beyond the amount, the moment and the link: the receipt is the document.
|
||||
if strings.Contains(receipt.Text, "test pack") {
|
||||
t.Errorf("the receipt letter repeats the catalog title; the receipt itself carries it:\n%s", receipt.Text)
|
||||
}
|
||||
|
||||
// 3. The annulment letter after a refund.
|
||||
|
||||
Reference in New Issue
Block a user