Log del JSON enviado al Service Layer cuando SAP rechaza, para todos los documentos. Versión 2.1.5.0

Se mueve de CreditNotesRepository a ConnectionServiceLayer (PostAsync,
PatchAsyncSBA, PatchNoContentAsync) con un hook asignado en Startup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 17:06:07 -05:00
1 parent 1ce0da7735
commit e5ea57b673
5 files changed
+39 -24

No files matched your search

@@ -6,7 +6,6 @@ using Net.Business.Entities.ServicesLayer.CreditNotes;
using Net.Connection;
using Net.Connection.ServiceLayer;
using Net.CrossCotting;
using Net.Data.HelperData.Log;
using System;
using System.Collections.Generic;
using System.Net.Http;
@@ -51,8 +50,6 @@ namespace Net.Data.ServicesLayer.CreditNotes
if (!data.Exito)
{
// Solo si SAP rechaza: guarda el JSON enviado al Service Layer para poder revisarlo
HelperLogServiceLayer.AddError("NotaCredito Error", DocEntryOrigen(entidad), entidad, data.Mensaje);
return resultadoTransaccion.GetInformacionResultado(-1, -1, data.Mensaje);
}
@@ -60,17 +57,10 @@ namespace Net.Data.ServicesLayer.CreditNotes
}
catch (Exception ex)
{
HelperLogServiceLayer.AddError("NotaCredito Error", DocEntryOrigen(entidad), entidad, ex.Message);
return resultadoTransaccion.GetInformacionResultado(-1, -1, ex.Message.ToString());
}
}
// DocEntry del documento base (factura o solicitud de devolucion) de la primera linea
private static string DocEntryOrigen(BE_CreditNotesNotes entidad)
{
return entidad?.DocumentLines?.Count > 0 ? entidad.DocumentLines[0].BaseEntry?.ToString() : null;
}
public async Task<BE_ResultadoTransaccion<BE_BaseResponseSap>> UpdateCreateCreditNotes(dynamic entidad, int DocEntry)
{