cfdi_processor 1.0.3 → 1.0.4
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cfdi_processor/stamped_extractor.rb +7 -5
- data/lib/cfdi_processor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ea23c7ff2324021e05208c739d9935eb1d05f17f71841c65d601d7e3c8479c2
|
4
|
+
data.tar.gz: 84a9c5994c270f6dc08b5ae6a0ea0d32fda4ea21efcfe31c5b930f8aa632bc3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e585808ad171d1f08854a7209258091895f3c762ab2add4acd0ee84208e66bcc40af7a68befd8ea507afad0e9158493df7c02614d458ee15c899e3bf80634e98
|
7
|
+
data.tar.gz: 207c9f157832222a4ce0982d08963c903743a157be15b7c7d4450f386da24bf59d29c3c005c565118d8cadc6a3a06b1accee323305124260c734d60470e9143c
|
data/Gemfile.lock
CHANGED
@@ -37,18 +37,20 @@ module CfdiProcessor
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def concepts_data_from_xml
|
40
|
-
nokogiri_xml.at('Conceptos').element_children.map do |e|
|
41
|
-
|
40
|
+
@concepts = nokogiri_xml.at('Conceptos').element_children.map do |e|
|
41
|
+
concepts = e.to_h
|
42
42
|
concepts["Traslados"] = (e.at('Impuestos').css("Traslado").map{|e| e.to_h})
|
43
43
|
concepts["Retenciones"] = (e.at('Impuestos').css("Retencion").map{|e| e.to_h})
|
44
|
-
|
44
|
+
concepts
|
45
|
+
end
|
45
46
|
end
|
46
47
|
|
47
48
|
def taxes_data_from_xml
|
48
|
-
nokogiri_xml.css('Comprobante Impuestos').last.element_children.map do |e|
|
49
|
-
|
49
|
+
@taxes = nokogiri_xml.css('Comprobante Impuestos').last.element_children.map do |e|
|
50
|
+
taxes = nokogiri_xml.css('Comprobante Impuestos').last.to_h
|
50
51
|
taxes["Traslados"] = (e.css("Traslado").map{|e| e.to_h})
|
51
52
|
taxes["Retenciones"] = (e.css("Retencion").map{|e| e.to_h})
|
53
|
+
taxes
|
52
54
|
end
|
53
55
|
end
|
54
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfdi_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Armando Alejandre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|