From 575dd1d2c06522a6516b3de27b202a7a24a33d87 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 18 Jan 2021 00:04:34 -0700 Subject: [PATCH] E72. EntregaAlmacen. Sugerir serie si tiene en apartados --- App_Code/ClsInventarios.vb | 6 +++++- Inventarios/EntregaAlmacen.aspx.vb | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) 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