- Code: Select all Expand view
if !pasaje("factura");return nil;endif
database oFac
oFac:setorder(3)
oFac:ordscope(0,nclia)
oFac:ordscope(1,nclia)
oFac:gotop()
// oFac:setfilter("paga" != "S" .and. "nota" != "C" .)
//FW_DbfToArray ( cFieldList, bFor, bWhile, nNext, nRec, lRest, aData )
//aRows := FW_DbfToArray( "DATE,TERMINAL,VALUE", { || FIELD->DATE = dDate } )
// aItems := fw_dbftoarray("fechida,nrofac,Importe,nota", { || paga != "S" .and. nota != "C" })
// oFac:deactivate()
do
if paga != "S" .and. nota != "C"
AAdd( aItems,{oFac:fechida,oFac:nrofac,oFac:importe, IIF(oFac:nota = "D", .t.,.f.)})
endif
oFac:skip()
until oFac:eof()
xbrNumFormat( "E", .T. )
DEFINE DIALOG odlg1 resource "DIA_ASOCIO1"
redefine xBrowse oBrw Of odlg1 array aItems ; // Columns 'fechida','nrofac','Importe' ;
columns {1,2,3,4};
Headers 'Fecha','Número', 'Abona','nota';
ColSizes 80,120,180,40 id 101 UpDate Cell AutoSort
With Object oBrw:InsCol(1)
:bEditValue := { || AScan( oBrw:aSelected, oBrw:BookMark ) > 0 }
:SetCheck()
:nHeadBmpNo := { || If( Len( oBrw:aSelected ) == oBrw:nLen, 1, 2 ) }
End
WITH OBJECT oBrw
:lDisplayZeros := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROWRC
:nStretchCol := STRETCHCOL_WIDEST
:bClrStd := {|| { RGB(0,0,0),colores( aItems[ oBrw:nat, 4 ] ) } }
:lColDividerComplete := .T.
:lAllowColHiding := .F.
:lRecordSelector := .F.
END WITH
oBrw:bLClicked := { |r,c,f,oBrw| If( oBrw:MouseColPos( c ) == 1 , ;
If( ( f := AScan( oBrw:aSelected, oBrw:BookMark ) ) == 0, ;
AAdd( oBrw:aSelected, oBrw:BookMark ), ;
ADel( oBrw:aSelected, f, .t. ) ), Nil ), ;
oBrw:RefreshCurrent() }
ACTIVATE DIALOG odlg1 ON INIT oBrw:gobottom()
etc
STATIC FUNCTION colores( lNota )
IF lNota
RETURN( RGB( 200,0,150 ) )
ELSE
RETURN( RGB( 255,255,255 ) )
ENDIF
RETURN NIL
etc
Con otros formularias no tengo ningún problema al usar :bClrStd
Muchas Gracias