Afip 0.6.6 → 0.6.7

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: a2ff5a7b098ef94109c441444525f0d4004e4460c2dd112dad73618af0e9112d
4
- data.tar.gz: 888dcef219ca5bff283d138eca30b1adade222a60c3727364b607b8525017fea
3
+ metadata.gz: 72df67ce2605b36e4fde35870839a7bad447b7ea73408a3c65aa23f17b8298da
4
+ data.tar.gz: 9bd656095f64f3cc0d0965f32005b66899b466d143642dd3a88c4c25ac305ef7
5
5
  SHA512:
6
- metadata.gz: d524a894f1f65a2a21c720f1975546fea2cbe9d26f0520bd62b81935d470fa25f7be4cf772ebafecd0a09f759a90e102b04b47fe562c7b3f7e294f4cb77a3acf
7
- data.tar.gz: 293d57653fed56cca5f4ec2d6754409183a984dc0af84f6d5c8e68d92909d78682584e1af22bcc4ab6a41eca9f35ae664c4f57ab024826671f89c0f9a424d9fc
6
+ metadata.gz: 9cbbe123601637f8bd77a5c665a32d508f155d1ebe7f5174f450b82defc2c5d6832f5f1e2d945c4cf7c7a4dcd609128612775529881c487e251edc9c9da4f43d
7
+ data.tar.gz: 8d3e1fbb532c9f66fa9cdbd854345bce2c57bba41eb5781378591a3f5c0ff06cc564b3982798108307e0911fe45edc302917090f259c3eb7721ca801ee25aefb
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Afip (0.6.5)
5
- httpi
6
- savon
4
+ Afip (0.6.6)
5
+ httpi (~> 0)
6
+ savon (~> 0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -14,27 +14,24 @@ GEM
14
14
  builder (3.2.3)
15
15
  gyoku (1.3.1)
16
16
  builder (>= 2.1.2)
17
- httpi (2.4.4)
17
+ httpi (0.9.7)
18
18
  rack
19
- socksify
20
19
  mini_portile2 (2.3.0)
21
20
  nokogiri (1.8.5)
22
21
  mini_portile2 (~> 2.3.0)
23
- nori (2.6.0)
24
- rack (2.0.5)
22
+ nori (1.1.5)
23
+ rack (2.0.6)
25
24
  rake (10.5.0)
26
- savon (2.12.0)
27
- akami (~> 1.2)
25
+ savon (0.9.11)
26
+ akami (~> 1.1)
28
27
  builder (>= 2.1.2)
29
- gyoku (~> 1.2)
30
- httpi (~> 2.3)
31
- nokogiri (>= 1.8.1)
32
- nori (~> 2.4)
33
- wasabi (~> 3.4)
34
- socksify (1.7.1)
35
- wasabi (3.5.0)
36
- httpi (~> 2.0)
37
- nokogiri (>= 1.4.2)
28
+ gyoku (>= 0.4.0)
29
+ httpi (~> 0.9)
30
+ nokogiri (>= 1.4.0)
31
+ nori (~> 1.1)
32
+ wasabi (~> 2.2)
33
+ wasabi (2.3.0)
34
+ nokogiri (>= 1.4.0)
38
35
 
39
36
  PLATFORMS
40
37
  ruby
data/lib/Afip/bill.rb CHANGED
@@ -10,14 +10,14 @@ module Afip
10
10
  @sale_point = attrs[:sale_point] || raise(NullOrInvalidAttribute.new, "Punto de venta inválido.")
11
11
  @body = { "Auth" => Afip.auth_hash }
12
12
  @net = attrs[:net] || 0
13
- @documento = attrs[:documento] || Afip.default_documento
14
- @moneda = attrs[:moneda] || Afip.default_moneda
15
- @iva_cond = attrs[:iva_cond]
16
- @concepto = attrs[:concepto] || Afip.default_concepto
17
- @ivas = attrs[:ivas] || Array.new # [ 1, 100.00, 10.50 ], [ 2, 100.00, 21.00 ]
18
- @fecha_emision = attrs[:fch_emision] || Time.new
19
- @cbte_type = Afip::BILL_TYPE[Afip.own_iva_cond][iva_cond] || raise(NullOrInvalidAttribute.new, "Tipo de documento inválido.")
20
- @total = net.zero? ? 0 : net + iva_sum
13
+ @documento = attrs[:documento] || Afip.default_documento
14
+ @moneda = attrs[:moneda] || Afip.default_moneda
15
+ @iva_cond = attrs[:iva_cond]
16
+ @concepto = attrs[:concepto] || Afip.default_concepto
17
+ @ivas = attrs[:ivas] || Array.new # [ 1, 100.00, 10.50 ], [ 2, 100.00, 21.00 ]
18
+ @fecha_emision = attrs[:fch_emision] || Time.new
19
+ @cbte_type = Afip::BILL_TYPE[Afip.own_iva_cond][iva_cond] || raise(NullOrInvalidAttribute.new, "Tipo de documento inválido.")
20
+ @total = net.zero? ? 0 : net + iva_sum
21
21
  end
22
22
 
23
23
  def set_client
@@ -105,7 +105,7 @@ module Afip
105
105
  def iva_sum
106
106
  iva_sum = 0.0
107
107
  self.ivas.each{ |i|
108
- iva_sum += i[1] * Afip::ALIC_IVA[ i[0] ][1]
108
+ iva_sum += i[2]
109
109
  }
110
110
  return iva_sum.round(2)
111
111
  end
data/lib/Afip/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Afip
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
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: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez