fdis2 0.1.42 → 0.1.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae435c1c3da4180029aa8edbe1a0577e0c129fd87740debb18884f6b59dea68e
4
- data.tar.gz: c43a0e899438cab1e7c4b9b2076ce497b460d1964cc1a96cb7966e9e1fa85407
3
+ metadata.gz: 1f7821abcc5bf80c46a51ed952ca9bac9bb62f4100af183d1b483277f1313097
4
+ data.tar.gz: cafa883502bf620e3457c0912d5db2caaa2a693aa4de8f305b3b8a6a43b36039
5
5
  SHA512:
6
- metadata.gz: 2e56f5b68b3d42290b243e4015ecbbc1d81ea4bb36f8a037d637d4496a6f0e8e1220067355d53494890a6f7a03aa18a01f8e1747f1910ced2e545a0ab52fa061
7
- data.tar.gz: de7861420c2f2a5ed5a92631e6ad6ac61e6fd4d63d4f044df79fea95be586a3ff9aa20c0da5b073fd86e9227b7067573d22b7b487546030d6ff4548f6f2661c8
6
+ metadata.gz: 0a8e5e9bf145f072a9ae5248d766c1f042b06eff28f58f16da3418ca9cfd3de1aa5229f7f26c87bd72eee590c42f17b41c4bd38d9c517a699a6f4160802bc2ac
7
+ data.tar.gz: ffc7494484d5e95d5e95de9799ecd7c5b7ff08fa4b305b7463627d22310646c56a93214da522b9d59997c585c8541775a6a1456a9523f3935351a776cefbaeed
@@ -39,7 +39,7 @@ module Fdis2
39
39
  end
40
40
  lines_total = params[:line_items].inject(0) {|sum, x| sum + x[:monto].to_f}
41
41
 
42
- puts "--- Fdis: Suma de line_items: #{lines_total}"
42
+ puts "--- Fdis: Suma de lineas: #{lines_total}"
43
43
 
44
44
  if (lines_total > params[:total].to_f)
45
45
  raise 'Error Fdis - la suma de los complementos de pago es mayor al total de la venta'
@@ -117,7 +117,7 @@ module Fdis2
117
117
 
118
118
 
119
119
  # totales
120
- total = params[:monto_pago].to_f
120
+ total = params[:monto_pago].to_f.abs
121
121
  iva_id = params.fetch(:tasa_iva, 16)
122
122
 
123
123
  pago_totales = xml.at_xpath("//pago20:Totales")
@@ -162,7 +162,7 @@ module Fdis2
162
162
  child_pago_relacionado['Folio'] = params[:folio]
163
163
  child_pago_relacionado['EquivalenciaDR'] = "1"
164
164
 
165
- saldo_anterior = params[:saldo_anterior].to_f
165
+ saldo_anterior = params[:saldo_anterior].to_f.abs
166
166
 
167
167
  child_pago_relacionado['ImpSaldoAnt'] = saldo_anterior.round(2).to_s
168
168
  child_pago_relacionado['ImpPagado'] = total.round(2).to_s
data/lib/fdis2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fdis2
2
- VERSION = "0.1.42"
2
+ VERSION = "0.1.44"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdis2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.42
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Padilla
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.4.6
140
+ rubygems_version: 3.0.1
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Gem used to fetch the CFDIS Web API