fix
This commit is contained in:
parent
dc939dbe60
commit
dba99bdb92
9
job.go
9
job.go
@ -973,16 +973,15 @@ func jobVaultStatus(j Job) {
|
|||||||
}
|
}
|
||||||
if currentUserID64 != 0 {
|
if currentUserID64 != 0 {
|
||||||
//display info
|
//display info
|
||||||
out := fmt.Sprintf(`<code>Item | Dep. | Rcv. | Total\n` +
|
out := fmt.Sprintf("<pre>%-28s | Dep. | Rcv. | Total\n-------------------------------------------------</pre>\n")
|
||||||
`-------------------------------------------------------------</code>\n`)
|
|
||||||
for i, itemId := range itemList {
|
for i, itemId := range itemList {
|
||||||
item, err := getObjItem(itemId)
|
item, err := getObjItem(itemId)
|
||||||
logOnError(err, "jobVaultStatus : getObjItem")
|
logOnError(err, "jobVaultStatus : getObjItem")
|
||||||
out = fmt.Sprintf("%s<code>%-34s|%-5d |%-5d |", out, item.Name, depositList[i], withdrawList[i])
|
out = fmt.Sprintf("%s<pre>%-28s |%-5d |%-5d |", out, item.Name, depositList[i], withdrawList[i])
|
||||||
if (depositList[i] - withdrawList[i]) >= 0 {
|
if (depositList[i] - withdrawList[i]) >= 0 {
|
||||||
out = fmt.Sprintf("%s%-5d</code>\n", out, depositList[i]-withdrawList[i])
|
out = fmt.Sprintf("%s%-5d</pre>\n", out, depositList[i]-withdrawList[i])
|
||||||
} else {
|
} else {
|
||||||
out = fmt.Sprintf("%s</code><pre>%-5d</pre>\n", out, depositList[i]-withdrawList[i])
|
out = fmt.Sprintf("%s</pre><code>%-5d</code>\n", out, depositList[i]-withdrawList[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Printf("Vault Status :\n%s", out)
|
log.Printf("Vault Status :\n%s", out)
|
||||||
|
Loading…
Reference in New Issue
Block a user