extface 0.6.3 → 0.6.4

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: eb74786ee666c424c8977bd4ccaed5e360a18914
4
- data.tar.gz: 629436ddadc8c4318a123034e58266ee848ca34e
3
+ metadata.gz: 3e57c184676a89a1136bde746b3285b8da4d8b6c
4
+ data.tar.gz: b6eb3be840a060d9274210a54dd5cd9c1e9b245d
5
5
  SHA512:
6
- metadata.gz: ca87e9b6830632695727cee3abeb09495a11f09601bd9eeb2f4db961dc8e9dc98f3d19cededc30986bade10d46091da5ea4fe1a94ee16218d1e6157fc168b5f0
7
- data.tar.gz: 5fe20af7b2587128749fcbe94be9acb372a3208dbb44caf380171bbc0a4ac0b1ad402c52eec45964ea37fad6ca77c7472e6a4578b383fce04ece9499c7b45fe2
6
+ metadata.gz: e6e0f608b4b3de4dda1cf6a011c5665007b20c55e7f223022e39af7bf2fe5ddea070ef6f9e2696d466a2167929e73ba0684b66619396e5b412fe0ffa68fa04f9
7
+ data.tar.gz: 18a079a5c81c1023f5093f8e3b3f115564e53f1db9817a4c9163f212a34b1dab589267619f8d73053049d15f444d3ab641ee9b5a593be0c455ae8c179ad68c97
@@ -270,9 +270,15 @@ module Extface
270
270
 
271
271
  private
272
272
  def build_sale_data(item)
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
275
+
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
278
+
273
279
  "".b.tap() do |data|
274
- data << item.text1.truncate(30) unless item.text1.blank?
275
- data << "\x0a#{text2}" unless item.text2.blank?
280
+ data << encoded_text1 unless encoded_text1.blank?
281
+ data << "\x0a#{encoded_text2}" unless encoded_text2.blank?
276
282
  data << "\t"
277
283
  data << TAX_GROUPS_MAP[item.tax_group || 2]
278
284
  data << ("%.2f" % item.price)
@@ -270,9 +270,15 @@ module Extface
270
270
 
271
271
  private
272
272
  def build_sale_data(item)
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
275
+
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
278
+
273
279
  "".b.tap() do |data|
274
- data << item.text1.truncate(30) unless item.text1.blank?
275
- data << "\x0a#{text2}" unless item.text2.blank?
280
+ data << encoded_text1 unless encoded_text1.blank?
281
+ data << "\x0a#{encoded_text2}" unless encoded_text2.blank?
276
282
  data << "\t"
277
283
  data << TAX_GROUPS_MAP[item.tax_group || 2]
278
284
  data << ("%.2f" % item.price)
@@ -0,0 +1,12 @@
1
+
2
+ <%= button_to 'Paper Cut', fiscal_device_path(@device), remote: true, name: :paper_cut, value: true, class: 'btn btn-warning' %>
3
+
4
+ <%= button_to 'Non Fiscal Test', fiscal_device_path(@device), remote: true, name: :non_fiscal_test, value: true, class: 'btn btn-warning' %>
5
+
6
+ <%= button_to 'Fiscal Test', fiscal_device_path(@device), remote: true, name: :fiscal_test, value: true, class: 'btn btn-warning' %>
7
+
8
+ <%= button_to 'X Report', fiscal_device_path(@device), remote: true, name: :x_report, value: true, class: 'btn btn-warning' %>
9
+ <%= button_to 'Z Report', fiscal_device_path(@device), remote: true, name: :z_report, value: true, class: 'btn btn-warning' %>
10
+
11
+ <%= button_to 'Cancel Fiscal Doc', fiscal_device_path(@device), remote: true, name: :cancel_fiscal_doc, value: true, class: 'btn btn-danger' %>
12
+
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
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.3
4
+ version: 0.6.4
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-16 00:00:00.000000000 Z
11
+ date: 2018-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -130,6 +130,8 @@ files:
130
130
  - app/views/extface/driver/daisy_fx1200/_settings.html.erb
131
131
  - app/views/extface/driver/datecs/dp25/_control.html.erb
132
132
  - app/views/extface/driver/datecs/dp25/_settings.html.erb
133
+ - app/views/extface/driver/datecs/dp35/_control.html.erb
134
+ - app/views/extface/driver/datecs/dp35/_settings.html.erb
133
135
  - app/views/extface/driver/datecs/fp550/_control.html.erb
134
136
  - app/views/extface/driver/datecs/fp550/_settings.html.erb
135
137
  - app/views/extface/driver/eltrade_tm_u220/_control_.html.erb