extface 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf3391e6f17520b04bbf5f5d4e11ec4fb5817564
4
- data.tar.gz: b43c43a59042484b7e8d01b8bd1e64a664bcb334
3
+ metadata.gz: 8b93c795a3f2f8b7f8f5c751103f46c28cc9b257
4
+ data.tar.gz: 5ff144d0e3d8fdb457c6b86e5b6db104e2eb8dbd
5
5
  SHA512:
6
- metadata.gz: 05caaf2f7caad31b12585019fa3a5dccc8bce59a1a81f4e4e038eb8b08de27055d2948165a5d4e0dfa8b5e4e265df021507920a7cf0fcec782176627e11c6d86
7
- data.tar.gz: c7fa5486fbeb2ba2f60e8daaf799de5feb4cabee652a0ec86cb45ec564d2482d7769c2dbbb14cc355eecb67d4a0e5704baab2e3d25991ef576266b7465aff779
6
+ metadata.gz: c010301a5e28fc1f8446280e11fe731ffc3104d7ff2fa3ca50f041f0ad809df2fd0f8d865fffc3149e9f55400d7df577655c83248d252279693645ae3e7dc02f
7
+ data.tar.gz: fcfef079afd9fc3e68487de38a28a08a5dcac4405b72d8af7d719ffea83681d9affd65d44d658d43ea2c28535599e8ecede2c931d8e6f026262eb16a382df25b
@@ -271,10 +271,10 @@ module Extface
271
271
  private
272
272
  def build_sale_data(item)
273
273
  encoded_text1 = device.encoding.present? ? item.text1.encode(device.encoding).b : item.text1
274
- encoded_text1 = encoded_text1.mb_chars.limit(27).to_s + '...' if encoded_text1 && encoded_text1.b.length > 30
274
+ encoded_text1 = encoded_text1.mb_chars.limit(19).to_s + '...' if encoded_text1 && encoded_text1.b.length > 22
275
275
 
276
276
  encoded_text2 = device.encoding.present? ? item.text2.encode(device.encoding).b : item.text2
277
- encoded_text2 = encoded_text1.mb_chars.limit(27).to_s + '...' if encoded_text2 && encoded_text2.b.length > 30
277
+ encoded_text2 = encoded_text1.mb_chars.limit(19).to_s + '...' if encoded_text2 && encoded_text2.b.length > 22
278
278
 
279
279
  "".b.tap() do |data|
280
280
  data << encoded_text1 unless encoded_text1.blank?
@@ -282,7 +282,7 @@ module Extface
282
282
  data << "\t"
283
283
  data << TAX_GROUPS_MAP[item.tax_group || 2].b
284
284
  data << ("%.2f" % item.price)
285
- data << "*#{item.qty.to_s}" unless item.qty.blank?
285
+ data << "*#{'%.3f' % item.qty}" unless item.qty.blank?
286
286
  data << ",#{item.percent}" unless item.percent.blank?
287
287
  data << ",;#{'%.2f' % item.neto}" unless item.neto.blank?
288
288
  end
@@ -271,10 +271,10 @@ module Extface
271
271
  private
272
272
  def build_sale_data(item)
273
273
  encoded_text1 = device.encoding.present? ? item.text1.encode(device.encoding).b : item.text1
274
- encoded_text1 = encoded_text1.mb_chars.limit(27).to_s + '...' if encoded_text1 && encoded_text1.b.length > 30
274
+ encoded_text1 = encoded_text1.mb_chars.limit(19).to_s + '...' if encoded_text1 && encoded_text1.b.length > 22
275
275
 
276
276
  encoded_text2 = device.encoding.present? ? item.text2.encode(device.encoding).b : item.text2
277
- encoded_text2 = encoded_text1.mb_chars.limit(27).to_s + '...' if encoded_text2 && encoded_text2.b.length > 30
277
+ encoded_text2 = encoded_text1.mb_chars.limit(19).to_s + '...' if encoded_text2 && encoded_text2.b.length > 22
278
278
 
279
279
  "".b.tap() do |data|
280
280
  data << encoded_text1 unless encoded_text1.blank?
@@ -282,7 +282,7 @@ module Extface
282
282
  data << "\t"
283
283
  data << TAX_GROUPS_MAP[item.tax_group || 2].b
284
284
  data << ("%.2f" % item.price)
285
- data << "*#{item.qty.to_s}" unless item.qty.blank?
285
+ data << "*#{'%.3f' % item.qty}" unless item.qty.blank?
286
286
  data << ",#{item.percent}" unless item.percent.blank?
287
287
  data << ",;#{'%.2f' % item.neto}" unless item.neto.blank?
288
288
  end
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-18 00:00:00.000000000 Z
11
+ date: 2018-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis