не, не, не. Вставил точно сразу после:
if ukm.str_len("ИТОГО: " .. ukm.leftpad(tostring(__hard_subtotal.receipt.subtotal.amount + __hard_subtotal.receipt:receipt_discount_amount()) , 14, ".") .. " ") < (width + 1) then
text = text .. ukm.leftpad("ИТОГО: " .. ukm.leftpad(tostring(__hard_subtotal.receipt.subtotal.amount + __hard_subtotal.receipt:receipt_discount_amount()) , 14, ".") .. " ", width, " ") .. "\n";