fdis 0.1.6 → 0.1.8

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: 5448f6ba3adf782da20155ebfa218925bf804f0aba90721b4bfaf6d89182ae02
4
- data.tar.gz: 85993c42a37eaf3e0e99ef0a255db5662ba7259c21d39529ce27b236154efcf5
3
+ metadata.gz: 4a4d7499aec20e1f0fcbebe1daf7ca9f6ac4cadc6b3162c7429efc11369cc48c
4
+ data.tar.gz: a6cda025cc360aa35f20887b78ca42e1e8325d12185cfce84f2133b0556a2d8a
5
5
  SHA512:
6
- metadata.gz: 6df980d5aaeeec6ca535b9fe6360b94ac2c50487403ba980bd416b6e9e1567f9bc4d9eb56c323defb842007e5a0bd5828275773002657c3f4b03f57fb0392282
7
- data.tar.gz: 68038c091abdf8068974bb62accc0bae2fced4f0e19a3baf723ef2ba621f3a2292247633e43cf26a1dd06153538059e94ecb8c7811f2c32510ec601acb208853
6
+ metadata.gz: 40818994252d22471ca584b427d57fd66bd246d9b4194ba4874f6d143d0067dcf4f0f344b01615d0d269797c21cf899c0865f5d4b9d503a9cf9094110b138d08
7
+ data.tar.gz: 7180812acb9da3d31b4bb7baa7ecba3640673a03a971e3671b6336d0159b50a4b3c16450588e0cefeac46666cd935cfaae71066d5f4f203a19c7ecbac9d0b5b1
data/lib/fdis/config.rb CHANGED
@@ -33,10 +33,8 @@ module Fdis
33
33
  def key_to_pem
34
34
  puts "---- Fdis:config:key_to_pem"
35
35
 
36
- puts "-- 1"
37
36
  @pem = %x[openssl pkcs8 -inform DER -in #{@doc_key_path} -passin pass:#{@key_pass}]
38
37
  # @pem = %x[openssl rsa -inform DER -in #{@doc_key_path} -passin pass:#{@key_pass}]
39
- puts "-- 2"
40
38
  @pem_cadena = @pem.clone
41
39
  @pem_cadena.slice!("-----BEGIN PRIVATE KEY-----")
42
40
  @pem_cadena.slice!("-----END PRIVATE KEY-----")
@@ -99,7 +99,7 @@ module Fdis
99
99
  receptor['Nombre'] = params[:receptor_razon].to_s
100
100
  receptor['Rfc'] = params[:receptor_rfc].to_s
101
101
  receptor['DomicilioFiscalReceptor'] = params[:receptor_cp].to_s
102
- receptor['RegimenFiscalReceptor'] = params.fetch(:receptor_regimen, 'S01')
102
+ receptor['RegimenFiscalReceptor'] = params.fetch(:receptor_regimen, '616')
103
103
 
104
104
 
105
105
  # totales
@@ -243,7 +243,7 @@ module Fdis
243
243
  else
244
244
  response = {
245
245
  status: json_response.code,
246
- message_error: "Error: #{json_response.message}",
246
+ message_error: "Error: #{response['errorMessages']}",
247
247
  xml: '',
248
248
  uuid: '',
249
249
  fecha_timbrado: '',
@@ -520,7 +520,7 @@ module Fdis
520
520
 
521
521
 
522
522
  base_doc = %(<?xml version="1.0" encoding="utf-8"?>
523
- <cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fecha="" Serie="" Folio="" FormaPago="" SubTotal="" Moneda="MXN" Total="" TipoDeComprobante="I" MetodoPago="" LugarExpedicion="" Certificado="" NoCertificado="" Sello="" >
523
+ <cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fecha="" Serie="" Folio="" FormaPago="" SubTotal="" Moneda="MXN" Total="" TipoDeComprobante="I" MetodoPago="" LugarExpedicion="" Certificado="" NoCertificado="" Sello="" Exportacion="01">
524
524
 
525
525
  <cfdi:Emisor Rfc="" Nombre="" RegimenFiscal="" />
526
526
  <cfdi:Receptor Rfc="" Nombre="" DomicilioFiscalReceptor="" RegimenFiscalReceptor="" UsoCFDI="" />
@@ -558,7 +558,7 @@ module Fdis
558
558
  receptor['Nombre'] = params.fetch(:receptor_razon, '')
559
559
  receptor['DomicilioFiscalReceptor'] = params.fetch(:receptor_cp, '47180')
560
560
  receptor['UsoCFDI'] = params.fetch(:uso_cfdi, 'G03')
561
- receptor['RegimenFiscalReceptor'] = params.fetch(:receptor_regimen, 'S01')
561
+ receptor['RegimenFiscalReceptor'] = params.fetch(:receptor_regimen, '616')
562
562
 
563
563
  # retencion_iva = params.fetch(:retencion_iva, 0)
564
564
 
@@ -821,7 +821,7 @@ module Fdis
821
821
  else
822
822
  response = {
823
823
  status: json_response.code,
824
- message_error: "Error: #{json_response.message}",
824
+ message_error: "Error: #{response['errorMessages']}",
825
825
  xml: '',
826
826
  uuid: '',
827
827
  fecha_timbrado: '',
data/lib/fdis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fdis
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Padilla