Version 2.1.11.0: tabla de log configurable (Hana:logTable) y lotes completos en la NC de Recibo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
48167d9138
commit
20f3a59d35
8 files changed
+36
-9
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user