- Serie,Lote, Caducidad Seccion Almacen
This commit is contained in:
@@ -1788,7 +1788,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Valor AF" DataField="ValorImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="8%" />
|
||||
<asp:HyperLinkField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" Target="_blank" DataNavigateUrlFields="CveVentaDevolucion" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolioDevolucion" />
|
||||
|
||||
@@ -1843,7 +1843,7 @@
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -1882,7 +1882,7 @@
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -2149,502 +2149,18 @@ Partial Class Contratos_Default
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
'VIEJO ALMACEN
|
||||
'#Region " MOVIMIENTOS ALMACEN "
|
||||
' Private Sub CargaInventarios()
|
||||
' If CveMovimiento > 0 Then
|
||||
' Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
|
||||
' If ObjInventarios.GetMovimientos(CveMovimiento, 8, -1, UsuarioActual.CveEmpresa) Then
|
||||
' TxtFechaAlmacen.Text = ObjInventarios.Fecha.ToShortDateString
|
||||
' DdlAlmacen.SelectedValue = ObjInventarios.CveAlmacen.ToString
|
||||
' TxtObservaciones.Text = ObjInventarios.Observaciones
|
||||
|
||||
' 'cargar también los movimentos detalle
|
||||
' If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
' DtMovimientos = ObjInventarios.DtResultados.FiltraParametros("", "CveMovimientoDetalle")
|
||||
|
||||
' DtMovimientos.Columns.Add("EstatusExistencia")
|
||||
' DtMovimientos.Columns("No").AutoIncrement = True
|
||||
' DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||
' DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||
|
||||
' Dim keys(1) As DataColumn
|
||||
' keys(0) = DtMovimientos.Columns("No")
|
||||
' DtMovimientos.PrimaryKey = keys
|
||||
|
||||
' CargaGvDatos()
|
||||
|
||||
' 'BLOQUEA
|
||||
' TxtFechaAlmacen.Enabled = False
|
||||
' ImgFechaAlmacen.Enabled = False
|
||||
' DdlAlmacen.Enabled = False
|
||||
' TxtObservaciones.Enabled = False
|
||||
' LbAgregarAlmacen.Visible = False
|
||||
' 'TxtCantidadAlmacen.Enabled = False
|
||||
' 'DdlUnidad.Enabled = False
|
||||
' DdlProducto2.Enabled = False
|
||||
' DdlClasificacion.Enabled = False
|
||||
' TxtnSerieLote.Enabled = False
|
||||
' DivCodigoSeriePS.Visible = False
|
||||
|
||||
' Else
|
||||
' Alert("Ocurrió un error al cargar la información de los Activos Fijos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' Alert("Ocurrió un error al cargar la información de los Activos Fijos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
|
||||
' ObjInventarios.Dispose()
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub InicializaAlmacen()
|
||||
' CreaDTAlmacen()
|
||||
' CargaPS()
|
||||
' TxtFechaAlmacen.Text = Now.ToShortDateString
|
||||
|
||||
' 'DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' 'DdlAlmacen.DataBind()
|
||||
' 'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
' End Sub
|
||||
|
||||
'#Region "CARGA DATOS"
|
||||
' Protected Sub CreaDTAlmacen()
|
||||
' Dim dt As New DataTable
|
||||
|
||||
' Dim column As DataColumn = New DataColumn("No")
|
||||
' column.DataType = Type.GetType("System.Int32")
|
||||
' With column
|
||||
' .AutoIncrement = True
|
||||
' .AutoIncrementSeed = 1
|
||||
' .AutoIncrementStep = 1
|
||||
' End With
|
||||
|
||||
' dt.Columns.Add(column)
|
||||
|
||||
|
||||
' dt.Columns.Add("Cantidad", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("CveUM", Type.GetType("System.Int32"))
|
||||
' dt.Columns.Add("UnidadMedida")
|
||||
' dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
|
||||
' dt.Columns.Add("PS")
|
||||
' dt.Columns.Add("SerieLote")
|
||||
|
||||
|
||||
' dt.Columns.Add("CveClasificacion", Type.GetType("System.Int32"))
|
||||
' dt.Columns.Add("EstatusExistencia")
|
||||
|
||||
' DtMovimientos = dt
|
||||
|
||||
' CargaGvDatos()
|
||||
|
||||
' End Sub
|
||||
|
||||
' Private Sub CargaPS()
|
||||
' DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
' If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
' End If
|
||||
' If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
|
||||
' DdlProducto2.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros($"Inv_CveMetodoInventario = 5")
|
||||
' DdlProducto2.DataBind()
|
||||
' DdlProducto2.ddl.Items.Insert(0, New ListItem("----", "-1"))
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
'#Region "AGREGAR Y GUARDAR"
|
||||
' Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LBAgregar.Click
|
||||
' BtnAgregarPS(1)
|
||||
' End Sub
|
||||
' Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
|
||||
' BtnAgregarPS(1)
|
||||
' End Sub
|
||||
' Private Sub BtnAgregarPS(Cantidad As Double)
|
||||
' Dim CveProducto As Integer = DdlProducto2.SelectedValue.ToEntero
|
||||
|
||||
' If CveProducto > 0 Then
|
||||
' If TxtnSerieLote.Visible AndAlso TxtnSerieLote.Text = "" Then
|
||||
' Alert("Serie-Lote es necesario", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' Dim Valido = ValidaExistencia(Cantidad, CveProducto, -1, TxtnSerieLote.Text) 'If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1")
|
||||
|
||||
' If Valido Then
|
||||
' AgregarPS(Cantidad, CveProducto, -1, TxtnSerieLote.Text) 'If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1")
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End Sub
|
||||
' Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1") As Boolean
|
||||
' Dim Retorno = True
|
||||
|
||||
' Dim Inv As New ClsInventarios
|
||||
' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, TxtFechaAlmacen.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote)
|
||||
' Inv.Dispose()
|
||||
|
||||
' If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then
|
||||
' If Existencia = 0 Then
|
||||
' Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' Retorno = False
|
||||
' End If
|
||||
|
||||
' Return Retorno
|
||||
' End Function
|
||||
' Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1")
|
||||
' If Cantidad <= 0 Then
|
||||
' Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
|
||||
' Dim CveClasificacion As Integer
|
||||
|
||||
' Dim DrPS As DataRow = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CvePS = {0}", CvePS))
|
||||
' If DrPS IsNot Nothing Then CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
|
||||
|
||||
' Dim registro As DataRow = DtMovimientos.NewRow
|
||||
' registro.Item("Cantidad") = Cantidad
|
||||
' registro.Item("CveUM") = DrPS("CveUnidadMedida")
|
||||
' registro.Item("UnidadMedida") = DrPS("UnidadMedida")
|
||||
' registro.Item("CvePS") = CvePS
|
||||
' registro.Item("PS") = DrPS("PS")
|
||||
' registro.Item("SerieLote") = SerieLote
|
||||
' registro.Item("CveClasificacion") = CveClasificacion
|
||||
' registro.Item("EstatusExistencia") = "1"
|
||||
|
||||
' DtMovimientos.Rows.Add(registro)
|
||||
|
||||
' CargaGvDatos()
|
||||
|
||||
' LimpiaAgregar()
|
||||
' End Sub
|
||||
|
||||
' Private Sub LimpiaAgregar()
|
||||
' DdlClasificacion.SelectedValue = "-1"
|
||||
' DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
|
||||
' 'TxtCantidad.Text = ""
|
||||
' TxtnSerieLote.Text = ""
|
||||
' 'TxtnSerieLote.Visible = False
|
||||
' End Sub
|
||||
|
||||
' Protected Function GuardarAlmacen(ObjInventarios As ClsInventarios) As Boolean
|
||||
' Dim ErrorMovInv As Boolean = False
|
||||
|
||||
' 'NO HACE NADA YA QUE TIENE MOVIMIENTO REGISTRADO O NO TENGA DETALLES EN EL GV
|
||||
' If CveMovimiento > 0 Or GvDatos.Rows.Count = 0 Then
|
||||
' Return ErrorMovInv
|
||||
' End If
|
||||
|
||||
|
||||
' 'VALIDA ESTATUS EXISTENCIA
|
||||
' For Each dr As DataRow In DtMovimientos.Rows
|
||||
' If dr("EstatusExistencia").ToString = "-1" Then
|
||||
' Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError)
|
||||
' Return True
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' Dim CveMovimientoSalida = 0
|
||||
' Dim CveMovimientoEntrada = 0
|
||||
' Dim IDPoliza As Integer = 0
|
||||
' Dim FolioSalida = 0
|
||||
' Dim FolioEntrada = 0
|
||||
' Dim AlmacenEntrada = -1
|
||||
|
||||
' Dim ErrorAC As Boolean = False
|
||||
' Dim ErrorExistencia = False
|
||||
|
||||
' Dim TextoError = ""
|
||||
' Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||
|
||||
|
||||
' 'VALIDA EXISTENCIA
|
||||
' Dim Existencia As Double
|
||||
' TextoExistencia.Append("Los siguiente productos se ajustaron por falta de exitencia:<br/>")
|
||||
' For Each dr As DataRow In DtMovimientos.Rows
|
||||
' Existencia = ObjInventarios.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, TxtFechaAlmacen.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString))
|
||||
|
||||
' Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}")
|
||||
|
||||
' If Existencia < 0 Then
|
||||
' ErrorExistencia = True
|
||||
' dr("EstatusExistencia") = "-1"
|
||||
' dr("Cantidad") = Existencia
|
||||
' TextoExistencia.AppendFormat("- #{0} {1}<br/>", dr("No").ToString, dr("PS").ToString)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' 'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
|
||||
' If Not ErrorExistencia Then
|
||||
' Dim Fecha As Date = TxtFechaAlmacen.Text.ToDate
|
||||
|
||||
' 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
||||
' CveMovimientoSalida = ObjInventarios.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveContrato:=CveContrato)
|
||||
' FolioSalida = ObjInventarios.Folio
|
||||
|
||||
' If CveMovimientoSalida <= 0 Then
|
||||
' TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
' ErrorMovInv = True
|
||||
' Else
|
||||
|
||||
' For Each Dr As DataRow In DtMovimientos.Rows
|
||||
' If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, -1, Dr("SerieLote").ToString) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
|
||||
' 'AGREGAMOS LA ENTRADA
|
||||
' If Not ErrorMovInv Then
|
||||
' AlmacenEntrada = 89
|
||||
|
||||
' CveMovimientoEntrada = ObjInventarios.AddMovimiento(AlmacenEntrada, 9, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, CveContrato:=CveContrato)
|
||||
' FolioEntrada = ObjInventarios.Folio
|
||||
|
||||
' If CveMovimientoEntrada <= 0 Then
|
||||
' TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
||||
' ErrorMovInv = True
|
||||
' Else
|
||||
|
||||
' If ObjInventarios.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
' For Each Dr As DataRow In ObjInventarios.DtResultados.Rows
|
||||
' If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not ErrorMovInv Then
|
||||
' Dim Mensaje As StringBuilder = New StringBuilder
|
||||
|
||||
' Mensaje.Append("Se realizó con éxito el traspaso.")
|
||||
|
||||
' Mensaje.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
|
||||
' Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||
|
||||
' Mensaje.AppendFormat("<br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada)
|
||||
' Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
|
||||
' Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
' TxtResponsable.Text = ""
|
||||
' TxtFechaAlmacen.Text = Now.ToShortDateString
|
||||
' TxtObservaciones.Text = ""
|
||||
' 'TxtCantidad.Text = ""
|
||||
|
||||
' DtMovimientos.Rows.Clear()
|
||||
' CargaGvDatos()
|
||||
' Else
|
||||
' Alert(TextoError, TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' Alert(TextoExistencia.ToString, TipoMensaje.MsgError)
|
||||
' ErrorMovInv = True
|
||||
' End If
|
||||
|
||||
|
||||
' 'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||
' If ErrorExistencia Then
|
||||
' CargaGvDatos()
|
||||
' End If
|
||||
|
||||
' Return ErrorMovInv
|
||||
|
||||
' End Function
|
||||
|
||||
|
||||
'#End Region
|
||||
|
||||
'#Region " AGREGA CON TXT | CODIGO - SERIE "
|
||||
' Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' If TxtCodigoPS.Text = "" Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' TdSeriePS.Visible = False
|
||||
|
||||
' Dim DrPS = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
|
||||
' If DrPS Is Nothing Then
|
||||
' Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||
' TxtCodigoPS.Text = ""
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
' TdSeriePS.Visible = True
|
||||
' TxtSeriePS.Focus()
|
||||
' CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
|
||||
' CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
|
||||
|
||||
' TxtCodigoPS.Text = ""
|
||||
|
||||
' End Sub
|
||||
' Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||
' If TxtSeriePS.Text.Trim = "" Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' 'TxtCantidad.Text = "1"
|
||||
|
||||
' Dim Valido = ValidaExistencia(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
|
||||
|
||||
' If Valido Then
|
||||
' AgregarPS(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
|
||||
' Else
|
||||
' TxtSeriePS.Text = ""
|
||||
' TxtSeriePS.Focus()
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' TdSeriePS.Visible = False
|
||||
' TxtSeriePS.Text = ""
|
||||
' TxtCodigoPS.Text = ""
|
||||
' TxtCodigoPS.Focus()
|
||||
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
'#Region "DDL CLASIFICACION"
|
||||
' Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
' ChangeDdlProducto()
|
||||
' End Sub
|
||||
' Private Sub ChangeDdlProducto()
|
||||
' If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
' Dim filtro As String = ""
|
||||
' If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||
|
||||
' If isWhitFamily() Then
|
||||
' filtro = String.Format("AND CveSubFamilia={0}", DdlClasificacion.SelectedValue)
|
||||
' Else
|
||||
' filtro = String.Format("AND CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||
' End If
|
||||
' End If
|
||||
' DdlProducto2.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros($"Inv_CveMetodoInventario = 5 {filtro}", "PS")
|
||||
' DdlProducto2.DataBind()
|
||||
' DdlProducto2.ddl.Items.Insert(0, New ListItem("----", "-1"))
|
||||
' Else
|
||||
' If isWhitFamily() Then
|
||||
' DdlProducto2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.SelectedValue)
|
||||
' Else
|
||||
' DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||
' End If
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Protected Sub DdlProducto_ValueChanged(sender As Object, e As EventArgs) Handles DdlProducto2.selectedindexchange
|
||||
' ElProductoChange()
|
||||
' End Sub
|
||||
' Private Sub ElProductoChange()
|
||||
' 'TxtnSerieLote.Visible = False
|
||||
|
||||
' 'If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
' ' If GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0} AND Inv_CveMetodoInventario = 5 ", DdlProducto2.SelectedValue), "PS").Rows.Count > 0 Then
|
||||
' ' ThSerieLote.Visible = True
|
||||
' ' TdSerieLote.Visible = True
|
||||
' ' TxtnSerieLote.Visible = True
|
||||
' ' GvDatos.Columns(2).Visible = True
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
' 'Dim objinv As New ClsInventarios
|
||||
' 'If objinv.GetExistenciasProducto(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, Now) Then
|
||||
' ' If objinv.DtResultados.Rows.Count = 0 Then
|
||||
' ' Alert("No hay existencias de este producto", TipoMensaje.MsgAdvertencia)
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
' 'UpGral.Update()
|
||||
|
||||
' End Sub
|
||||
' Private Function isWhitFamily() As Boolean
|
||||
' Return (UsuarioActual.CveEmpresa = 66)
|
||||
' End Function
|
||||
'#End Region
|
||||
|
||||
'#Region "GV DATOS"
|
||||
' Private Sub CargaGvDatos()
|
||||
' 'TxtnSerieLote.Visible = False
|
||||
' 'ThSerieLote.Visible = False
|
||||
' 'TdSerieLote.Visible = False
|
||||
' 'GvDatos.Columns(4).Visible = False
|
||||
|
||||
' GvDatos.DataSource = DtMovimientos
|
||||
' GvDatos.DataBind()
|
||||
' UpGral.Update()
|
||||
' End Sub
|
||||
' Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' If CveMovimiento > 0 Then
|
||||
' e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||
' End If
|
||||
|
||||
' If e.Row.DBCampo("EstatusExistencia").ToEntero < 0 Then
|
||||
' e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
' End If
|
||||
|
||||
' If e.Row.DBCampo("SerieLote").ToString <> "-1" Then
|
||||
' 'TxtnSerieLote.Visible = True
|
||||
' 'ThSerieLote.Visible = True
|
||||
' 'TdSerieLote.Visible = True
|
||||
' 'GvDatos.Columns(2).Visible = True
|
||||
' 'e.Row.Cells(2).Text = e.Row.DBCampo("SerieLote").ToString
|
||||
' Else
|
||||
' e.Row.Cells(2).Text = ""
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End Sub
|
||||
' Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
' Dim DbRow As DataRow = Nothing
|
||||
' DbRow = DtMovimientos.Rows(e.RowIndex)
|
||||
|
||||
' DtMovimientos.Rows.Remove(DbRow)
|
||||
' CargaGvDatos()
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
'#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user