Version 2.1.12.0: limpieza de codigo comentado y SetCreatePurchaseInvoices duplicado
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
20f3a59d35
commit
2fb7509fc2
13 files changed
+9
-173
No files matched your search
@@ -10,7 +10,7 @@ comprimido (versión antigua)**.
|
|||||||
|
|
||||||
## Versión y control de versiones
|
## Versión y control de versiones
|
||||||
|
|
||||||
- **Versión actual: 2.1.11.0** (rama `limpieza-2.1.8.0`; `main` = 2.1.7.0) (`Net.Business.Services.csproj`: `Version`,
|
- **Versión actual: 2.1.12.0** (rama `limpieza-2.1.8.0`; `main` = 2.1.7.0) (`Net.Business.Services.csproj`: `Version`,
|
||||||
`AssemblyVersion`, `FileVersion`). Cada versión tiene su commit; al publicar
|
`AssemblyVersion`, `FileVersion`). Cada versión tiene su commit; al publicar
|
||||||
se sube la versión (ver `publicar.ps1`).
|
se sube la versión (ver `publicar.ps1`).
|
||||||
- **Git**: rama `main`, remoto `origin` =
|
- **Git**: rama `main`, remoto `origin` =
|
||||||
@@ -135,6 +135,11 @@ transferencias siempre, sin depender de `Notificacion`. Detalle y tabla en
|
|||||||
factura) no cubre la cantidad de la línea, el resto va a un lote nuevo por fecha/hora (antes SAP
|
factura) no cubre la cantidad de la línea, el resto va a un lote nuevo por fecha/hora (antes SAP
|
||||||
respondía "No es posible añadir una línea sin la selección completa de los números de serie/lote");
|
respondía "No es posible añadir una línea sin la selección completa de los números de serie/lote");
|
||||||
una línea sin equivalente en la factura ya no revienta con referencia nula. Sin probar contra SAP.
|
una línea sin equivalente en la factura ya no revienta con referencia nula. Sin probar contra SAP.
|
||||||
|
- **v2.1.12.0 — más limpieza** (sin cambios de comportamiento): se quitó `PurchaseOrdersRepository.SetCreatePurchaseInvoices`
|
||||||
|
(duplicado sin llamadores; queda el de `PurchaseInvoicesRepository`), el código comentado de `HRRepository`
|
||||||
|
(rama "Privado"), `Program.cs` (`CreateHostBuilder` viejo), `ConnectionServiceLayer` (líneas de header/éxito y un
|
||||||
|
`if` de `NoContent` vacío), `CreditNotesRepository`, `ReciboRepository`, `InventarioRepository`, `ConnectionSQL`, `DBParameter` y
|
||||||
|
`BE_BusinessPartners` (ya no queda código comentado). Sigue pendiente `PatchAsyncSBA` y la redundancia de serie/cabecera de la NC.
|
||||||
- Sin probar contra SAP: confirmar con la factura 292410 que SAP devuelve
|
- Sin probar contra SAP: confirmar con la factura 292410 que SAP devuelve
|
||||||
`BaseType`/`BaseEntry` en las líneas y `BatchNumbers` en las de la Entrega.
|
`BaseType`/`BaseEntry` en las líneas y `BatchNumbers` en las de la Entrega.
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ namespace Net.Business.Entities.ServicesLayer
|
|||||||
[DBParameter(SqlDbType.Int, 0, ActionType.Everything)]
|
[DBParameter(SqlDbType.Int, 0, ActionType.Everything)]
|
||||||
public int U_BPP_BPTD { get; set; }
|
public int U_BPP_BPTD { get; set; }
|
||||||
public int PriceListNum { get; set; }
|
public int PriceListNum { get; set; }
|
||||||
//U_BPP_BPTD = 6,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<AssemblyName>ITCA_API_SAP_WMS</AssemblyName>
|
<AssemblyName>ITCA_API_SAP_WMS</AssemblyName>
|
||||||
<Version>2.1.11.0</Version>
|
<Version>2.1.12.0</Version>
|
||||||
<AssemblyVersion>2.1.11.0</AssemblyVersion>
|
<AssemblyVersion>2.1.12.0</AssemblyVersion>
|
||||||
<FileVersion>2.1.11.0</FileVersion>
|
<FileVersion>2.1.12.0</FileVersion>
|
||||||
<UserSecretsId>24763424-3300-4c85-87e3-503f8fdebd14</UserSecretsId>
|
<UserSecretsId>24763424-3300-4c85-87e3-503f8fdebd14</UserSecretsId>
|
||||||
<!-- Antes solo estaba condicionado a Debug|AnyCPU - un "dotnet publish -c Release"
|
<!-- Antes solo estaba condicionado a Debug|AnyCPU - un "dotnet publish -c Release"
|
||||||
(lo normal para IIS) se quedaba sin este archivo, y Startup.cs revienta con
|
(lo normal para IIS) se quedaba sin este archivo, y Startup.cs revienta con
|
||||||
|
|||||||
@@ -23,25 +23,5 @@ namespace Net.Business.Services
|
|||||||
{
|
{
|
||||||
webBuilder.UseStartup<Startup>();
|
webBuilder.UseStartup<Startup>();
|
||||||
});
|
});
|
||||||
|
|
||||||
//public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
||||||
// Host.CreateDefaultBuilder(args)
|
|
||||||
// .ConfigureWebHostDefaults(webBuilder =>
|
|
||||||
// {
|
|
||||||
// webBuilder.
|
|
||||||
// UseStartup<Startup>()
|
|
||||||
// .UseContentRoot(Directory.GetCurrentDirectory())
|
|
||||||
// .UseKestrel(options =>
|
|
||||||
// {
|
|
||||||
// options.Limits.MaxRequestBodySize = long.MaxValue;
|
|
||||||
// })
|
|
||||||
// .UseIISIntegration();
|
|
||||||
// //.UseKestrel(options =>
|
|
||||||
// //{
|
|
||||||
// // options.Limits.MaxRequestBodySize = long.MaxValue;
|
|
||||||
// //})
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,14 +23,6 @@ namespace Net.Connection.Attributes
|
|||||||
{
|
{
|
||||||
DBParameterMethod(dbType, 0, ParameterDirection.Input, "", actionType, Key);
|
DBParameterMethod(dbType, 0, ParameterDirection.Input, "", actionType, Key);
|
||||||
}
|
}
|
||||||
//public DBParameter(SqlDbType dbType, ActionType actionType)
|
|
||||||
//{
|
|
||||||
// DBParameterMethod(dbType, 0, ParameterDirection.Input, "", actionType, false);
|
|
||||||
//}
|
|
||||||
//public DBParameter(SqlDbType dbType, ActionType actionType, ParameterDirection direction)
|
|
||||||
//{
|
|
||||||
// DBParameterMethod(dbType, 0, direction, "", actionType, false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asignacion del Tipo de Dato
|
/// Asignacion del Tipo de Dato
|
||||||
@@ -42,14 +34,6 @@ namespace Net.Connection.Attributes
|
|||||||
{
|
{
|
||||||
DBParameterMethod(dbType, size, ParameterDirection.Input, "", actionType, false);
|
DBParameterMethod(dbType, size, ParameterDirection.Input, "", actionType, false);
|
||||||
}
|
}
|
||||||
//public DBParameter(SqlDbType dbType, int size, ParameterDirection direction, ActionType actionType)
|
|
||||||
//{
|
|
||||||
// DBParameterMethod(dbType, size, direction, "", actionType, false);
|
|
||||||
//}
|
|
||||||
//public DBParameter(SqlDbType dbType, int size, ParameterDirection direction, string name, ActionType actionType)
|
|
||||||
//{
|
|
||||||
// DBParameterMethod(dbType, size, direction, name, actionType, false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
private void DBParameterMethod(SqlDbType dbType, int size, ParameterDirection direction, string name, ActionType actionType, Boolean Key)
|
private void DBParameterMethod(SqlDbType dbType, int size, ParameterDirection direction, string name, ActionType actionType, Boolean Key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -172,7 +172,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
|
|
||||||
// ASIGNAMOS A LA CABECERA DE LA PETICIÓN EL TOKEN JWT.
|
// ASIGNAMOS A LA CABECERA DE LA PETICIÓN EL TOKEN JWT.
|
||||||
if (_responseLoginServiceLayer.ServicioActivo)
|
if (_responseLoginServiceLayer.ServicioActivo)
|
||||||
//request_.Headers = new AuthenticationHeaderValue("B1SESSION", _responseLoginServiceLayer.SessionId);
|
|
||||||
request_.Headers.Add("Cookie", "B1SESSION=" + _responseLoginServiceLayer.SessionId);
|
request_.Headers.Add("Cookie", "B1SESSION=" + _responseLoginServiceLayer.SessionId);
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// CONSTRUIMOS LA RESPUESTA (RESPONSE) //
|
// CONSTRUIMOS LA RESPUESTA (RESPONSE) //
|
||||||
@@ -198,10 +197,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
{
|
{
|
||||||
List<T> lista = new List<T>();
|
List<T> lista = new List<T>();
|
||||||
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
||||||
//responseBody.Exito = true;
|
|
||||||
//var estado = (int)response_.StatusCode;
|
|
||||||
//responseBody.CodigoHttp = estado.ToString();
|
|
||||||
//responseBody.Mensaje = "Datos Correctos del SAP";
|
|
||||||
lista.Add(responseBody);
|
lista.Add(responseBody);
|
||||||
return lista;
|
return lista;
|
||||||
}
|
}
|
||||||
@@ -271,8 +266,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
|
|
||||||
// DEFINIMOS EL Accept, EN ESTE CASO ES "application/json"
|
// DEFINIMOS EL Accept, EN ESTE CASO ES "application/json"
|
||||||
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
||||||
//request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("odata=minimalmetadata"));
|
|
||||||
//request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("charset=utf-8"));
|
|
||||||
if (conCuerpo)
|
if (conCuerpo)
|
||||||
request_.Content = new StringContent(JsonConvert.SerializeObject(obj), System.Text.Encoding.UTF8, "application/json");
|
request_.Content = new StringContent(JsonConvert.SerializeObject(obj), System.Text.Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
@@ -404,8 +397,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
|
|
||||||
// DEFINIMOS EL Accept, EN ESTE CASO ES "application/json"
|
// DEFINIMOS EL Accept, EN ESTE CASO ES "application/json"
|
||||||
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
||||||
//request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("odata=minimalmetadata"));
|
|
||||||
//request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("charset=utf-8"));
|
|
||||||
request_.Content = new StringContent(JsonConvert.SerializeObject(obj), System.Text.Encoding.UTF8, "application/json");
|
request_.Content = new StringContent(JsonConvert.SerializeObject(obj), System.Text.Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
// ASIGNAMOS A LA CABECERA DE LA PETICIÓN EL TOKEN JWT.
|
// ASIGNAMOS A LA CABECERA DE LA PETICIÓN EL TOKEN JWT.
|
||||||
@@ -428,7 +419,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
// DESERIALIZAMOS Content DEL RESPONSE
|
// DESERIALIZAMOS Content DEL RESPONSE
|
||||||
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
||||||
var estado = (int)response_.StatusCode;
|
var estado = (int)response_.StatusCode;
|
||||||
//responseBody.CodigoHttp = estado.ToString();
|
|
||||||
responseBody.Mensaje = "SE ENVIO CORRECTAMENTE A SAP BO ";
|
responseBody.Mensaje = "SE ENVIO CORRECTAMENTE A SAP BO ";
|
||||||
return responseBody;
|
return responseBody;
|
||||||
}
|
}
|
||||||
@@ -446,7 +436,6 @@ namespace Net.Connection.ServiceLayer
|
|||||||
{
|
{
|
||||||
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
||||||
var estado = (int)response_.StatusCode;
|
var estado = (int)response_.StatusCode;
|
||||||
//responseBody.CodigoHttp = estado.ToString();
|
|
||||||
responseBody.Mensaje = "Services Unauthorized : " + _responseLoginServiceLayer.error.message.ToString();
|
responseBody.Mensaje = "Services Unauthorized : " + _responseLoginServiceLayer.error.message.ToString();
|
||||||
LogErrorEnvio(Query, obj, responseBody.Mensaje);
|
LogErrorEnvio(Query, obj, responseBody.Mensaje);
|
||||||
return responseBody;
|
return responseBody;
|
||||||
@@ -471,19 +460,11 @@ namespace Net.Connection.ServiceLayer
|
|||||||
|
|
||||||
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
||||||
var estado = (int)response_.StatusCode;
|
var estado = (int)response_.StatusCode;
|
||||||
//responseBody.CodigoHttp = estado.ToString();
|
|
||||||
responseBody.Mensaje = "Error Services : " + _responseLoginServiceLayer.error.message.ToString();
|
responseBody.Mensaje = "Error Services : " + _responseLoginServiceLayer.error.message.ToString();
|
||||||
LogErrorEnvio(Query, obj, responseBody.Mensaje);
|
LogErrorEnvio(Query, obj, responseBody.Mensaje);
|
||||||
return responseBody;
|
return responseBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response_.StatusCode == System.Net.HttpStatusCode.NoContent)
|
|
||||||
{
|
|
||||||
//dynamic responseBody = JsonConvert.DeserializeObject<T>(responseText_);
|
|
||||||
////responseBody.Mensaje = "OK";
|
|
||||||
//return responseBody;
|
|
||||||
}
|
|
||||||
|
|
||||||
// RETORNAMOS EL OBJETO POR DEFECTO ESPERADO
|
// RETORNAMOS EL OBJETO POR DEFECTO ESPERADO
|
||||||
return default(T);
|
return default(T);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,63 +188,6 @@ namespace Net.Connection
|
|||||||
return queryResult;
|
return queryResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
//private static SqlParameterCollection CreateParametros(string procedureName, string conexion)
|
|
||||||
//{
|
|
||||||
// SqlCommand cmd = new SqlCommand(procedureName.Trim());
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// cmd.CommandType = CommandType.StoredProcedure;
|
|
||||||
// cmd.Connection = new SqlConnection(conexion);
|
|
||||||
// if (cmd.Connection.State == ConnectionState.Closed)
|
|
||||||
// {
|
|
||||||
// cmd.Connection.Open();
|
|
||||||
// }
|
|
||||||
// SqlCommandBuilder.DeriveParameters(cmd);
|
|
||||||
// for (int i = 0; i < cmd.Parameters.Count; i++)
|
|
||||||
// {
|
|
||||||
// string Nombre = cmd.Parameters[i].ParameterName;
|
|
||||||
// if (Nombre.Substring(0, 1) == "@")
|
|
||||||
// {
|
|
||||||
// Nombre = Nombre.Substring(1);
|
|
||||||
// }
|
|
||||||
// cmd.Parameters[i].ParameterName = Nombre.ToUpper();
|
|
||||||
// }
|
|
||||||
// return cmd.Parameters;
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// throw ex;
|
|
||||||
// }
|
|
||||||
// finally
|
|
||||||
// {
|
|
||||||
// cmd.Connection.Dispose();
|
|
||||||
// cmd.Dispose();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private static IList<DbParametro> GetParametersSqlQuery(Object parameters)
|
|
||||||
//{
|
|
||||||
// IList<DbParametro> listaParametro = new List<DbParametro>();
|
|
||||||
|
|
||||||
// foreach (PropertyInfo prop in parameters.GetType().GetProperties())
|
|
||||||
// {
|
|
||||||
// dynamic valor = prop.GetValue(parameters, null);
|
|
||||||
// Type type = Nullable.GetUnderlyingType(prop.PropertyType);
|
|
||||||
|
|
||||||
// if (valor != null)
|
|
||||||
// {
|
|
||||||
// type = (type == null) ? prop.PropertyType : type;
|
|
||||||
|
|
||||||
// if (type != typeof(System.Collections.Generic.ICollection<>))
|
|
||||||
// {
|
|
||||||
// listaParametro.Add(new DbParametro() { nombre = prop.Name, valor = valor });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return listaParametro;
|
|
||||||
//}
|
|
||||||
|
|
||||||
private static IList<DbParametro> GetParametersSqlQueryAnotation<T>(T parameters, ActionType actionType)
|
private static IList<DbParametro> GetParametersSqlQueryAnotation<T>(T parameters, ActionType actionType)
|
||||||
{
|
{
|
||||||
IList<DbParametro> listaParametro = new List<DbParametro>();
|
IList<DbParametro> listaParametro = new List<DbParametro>();
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ namespace Net.Data.ServicesLayer.CreditNotes
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//var cadena = "Drafts";
|
|
||||||
var cadena = "CreditNotes";
|
var cadena = "CreditNotes";
|
||||||
var data = await _connectServiceLayer.PostAsync<BE_BaseResponseSap>(cadena, entidad);
|
var data = await _connectServiceLayer.PostAsync<BE_BaseResponseSap>(cadena, entidad);
|
||||||
|
|
||||||
@@ -73,7 +72,6 @@ namespace Net.Data.ServicesLayer.CreditNotes
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//var cadena = "Drafts";
|
|
||||||
var cadena = $"CreditNotes({DocEntry})";
|
var cadena = $"CreditNotes({DocEntry})";
|
||||||
var data = await _connectServiceLayer.PatchAsyncSBA<BE_BaseResponseSap>(cadena, entidad);
|
var data = await _connectServiceLayer.PatchAsyncSBA<BE_BaseResponseSap>(cadena, entidad);
|
||||||
if (!data.Exito)
|
if (!data.Exito)
|
||||||
|
|||||||
@@ -75,28 +75,6 @@ namespace Net.Data.ServicesLayer.HR
|
|||||||
U_ARD_PHR_CNTDOC = entidad.Detalle.Count()
|
U_ARD_PHR_CNTDOC = entidad.Detalle.Count()
|
||||||
};
|
};
|
||||||
|
|
||||||
//if(entidad.ModalidadTransporte == "Privado")
|
|
||||||
//{
|
|
||||||
// HojaRuta = new HojaRutaSAP()
|
|
||||||
// {
|
|
||||||
// ARD_PCK_HJRT_DETCollection = new List<HojaRutaDetailsEntities>(),
|
|
||||||
// U_ARD_PHR_PLACA = entidad.PlacaVehiculo,
|
|
||||||
// U_ARD_PHR_TERRI = entidad.Territorio,
|
|
||||||
// U_ARD_PHR_ZONDIS = entidad.Zona,
|
|
||||||
// U_ARD_PHR_FECCRE = entidad.FechaDespacho,
|
|
||||||
// U_ARD_PHR_MODTRANSP = entidad.ModalidadTransporte,
|
|
||||||
// U_ARD_PHR_NOMDESP = entidad.Despachador,
|
|
||||||
// U_ARD_PHR_NOMAGENTRANS = "ARDICORP S.A.C.",
|
|
||||||
// U_ARD_PHR_CODAGENTRANS = "P20136836545",
|
|
||||||
// U_ARD_PHR_RUCAGENTRANS = "20136836545",
|
|
||||||
// U_ARD_PHR_ESTDESP = "Embarcado"
|
|
||||||
// };
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
HojaRuta.ARD_PCK_HJRT_DETCollection = detalle;
|
HojaRuta.ARD_PCK_HJRT_DETCollection = detalle;
|
||||||
|
|
||||||
var cadena = "ARD_PHR";
|
var cadena = "ARD_PHR";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Net.Business.Entities;
|
using Net.Business.Entities;
|
||||||
using Net.Business.Entities.ServicesLayer;
|
using Net.Business.Entities.ServicesLayer;
|
||||||
using Net.Business.Entities.ServicesLayer.PurchaseInvoices;
|
|
||||||
using Net.Business.Entities.ServicesLayer.PurchaseOrders;
|
using Net.Business.Entities.ServicesLayer.PurchaseOrders;
|
||||||
using Net.Connection;
|
using Net.Connection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -9,7 +8,6 @@ namespace Net.Data.ServicesLayer
|
|||||||
{
|
{
|
||||||
public interface IPurchaseOrdersRepository
|
public interface IPurchaseOrdersRepository
|
||||||
{
|
{
|
||||||
Task<BE_ResultadoTransaccion<BE_BaseResponseSap>> SetCreatePurchaseInvoices(BE_PurchaseInvoices entidad);
|
|
||||||
Task<BE_ResultadoTransaccion<BE_PurchaseOrders>> GetPurchaseInvoices(int DocEntry);
|
Task<BE_ResultadoTransaccion<BE_PurchaseOrders>> GetPurchaseInvoices(int DocEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Net.Business.Entities;
|
using Net.Business.Entities;
|
||||||
using Net.Business.Entities.ServicesLayer;
|
using Net.Business.Entities.ServicesLayer;
|
||||||
using Net.Business.Entities.ServicesLayer.PurchaseInvoices;
|
|
||||||
using Net.Business.Entities.ServicesLayer.PurchaseOrders;
|
using Net.Business.Entities.ServicesLayer.PurchaseOrders;
|
||||||
using Net.Connection.ServiceLayer;
|
using Net.Connection.ServiceLayer;
|
||||||
using Net.CrossCotting;
|
using Net.CrossCotting;
|
||||||
@@ -32,31 +31,6 @@ namespace Net.Data.ServicesLayer
|
|||||||
_connectServiceLayer = new ConnectionServiceLayer(configuration, clientFactory);
|
_connectServiceLayer = new ConnectionServiceLayer(configuration, clientFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<BE_ResultadoTransaccion<BE_BaseResponseSap>> SetCreatePurchaseInvoices(BE_PurchaseInvoices entidad)
|
|
||||||
{
|
|
||||||
_metodoName = regex.Match(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name).Groups[1].Value.ToString();
|
|
||||||
|
|
||||||
ResultadoTransaccion<BE_BaseResponseSap> resultadoTransaccion = new ResultadoTransaccion<BE_BaseResponseSap>(_metodoName, _aplicacionName);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var cadena = "PurchaseInvoices";
|
|
||||||
var data = await _connectServiceLayer.PostAsync<BE_BaseResponseSap>(cadena, entidad);
|
|
||||||
|
|
||||||
if (!data.Exito)
|
|
||||||
{
|
|
||||||
return resultadoTransaccion.GetInformacionResultado(-1, -1, data.Mensaje);
|
|
||||||
}
|
|
||||||
|
|
||||||
return resultadoTransaccion.GetInformacionResultado(0, "", "Se Listo correctamento...!!!", data);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return resultadoTransaccion.GetInformacionResultado(-1, -1, ex.Message.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public async Task<BE_ResultadoTransaccion<BE_PurchaseOrders>> GetPurchaseInvoices(int DocEntry)
|
public async Task<BE_ResultadoTransaccion<BE_PurchaseOrders>> GetPurchaseInvoices(int DocEntry)
|
||||||
{
|
{
|
||||||
_metodoName = regex.Match(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name).Groups[1].Value.ToString();
|
_metodoName = regex.Match(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name).Groups[1].Value.ToString();
|
||||||
|
|||||||
@@ -497,7 +497,6 @@ namespace Net.Data.WMS.Inventario
|
|||||||
};
|
};
|
||||||
|
|
||||||
return resultadoTransaccion.GetInformacionResultado(DocEntry, DocNum.ToString(), "Registrado Correctamente", entidad);
|
return resultadoTransaccion.GetInformacionResultado(DocEntry, DocNum.ToString(), "Registrado Correctamente", entidad);
|
||||||
// return resultadoTransaccion.GetInformacionResultado((int)inventoryGenEntries_result.Data.DocEntry, inventoryGenEntries_result.Data.DocNum.ToString(), "Registrado Correctamente", entidad);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=== SALIDA DE MERCANCIA
|
//=== SALIDA DE MERCANCIA
|
||||||
@@ -586,7 +585,6 @@ namespace Net.Data.WMS.Inventario
|
|||||||
};
|
};
|
||||||
|
|
||||||
return resultadoTransaccion.GetInformacionResultado(DocEntry, DocNum.ToString(), "Registrado Correctamente", entidad);
|
return resultadoTransaccion.GetInformacionResultado(DocEntry, DocNum.ToString(), "Registrado Correctamente", entidad);
|
||||||
//return resultadoTransaccion.GetInformacionResultado((int)inventoryGenExits_result.Data.DocEntry, inventoryGenExits_result.Data.DocNum.ToString(), "Registrado Correctamente", entidad);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultadoTransaccion.GetInformacionResultado(0, "", "Registrado Correctamente", entidad);
|
return resultadoTransaccion.GetInformacionResultado(0, "", "Registrado Correctamente", entidad);
|
||||||
|
|||||||
@@ -412,7 +412,6 @@ namespace Net.Data.WMS.Recibo
|
|||||||
creditNotesNotes.PaymentGroupCode = returnRequest.PaymentGroupCode;
|
creditNotesNotes.PaymentGroupCode = returnRequest.PaymentGroupCode;
|
||||||
creditNotesNotes.DocDate = DateTime.Now;
|
creditNotesNotes.DocDate = DateTime.Now;
|
||||||
creditNotesNotes.DocDueDate = DateTime.Now;
|
creditNotesNotes.DocDueDate = DateTime.Now;
|
||||||
//creditNotesNotes.NumAtCard = entidad.DocImportacion;
|
|
||||||
creditNotesNotes.NumAtCard = ("07-" + Serie +"-" + Correlativo);
|
creditNotesNotes.NumAtCard = ("07-" + Serie +"-" + Correlativo);
|
||||||
creditNotesNotes.U_SYP_MDTO = U_SYP_MDTO;
|
creditNotesNotes.U_SYP_MDTO = U_SYP_MDTO;
|
||||||
creditNotesNotes.U_SYP_MDCO = U_SYP_MDCO;
|
creditNotesNotes.U_SYP_MDCO = U_SYP_MDCO;
|
||||||
@@ -553,7 +552,6 @@ namespace Net.Data.WMS.Recibo
|
|||||||
return resultadoTransaccion.GetInformacionResultado((int)result_creditNotesRepository.Data.DocEntry, result_creditNotesRepository.Data.DocNum.ToString(), "Se registro correctamente...!!!", entidad);
|
return resultadoTransaccion.GetInformacionResultado((int)result_creditNotesRepository.Data.DocEntry, result_creditNotesRepository.Data.DocNum.ToString(), "Se registro correctamente...!!!", entidad);
|
||||||
}
|
}
|
||||||
|
|
||||||
//return resultadoTransaccion.GetInformacionResultado((int)result_creditNotesRepository.Data.DocEntry, result_creditNotesRepository.Data.DocNum.ToString(), "Se registro correctamente...!!!", entidad);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in new issue
Block a user