diff --git a/job.go b/job.go
index d9bcc9d..e365519 100644
--- a/job.go
+++ b/job.go
@@ -949,12 +949,12 @@ func jobVaultItemStatus(j Job) {
err = rows.Scan(&itemID64, &userID64, &deposit, &withdraw)
logOnError(err, "jobVaultItemStatus : scan next val")
if itemID64 != currentItemID64 {
- if currentUserID64 != 0 {
+ if currentItemID64 != 0 {
// display info
out := fmt.Sprintf("%-32s | Depo. | Recv. | Total\n────────────────────────────┼──────┼──────┼──────\n", `User`)
for i, userId := range userList {
logOnError(err, "jobVaultItemStatus : getObjItem")
- out = fmt.Sprintf("%s%-32d |%6d |%6d |%6d\n", out, userID, depositList[i], withdrawList[i], depositList[i]-withdrawList[i])
+ out = fmt.Sprintf("%s%-32d |%6d |%6d |%6d\n", out, userId, depositList[i], withdrawList[i], depositList[i]-withdrawList[i])
}
out = fmt.Sprintf("%s
", out)
@@ -966,8 +966,8 @@ func jobVaultItemStatus(j Job) {
}
TGCmdQueue <- c
}
- currentUserID64 = userID64
- itemList = nil
+ currentItemID64 = itemID64
+ userList = nil
depositList = nil
withdrawList = nil
}
@@ -976,12 +976,12 @@ func jobVaultItemStatus(j Job) {
depositList = append(depositList, deposit)
withdrawList = append(withdrawList, withdraw)
}
- if currentUserID64 != 0 {
+ if currentItemID64 != 0 {
// display info
out := fmt.Sprintf("%-32s | Depo. | Recv. | Total\n────────────────────────────┼──────┼──────┼──────\n", `User`)
for i, userId := range userList {
logOnError(err, "jobVaultItemStatus : getObjItem")
- out = fmt.Sprintf("%s%-32d |%6d |%6d |%6d\n", out, userID, depositList[i], withdrawList[i], depositList[i]-withdrawList[i])
+ out = fmt.Sprintf("%s%-32d |%6d |%6d |%6d\n", out, userId, depositList[i], withdrawList[i], depositList[i]-withdrawList[i])
}
out = fmt.Sprintf("%s
", out)