fix: cannot close account #22
This commit is contained in:
parent
517cb25e73
commit
506e606591
|
|
@ -168,7 +168,7 @@ func CloseAccount(c *gin.Context) {
|
|||
ledgerConfig := script.GetLedgerConfigFromContext(c)
|
||||
line := fmt.Sprintf("%s close %s", accountForm.Date, accountForm.Account)
|
||||
// 写入文件
|
||||
filePath := ledgerConfig.DataPath + "/account/" + script.GetAccountPrefix(accountForm.Account) + ".bean"
|
||||
filePath := ledgerConfig.DataPath + "/account/" + strings.ToLower(script.GetAccountPrefix(accountForm.Account)) + ".bean"
|
||||
err := script.AppendFileInNewLine(filePath, line)
|
||||
if err != nil {
|
||||
InternalError(c, err.Error())
|
||||
|
|
|
|||
Loading…
Reference in New Issue