Afip 1.5.1 → 1.5.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: 3f387b1d11e4017ecfb6f212c5dec4fb34bbda801f43664367f1036fe5f2c488
4
- data.tar.gz: 745289855f4e759d93de2d946d2c82ba101aae450801e9dfe0f036bac35c82e8
3
+ metadata.gz: eeda5475fee1463de43c975e3c220a18e6d112b12367c3d958a94f85f35870a0
4
+ data.tar.gz: b8ef297a83845e6fcab29617fb6a22e682d565962fa0b6080d08c918697ce43e
5
5
  SHA512:
6
- metadata.gz: eab31a0761b8c2670824a3f50a9c3f1742a62dd8386ee91559edbc56bce8cc9de07f792077b52e17e836f833f8211c5e81ceb744c46705f987fb881c07fd8475
7
- data.tar.gz: 120c3bac99d831e00fcaa7c28c652d6d90b584f1c06b832128b740eb9b7c7701ff64373a0d69737ecd2f01026664e00796b28b271ff7302f2ac4016e5794212a
6
+ metadata.gz: bff3589d154c87f160c8611c7c2615ac46012c3203e6b4e811dc934618f4ed675e0a6d128e6c5f0d51b83cc2cb233f54e03888000a98fbb18730bcb4ab0b963f
7
+ data.tar.gz: a7c6e6158ad92f87b1988ada803321cd2d96b8b6c4121046be24ee6895bb7fdad09acc922be470641928101fc583d969902dd82825a8df960a2e8fbb3c9b09a4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Afip (1.2.8)
4
+ Afip (1.5.1)
5
5
  httpi
6
6
  nokogiri (>= 1.10.4)
7
7
  savon
@@ -23,7 +23,7 @@ GEM
23
23
  mini_portile2 (~> 2.4.0)
24
24
  nori (2.6.0)
25
25
  rack (2.2.2)
26
- rake (10.5.0)
26
+ rake (12.3.3)
27
27
  savon (2.12.0)
28
28
  akami (~> 1.2)
29
29
  builder (>= 2.1.2)
@@ -43,7 +43,7 @@ PLATFORMS
43
43
  DEPENDENCIES
44
44
  Afip!
45
45
  bundler (~> 1.16)
46
- rake (~> 10.0)
46
+ rake (~> 12.3.3)
47
47
 
48
48
  BUNDLED WITH
49
49
  1.17.3
@@ -86,24 +86,24 @@ module Afip
86
86
 
87
87
  def setup_bill
88
88
  array_ivas = {}
89
- array_ivas["AlicIva"] = ivas.map{ |i| { "Id" => i[0], "BaseImp" => i[1].round(4), "Importe" => i[2].round(4)} unless ["01", "02"].include?(i[0])}.compact
89
+ array_ivas["AlicIva"] = ivas.map{ |i| { "Id" => i[0], "BaseImp" => i[1].round(2), "Importe" => i[2].round(2)} unless ["01", "02"].include?(i[0])}.compact
90
90
 
91
91
  array_tributos = {}
92
92
  array_tributos["Tributo"] = tributos.map{ |t|
93
93
  if t[1].blank?
94
94
  {
95
95
  "Id" => t[0],
96
- "BaseImp" => t[2].to_f.round(4),
97
- "Alic" => t[3].to_f.round(4),
98
- "Importe" => t[4].to_f.round(4)
96
+ "BaseImp" => t[2].to_f.round(2),
97
+ "Alic" => t[3].to_f.round(2),
98
+ "Importe" => t[4].to_f.round(2)
99
99
  }
100
100
  else
101
101
  {
102
102
  "Id" => t[0],
103
103
  "Desc" => t[1],
104
- "BaseImp" => t[2].to_f.round(4),
105
- "Alic" => t[3].to_f.round(4),
106
- "Importe" => t[4].to_f.round(4)
104
+ "BaseImp" => t[2].to_f.round(2),
105
+ "Alic" => t[3].to_f.round(2),
106
+ "Importe" => t[4].to_f.round(2)
107
107
  }
108
108
  end
109
109
  }
@@ -131,7 +131,7 @@ module Afip
131
131
  "MonId" => Afip::MONEDAS[moneda][:codigo],
132
132
  "MonCotiz" => exchange_rate,
133
133
  "ImpOpEx" => exento,
134
- "ImpTotal" => (Afip.own_iva_cond == :responsable_monotributo ? net : total).to_f.round(4),
134
+ "ImpTotal" => (Afip.own_iva_cond == :responsable_monotributo ? net : total).to_f.round(2),
135
135
  "CbteDesde" => next_bill_number,
136
136
  "CbteHasta" => next_bill_number
137
137
  }
@@ -186,7 +186,7 @@ module Afip
186
186
  self.ivas.each{ |i|
187
187
  iva_sum += i[2]
188
188
  }
189
- return iva_sum.round(4)
189
+ return iva_sum.round(2)
190
190
  end
191
191
 
192
192
  def next_bill_number
@@ -1,3 +1,3 @@
1
1
  module Afip
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.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.5.1
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez