extface 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 905561e9d8179ca1ad66c6677a6a63be78cd5d40
4
- data.tar.gz: 0f152bcf718ee7d6386fa53460c6c5a71b307d4d
3
+ metadata.gz: 5786f7ad0ead78d2845a75050b446f11f7390e91
4
+ data.tar.gz: c9cad39fd1bd55d726cd3b819ab1e5905c2825e6
5
5
  SHA512:
6
- metadata.gz: bbe9348d5e1d1419cf55014638705fe61dc61de9ab19d16f3db420ae7b25f7e690c3a217e38d85609a680dfd5aeb143f246aa132ac96257abe9595be9b280355
7
- data.tar.gz: 51ac47fac3046fa4bd6b9dba3f3a2a3ea5a676f35fcfe78548b2090a460d292571e2c0b0d91e0c7804edc9db277e3deea76fda2dbbcbd4dfa9737a5158f77719
6
+ metadata.gz: 8b0aa36e274f4ef4cdf48c39e5a58f889a69da25d4607c9866869a1ce63ae3cedc9fcd84fa1923a6aac5429659b659c30399b836ea4ee662cba9b5a194376a4e
7
+ data.tar.gz: 993ea8519d2fba9d9b640252a809952c0acff8fd6e63164150bef2f928e4ae2203f8d928611957304d20f04af908be8435003c881a2ce6c567fc41137d38ca5d
@@ -67,7 +67,7 @@ module Extface
67
67
  def initialize(attributes)
68
68
  @price, @text1, @text2, @tax_group, @qty, @percent, @neto, @number = attributes[:price], attributes[:text1].to_s, attributes[:text2].to_s, attributes[:tax_group], attributes[:qty], attributes[:percent], attributes[:neto], attributes[:number]
69
69
  raise "invalid price" unless price.kind_of?(Float)
70
- raise "invalid tax group" if tax_group.present? && !tax_group.kind_of(Integer)
70
+ raise "invalid tax group" if tax_group.present? && !tax_group.kind_of?(Fixnum)
71
71
  raise "invalid qty" if qty.present? && !qty.kind_of(Float)
72
72
  end
73
73
  end
@@ -90,8 +90,13 @@ module Extface
90
90
  end
91
91
  end
92
92
 
93
- # def period_report_session(from, to, detailed = true)
94
- # end
93
+ def period_report_session(from, to, detailed = true)
94
+ device.session("Period Report #{ '(detailed)' if detailed }") do |s|
95
+ s.notify "Period Report Start #{ '(detailed)' if detailed }"
96
+ s.fsend detailed ? Reports::REPORT_FP_BY_DATE : Reports::COMPACT_REPORT_FP_BY_DATE, "#{from.strftime('%d%m%y')},#{to.strftime('%d%m%y')}"
97
+ s.notify "Period Report End"
98
+ end
99
+ end
95
100
 
96
101
  #print
97
102
  def open_non_fiscal_doc
@@ -74,6 +74,14 @@ module Extface
74
74
  end
75
75
  end
76
76
 
77
+ def period_report_session(from, to, detailed = true)
78
+ device.session("Period Report #{ '(detailed)' if detailed }") do |s|
79
+ s.notify "Period Report Start #{ '(detailed)' if detailed }"
80
+ s.fsend detailed ? Reports::REPORT_FP_BY_DATE : Reports::COMPACT_REPORT_FP_BY_DATE, "#{from.strftime('%d%m%y')},#{to.strftime('%d%m%y')}"
81
+ s.notify "Period Report End"
82
+ end
83
+ end
84
+
77
85
  #print
78
86
  def open_non_fiscal_doc
79
87
  fsend Sales::START_NON_FISCAL_DOC
@@ -66,7 +66,7 @@ module Extface
66
66
  end
67
67
 
68
68
  def x_report_session
69
- device.session("Z Report") do |s|
69
+ device.session("X Report") do |s|
70
70
  s.notify "X Report Start"
71
71
  s.fsend Reports::DAILY_REPORT, FLAG_FALSE
72
72
  status = s.get_printer_status
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
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.7
4
+ version: 0.4.8
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-07-02 00:00:00.000000000 Z
11
+ date: 2015-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails