extface 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/extface/driver/base/fiscal.rb +1 -1
- data/app/models/extface/driver/datecs/dp35.rb +14 -0
- data/lib/extface/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a5c13ea7832ea917b771bc58f42fb69031d39a
|
4
|
+
data.tar.gz: 6778dd8fe350283c619d2aab6de1effaa84721a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd875f694faacaff16f33db5da5ac17864b61b56aa292aebca2bdf3e3f989205376edc903e2b7d3aecb1797f977b53c1c8d2a9ff18269595690d8eafcd1fa6f2
|
7
|
+
data.tar.gz: 4668e9efc26f1b931840d9ed05abe644fde07e8a3a2c56605694796a266507d74d6264f7e6de201129497fe6ec13f64780d695b4e353bcaa1c7d70b001b2d2e2
|
@@ -107,7 +107,7 @@ module Extface
|
|
107
107
|
end
|
108
108
|
if global_modifier_value = bill.global_modifier_value
|
109
109
|
s.notify "Register Global Modifier"
|
110
|
-
s.add_total_modifier global_modifier_value.to_f
|
110
|
+
s.add_total_modifier global_modifier_value.to_f, global_modifier.percent_ratio.try(:to_f)
|
111
111
|
end
|
112
112
|
s.notify "Register Payment"
|
113
113
|
bill.payments.each do |payment|
|
@@ -136,6 +136,20 @@ module Extface
|
|
136
136
|
end
|
137
137
|
fsend(Sales::TOTAL, payment_data)
|
138
138
|
end
|
139
|
+
|
140
|
+
def add_total_modifier(fixed_value = nil, percent_ratio = nil)
|
141
|
+
raise "Not in fiscal session" unless @fiscal_session
|
142
|
+
subtotal_data = "".tap() do |data|
|
143
|
+
data << "1" #One byte, which if ‘1’ the sum of the subtotal will be printed out.
|
144
|
+
data << "1" #One byte which if ‘1’ the sum of the subtotal will appear on the display.
|
145
|
+
if percent_ratio.nil?
|
146
|
+
data << (";%.2f" % fixed_value) unless fixed_value.blank?
|
147
|
+
else
|
148
|
+
data << (",%d" % (percent_ratio*100).to_i) unless percent_ratio.blank?
|
149
|
+
end
|
150
|
+
end
|
151
|
+
fsend(Sales::SUBTOTAL, subtotal_data)
|
152
|
+
end
|
139
153
|
|
140
154
|
def total_payment
|
141
155
|
raise "Not in fiscal session" unless @fiscal_session
|
data/lib/extface/version.rb
CHANGED
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.
|
4
|
+
version: 0.6.9
|
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
|
+
date: 2018-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|