Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 04-08-2022
JoseLeeTo JoseLeeTo is offline
Miembro
 
Registrado: jun 2021
Posts: 69
Poder: 3
JoseLeeTo Va por buen camino
Cita:
Empezado por ermendalenda Ver Mensaje
Buenas Tardes, espero que te sirva, aunque te lo he puesto con tipo impositivo al 10% al 21% cambian las bases pero el resto igual es igual.:
Código:
DetallesFactura>
   - <IDDetalleFactura>
     <DescripcionDetalle>COMISION 60</DescripcionDetalle> 

    <Cantidad>2.00</Cantidad> 

    <ImporteUnitario>54.54545454</ImporteUnitario> 

    <ImporteTotal>120.00</ImporteTotal> 

   </IDDetalleFactura>


  - <IDDetalleFactura>
     <DescripcionDetalle>Dto: COMISION 60</DescripcionDetalle> 

    <Cantidad>-1.00</Cantidad> 

    <ImporteUnitario>32.72727273</ImporteUnitario> 

    <ImporteTotal>-36.00</ImporteTotal> 

   </IDDetalleFactura>


  - <IDDetalleFactura>
     <DescripcionDetalle>COMISION 50</DescripcionDetalle> 

    <Cantidad>1.00</Cantidad> 

    <ImporteUnitario>45.45454545</ImporteUnitario> 

    <ImporteTotal>50.00</ImporteTotal> 

   </IDDetalleFactura>


  - <IDDetalleFactura>
     <DescripcionDetalle>Dto: COMISION 50</DescripcionDetalle> 

    <Cantidad>-1.00</Cantidad> 

    <ImporteUnitario>13.63636364</ImporteUnitario> 

    <ImporteTotal>-15.00</ImporteTotal> 

   </IDDetalleFactura>


   </DetallesFactura>


    <ImporteTotalFactura>119.00</ImporteTotalFactura>
En lass lineas de descuento no hay que indicar porcentajes solo importes
Muchísimas gracias. Me ha sido muy útil.
Un saludo
Responder Con Cita
  #2  
Antiguo 06-08-2022
Sistel Sistel is offline
Miembro
 
Registrado: nov 2019
Ubicación: Bilbao
Posts: 373
Poder: 5
Sistel Va por buen camino
Rechazo de alta de facturas de Gipuzkoa en entorno de pruebas

Hola,

Llevamos un tiempo utilizando el servicio de pruebas https://tbai-prep.egoitza.gipuzkoa.e...nFacturas/alta para el envío de facturas de Gipuzkoa.
Normalmente, las facturas son aceptadas y obtenemos el código 00 de envío recibido correctamente.

Sin embargo, ayer (05-08-2022) y hoy (06-08-2022) estamos recibiendo el código 01 (Rechazado - ALTA PREP) con código de retorno de envío 007 (Certificado remitente no válido para emisor factura.)
El certificado que utilizamos para el envío es el mismo de siempre, expedido por FNMT, que sigue en vigor.

¿A alguien más le está ocurriendo?

Saludos
Responder Con Cita
  #3  
Antiguo 08-08-2022
edari edari is offline
Miembro
 
Registrado: jun 2021
Posts: 187
Poder: 4
edari Va por buen camino
Cita:
Empezado por Sistel Ver Mensaje
Hola,

Llevamos un tiempo utilizando el servicio de pruebas https://tbai-prep.egoitza.gipuzkoa.e...nFacturas/alta para el envío de facturas de Gipuzkoa.
Normalmente, las facturas son aceptadas y obtenemos el código 00 de envío recibido correctamente.

Sin embargo, ayer (05-08-2022) y hoy (06-08-2022) estamos recibiendo el código 01 (Rechazado - ALTA PREP) con código de retorno de envío 007 (Certificado remitente no válido para emisor factura.)
El certificado que utilizamos para el envío es el mismo de siempre, expedido por FNMT, que sigue en vigor.

¿A alguien más le está ocurriendo?

Saludos

Yo acabo de probar y me suben perfectamente
Responder Con Cita
  #4  
Antiguo 08-08-2022
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.339
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Cita:
Empezado por Sistel Ver Mensaje
Sin embargo, ayer (05-08-2022) y hoy (06-08-2022) estamos recibiendo el código 01 (Rechazado - ALTA PREP) con código de retorno de envío 007 (Certificado remitente no válido para emisor factura.)
El certificado que utilizamos para el envío es el mismo de siempre, expedido por FNMT, que sigue en vigor.

