Recibo (NC desde Solicitud de Devolucion): lotes solo de la distribucion y serie segun tipo de documento. Versión 2.1.7.0

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 18:03:58 -05:00
1 parent 0a2dc12305
commit d0118d1848
3 files changed
+20 -4

No files matched your search

+7 -1
View File
@@ -403,7 +403,8 @@ namespace Net.Data.WMS.Recibo
}
#endregion
string Serie = SerieOrigen == "03" ? "BC10" : "FC10";
// Serie segun el TIPO de documento origen (03 = boleta), no segun su serie
string Serie = U_SYP_MDTO == "03" ? "BC10" : "FC10";
string Correlativo = HelperCorrelativo.Get(Serie);
creditNotesNotes.DocCurrency = returnRequest.DocCurrency;
creditNotesNotes.CardCode = returnRequest.CardCode;
@@ -456,6 +457,10 @@ namespace Net.Data.WMS.Recibo
//=== REALIZA DISTRIBUCION DE STOCK POR LOTE
creditNotesNotes.DocumentLines.ForEach(line =>
{
// La linea nace con un lote del request (LoteProducto); se descarta para que
// los lotes finales sean solo los de la distribucion y sumen la cantidad de la linea
line.BatchNumbers.Clear();
#region CONSULTA A HANA
var ListaStock = HelperStock.Get(line.ItemCode, line.WarehouseCode);
@@ -492,6 +497,7 @@ namespace Net.Data.WMS.Recibo
{
creditNotesNotes.DocumentLines.ForEach(line =>
{
line.BatchNumbers.Clear();
var ReferenciaFactura = returnRequest.DocumentLines.FirstOrDefault(t => t.LineNum == line.LineNum);
var ListaStock = _Invoice.DocumentLines.FirstOrDefault(InvoiceLine => InvoiceLine.LineNum == ReferenciaFactura.BaseLine).BatchNumbers;
if (ListaStock.Count > 0)