sw_fac 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: ec13bb833e23e19ee3b039808b5506153d26c9ad
4
- data.tar.gz: 82ed95cc47d374a8d6eb1f6ccc5ad28074f712e0
3
+ metadata.gz: 4ee501432b2f8e0d99a3a9404e829053ba11c46a
4
+ data.tar.gz: f2f38d0e94cb9293050541434b9c57c44e65c019
5
5
  SHA512:
6
- metadata.gz: ba6cfbfa8ec3b0d3655af2e28763ce72c6114afc428185245a7dcb96d67fc06ea7347607f7996a7804b3de4f412c2bc7cac5c2968e5f896cb8a6e7591fce0029
7
- data.tar.gz: e94ae522da362004b77e4d3f0301672966c5574590cf7feea0e3fcea194af3c672b984a090e59ba2b0ca770e65d1ce4ece0780be59475bcfe68bc1cd2db680dd
6
+ metadata.gz: 5cf43d3ca0e88e38fc6bc2e78ae819cbe3d736096a3d829a41afeb2ac54323f32ecee305bb67be624c4ae8f6fda22fa5a9366654daa50d50d79c4233664af251
7
+ data.tar.gz: d5c870afb38a2bed7cabf86c722107f84bdf1fd68ed2a1e1771d002231dac67014fdd4c0e782cf38faefbfc95dcb43cdb74d1dd5c4600c1ade514b92b98bac20
@@ -34,10 +34,10 @@ module SwFac
34
34
  number = (response[d_begin..-1]).chomp
35
35
  final_serial = ""
36
36
 
37
- number.each_char do |s|
38
- unless (s == "3")
39
- final_serial << s
40
- end
37
+ number.each_char.with_index do |s, index|
38
+ if (index + 1).even?
39
+ final_serial << s
40
+ end
41
41
  end
42
42
  @serial = final_serial
43
43
  end
@@ -433,7 +433,7 @@ module SwFac
433
433
  comprobante['TipoDeComprobante'] = 'I'
434
434
  comprobante['Serie'] = params.fetch(:series, 'FA').to_s
435
435
  comprobante['Folio'] = params.fetch(:folio).to_s
436
- comprobante['Fecha'] = time
436
+ comprobante['Fecha'] = time.to_s
437
437
  comprobante['FormaPago'] = params.fetch(:forma_pago, '01')
438
438
  comprobante['MetodoPago'] = params.fetch(:metodo_pago, 'PUE')
439
439
  comprobante['LugarExpedicion'] = params.fetch(:cp, '')
@@ -453,6 +453,9 @@ module SwFac
453
453
  impuestos = xml.at_xpath("//cfdi:Impuestos")
454
454
  traslado = xml.at_xpath("//cfdi:Traslado")
455
455
 
456
+ puts '--- sw_fac time -----'
457
+ puts time
458
+ puts '--------'
456
459
 
457
460
  conceptos = xml.at_xpath("//cfdi:Conceptos")
458
461
 
@@ -1,3 +1,3 @@
1
1
  module SwFac
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sw_fac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Padilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2018-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler