aCabe := { ;
{ 1, "Artículo", nil, 100 }, ;
{ 2, "Definición", nil, 200 }, ;
{ 3, "Cantidad", nil, 60 }, ;
{ 4, "Precio", nil, 65 }, ;
{ 5, "Dto.", nil, 40 }, ;
{ 6, "Total", nil, 70 }, ;
{ 7, "Lote", nil, 110 }, ;
{ 8, "PT", nil, 40 }, ;
{ 9, "Iva", nil, 60 }, ;
{ 10, "R.E.", nil, 40 }, ;
{ 11, "Ancho", nil, 55 }, ;
{ 12, "Alto", nil, 55 }, ;
{ 13, "Linea", nil, 35 }, ;
}
REDEFINE XBROWSE oBrw ID 6400 of oFld ;
COLUMNS aCabe lfastedit cell lines array aDatos
oBrw:aCols[ 1 ]:nEditType := 1
oBrw:aCols[ 2 ]:nEditType := 0
oBrw:aCols[ 3 ]:nEditType := 1
oBrw:aCols[ 4 ]:nEditType := 1
oBrw:aCols[ 5 ]:nEditType := 1
oBrw:aCols[ 6 ]:nEditType := 0
oBrw:aCols[ 7 ]:nEditType := 2
oBrw:aCols[ 8 ]:nEditType := 2
oBrw:aCols[ 9 ]:nEditType := 2
oBrw:aCols[ 10 ]:nEditType := 2
oBrw:aCols[ 11 ]:nEditType := 1
oBrw:aCols[ 12 ]:nEditType := 1
oBrw:aCols[ 13 ]:nEditType := 0
oBrw:aCols[ 7 ]:aEditListTxt := {}
oBrw:aCols[ 8 ]:aEditListTxt := {}
oBrw:aCols[ 9 ]:aEditListTxt := aPiva
oBrw:aCols[ 10 ]:aEditListTxt := aPre
oBrw:aCols[ 1 ]:bEditValid := {| oGet, oCol | ValidAlba( oGet, oCol, oBrw, @aDatos, @aPlot, @aPpt ) }
oBrw:acols[ 3 ]:bEditValid := {| oGet, oCol | Compsto( oGet, oCol, oBrw, @aDatos, @aPlot, @aPpt ) }
oBrw:aCols[ 5 ]:bEditValid := {| oGet, oCol | ValidTota( oGet, oCol, oBrw, @aDatos, oDlg ) }
oBrw:aCols[ 3 ]:bOnPostEdit := {| oCol, xVal, nKey | IF( nKey <> 27, ;
oBrw:selectcol( oBrw:ncolsel + 1 ), ), ;
IF ( articulo->m2, oBrw:selectcol( 11 ), ), ;
oBrw:refresh() }
oBrw:aCols[ 5 ]:bOnPostEdit := {| oCol, xVal, nKey | ;
IF( nKey <> 27 .OR. nKey = 13, ;
oCol:value := xVal, ), ;
IF( oBrw:nrowsel = Len( aDatos ), ;
NewAlb( @aDatos, oBrw ), ), ;
oBrw:GoDown(), oBrw:selectcol( 1 ) }
oBrw:aCols[ 8 ]:bOnPostEdit := {| | Cargalots( aDatos, oBrw ) }
oBrw:aCols[ 12 ]:bOnPostEdit := {| oCol, xVal, nKey | ;
IF( nKey <> 27 .OR. nKey = 13, ;
oCol:value := xVal, ), ;
oBrw:selectcol( 4 ) }
// :nMarqueeStyle := MARQSTYLE_HIGHLROW // NO PERMITE EDICION CELDA AUTO.
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .T.
oBrw:lFastEdit := .T.
oBrw:lAutoAppend := .T.
oBrw:lHScroll := .F.