mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
fix(account-service): fix repeatedly applying invoices (#6478)
fix the issue of repeatedly applying invoices
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user