-- mejora BDH

This commit is contained in:
2025-02-13 16:15:49 -07:00
parent 48ea850000
commit baaec697d9

View File

@@ -581,7 +581,7 @@ Partial Class Inventarios_RecepcionAlmacen
''' </summary> ''' </summary>
''' <param name="CveSubProyecto"></param> ''' <param name="CveSubProyecto"></param>
''' <param name="CveTiposAlmacen">Parametro sin espacios y separado por comas ["1,2,3,21"]</param> ''' <param name="CveTiposAlmacen">Parametro sin espacios y separado por comas ["1,2,3,21"]</param>
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1) Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1, Optional RecargaGrid As Boolean = True)
Dim StrAlmacenes As String = "" Dim StrAlmacenes As String = ""
Dim Strtmp As String = If(TipoMovimiento = 2, ",21", "") ' cuando es solicitud de devolución de almacen ,considerar los almacenes de dev prov Dim Strtmp As String = If(TipoMovimiento = 2, ",21", "") ' cuando es solicitud de devolución de almacen ,considerar los almacenes de dev prov
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14,19" & Strtmp)}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}" StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14,19" & Strtmp)}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
@@ -597,25 +597,20 @@ Partial Class Inventarios_RecepcionAlmacen
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
If UsuarioActual.CveAlmacen > 0 Then If UsuarioActual.CveAlmacen > 0 Then
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
RecargaporAlmacenes() If RecargaGrid Then RecargaporAlmacenes()
End If End If
UpGenerales.Update() UpGenerales.Update()
End Sub End Sub
Private Sub RecargaporAlmacenes() Private Sub RecargaporAlmacenes()
CveTipoAlmacen = -1 CveTipoAlmacen = -1
If DdlAlmacen.SelectedValue <> "-1" Then If DdlAlmacen.SelectedValue <> "-1" Then
Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("") Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
If drr IsNot Nothing Then If drr IsNot Nothing Then
CveTipoAlmacen = drr("CveTipoAlmacen").ToString.ToEntero CveTipoAlmacen = drr("CveTipoAlmacen").ToString.ToEntero
End If End If
CargaGVInv() CargaGVInv()
'For Each Gvr As GridViewRow In GvInv.Rows 'For Each Gvr As GridViewRow In GvInv.Rows
' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then ' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
@@ -1078,7 +1073,7 @@ Partial Class Inventarios_RecepcionAlmacen
Else Else
Dim tTipoAlm As String = "22" Dim tTipoAlm As String = "22"
If CveTipoCompra = 16 Then tTipoAlm = "22,1,24" ' apoyos, "acumuladores sin virtual" o "virtual solo" If CveTipoCompra = 16 Then tTipoAlm = "22,1,24" ' apoyos, "acumuladores sin virtual" o "virtual solo"
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, tTipoAlm, CveTipoCompra) CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, tTipoAlm, CveTipoCompra, RecargaGrid:=False)
End If End If
Else Else
@@ -1098,11 +1093,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End If End If
CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL 'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
@@ -1449,6 +1440,7 @@ Partial Class Inventarios_RecepcionAlmacen
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
DtInv = DtInv.FiltraParametros("", "PS") DtInv = DtInv.FiltraParametros("", "PS")
End If End If
If Not DtInv.Columns.Contains("Consec") Then DtInv.Columns.Add("Consec", GetType(Integer))
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
If DtInv IsNot Nothing AndAlso DtInv.Rows.Count > 0 Then If DtInv IsNot Nothing AndAlso DtInv.Rows.Count > 0 Then
@@ -1746,7 +1738,7 @@ Partial Class Inventarios_RecepcionAlmacen
Private Sub CreaDtDetalle() Private Sub CreaDtDetalle()
If DtDatosDetalle Is Nothing Then If DtDatosDetalle Is Nothing Then
DtDatosDetalle = New DataTable DtDatosDetalle = New DataTable
DtDatosDetalle.Columns.Add("Consec", GetType(Integer)) If Not DtDatosDetalle.Columns.Contains("Consec") Then DtDatosDetalle.Columns.Add("Consec", GetType(Integer))
DtDatosDetalle.Columns.Add("ConsecId", GetType(Integer)) DtDatosDetalle.Columns.Add("ConsecId", GetType(Integer))
DtDatosDetalle.Columns.Add("CvePS", GetType(Integer)) DtDatosDetalle.Columns.Add("CvePS", GetType(Integer))
DtDatosDetalle.Columns.Add("CveUM", GetType(Integer)) DtDatosDetalle.Columns.Add("CveUM", GetType(Integer))
@@ -1998,7 +1990,7 @@ Partial Class Inventarios_RecepcionAlmacen
Private Sub CreaDtLoteDetalle() Private Sub CreaDtLoteDetalle()
If DtDatosLoteDetalle Is Nothing Then If DtDatosLoteDetalle Is Nothing Then
DtDatosLoteDetalle = New DataTable DtDatosLoteDetalle = New DataTable
DtDatosLoteDetalle.Columns.Add("Consec", GetType(Integer)) If Not DtDatosLoteDetalle.Columns.Contains("Consec") Then DtDatosLoteDetalle.Columns.Add("Consec", GetType(Integer))
DtDatosLoteDetalle.Columns.Add("ConsecId", GetType(Integer)) DtDatosLoteDetalle.Columns.Add("ConsecId", GetType(Integer))
DtDatosLoteDetalle.Columns.Add("Cantidad", GetType(Decimal)) DtDatosLoteDetalle.Columns.Add("Cantidad", GetType(Decimal))
DtDatosLoteDetalle.Columns.Add("CvePS", GetType(Integer)) DtDatosLoteDetalle.Columns.Add("CvePS", GetType(Integer))