fix: 话费按营业厅剩余话费页面显示

This commit is contained in:
Nixevol
2026-10-16 16:46:28 +08:00
parent def0b08784
commit 83b62ca7d2
6 changed files with 159 additions and 12 deletions
+17
View File
@@ -28,3 +28,20 @@ func TestBuildSnapshot(t *testing.T) {
t.Fatalf("resources %#v", snap.Resources)
}
}
func TestOfficialFeeFields(t *testing.T) {
balance := []byte(`{
"newVersion": true,
"curntbalancecust": "261.09",
"canusefeecust": "731.41",
"realfeecust": "470.32",
"realfeecustnew": "361.00",
"newCarryForwardFromLastMonth": "453.88",
"carryForwardFromLastMonth": "563.20",
"newDepositForTheMonth": "168.21"
}`)
snap := BuildSnapshot("", balance, nil)
if snap.Balance != "261.09" || snap.MonthFee != "361.00" || snap.CarryOver != "453.88" || snap.MonthIn != "168.21" {
t.Fatalf("%#v", snap)
}
}