cfdi40 0.0.6 → 0.0.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: 55ca7f3a64dc87b4b19cbb5d389f71ccd624b70e7c5af601d97dd4dd6e1599db
4
- data.tar.gz: 9cab2e03e554d96d47ff328c6c520782036ee9b561f11586c42bd353a3112f1d
3
+ metadata.gz: 7901aac708d9a35630373ea7d4f38a43fdddd801defb286068fe7b96350db91c
4
+ data.tar.gz: 34ffabb2c0a58898656c5a652afdbc2e84d04bc0848c5927b7f673a0ebd5875e
5
5
  SHA512:
6
- metadata.gz: '0310189ea57acabe4fffc77ed24d1b02aab3d49e0afafd47d1abf7df10856d19a5a00b89d302138c6b43b036e8af5d52671d922b274e10613f1d57d76b732e1e'
7
- data.tar.gz: 719ed8d0e569dd621edf7ee702271b7c468c2e6b4606297f650cac39b6cb199d06d881f07b15e56599d214da3481651987348cfc24997e6a1843939ea933c711
6
+ metadata.gz: 9e04325fa2210081dc36519e8d9773110f386964d45e541b8273fbd7c22112d258ba249f0f04ad68cd8f12039648d466228c1759aad8b1b84a9eb69e23edd3a1
7
+ data.tar.gz: c1f87bc293e895fc4df9d3440413477f1d540142e879b85e3d13e534a69c1f9376080f41212bf26e3bc161726883c238f625121198e2de7db98aec99b0122bd7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cfdi40 (0.0.6)
4
+ cfdi40 (0.0.7)
5
5
  nokogiri (>= 1.10.10)
6
6
 
7
7
  GEM
data/README_es-MX.md CHANGED
@@ -17,6 +17,12 @@ que esta herramienta:
17
17
  * Valide el CFDi contra los XSD
18
18
  * Selle el CFDi.
19
19
 
20
+ Hasta ahora:
21
+
22
+ * Genera CFDIs de ingreso básicos con IVA
23
+ * Genera CFDIs con complemento de pago para colegiaturas
24
+ * Genera CFDIs complementos de pago básicos.
25
+
20
26
  # Uso
21
27
 
22
28
  ## Ejemplo básico
@@ -102,6 +108,9 @@ que esta herramienta:
102
108
 
103
109
  # Cambios
104
110
 
111
+ # 0.0.7
112
+ * Ajustes al CFDi con complemento de pagos por validaciones del PAC.
113
+
105
114
  # 0.0.6
106
115
  * CFDi con complemento de pagos
107
116
 
@@ -145,7 +154,5 @@ que esta herramienta:
145
154
 
146
155
  # ¿Que sigue?
147
156
 
148
- * Complemento de pagos
149
157
  * Retenciones
150
- * IEPS
151
- * Complemento para colegiaturas
158
+ * Complemento de pagos con retenciones
@@ -4,7 +4,7 @@ module Cfdi40
4
4
  define_attribute :serie, xml_attribute: 'Serie'
5
5
  define_attribute :folio, xml_attribute: 'Folio'
6
6
  define_attribute :moneda_dr, xml_attribute: 'MonedaDR', default: 'MXN'
7
- define_attribute :equivalencia_dr, xml_attribute: 'EquivalenciaDR'
7
+ define_attribute :equivalencia_dr, xml_attribute: 'EquivalenciaDR', default: '1'
8
8
  define_attribute :num_parcialidad, xml_attribute: 'NumParcialidad'
9
9
  define_attribute :imp_saldo_ant, xml_attribute: 'ImpSaldoAnt', format: :t_ImporteMXN
10
10
  define_attribute :imp_pagado, xml_attribute: 'ImpPagado', format: :t_ImporteMXN
@@ -16,7 +16,7 @@ module Cfdi40
16
16
  add_impuestos
17
17
  end
18
18
 
19
- # Add nodes for 'traslado_dr' and/or 'retencion_dr' and intermetiate nodes
19
+ # Add nodes for 'traslado_dr' and/or 'retencion_dr' and intermediate nodes
20
20
  def add_impuestos
21
21
  add_traslado if objeto_imp_dr == '02'
22
22
  end
data/lib/cfdi40/node.rb CHANGED
@@ -155,9 +155,9 @@ module Cfdi40
155
155
  def formated_value(accessor)
156
156
  case self.class.formats[accessor]
157
157
  when :t_Importe
158
- sprintf("%0.6f", public_send(accessor).to_f)
158
+ public_send(accessor).to_f == 0.0 ? '0' : sprintf("%0.6f", public_send(accessor).to_f)
159
159
  when :t_ImporteMXN
160
- sprintf("%0.2f", public_send(accessor).to_f)
160
+ public_send(accessor).to_f == 0.0 ? '0' : sprintf("%0.2f", public_send(accessor).to_f)
161
161
  else
162
162
  public_send(accessor)
163
163
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cfdi40
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
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.6
4
+ version: 0.0.7
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: 2023-04-16 00:00:00.000000000 Z
11
+ date: 2023-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri