1
This commit is contained in:
@@ -179,8 +179,12 @@ func FormatPrintOrderItemV2(foodName string, quantity, cnt int) string {
|
||||
} else {
|
||||
restLen = foodNameLen - LineLength
|
||||
}
|
||||
repeatTimes := MaxLineLength - restLen
|
||||
if repeatTimes < 0 {
|
||||
repeatTimes = MaxLineLength
|
||||
}
|
||||
result += `<font# bolder=0 height=2 width=1>` + utils.Int2Str(cnt) + `.` + foodName
|
||||
result += StrRepeat(" ", MaxLineLength-restLen) + `x` + quantityStr + `</font#>`
|
||||
result += StrRepeat(" ", repeatTimes) + `x` + quantityStr + `</font#>`
|
||||
} else {
|
||||
result += `<font# bolder=0 height=2 width=1>` + utils.Int2Str(cnt) + `.` + foodName + StrRepeat(" ", MaxLineLength-foodNameLen) + `x` + quantityStr + `</font#>`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user