¿A alguien más le está ocurriendo?
Cita:
Empezado por edari Ver Mensaje
Yo acabo de probar y me suben perfectamente
Yo también acabo de probar a subir una ahora mismo y todo correcto (Guipuzcoa / Preproduccion).
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #5  
Antiguo 08-08-2022
Sistel Sistel is offline
Miembro
 
Registrado: nov 2019
Ubicación: Bilbao
Posts: 373
Poder: 5
Sistel Va por buen camino
Cita:
Empezado por Neftali [Germán.Estévez] Ver Mensaje
Yo también acabo de probar a subir una ahora mismo y todo correcto (Guipuzcoa / Preproduccion).
Hola,

Gracias edari y Neftali.

Era un problema de que el certificado de envío y el certificado de firma eran diferentes.
Y, en el entorno de pruebas, no estaba dado de alta, como colaborador social, el certificado del enviante.
Ya está solucionado.

Muchas gracias, de nuevo.

Saludos
Responder Con Cita
  #6  
Antiguo 08-08-2022
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.744
Poder: 20
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
Problemas de envio mediante CURL

Estoy tratando de enviar mediante CURL un registro.

En la apliación hago y firmo el TicketBAI y luego hago el xml de la presentación.
Código:
<?xml version="1.0"?>
<lrpjfecsgap:LROEPJ240FacturasEmitidasConSGAltaPeticion xmlns:lrpjfecsgap="https://www.batuz.eus/fitxategiak/batuz/LROE/esquemas/LROE_PJ_240_1_1_FacturasEmitidas_ConSG_AltaPeticion_V1_0_2.xsd">
  <Cabecera>
    <Modelo>240</Modelo>
    <Capitulo>1</Capitulo>
    <Subcapitulo>1.1</Subcapitulo>
    <Operacion>A00</Operacion>
    <Version>1.0</Version>
    <Ejercicio>2022</Ejercicio>
    <ObligadoTributario>
      <NIF>B95642500</NIF>
      <ApellidosNombreRazonSocial>ECOTHERM ENERGY SL</ApellidosNombreRazonSocial>
    </ObligadoTributario>
  </Cabecera>
  <FacturasEmitidas>
    <FacturaEmitida>
      <TicketBai>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48VDpUaWNrZXRC
[...]
PjwvZHM6T2JqZWN0PjwvZHM6U2lnbmF0dXJlPjwvVDpUaWNrZXRCYWk+
</TicketBai>
    </FacturaEmitida>
  </FacturasEmitidas>
</lrpjfecsgap:LROEPJ240FacturasEmitidasConSGAltaPeticion>
Este fichero lo comprimo con 7zip en formato gz.
Código:
7z.exe a Presentacion_1.gz Presentacion_1.xml
Luego creo un fichero BAT para ejecutar el envío:
Código:
set CAB1=-H "Accept-Encoding: gzip" 
set CAB2=-H "Content-Encoding: gzip" 
set CAB3=-H "Content-Type: application/octet-stream" 
set CAB4=-H "eus-bizkaia-n3-version: 1.0" 
set CAB5=-H "eus-bizkaia-n3-content-type: application/xml" 
set CAB6=-H "eus-bizkaia-n3-data: { \"con\":\"LROE\", \"apa\":\"1.1\", \"inte\":{ \"nif\":\"B95642500\", \"nrs\":\"ECOTHERM ENERGY SL\", \"ap1\":\"\", \"ap2\":\"\" }, \"drs\":{ \"mode\":\"240\", \"ejer\":\"2022\" } } " 
set FICHERO=--data-binary "@Presentacion_1.xml" 
set CERT=--cert Certificado_crt.pem 
set CERT_KEY=--key Certificado_key.pem 
set URL=-v https://tbai-z.prep.gipuzkoa.eus/sarrerak/alta 
set REPUESTA=--output Respuesta_1.gz 
set CABECERA=-D Respuesta_1.txt 
cls 
.\curl.exe -v --insecure %CAB1% %CAB2% %CAB3% %CAB4% %CAB5% %CAB6% %FICHERO% %CERT_TYPE% %CERT% %CERT_KEY% %URL% %RESPUESTA% %CABECERA%
El problema es que me está devolviendo el mensaje 415 Unsupported Media Type
Código:
HTTP/1.1 415 Unsupported Media Type
Date: Mon, 08 Aug 2022 13:14:34 GMT
Server: Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips
X-Powered-By: Servlet/3.0
$WSEP: 
Transfer-Encoding: chunked
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en-US
He seguido este hilo y he visto y comparado las difrentes formas de enviar por CURL que hay en el mensaje que resume este tema.
He visto que hay algunos de ustedes que han enviado con éxito utilizando CURL estos registros.

