cfdi40 0.0.8 → 0.0.9

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: ce28369c399d94875c10fa980ead1eb1cd75e0300035ffeb61c7bc310d87b327
4
- data.tar.gz: 8d03b666fb2fac0b592032891fadfec3643f64938eb46b2e301bf4a98e68014a
3
+ metadata.gz: 11ad4a2857a7cf7f906cd5c5927448aca089e2f6042ae6f41eddc4e86b9f030f
4
+ data.tar.gz: 9425bd12e064e4fe8c7869401cc4b8458fee947baef91ce070114d7528d2cc79
5
5
  SHA512:
6
- metadata.gz: 1246bce889af62b67256d2c1278201bfaee2c6ae5693048b7a00b8ec424830192610a8d98df294f5227b47ed3f19a0556f1f07146b057a0b8f65e3c95a8874f0
7
- data.tar.gz: d3142214a86217a324b8539bc3455695a257505265e76dc746fa0999d2a2a1ed3486abd8a0e58ef31f4fdd46d828ae9529adcf7d271ce77499657124c855c395
6
+ metadata.gz: 988be6599bd5c7a9a651e8522ae2597045e5e0b6dcfcaac1eeef928b88643f0599f98ef9f62dc0c4a22eeb12727cadbe41569d36dfeed053a53c458aafbbbd7e
7
+ data.tar.gz: 69e7f3b65b1400caceff02c24b6320d3c17a75d702e59d83e4ffc9fb2580810b69d557d6e2ff9d011383c8c31fc5b6b5f532a56575ae593b84688c9d3c7dc8cd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cfdi40 (0.0.8)
4
+ cfdi40 (0.0.9)
5
5
  nokogiri (>= 1.10.10)
6
6
 
7
7
  GEM
@@ -264,8 +264,8 @@ module Cfdi40
264
264
  end
265
265
 
266
266
  def calculate!
267
- @subtotal = @conceptos.children_nodes.map(&:importe).sum
268
- @total = @conceptos.children_nodes.map(&:importe_neto).sum
267
+ @subtotal = @conceptos.children_nodes.map(&:importe).map(&:to_f).sum
268
+ @total = @conceptos.children_nodes.map(&:importe_neto).map(&:to_f).sum
269
269
  add_traslados_summary_node
270
270
  end
271
271
 
@@ -297,8 +297,8 @@ module Cfdi40
297
297
  concepto_nodes.map(&:traslado_nodes).flatten.each do |traslado|
298
298
  key = [traslado.impuesto, traslado.tasa_o_cuota, traslado.tipo_factor]
299
299
  summary[key] ||= { base: 0, importe: 0 }
300
- summary[key][:base] += traslado.base
301
- summary[key][:importe] += traslado.importe
300
+ summary[key][:base] += traslado.base.to_f
301
+ summary[key][:importe] += traslado.importe.to_f
302
302
  end
303
303
  summary
304
304
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cfdi40
4
- VERSION = "0.0.8"
4
+ VERSION = "0.0.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfdi40
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Israel Benítez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-15 00:00:00.000000000 Z
11
+ date: 2025-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri