by cdmmaui » Sat Jan 12, 2008 10:37 pm
Here is the source.
DEFINE DIALOG oDlg RESOURCE "FRTLIST"
REDEFINE GET aGet[01] VAR cFile ID 101 OF oDlg PICTURE "@!" WHEN .F.
REDEFINE GET aGet[02] VAR nFlparty ID 102 OF oDlg PICTURE "9" ;
VALID ( lPass := _FlOk( nFlParty, @nShare, @nInvCnt, cGroupon, cFlkey, cMbl, oLbx2 ), aGet[03]:Refresh(), lPass )
REDEFINE GET aGet[03] VAR nShare ID 103 OF oDlg PICTURE "99.99" ;
VALID ( lPass := _FlOk2( nShare ), aGet[03]:Refresh(), lPass )
REDEFINE GET aGet[04] VAR cMbl ID 104 OF oDlg PICTURE "@!" WHEN .F.
REDEFINE GET aGet[05] VAR cHbl ID 105 OF oDlg PICTURE "@!" WHEN .F.
REDEFINE COMBOBOX aGet[06] VAR cFlRem ID 106 ITEMS aFlRem OF oDlg ;
VALID ( lPass := _FlOk3( cGroupon, cFlkey, cFlRem ), lPass )
SELECT invoice
SET ORDER TO TAG S7
GO TOP
SEEK cFlkey
SET FILTER TO ( invoice->flkey = cFlkey )
REDEFINE LISTBOX oLbx2 FIELDS invoice->type , ;
invoice->flkey , ;
invoice->invoice , ;
DTOC( invoice->invdate ) , ;
TRANSF( invoice->totamt, "9,999,999.99" ) , ;
TRANSF( invoice->totcst, "9,999,999.99" ) , ;
IF( invoice->flprt, "PRINTED","NOT-PRINTED") , ;
invoice->fluser , ;
invoice->fldate , ;
invoice->fltime ;
ID 6000 ;
HEADERS "Type", "F/L Key", "CR/DB No.", "Ref Date", "Revenue", "Outlay", "Status", "F/L User", "Date", "Time" ;
FIELDSIZES 75 , 125 , 125 , 85 , 100 , 100 , 100 , 100 , 85 , 85 ;
SELECT invoice->flkey FOR cFlkey ;
ON DBLCLICK ( EditFl( .F., invoice->file ), _Lbx( oLbx2 ) ) ;
ON CHANGE ( nShare := invoice->flper, aGet[03]:Refresh() ) ;
OF oDlg
REDEFINE BUTTON ID 200 OF oDlg ACTION ( EditFl( .F., invoice->file ), _Lbx( oLbx2 ) )
REDEFINE BUTTON ID 201 OF oDlg ACTION _StmPrt( oLbx, nFlParty, invoice->( recno() ) )
REDEFINE BUTTON ID 202 OF oDlg ACTION (lQuit := .T., oDlg:End())
ACTIVATE DIALOG oDlg CENTERED