¿Véis alguna cosa rara en cómo lo estoy haciendo yo?

Lo único que me resulta raro en la respuesta es
Content-Type: text/html;charset=ISO-8859-1
Pero yo genero en UTF8 y en la cabecera se menciona tipo gzip.


Por si sirve de algo, os dejo la captura completa de lo que devuelve CURL.

Código:
C:\Users\Usuario\AppData\Local\Temp>.\curl.exe -v --insecure -H "Accept-Encoding: gzip"  -H "Content-Encoding: gzip"  -H "Content-Type: application/octet-stream"  -H "eus-bizkaia-n3-version: 1.0"  -H "eus-bizkaia-n3-content-type: application/xml"  -H "eus-bizkaia-n3-data: { \"con\":\"LROE\", \"apa\":\"1.1\", \"inte\":{ \"nif\":\"B95642500\", \"nrs\":\"ECOTHERM ENERGY SL\", \"ap1\":\"\", \"ap2\":\"\" }, \"drs\":{ \"mode\":\"240\", \"ejer\":\"2022\" } } "  --data-binary "@Presentacion_1.xml"   --cert Certificado_crt.pem  --key Certificado_key.pem  -v https://tbai-z.prep.gipuzkoa.eus/sarrerak/alta   -D Respuesta_1.txt
*   Trying 82.116.160.130:443...
* Connected to tbai-z.prep.gipuzkoa.eus (82.116.160.130) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=ES; ST=GIPUZKOA; L=DONOSTIA / SAN SEBASTIAN; O=INFORMATIKA ZERBITZUEN FORU ELKARTEA - SOCIEDAD FORAL DE SERVICI; CN=*.prep.gipuzkoa.eus
*  start date: Nov 15 15:59:03 2021 GMT
*  expire date: Dec 15 15:59:03 2022 GMT
*  issuer: C=ES; O=IZENPE S.A.; OU=AZZ Ziurtagiri publikoa - Certificado publico SCA; CN=EAEko Herri Administrazioen CA - CA AAPP Vascas (2)
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> POST /sarrerak/alta HTTP/1.1
> Host: tbai-z.prep.gipuzkoa.eus
> User-Agent: curl/7.81.0
> Accept: */*
> Accept-Encoding: gzip
> Content-Encoding: gzip
> Content-Type: application/octet-stream
> eus-bizkaia-n3-version: 1.0
> eus-bizkaia-n3-content-type: application/xml
> eus-bizkaia-n3-data: { "con":"LROE", "apa":"1.1", "inte":{ "nif":"B95642500", "nrs":"ECOTHERM ENERGY SL", "ap1":"", "ap2":"" }, "drs":{ "mode":"240", "ejer":"2022" } }
> Content-Length: 19906
>
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Hello request (0):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, CERT verify (15):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 415 Unsupported Media Type
< Date: Mon, 08 Aug 2022 14:02:00 GMT
< Server: Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips
< X-Powered-By: Servlet/3.0
< $WSEP:
< Transfer-Encoding: chunked
< Content-Type: text/html;charset=ISO-8859-1
< Content-Language: en-US
<
* TLSv1.2 (IN), TLS header, Supplemental data (23):
Error 415: SRVE0295E: Error reported: 415
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection #0 to host tbai-z.prep.gipuzkoa.eus left intact

Última edición por duilioisola fecha: 08-08-2022 a las 16:12:40.
Responder Con Cita
  #7  
Antiguo 09-08-2022
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.339
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
¿Has probado con este ContentType? (tercer parametro)
Cita:
set CAB3=-H "Content-Type: application/xml;charset=UTF-8"
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
SII -Nuevo sistema de la Agencia Tributaria española de envío de datos vía Webservice newtron Internet 3565 Hace 1 Semana 11:04:13
Como utilizar la ayuda del nuevo Sistema Operativo gluglu Humor 3 24-09-2007 09:39:05
Aplicacion Agencia De Viajes ArdiIIa Varios 9 20-01-2007 16:49:53
El Vasco Aguirre Al González La Taberna 5 26-05-2006 09:22:28
Microsoft ha lanzado su nuevo sistema operativo DarkByte Humor 0 25-01-2004 09:21:14


La franja horaria es GMT +2. Ahora son las 20:19:24.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi