extface 0.4.3a → 0.4.3b

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: 9c81a7abc83c438c984b7e352c1f5d8bed35bb05
4
- data.tar.gz: 5ab78479186b34233ae0bfd09f530455090c4d8c
3
+ metadata.gz: b9c07a92b35f3110d8eaf2ab032053d1cc71ca6f
4
+ data.tar.gz: bf8315f4331cfc4140a96ea356f149c9cc0b12ef
5
5
  SHA512:
6
- metadata.gz: 27c63496efe8f40ef0a3b2803a1ec0e995bdbc28ca00f8b30fe1d130fb5c00bb4f0f364c5cd1de535b84ee5b0212cce59c3c2a12272ab869567de43a2fbd7bd2
7
- data.tar.gz: ba7541aa69e1486527b5a89e3832c3cf61e0c689af6f6fafadaf6879d8b3d3c53983b2d7b99aa5cdf6e4422273c1c4420fcad1a0be510d8a8a9bfd13197e41d7
6
+ metadata.gz: cded660eb711f616d20fe2b742708d11b289c537d1dbfa69ae95b25514041959576da901b1b390394e5006f5976950ae4ae6f1c12deb992651ac9fc1b189f1cc
7
+ data.tar.gz: f3393bb873caddaaf1f214a165fc1b1da9b89bb379f7eb9757e9dcc91e43e176ca7eff27c87ae8b6a616f0dceada262ea98c521d210052aed3185c85c8c3aa4b
@@ -30,6 +30,14 @@ module Extface
30
30
  8 => "\xc7"
31
31
  }
32
32
 
33
+ PAYMENT_TYPE_MAP = {
34
+ 1 => "P",
35
+ 2 => "N",
36
+ 3 => "C",
37
+ 4 => "D",
38
+ 5 => "B"
39
+ }
40
+
33
41
  has_serial_config
34
42
 
35
43
  include Extface::Driver::Daisy::CommandsFx1200
@@ -124,6 +132,12 @@ module Extface
124
132
 
125
133
  def add_payment(value = nil, type_num = nil)
126
134
  raise "Not in fiscal session" unless @fiscal_session
135
+ fsend(Sales::TOTAL, "".tap() do |data|
136
+ data << "\t"
137
+ data << PAYMENT_TYPE_MAP[type_num] unless type_num.blank?
138
+ data << item.price.to_s
139
+ end
140
+ )
127
141
  end
128
142
 
129
143
  def total_payment
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.4.3a"
2
+ VERSION = "0.4.3b"
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.4.3a
4
+ version: 0.4.3b
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-05 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails