Afip 1.0.2 → 1.0.3

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
  SHA256:
3
- metadata.gz: 0151d7265ec02895379df319f7d83cd8ef5840cacc9451d5bcb2aa243663ff6d
4
- data.tar.gz: d720148a49cb39b8cefc5c9015753496c0d43a852ec13c5fbed074a141c4ed50
3
+ metadata.gz: eab436a60535e3284055ed5f64a9f6826392cc7045a5cfb712644659f86ec2b6
4
+ data.tar.gz: 790f79866a448283de8d1873cdae10a6f12c23dffa453659a44773becce84a66
5
5
  SHA512:
6
- metadata.gz: a8325409ebf7ded4d962d1fc0e3292b5b6bd1b83b216ec8bfafe090b1f9351447c798b4ba1b29a36169587dff4401ccc03a8c55dfe026d0ebfe7422d53950a11
7
- data.tar.gz: 0b65b2388ecdbef3dedfbbd5927421fb887c99caa68d6338cecb19f688add23ab52502dde53c248dbce5226eaced4c0da0f2708dd0bcb776aafa892c7f698720
6
+ metadata.gz: b0e6ae21001f43cd8e5a8ff3c739d32e1017b74bba14eaabf2cd886d29b1efa68d77a8895a58618533dedb86734166a20e6019c13467e9dfc5d5140ff9a3f192
7
+ data.tar.gz: 19231b3596fc80c8e923d7442d7eaddd2f523bfcf1538071db5bb16fb9de6ab6ec77bf12dbeb2da25202b2a2c0ba2a2b8f8a1d3d33242b521bd6c1a4ad384da7
data/Afip-1.0.0.gem ADDED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Afip (1.0.1)
4
+ Afip (1.0.2)
5
5
  httpi
6
6
  savon
7
7
 
data/lib/Afip/bill.rb CHANGED
@@ -78,37 +78,25 @@ module Afip
78
78
  end
79
79
 
80
80
  def setup_bill
81
- array_ivas = []
82
- ivas.each{ |i|
83
- array_ivas << {
84
- "AlicIva" => {
85
- "Id" => i[0],
86
- "BaseImp" => i[1].round(2),
87
- "Importe" => i[2].round(2)
88
- }
89
- } unless ["01", "02"].include?(i[0])
90
- }
81
+ array_ivas = {}
82
+ array_ivas["AlicIva"] = ivas.map{ |i| { "Id" => i[0], "BaseImp" => i[1].round(2), "Importe" => i[2].round(2)} }
91
83
 
92
- array_tributos = []
93
- tributos.each{ |t|
84
+ array_tributos = {}
85
+ array_tributos["Tributo"] = tributos.map{ |t|
94
86
  if t[1].blank?
95
- array_tributos << {
96
- "Tributo" => {
97
- "Id" => t[0],
98
- "BaseImp" => t[2].to_f.round(2),
99
- "Alic" => t[3].to_f.round(2),
100
- "Importe" => t[4].to_f.round(2)
101
- }
87
+ {
88
+ "Id" => t[0],
89
+ "BaseImp" => t[2].to_f.round(2),
90
+ "Alic" => t[3].to_f.round(2),
91
+ "Importe" => t[4].to_f.round(2)
102
92
  }
103
93
  else
104
- array_tributos << {
105
- "Tributo" => {
106
- "Id" => t[0],
107
- "Desc" => t[1],
108
- "BaseImp" => t[2].to_f.round(2),
109
- "Alic" => t[3].to_f.round(2),
110
- "Importe" => t[4].to_f.round(2)
111
- }
94
+ {
95
+ "Id" => t[0],
96
+ "Desc" => t[1],
97
+ "BaseImp" => t[2].to_f.round(2),
98
+ "Alic" => t[3].to_f.round(2),
99
+ "Importe" => t[4].to_f.round(2)
112
100
  }
113
101
  end
114
102
  }
data/lib/Afip/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Afip
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Afip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez
@@ -76,6 +76,7 @@ files:
76
76
  - ".gitignore"
77
77
  - Afip-0.8.3.gem
78
78
  - Afip-0.8.4.gem
79
+ - Afip-1.0.0.gem
79
80
  - Afip.gemspec
80
81
  - Gemfile
81
82
  - Gemfile.lock