amp-web-push-widget button.amp-subscribe { display: inline-flex; align-items: center; border-radius: 5px; border: 0; box-sizing: border-box; margin: 0; padding: 10px 15px; cursor: pointer; outline: none; font-size: 15px; font-weight: 500; background: #4A90E2; margin-top: 7px; color: white; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .amp-logo amp-img{width:190px} .amp-menu input{display:none;}.amp-menu li.menu-item-has-children ul{display:none;}.amp-menu li{position:relative;display:block;}.amp-menu > li a{display:block;} /* Inline styles */ div.acss138d7{clear:both;}div.acssf5b84{--relposth-columns:3;--relposth-columns_m:2;--relposth-columns_t:2;}div.acssa8a3d{aspect-ratio:1/1;background:transparent no-repeat scroll 0% 0%;height:300px;max-width:300px;}div.acss13836{color:#333333;font-family:Arial;font-size:14px;height:75px;}span.acss47fcd{background:#FFFFFF;color:#000000;}div.acss0f1bf{display:none;}a.acssf23c5{font-size:8pt;}a.acss24ea4{font-size:16.4pt;}a.acss066f0{font-size:22pt;} .ampforwp_wc_shortcode{margin-top: 0;padding:0;display:inline-block;width: 100%;} .ampforwp_wc_shortcode li{position: relative;width:29%; font-size:12px; line-height: 1; float: left;list-style-type: none;margin:2%;} .ampforwp_wc_shortcode .onsale{position: absolute;top: 0;right: 0;background: #ddd;padding: 7px;font-size: 12px;} .single-post .ampforwp_wc_shortcode li amp-img{margin:0} .ampforwp-wc-title{margin: 8px 0px 10px 0px;font-size: 13px;} .ampforwp-wc-price{color:#444} .wc_widgettitle{text-align:center;margin-bottom: 0px;} .ampforwp-wc-price, .ampforwp_wc_star_rating{float:left;margin-right: 10px;} .icon-widgets:before {content: "\e1bd";}.icon-search:before {content: "\e8b6";}.icon-shopping-cart:after {content: "\e8cc";} /******* Paste your Custom CSS in this Editor *******/
En esta lección terminamos con el formulario de Kardex del curso Curso de Software de Ventas, ya con esto podemos ver un historial del producto
En este vídeo construimos la ventana del Kardex donde se visualizara el historial de producto seleccionado del inventario.
Primero se llenan los Datos del producto en la ventana del Kardex
Dim IdProductoSeleccionado
Sub DatosProducto()
If frmInventario.msGrid.Row > 0 Then
IdProductoSeleccionado = frmInventario.msGrid.TextMatrix(frmInventario.msGrid.Row, 1)
txtCodigoPro = frmInventario.msGrid.TextMatrix(frmInventario.msGrid.Row, 2)
txtNombrePro = frmInventario.msGrid.TextMatrix(frmInventario.msGrid.Row, 3)
End If
End Sub Luego cargamos la información llenando el grid, podemos filtrar por mes y año o por un rango de Fechas
Sub Llenar_Grid()
Dim Filtro
Dim Sql As String
Dim Columnas As Integer
Filtro = ""
'Buscar por mes
If chkPorFecha.Value = 0 Then
Mes = cmdMeses.ListIndex + 1
Anio = txtAnio.Text
Filtro = " Month(Fecha) = " & Mes & " and Year(Fecha) = " & Anio
Else
'buscar por rango de fecha
Fecha1 = Format(DTFecha1.Value, "mm/dd/yyyy")
Fecha2 = Format(DTFecha2.Value, "mm/dd/yyyy")
Filtro = " Format(Fecha,'dd/mm/yyyy') Between #" & Fecha1 & "# and #" & Fecha2 & "#"
End If
Sql = "Select Format(Fecha,'dd/mm/yyyy H:mm:ss'), Detalle, D_C, Cantidad, Costo, Cant_Saldo From tblKardex Where " & Filtro & " and IdProducto = " & IdProductoSeleccionado & " Order by IdKardex ASC "
Columnas = 6
Call LlenarGrid(msGrid, Sql, Columnas)
msGrid.ColWidth(0) = 0
msGrid.ColWidth(1) = 2200
msGrid.ColWidth(2) = 5200
msGrid.ColWidth(3) = 700
msGrid.ColWidth(4) = 800
msGrid.ColWidth(5) = 1600
msGrid.ColWidth(6) = 900
msGrid.TextMatrix(0, 1) = "Fecha"
msGrid.TextMatrix(0, 2) = "Descripción"
msGrid.TextMatrix(0, 3) = "D_C"
msGrid.TextMatrix(0, 4) = "Cant"
msGrid.TextMatrix(0, 5) = "Costo"
msGrid.TextMatrix(0, 6) = "Saldo"
msGrid.Redraw = False
For I = 1 To msGrid.Rows - 1
msGrid.Row = I
msGrid.Col = 4
msGrid.CellAlignment = flexAlignCenterCenter
msGrid.Col = 6
msGrid.CellAlignment = flexAlignCenterCenter
msGrid.TextMatrix(I, 5) = Format(msGrid.TextMatrix(I, 5), "currency")
Next I
msGrid.Redraw = True
End Sub
Hay un control check para poder escoger entre filtrar por mes y año o por rango de fechas
Private Sub chkPorFecha_Click()
If chkPorFecha.Value = 1 Then
DTFecha1.Enabled = True
DTFecha2.Enabled = True
Else
DTFecha1.Enabled = False
DTFecha2.Enabled = False
End If
End Sub El resto de los eventos
Private Sub cmdBuscar_Click()
Call Llenar_Grid
End Sub
Private Sub cmdCerrar_Click()
Unload Me
End Sub
Private Sub Form_Load()
cmdMeses.ListIndex = Format(Date, "mm") - 1
txtAnio.Text = Format(Date, "yyyy")
DTFecha1.Enabled = False
DTFecha2.Enabled = False
Call DatosProducto
Call Llenar_Grid
End Sub
Private Sub txtAnio_KeyPress(KeyAscii As Integer)
If SoloNumeros(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub Saludos, en este tutorial aprenderás a integrar tu aplicación de Visual Basic 6 con un…
Recientemente, muchos usuarios de Hotmail (ahora Outlook.com) han reportado un error al intentar iniciar sesión…
En este proyecto, vamos a desarrollar una calculadora sencilla usando Visual Basic 6, que permite…
6 de septiembre de 2024 - La demanda de desarrolladores de software sigue en aumento,…
En un movimiento histórico, la Unión Europea ha aprobado la primera ley de inteligencia artificial…
¿Sigues trabajando con Visual Basic 6 y necesitas una forma eficiente de acceder a tus…
Este sitio utiliza cookies desea activarlas
Ver Comentarios
HOLA, LA PREGUNTA ES EN QUE PARTE DEL FORMULARIO FrmProducto CREAR NUEVO PRODUCTO Y MODIFICAR PRODUCTO SE LLAMA al procedimiento FKardex para que guarde la modificación del detalle, cantidad existencia, costo, y saldo , por que en el vídeo no aparece, Y ME GUSTARÍA SABER COMO LLAMO ESE PROCEDIMIENTO PARA CARGAR KARDEX, MUCHAS GRACIAS POR LA CONCATENAN PRESTADA