animeic 2 years ago
parent
commit
9d35a159e7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      boxcost/api/bill.go

+ 3 - 0
boxcost/api/bill.go

@@ -315,6 +315,9 @@ func UpdateBill(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	if bill.Status == "complete" {
 		bill.CompleteTime = time.Now()
 	}
+	if bill.Remark == "" {
+		bill.Remark = " "
+	}
 
 	bill.UpdateTime = time.Now()
 	return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, bill.Id.Hex(), &bill)