This commit is contained in:
suyl
2021-04-23 09:54:04 +08:00
parent 48df8aac52
commit 58585baea9
2 changed files with 4 additions and 0 deletions

View File

@@ -4134,6 +4134,7 @@ func GetStoreAcctBalance(ctx *jxcontext.Context, storeID int) (storeAcct *model.
if err != nil { if err != nil {
return nil, err return nil, err
} }
fmt.Println("11", totalIncome, totalExpend)
return &model.StoreAcct{ return &model.StoreAcct{
StoreID: storeID, StoreID: storeID,
AccountBalance: totalIncome - totalExpend, AccountBalance: totalIncome - totalExpend,

View File

@@ -1,6 +1,7 @@
package dao package dao
import ( import (
"fmt"
"sort" "sort"
"time" "time"
@@ -1070,6 +1071,8 @@ func GetStoreAcctIncomeTotal(db *DaoDB, storeID int, incomeTypes []int, vendorOr
sql += " AND created_at <= ?" sql += " AND created_at <= ?"
sqlParams = append(sqlParams, toTime) sqlParams = append(sqlParams, toTime)
} }
fmt.Println(sql)
fmt.Println(sqlParams)
if err = GetRow(db, &income, sql, sqlParams); err == nil && income != nil { if err = GetRow(db, &income, sql, sqlParams); err == nil && income != nil {
return income.IncomePrice, err return income.IncomePrice, err
} }