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 +4 -4
- data/lib/fdis/config.rb +0 -2
- data/lib/fdis/facturacion.rb +5 -5
- data/lib/fdis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4d7499aec20e1f0fcbebe1daf7ca9f6ac4cadc6b3162c7429efc11369cc48c
|
4
|
+
data.tar.gz: a6cda025cc360aa35f20887b78ca42e1e8325d12185cfce84f2133b0556a2d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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-----")
|
data/lib/fdis/facturacion.rb
CHANGED
@@ -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, '
|
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: #{
|
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, '
|
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: #{
|
824
|
+
message_error: "Error: #{response['errorMessages']}",
|
825
825
|
xml: '',
|
826
826
|
uuid: '',
|
827
827
|
fecha_timbrado: '',
|
data/lib/fdis/version.rb
CHANGED