diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index e4bdd741e..4f6329ac5 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -2955,7 +2955,8 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function SerieRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1, Optional CveSeccionAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
+ Public Function SerieRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1, Optional CveSeccionAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
+ Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional ExcluyeApartados As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_SerieRecomendadoGet")
@@ -2966,6 +2967,9 @@ Public Class ClsInventarios
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
End With
Try
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 67bc6e154..5eae3c8f5 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -1078,7 +1078,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim DtSerie As New DataTable
If TipoMovimiento = 1 Then
Dim ObjInventarios As New ClsInventarios
- If ObjInventarios.SerieRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), CveSubProyecto:=CveSubProyecto) Then
+ If ObjInventarios.SerieRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, CveVendedor:=CveVendedor) Then
DtSerie = ObjInventarios.DtResultados
End If
ObjInventarios.Dispose()
@@ -1105,6 +1105,7 @@ Partial Class Inventarios_EntregaAlmacen
If DtSerie.Rows.Count > 0 Then
Dim Mensaje As New StringBuilder
Mensaje.AppendFormat("Serie Recomendado: {0}", DtSerie.Rows(0)("Serie"))
+
If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: {0}", DtSerie.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
LbSerieRecomendado.Text = Mensaje.ToString() 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
Else