app/models/extface/driver/datecs/dp35.rb in extface-0.6.7 vs app/models/extface/driver/datecs/dp35.rb in extface-0.6.8

- old
+ new

@@ -269,13 +269,13 @@ end private def build_sale_data(item) encoded_text1 = device.encoding.present? ? item.text1.encode(device.encoding).b : item.text1 - encoded_text1 = encoded_text1.mb_chars.slice!(0..19).to_s + '...' if encoded_text1 && encoded_text1.b.length > 22 + encoded_text1 = encoded_text1.mb_chars.slice!(0..19).to_s.b + '...' if encoded_text1 && encoded_text1.b.length > 22 encoded_text2 = device.encoding.present? ? item.text2.encode(device.encoding).b : item.text2 - encoded_text2 = encoded_text1.mb_chars.slice!(0..19).to_s + '...' if encoded_text2 && encoded_text2.b.length > 22 + encoded_text2 = encoded_text2.mb_chars.slice!(0..19).to_s.b + '...' if encoded_text2 && encoded_text2.b.length > 22 "".b.tap() do |data| data << encoded_text1 unless encoded_text1.blank? data << "\x0a#{encoded_text2}" unless encoded_text2.blank? data << "\t"