This commit is contained in:
Aaron Lindsay 2015-08-30 19:43:26 -04:00
parent fcea2d380b
commit 434d9c297e
1 changed files with 2 additions and 2 deletions

View File

@ -551,7 +551,7 @@ func GetAccountTransactions(user *User, accountid int64, sort string, page uint6
if sort == "date-asc" {
sqlsort = " ORDER BY transactions.Date ASC"
balanceLimitOffset = " LIMIT ?"
balanceLimitOffsetArg = page*limit
balanceLimitOffsetArg = page * limit
} else if sort == "date-desc" {
numSplits, err := transaction.SelectInt("SELECT count(*) FROM splits")
if err != nil {
@ -560,7 +560,7 @@ func GetAccountTransactions(user *User, accountid int64, sort string, page uint6
}
sqlsort = " ORDER BY transactions.Date DESC"
balanceLimitOffset = fmt.Sprintf(" LIMIT %d OFFSET ?", numSplits)
balanceLimitOffsetArg = (page + 1)*limit
balanceLimitOffsetArg = (page + 1) * limit
}
var sqloffset string