Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20f3a59d35 | ||
|
|
48167d9138 |
No files matched your search
@@ -10,7 +10,7 @@ comprimido (versión antigua)**.
|
||||
|
||||
## Versión y control de versiones
|
||||
|
||||
- **Versión actual: 2.1.9.0** (rama `limpieza-2.1.8.0`; `main` = 2.1.7.0) (`Net.Business.Services.csproj`: `Version`,
|
||||
- **Versión actual: 2.1.11.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
|
||||
se sube la versión (ver `publicar.ps1`).
|
||||
- **Git**: rama `main`, remoto `origin` =
|
||||
@@ -124,6 +124,17 @@ transferencias siempre, sin depender de `Notificacion`. Detalle y tabla en
|
||||
la línea de `StockTransfers`. Detalle, errores y diagnóstico en
|
||||
`docs/TRANSFERENCIA_IMPORTACION.md`. Probado con datos reales (SQL Server) solo la consulta: entradas
|
||||
de 1 y 2 líneas, y una transferencia cancelada libera la entrada.
|
||||
- **v2.1.10.0 — solo versión** (sin cambios de comportamiento): `Version`, `AssemblyVersion` y
|
||||
`FileVersion` del `csproj` quedan iguales (2.1.10.0). Swagger muestra `AssemblyVersion`
|
||||
(`Startup.cs`: `OpenApiInfo.Version`); si Swagger muestra otro número el servidor corre
|
||||
binarios viejos (pool sin reiniciar, carpeta equivocada o sitio desde `bin\Debug`).
|
||||
- **v2.1.11.0 — tabla de log configurable y lotes de la NC de Recibo**: (1) la tabla de log sale de
|
||||
`Hana:logTable` en `appsettings.json` (`LocalData.LogTable`; por defecto `ITCA_LOG_INTEGRACION` para
|
||||
QA/Desarrollo, producción usa `ITCA_LOG_INTEGRACION_PROD`); el esquema sigue fijo en `ITC_WMS_SAP`.
|
||||
Aplica a `B_Log` y `HelperLogServiceLayer`. (2) Recibo/Devolución: si el reparto de lotes (stock HANA o
|
||||
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");
|
||||
una línea sin equivalente en la factura ya no revienta con referencia nula. Sin probar contra SAP.
|
||||
- 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.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Net.Business.Services.Log
|
||||
{
|
||||
public static string Add(string Origen, byte[] Trama_Origen, byte[] Trama_Respuesta, string Proceso, string Nro_Orden, string DocEntry, string DocNumSAP, string DocEntrySAP)
|
||||
{
|
||||
string DB = "ITCA_LOG_INTEGRACION";
|
||||
string DB = Net.Data.LocalData.LogTable;
|
||||
string Code = System.Guid.NewGuid().ToString();
|
||||
string Fecha = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
HanaConnection hana = new HanaConnection(Net.Data.LocalData.ConnectionString);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>ITCA_API_SAP_WMS</AssemblyName>
|
||||
<Version>2.1.9</Version>
|
||||
<AssemblyVersion>2.1.9.0</AssemblyVersion>
|
||||
<FileVersion>2.1.9.0</FileVersion>
|
||||
<Version>2.1.11.0</Version>
|
||||
<AssemblyVersion>2.1.11.0</AssemblyVersion>
|
||||
<FileVersion>2.1.11.0</FileVersion>
|
||||
<UserSecretsId>24763424-3300-4c85-87e3-503f8fdebd14</UserSecretsId>
|
||||
<!-- 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
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"Hana": {
|
||||
"server": "",
|
||||
"user": "",
|
||||
"password": ""
|
||||
"password": "",
|
||||
"logTable": "ITCA_LOG_INTEGRACION"
|
||||
},
|
||||
"EmailSenderOptions": {
|
||||
"Port": "",
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Net.Data.HelperData.Log
|
||||
{
|
||||
hana.Open();
|
||||
HanaCommand hanaCommand = hana.CreateCommand();
|
||||
hanaCommand.CommandText = "INSERT INTO \"ITC_WMS_SAP\".\"ITCA_LOG_INTEGRACION\" (\"CODIGO\", \"ORIGEN\", \"TRAMA_ORIGEN\", \"TRAMA_RESPUESTA\", \"PROCESO\", \"FECHA\", \"NRO_ORDEN\", \"DOCENTRY\", \"DOCNUMSAP\", \"DOCENTRYSAP\", \"HORA\") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
hanaCommand.CommandText = $"INSERT INTO \"ITC_WMS_SAP\".\"{LocalData.LogTable}\" (\"CODIGO\", \"ORIGEN\", \"TRAMA_ORIGEN\", \"TRAMA_RESPUESTA\", \"PROCESO\", \"FECHA\", \"NRO_ORDEN\", \"DOCENTRY\", \"DOCNUMSAP\", \"DOCENTRYSAP\", \"HORA\") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
hanaCommand.Parameters.Add("CODIGO", HanaDbType.VarChar).Value = Guid.NewGuid().ToString();
|
||||
hanaCommand.Parameters.Add("ORIGEN", HanaDbType.VarChar).Value = "ServiceLayer";
|
||||
hanaCommand.Parameters.Add("TRAMA_ORIGEN", HanaDbType.Blob).Value = trama;
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace Net.Data
|
||||
// Esquema HANA: por defecto la compañia del Service Layer (SapServiceLayer:company)
|
||||
public static string Schema { get; private set; }
|
||||
|
||||
// Tabla de log de integracion (esquema fijo ITC_WMS_SAP). QA/Desarrollo: ITCA_LOG_INTEGRACION;
|
||||
// produccion: ITCA_LOG_INTEGRACION_PROD (Hana:logTable en appsettings.json)
|
||||
public static string LogTable { get; private set; } = "ITCA_LOG_INTEGRACION";
|
||||
|
||||
// Unico punto de lectura de las credenciales HANA (seccion "Hana" de appsettings.json)
|
||||
public static void Configure(IConfiguration configuration)
|
||||
{
|
||||
@@ -32,6 +36,9 @@ namespace Net.Data
|
||||
}
|
||||
|
||||
Schema = schema;
|
||||
|
||||
var logTable = configuration["Hana:logTable"];
|
||||
if (!string.IsNullOrWhiteSpace(logTable)) LogTable = logTable.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -486,6 +486,11 @@ namespace Net.Data.WMS.Recibo
|
||||
}
|
||||
}
|
||||
});
|
||||
// Stock de HANA menor a la cantidad: el resto va a un lote nuevo para que los lotes sumen la cantidad de la linea
|
||||
if (CantidadPendiente > 0)
|
||||
{
|
||||
line.BatchNumbers.Add(new BE_CreditNotesBatchNumbers() { BatchNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), Quantity = (double)CantidadPendiente });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -501,7 +506,7 @@ namespace Net.Data.WMS.Recibo
|
||||
{
|
||||
line.BatchNumbers.Clear();
|
||||
var ReferenciaFactura = returnRequest.DocumentLines.FirstOrDefault(t => t.LineNum == line.LineNum);
|
||||
var ListaStock = _Invoice.DocumentLines.FirstOrDefault(InvoiceLine => InvoiceLine.LineNum == ReferenciaFactura.BaseLine).BatchNumbers;
|
||||
var ListaStock = _Invoice.DocumentLines.FirstOrDefault(InvoiceLine => InvoiceLine.LineNum == ReferenciaFactura.BaseLine)?.BatchNumbers ?? new List<BE_InvoicesBatchNumbers>();
|
||||
if (ListaStock.Count > 0)
|
||||
{
|
||||
var CantidadPendiente = line.Quantity;
|
||||
@@ -522,6 +527,11 @@ namespace Net.Data.WMS.Recibo
|
||||
}
|
||||
}
|
||||
});
|
||||
// Lotes de la factura menores a la cantidad: el resto va a un lote nuevo para que los lotes sumen la cantidad de la linea
|
||||
if (CantidadPendiente > 0)
|
||||
{
|
||||
line.BatchNumbers.Add(new BE_CreditNotesBatchNumbers() { BatchNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), Quantity = (double)CantidadPendiente });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ dotnet publish Net.Business.Services/Net.Business.Services.csproj -c Release -r
|
||||
## Versión y script de publish
|
||||
|
||||
- La versión sale de `<Version>`/`<AssemblyVersion>`/`<FileVersion>` en
|
||||
`Net.Business.Services/Net.Business.Services.csproj` (actual: **2.1.9.0** en la rama de limpieza; `main` = 2.1.7.0);
|
||||
`Net.Business.Services/Net.Business.Services.csproj` (actual: **2.1.10.0** en la rama de limpieza; `main` = 2.1.7.0);
|
||||
súbela en cada publish.
|
||||
- `publicar.ps1` (solo Windows) genera `dist\ITCA_API_SAP_WMS_v<versión>.zip` sin
|
||||
`appsettings.json`. Desde macOS se hace el mismo `dotnet publish` a mano con
|
||||
@@ -120,7 +120,9 @@ git switch -c recuperar-2.1.7.0 v2.1.7.0 # trabajar desde ahí en una rama nue
|
||||
`PROCESO = 'ServiceLayer Error'`, `NRO_ORDEN` = ruta del recurso y `DOCENTRY`
|
||||
= `BaseEntry` del documento base. Solo en error; no cambia la respuesta de la
|
||||
API.
|
||||
- Ambos usan el esquema fijo `ITC_WMS_SAP` (columnas `PROCESO`, `NRO_ORDEN` y
|
||||
- Ambos usan el esquema fijo `ITC_WMS_SAP` y la tabla de `Hana:logTable`
|
||||
(por defecto `ITCA_LOG_INTEGRACION` para QA/Desarrollo; en **producción**
|
||||
poner `ITCA_LOG_INTEGRACION_PROD`) (columnas `PROCESO`, `NRO_ORDEN` y
|
||||
`DOCENTRY` son `VARCHAR(100)`).
|
||||
- Consulta de ejemplo:
|
||||
`SELECT * FROM "ITC_WMS_SAP"."ITCA_LOG_INTEGRACION" WHERE "PROCESO" = 'ServiceLayer Error' ORDER BY "FECHA" DESC, "HORA" DESC`
|
||||
|
||||
Reference in new issue
Block a user