fix(account-service): fix repeatedly applying invoices (#6478)

fix the issue of repeatedly applying invoices
This commit is contained in:
Jiahui
2026-01-05 15:14:11 +08:00
committed by GitHub
parent b60b828fd7
commit ffe1919dbc
+1 -1
View File
@@ -1159,7 +1159,7 @@ func ApplyInvoice(c *gin.Context) {
)
return
}
if len(payments) == 0 {
if len(payments) == 0 || invoice.TotalAmount == 0 {
c.JSON(http.StatusForbidden, gin.H{"error": "no payment can be applied to the invoice"})
return
}