- Code: Select all Expand view
- REDEFINE XBROWSE oLbx[1] ;
COLUMNS ID_CANRMT, ID_CANVTA, ID_CANART, ID_MERMAVTA, ID_MERMA, ID_NOMART, ID_PREVTA, ID_PREART, ID_VACART, ID_IMPART ;
PICTURES "@z 9999", "@z 9999", "@z 9999", "@z 9999", "@z 9999",, aCliente[ ID_PICTP ], aCliente[ ID_PICTP ], aCliente[ ID_PICTP ], aCliente[ ID_PICTI ] ;
HEADERS "Remito",;
"Vendidos",;
"A Liquidar",;
"Cargada",;
"A Liquidar",;
OTA("Art¡culo"),;
"Promedio",;
"A Liquidar",;
"Vacios"+CRLF+"a Liquidar",;
"IMPORTE" ;
FIELDSIZES 50, 50, 60, 50, 60, 180, 65, 65, 60, 70 ;
JUSTIFY AL_RIGHT,AL_RIGHT,AL_RIGHT,AL_RIGHT,AL_RIGHT,,AL_RIGHT,AL_RIGHT,AL_RIGHT,AL_RIGHT ;
ID 101 ;
OF oDlg ;
ARRAY aDatos ;
FASTEDIT
oLbx[1]:lFooter := .t.
oLbx[1]:lHScroll := .f.
oLbx[1]:nStretchCol := STRETCHCOL_LAST
oLbx[1]:nHeaderHeight:= 42
oLbx[1]:nHeader := 1
oLbx[1]:aHeaderTop := { "B U L T O S", "M E R M A", "P R E C I O" }
oLbx[1]:nColDividerStyle := LINESTYLE_BLACK
oLbx[1]:nRowDividerStyle := LINESTYLE_BLACK
AEVAL( oLbx[1]:aCols, { |o| ( o:nHeadStrAlign:= AL_CENTER,;
o:nHeaderType:= 0 ) } )
oLbx[1]:aCols[1]:nHeaderType := 2
oLbx[1]:aCols[2]:nHeaderType := 1
oLbx[1]:aCols[3]:nHeaderType := 1
oLbx[1]:aCols[4]:nHeaderType := 4
oLbx[1]:aCols[5]:nHeaderType := 1
oLbx[1]:aCols[6]:nHeaderType := 3
oLbx[1]:aCols[7]:nHeaderType := 2
oLbx[1]:aCols[8]:nHeaderType := 1
oLbx[1]:aCols[9]:nHeaderType := 3
oLbx[1]:aCols[1]:bFooter := { || TABSUM( aDatos, ID_CANRMT ) }
oLbx[1]:aCols[1]:lTotal := .t.
oLbx[1]:aCols[2]:bFooter := { || TABSUM( aDatos, ID_CANVTA ) }
oLbx[1]:aCols[2]:lTotal := .t.
oLbx[1]:aCols[3]:bFooter := { || TABSUM( aDatos, ID_CANART ) }
oLbx[1]:aCols[3]:lTotal := .t.
oLbx[1]:aCols[4]:bFooter := { || TABSUM( aDatos, ID_MERMAVTA ) }
oLbx[1]:aCols[4]:lTotal := .t.
oLbx[1]:aCols[5]:bFooter := { || TABSUM( aDatos, ID_MERMA ) }
oLbx[1]:aCols[5]:lTotal := .t.
if !Empty( oCol := oLbx[1]:oCol( OTA("Art¡culo") ) )
oCol:nHeadStrAlign:= AL_LEFT
endif
oLbx[1]:aCols[3]:nEditType := EDIT_GET
oLbx[1]:aCols[3]:bOnPostEdit := { |oCol, xValue, nLastKey| ;
If( nLastKey == 13, ;
if( xValue <= oLbx[1]:aRow[ID_CANRMT]-oLbx[1]:aRow[ID_MERMA],;
( oLbx[1]:aRow[ oCol:nArrayCol ] := xValue,;
oLbx[1]:aRow[ ID_IMPART ] := (xValue*oLbx[1]:aRow[ID_PREART])+oLbx[1]:aRow[ID_VACART],;
Totalex( aDeduce, oLbx[1]:aArrayData ),;
oLbx[2]:Refresh(), oLbx[1]:Refresh() ), ;
msgstop('La cantidad excede el stock recibido.','Error.') ), nil ) }
oLbx[1]:aCols[5]:nEditType := EDIT_GET
oLbx[1]:aCols[5]:bOnPostEdit := { |oCol, xValue, nLastKey| ;
If( nLastKey == 13, ;
if( xValue <= oLbx[1]:aRow[ID_CANRMT],;
( oLbx[1]:aRow[ oCol:nArrayCol ] := xValue,;
oLbx[1]:aRow[ ID_CANART ] := oLbx[1]:aRow[ID_CANRMT]-xValue,;
oLbx[1]:aRow[ ID_IMPART ] := (oLbx[1]:aRow[ ID_CANART ]*oLbx[1]:aRow[ID_PREART])+oLbx[1]:aRow[ID_VACART],;
Totalex( aDeduce, oLbx[1]:aArrayData ),;
oLbx[2]:Refresh(), oLbx[1]:Refresh() ), ;
msgstop('La Merma excede el stock recibido.','Error.') ), nil ) }
oLbx[1]:aCols[8]:nEditType := EDIT_GET
oLbx[1]:aCols[8]:bOnPostEdit := { |oCol, xValue, nLastKey| ;
If( nLastKey == 13, ;
( ;
oLbx[1]:aRow[ oCol:nArrayCol ] := xValue,;
oLbx[1]:aRow[ ID_IMPART ] := (xValue* oLbx[1]:aRow[ID_CANART])+oLbx[1]:aRow[ID_VACART],;
Totalex( aDeduce, oLbx[1]:aArrayData ),;
oLbx[2]:Refresh(), oLbx[1]:Refresh() ), ;
nil ) }
oLbx[1]:aCols[9]:nEditType := EDIT_GET
oLbx[1]:aCols[9]:bOnPostEdit := { |oCol, xValue, nLastKey| ;
If( nLastKey == 13, ;
( ;
oLbx[1]:aRow[ oCol:nArrayCol ] := xValue,;
oLbx[1]:aRow[ ID_IMPART ] := (oLbx[1]:aRow[ ID_CANART ]*oLbx[1]:aRow[ID_PREART])+xValue,;
Totalex( aDeduce, oLbx[1]:aArrayData ),;
oLbx[2]:Refresh(), oLbx[1]:Refresh() ), ;
nil ) }
oLbx[1]:aCols[10]:bFooter:= { || TABSUM( aDatos, ID_IMPART ) }
oLbx[1]:aCols[10]:lTotal := .t.
if my source is:
"bultos" + CRLF + "remito" the program run ok.
but with SuperHeader in column 1 to 3, if user click in this column, the text and header hide.
the column and text only show when i make refresh in all screen.
other problem:
in SuperHeader 2, text aligment to rigth, when all ist centered.