Hola gente, tengo un problema, cuando hago la busqueda el xbrowse me muestra todos los registros iguales, el recordset tiene bien todos los registros correctos, o sea es un problema de muestra del xbrowse
DEFINE DIALOG oDlgStk RESOURCE "validastkw" TITLE "Consulta de Stock"
redefine get obusco var xbusco ID 171 picture "@!" on change ( ::assign(), oRS1 := buscosql( oBrw, xbusco, obusco, oRS1 ), oBrw:recset := ors1 ) of odlgSTK
REDEFINE combobox oOrden var xOrden items tOrden ID 212 on change ( xOrden := oOrden:nAt, CambioOrden( ors1 ,xorden), obusco:setfocus() ) OF odlgSTK
REDEFINE XBROWSE oBrw ID 181 recset oRS1 OF oDlgSTK FIELDS ;
iif ( ( oRS1:Fields( "disconti" ):Value ) = "S", "S", "N" ), ;
oRS1:Fields( "codigo" ):Value, ;
oRS1:Fields( "codbarra" ):Value, ; //oRS1:Fields( "descri" ):Value, ;
alltrim( oRS1:Fields( "descri" ):Value ) + iif ( ! empty( oRS1:Fields( "descri1" ):Value ), ( " " + alltrim( oRS1:Fields( "descri1" ):Value ) ), "" ), ;
substr( oRS1:Fields( "Nombre" ):Value, 1, 20 ), ;
str( round( oRS1:Fields( "costo" ):Value * iif ( oRS1:Fields( "porc_iva" ):Value = 0, ( 1 + ( xporc_iva / 100 ) ), ( oRS1:Fields( "porc_iva" ):Value / 100 ) + 1 ), 2 ) * oRS1:Fields( "cotiza" ):Value, 14, 2 ) , ;
oRS1:Fields( "um" ):Value , ;
dtoc( oRS1:Fields( "Fec_modi" ):Value) ;
headers "Discont", "Código", "Cód.Barra" , ;
oemtoansi( "Descripci¢n" ), "Ult. Proveedor", ;
"costo" , ;
"UM", , "Ult.Modif" ;
LINES CELL font ofont ON dblCLICK ( lsavek := .t., oDlgSTK:End() )
obrw:bKeyDown = { | nKey, nCol, nFlags | iif( nKey = K_ENTER, ( lsavek := .t., oDlgSTK:End() ), ) }
oBrw:nRowHeight := 35
REDEFINE BTNBMP 2007 prompt HB_UTF8CHR( 57611 ) + " Confirma " font oSegoe ID 120 OF oDlgStk ACTION ( lsave := .t., oDlgSTK:End() )
REDEFINE button btnMod ID 130 OF oDlgStk action (Editstock( oBrow, oCon, oRS1, oRS1:AbsolutePosition, .t. ), cSQL := wwcSQL) // Editstock( obrow, .t. )
REDEFINE button btnOK ID 4002 OF oDlgStk ACTION veoplan( precio_vta, 9, 0 )
REDEFINE button btnMod1 ID 992 OF oDlgStk ACTION ( lsave := .f., oDlgSTK:End() )
ACTIVATE DIALOG oDlgStk
Alguna idea que estoy haciendo mal?