#include "FiveWin.ch"
FUNCTION Main
LOCAL oWnd
LOCAL oBrw1
LOCAL aMedi
LOCAL aVars := { 4, if( dOW( date() + 1 ) != 1, date() + 1, date() + 2 ), 1 }
LOCAL aTota := array( 10 )
LOCAL nI, nJ
aMedi := {;
{ 'PADARIA IDEAL ','0289','PDVs RAPIDO LOG ','ROTA 0001 ','0000',' ',' ',12,0,' ',' ',' ',' ',0,0 },;
{ 'BANCA DE REVISTA (DANILO) ','0295','PDVs RAPIDO LOG ','ROTA 0001 ','0000',' ',' ',10,0,' ',' ',' ',' ',0,0 },;
{ 'PADARIA NARJARA ','0505','PDVs RAPIDO LOG ','ROTA 0001 ','0000',' ',' ',15,0,20,0,' ',' ',0,0 },;
{ 'DELICIA DO TRIGO ','0303','PDVs RAPIDO LOG ','ROTA 0001 ','0001',' ',' ',10,10,10,10,10,10,10,12 },;
{ 'TOTOLEC ','0298','PDVs RAPIDO LOG ','ROTA 0001 ','0002',' ',' ',50,50,50,50,50,50,50,60 },;
{ 'BANCA CANTINHO DO LEITOR ','0299','PDVs RAPIDO LOG ','ROTA 0001 ','0003',' ',' ',10,10,15,13,15,15,13,16 },;
{ 'PANIFICADORA RAVELLY ','0504','PDVs RAPIDO LOG ','ROTA 0001 ','0004',' ',' ',5,5,5,5,10,10,7,8 },;
{ 'BANCA DA VIVI ','0013','PDVs RAPIDO LOG ','ROTA 0001 ','0005',' ',' ',6,4,6,5,6,6,5,6 },;
{ 'BANCA DISNEYLANDIA II ','0012','PDVs RAPIDO LOG ','ROTA 0001 ','0006',' ',' ',8,3,8,5,8,8,5,6 },;
{ 'BANCA PONTO CULTURAL ','0009','PDVs RAPIDO LOG ','ROTA 0001 ','0007',' ',' ',5,3,5,3,5,5,4,5 },;
{ 'BANCA AUGE ','0008','PDVs RAPIDO LOG ','ROTA 0001 ','0008',' ',' ',5,3,5,5,5,5,4,5 },;
{ 'BANCA SÃO GERARDO ','0007','PDVs RAPIDO LOG ','ROTA 0001 ','0009',' ',' ',10,7,10,9,10,10,9,11 },;
{ 'BANCA PARADA DO LEITOR ','0025','PDVs RAPIDO LOG ','ROTA 0001 ','0010',' ',' ',10,6,10,6,10,10,7,8 },;
{ 'BANCA DA CAIXA ','0023','PDVs RAPIDO LOG ','ROTA 0001 ','0011',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'BANCA PRAÇA OTAVIO BONFIM ','0027','PDVs RAPIDO LOG ','ROTA 0001 ','0012',' ',' ',25,23,25,21,25,25,23,28 },;
{ 'BANCA LIBERDADE ','0026','PDVs RAPIDO LOG ','ROTA 0001 ','0013',' ',' ',10,5,10,5,10,10,7,8 },;
{ 'BANCA O LOURO ','0024','PDVs RAPIDO LOG ','ROTA 0001 ','0014',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'BANCA SÃO FRANCISCO ','0181','PDVs RAPIDO LOG ','ROTA 0001 ','0015',' ',' ',12,10,12,6,12,12,9,11 },;
{ 'BANCA RECREIO E CIA ','0201','PDVs RAPIDO LOG ','ROTA 0001 ','0016',' ',' ',5,5,5,4,5,5,5,6 },;
{ 'PÃO DA PRAÇA ','0290','PDVs RAPIDO LOG ','ROTA 0001 ','0017',' ',' ',30,13,15,15,15,15,14,17 },;
{ 'FRIGORIFICO PADRÃO ','0296','PDVs RAPIDO LOG ','ROTA 0001 ','0018',' ',' ',15,0,15,5,15,15,7,8 },;
{ 'BANCA DOS NAVEGANTES ','0197','PDVs RAPIDO LOG ','ROTA 0001 ','0019',' ',' ',6,2,6,0,6,6,3,4 },;
{ 'MERCANTIL JOSÉ CLEMIRTON ','0292','PDVs RAPIDO LOG ','ROTA 0001 ','0020',' ',' ',10,7,10,2,10,10,6,7 },;
{ 'ARMARINHO E PAPELARIA PAPIRUS ','0302','PDVs RAPIDO LOG ','ROTA 0001 ','0021',' ',' ',5,5,5,0,5,5,3,4 },;
{ 'MERCADINHO SUPERCENTER ','0293','PDVs RAPIDO LOG ','ROTA 0001 ','0022',' ',' ',25,25,25,25,25,25,25,30 },;
{ 'MERCANTIL O TIÃO ','0300','PDVs RAPIDO LOG ','ROTA 0001 ','0023',' ',' ',10,4,10,9,10,10,8,10 },;
{ 'BAR E RESTAURANTE CRATEÚS ','0301','PDVs RAPIDO LOG ','ROTA 0001 ','0024',' ',' ',10,10,10,10,10,10,10,12 },;
{ 'BANCA LAGOINHA ','0209','PDVs RAPIDO LOG ','ROTA 0001 ','0025',' ',' ',20,20,20,20,20,20,20,24 },;
{ 'FARMACIA FORT-DROGA ','0297','PDVs RAPIDO LOG ','ROTA 0001 ','0026',' ',' ',25,0,10,0,10,10,3,4 },;
{ 'CORREIOS SHOPPING METRO ','0294','PDVs RAPIDO LOG ','ROTA 0001 ','0027',' ',' ',10,6,10,6,10,10,7,8 },;
{ 'BANCA PE CICERO PÇA JOSÉ ALENCAR ','0219','PDVs RAPIDO LOG ','ROTA 0001 ','0028',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'BANCA SANTOS ','0182','PDVs RAPIDO LOG ','ROTA 0001 ','0029',' ',' ',15,13,15,15,15,15,14,17 },;
{ 'BANCA O PAIVA ','0183','PDVs RAPIDO LOG ','ROTA 0001 ','0030',' ',' ',30,26,30,18,30,30,25,30 },;
{ 'BANCA O FERNANDO ','0184','PDVs RAPIDO LOG ','ROTA 0001 ','0031',' ',' ',5,5,5,0,5,5,3,4 },;
{ 'BANCA IRACEMA ','0185','PDVs RAPIDO LOG ','ROTA 0001 ','0032',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'BANCA DIMAS ','0291','PDVs RAPIDO LOG ','ROTA 0001 ','0033',' ',' ',10,0,10,10,10,10,7,8 },;
{ 'BANCA DO TEATRO ','0602','PDVs RAPIDO LOG ','ROTA 0001 ','0034',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'BANCA CENTRAL DOS CONCURSOS ','0208','PDVs RAPIDO LOG ','ROTA 0001 ','0035',' ',' ',10,10,10,9,10,10,10,12 },;
{ 'BANCA RAIV ','0207','PDVs RAPIDO LOG ','ROTA 0001 ','0036',' ',' ',20,20,10,10,10,10,13,16 },;
{ 'BANCA DO ERNANE ','0188','PDVs RAPIDO LOG ','ROTA 0001 ','0037',' ',' ',10,10,20,20,20,20,17,20 },;
{ 'BANCA RCD ','0041','PDVs RAPIDO LOG ','ROTA 0002 ','0001',' ',' ',7,7,7,6,7,7,7,8 },;
{ 'PANIFICADORA PÃO NOSSO ','0306','PDVs RAPIDO LOG ','ROTA 0002 ','0002',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'MERCADINHO EDVAN ','0305','PDVs RAPIDO LOG ','ROTA 0002 ','0003',' ',' ',10,10,10,7,10,10,9,11 },;
{ 'MERCADINHO N. S. DE FATIMA ','0309','PDVs RAPIDO LOG ','ROTA 0002 ','0004',' ',' ',10,10,10,5,10,10,8,10 },;
{ 'BANCA O POVO ','0180','PDVs RAPIDO LOG ','ROTA 0002 ','0005',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'BANCA FLOR DE LIS ','0204','PDVs RAPIDO LOG ','ROTA 0002 ','0006',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'BANCA CLAUDIA ','0054','PDVs RAPIDO LOG ','ROTA 0002 ','0007',' ',' ',7,7,7,2,7,7,5,6 },;
{ 'BANCA RIOS ','0050','PDVs RAPIDO LOG ','ROTA 0002 ','0008',' ',' ',7,7,7,5,7,7,6,7 },;
{ 'BANCA O CLAUDIO ','0203','PDVs RAPIDO LOG ','ROTA 0002 ','0009',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'BANCA SANTA RITA ','0052','PDVs RAPIDO LOG ','ROTA 0002 ','0010',' ',' ',10,10,10,7,10,10,9,11 },;
{ 'BOX TELECARD / A. MOURÃO ','0458','PDVs RAPIDO LOG ','ROTA 0002 ','0011',' ',' ',10,10,10,9,10,10,10,12 },;
{ 'BELAS BALAS ','0459','PDVs RAPIDO LOG ','ROTA 0002 ','0012',' ',' ',15,15,12,12,12,12,13,16 },;
{ 'LOJA DA COMUNICAÇAO ','0460','PDVs RAPIDO LOG ','ROTA 0002 ','0013',' ',' ',15,15,12,9,12,12,12,14 },;
{ 'BANCA ESTAÇAO ','0044','PDVs RAPIDO LOG ','ROTA 0002 ','0014',' ',' ',15,15,15,15,15,15,15,18 },;
{ 'BANCO DO GIRO ','0045','PDVs RAPIDO LOG ','ROTA 0002 ','0016',' ',' ',10,10,7,7,7,7,8,10 },;
{ 'BANCA POLIESPORTIVA ','0053','PDVs RAPIDO LOG ','ROTA 0002 ','0017',' ',' ',7,7,5,4,5,5,5,6 },;
{ 'BANCA RD (VALDEMIR) ','0051','PDVs RAPIDO LOG ','ROTA 0002 ','0018',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'BANCA DA FRAN ','0046','PDVs RAPIDO LOG ','ROTA 0002 ','0019',' ',' ',7,7,5,5,5,5,6,7 },;
{ 'NILOPAN ','0324','PDVs RAPIDO LOG ','ROTA 0002 ','0020',' ',' ',8,8,8,3,8,8,6,7 },;
{ 'BANCA PARQUE CULTURAL ','0047','PDVs RAPIDO LOG ','ROTA 0002 ','0021',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'BANCA MARAPONGA ','0048','PDVs RAPIDO LOG ','ROTA 0002 ','0022',' ',' ',7,7,7,5,7,7,6,7 },;
{ 'BANCA DO FELIPE J.W ','0062','PDVs RAPIDO LOG ','ROTA 0002 ','0023',' ',' ',8,8,8,3,8,8,6,7 },;
{ 'BAIANO VARIEDADES ','0320','PDVs RAPIDO LOG ','ROTA 0002 ','0023',' ',' ',8,8,15,15,15,15,13,16 },;
{ 'LANCHONETE VITA D FRUTA ','0323','PDVs RAPIDO LOG ','ROTA 0002 ','0024',' ',' ',8,8,5,2,5,5,5,6 },;
{ 'PANIFICADORA MEDALHA DE OURO ','0322','PDVs RAPIDO LOG ','ROTA 0002 ','0025',' ',' ',8,8,8,7,8,8,8,10 },;
{ 'BANCA MART MODA ','0049','PDVs RAPIDO LOG ','ROTA 0002 ','0026',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'LOTERIA ROCHA (Gilmaria) ','0326','PDVs RAPIDO LOG ','ROTA 0002 ','0027',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'PANIFICADORA DONA ADELIA ','0325','PDVs RAPIDO LOG ','ROTA 0002 ','0028',' ',' ',7,7,7,5,7,7,6,7 },;
{ 'MERCADINHO FREITAS ','0312','PDVs RAPIDO LOG ','ROTA 0002 ','0029',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'MERCADINHO MARCOS FREIRES ','0311','PDVs RAPIDO LOG ','ROTA 0002 ','0030',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'MERCADINHO CHEIRO VERDE ','0318','PDVs RAPIDO LOG ','ROTA 0002 ','0031',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'BANCA O MENINO ','0060','PDVs RAPIDO LOG ','ROTA 0002 ','0032',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'AGENCIA DOS SONHOS 2 AV. G ','0315','PDVs RAPIDO LOG ','ROTA 0002 ','0033',' ',' ',10,10,10,5,10,10,8,10 },;
{ 'BANCA FELIPE PARANGABA ','0043','PDVs RAPIDO LOG ','ROTA 0002 ','0034',' ',' ',15,15,15,15,15,15,15,18 },;
{ 'BANCA TIAGO ','0058','PDVs RAPIDO LOG ','ROTA 0002 ','0035',' ',' ',8,8,5,1,5,5,5,6 },;
{ 'BANCA KDYN ','0057','PDVs RAPIDO LOG ','ROTA 0002 ','0036',' ',' ',15,15,15,7,15,15,12,14 },;
{ 'BANCA JAJÁ ','0056','PDVs RAPIDO LOG ','ROTA 0002 ','0037',' ',' ',15,15,15,12,15,15,14,17 },;
{ 'BANCA DAMATRIZ ','0059','PDVs RAPIDO LOG ','ROTA 0002 ','0038',' ',' ',5,5,5,0,5,5,3,4 },;
{ 'MERCADINHO DIA A DIA ','0313','PDVs RAPIDO LOG ','ROTA 0002 ','0039',' ',' ',6,6,6,4,6,6,5,6 },;
{ 'AGENCIA DOS SONHOS 1 AV . J ','0314','PDVs RAPIDO LOG ','ROTA 0002 ','0040',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'BANCA EDSON ','0055','PDVs RAPIDO LOG ','ROTA 0002 ','0041',' ',' ',7,7,7,5,7,7,6,7 },;
{ 'QUALY PAN ','0317','PDVs RAPIDO LOG ','ROTA 0002 ','0042',' ',' ',10,10,10,7,10,10,9,11 },;
{ 'BANCA OPÇÃO ','0061','PDVs RAPIDO LOG ','ROTA 0002 ','0043',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'PANIFICADORA GEISA ','0310','PDVs RAPIDO LOG ','ROTA 0002 ','0044',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'AGENCIA DOS SONHOS 3 N ','0316','PDVs RAPIDO LOG ','ROTA 0002 ','0045',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'DROGARIA RAMOS ','0319','PDVs RAPIDO LOG ','ROTA 0002 ','0046',' ',' ',10,10,10,10,10,10,10,12 },;
{ 'PANIFICADORA E CONFEITARIA SÃO JOSÉ ','0346','PDVs RAPIDO LOG ','ROTA 0003 ','0001',' ',' ',10,10,10,8,10,10,9,11 },;
{ 'BANCA CAJAZEIRAS ','0063','PDVs RAPIDO LOG ','ROTA 0003 ','0002',' ',' ',15,15,15,11,15,15,14,17 },;
{ 'BANCA CASA DE LER ','0085','PDVs RAPIDO LOG ','ROTA 0003 ','0003',' ',' ',8,8,8,4,8,8,7,8 },;
{ 'MERCADINHO DO BAIRRO ','0341','PDVs RAPIDO LOG ','ROTA 0003 ','0004',' ',' ',5,5,5,4,5,5,5,6 },;
{ 'BANCA AVENIDA ','0083','PDVs RAPIDO LOG ','ROTA 0003 ','0005',' ',' ',8,8,8,5,8,8,7,8 },;
{ 'BANCA NS SRA DA GLORIA ','0087','PDVs RAPIDO LOG ','ROTA 0003 ','0006',' ',' ',8,8,8,3,8,8,6,7 },;
{ 'ABENÇOADA ','0073','PDVs RAPIDO LOG ','ROTA 0003 ','0027',' ',' ',' ',' ',5,2,5,5,4,5 },;
{ 'BANCA LUA VITORIA ','0084','PDVs RAPIDO LOG ','ROTA 0003 ','0007',' ',' ',10,10,10,7,10,10,9,11 },;
{ 'BANCA PE CICERO ','0072','PDVs RAPIDO LOG ','ROTA 0003 ','0009',' ',' ',5,5,5,2,5,5,4,5 },;
{ 'FARMACIA DESCONTO ','0343','PDVs RAPIDO LOG ','ROTA 0003 ','0010',' ',' ',10,10,10,4,10,10,8,10 },;
{ 'PANIFICADORA PÃO DA VIDA ','0345','PDVs RAPIDO LOG ','ROTA 0003 ','0011',' ',' ',10,10,10,9,10,10,10,12 },;
{ 'BANCA DO NAMI ','0071','PDVs RAPIDO LOG ','ROTA 0003 ','0012',' ',' ',5,5,5,0,5,5,3,4 },;
{ 'BANCA PINIEL ','0069','PDVs RAPIDO LOG ','ROTA 0003 ','0037',' ',' ',5,5,5,1,5,5,4,5 },;
{ 'FRIGORIFICO O CATO ','0342','PDVs RAPIDO LOG ','ROTA 0003 ','0037',' ',' ',' ',' ',' ',' ',' ',' ',0,0 },;
{ 'BANCA TOTOLEC ','0075','PDVs RAPIDO LOG ','ROTA 0003 ','0039',' ',' ',5,5,5,4,5,5,5,6 },;
{ 'AMC FERRAGENS ','0339','PDVs RAPIDO LOG ','ROTA 0003 ','0040',' ',' ',5,5,5,5,5,5,5,6 },;
{ 'BANCA ARRUDA ','0103','PDVs RAPIDO LOG ','ROTA 0004 ','0001',' ',' ',6,6,6,5,6,6,6,7 },;
{ 'BANCA ZACA ','0122','PDVs RAPIDO LOG ','ROTA 0004 ','0002',' ',' ',10,10,10,10,10,10,10,12 },;
{ 'ALDEMIR ANTUNES DA COSTA ','0104','PDVs RAPIDO LOG ','ROTA 0004 ','0003',' ',' ',6,6,6,6,6,6,6,7 },;
{ 'BANCA ARCANJO ','0105','PDVs RAPIDO LOG ','ROTA 0004 ','0004',' ',' ',6,6,6,6,6,6,6,7 },;
{ 'BANCA DE REVISTA 2 ','0132','PDVs RAPIDO LOG ','ROTA 0004 ','0005',' ',' ',5,5,5,3,5,5,4,5 },;
{ 'BANCA POLLYANA ','0118','PDVs RAPIDO LOG ','ROTA 0004 ','0006',' ',' ',8,8,8,4,8,8,7,8 },;
{ 'BANCA DE REVISTA 1 ','0099','PDVs RAPIDO LOG ','ROTA 0004 ','0007',' ',' ',5,5,5,0,5,5,3,4 },;
{ 'PADARIA IDEAL RUI BARBOSA ','0353','PDVs RAPIDO LOG ','ROTA 0004 ','0008',' ',' ',30,30,30,27,30,30,29,35 },;
{ 'BANCA NORDESTE ','0097','PDVs RAPIDO LOG ','ROTA 0004 ','0009',' ',' ',8,8,8,0,8,8,5,6 } }
aTota := array( 2 + aVars[ 1 ] * 2 )
aFill( aTota, 0 )
FOR nI := 1 TO len( aMedi )
FOR nJ := 1 TO ( 2 + aVars[ 1 ] * 2 )
aTota[ nJ ] += val( hb_ValToStr( aMedi[ nI, nJ + 5 ] ) )
NEXT
NEXT
// DEFINE WINDOW oWnd MDICHILD OF WndMain() TITLE "Sugestão de repartes"
DEFINE WINDOW oWnd TITLE "Sugestão de repartes"
@ 0,0 XBROWSE oBrw1
oBrw1:SetArray( aMedi, .T. )
oBrw1:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw1:lFastEdit := .T.
oBrw1:aCols[ 1 ]:cHeader := "PONTO DE VENDA"
oBrw1:aCols[ 1 ]:nWidth := 230
oBrw1:aCols[ 2 ]:cHeader := "CÓDIGO"
oBrw1:aCols[ 3 ]:cHeader := "ÁREA"
oBrw1:aCols[ 3 ]:nWidth := 125
oBrw1:aCols[ 4 ]:cHeader := "ROTA"
oBrw1:aCols[ 4 ]:nWidth := 125
oBrw1:aCols[ 5 ]:cHeader := "POSIÇÃO"
oBrw1:aCols[ 5 ]:nWidth := 60
oBrw1:aCols[ 5 ]:nDataStrAlign := AL_CENTER
oBrw1:aCols[ 2 ]:hide()
FOR nI := 1 TO aVars[ 1 ]
oBrw1:aCols[ 4 + ( nI * 2 ) ]:cHeader := "REPARTE"
oBrw1:aCols[ 4 + ( nI * 2 ) ]:nFootStrAlign := AL_RIGHT
oBrw1:aCols[ 4 + ( nI * 2 ) ]:nHeadStrAlign := AL_CENTER
oBrw1:aCols[ 4 + ( nI * 2 ) ]:nWidth := 55
oBrw1:aCols[ 4 + ( nI * 2 ) ]:lTotal := .T.
oBrw1:aCols[ 4 + ( nI * 2 ) ]:nTotal := aTota[ ( nI * 2 ) - 1 ]
oBrw1:aCols[ 5 + ( nI * 2 ) ]:cHeader := "VENDA"
oBrw1:aCols[ 5 + ( nI * 2 ) ]:nFootStrAlign := AL_RIGHT
oBrw1:aCols[ 5 + ( nI * 2 ) ]:nHeadStrAlign := AL_CENTER
oBrw1:aCols[ 5 + ( nI * 2 ) ]:nWidth := 55
oBrw1:aCols[ 5 + ( nI * 2 ) ]:lTotal := .T.
oBrw1:aCols[ 5 + ( nI * 2 ) ]:nTotal := aTota[ nI * 2 ]
oBrw1:SetGroupHeader( dToC( aVars[ 2 ] - ( 7 * aVars[ 1 ] ) + ( 7 * ( nI - 1 ) ) ), 4 + ( nI * 2 ), 5 + ( nI * 2 ), )
NEXT nI
oBrw1:aCols[ 6 + ( aVars[ 1 ] * 2 ) ]:cHeader := "MÉDIA"
oBrw1:aCols[ 6 + ( aVars[ 1 ] * 2 ) ]:nWidth := 60
oBrw1:aCols[ 6 + ( aVars[ 1 ] * 2 ) ]:lTotal := .T.
oBrw1:aCols[ 6 + ( aVars[ 1 ] * 2 ) ]:nTotal := aTota[ len( aTota ) - 1 ]
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:cHeader := "SUGESTÃO"
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:nWidth := 68
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:nEditType := EDIT_GET
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:cEditPicture := "99999"
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:lTotal := .T.
oBrw1:aCols[ 7 + ( aVars[ 1 ] * 2 ) ]:nTotal := aTail( aTota )
oBrw1:nStretchCol := STRETCHCOL_WIDEST
oBrw1:nFreeze := 3
oBrw1:l2007 := .T.
oBrw1:lFooter := .T.
oBrw1:RefreshFooters()
oBrw1:CreateFromCode()
oWnd:oClient := oBrw1
BtnBar( oBrw1, aMedi, aVars )
//ACTIVATE WINDOW oWnd MAXIMIZED ON INIT ( oBrw1:SetFocus() ) VALID ( pdv2->( dbCloseArea() ), .T. )
ACTIVATE WINDOW oWnd ON INIT ( oBrw1:SetFocus() ) // MAXIMIZED
RETURN NIL
STATIC FUNCTION BtnBar( oBrw1, aShow, aVars )
LOCAL oBar, oCodp
LOCAL cCodp := space( 4 )
LOCAL oFont
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -12
DEFINE BUTTONBAR oBar OF oBrw1:oWnd SIZE 65,65 2007
DEFINE BUTTON OF oBar RESOURCE "PRINT64X64" TOP NOBORDER ACTION oBrw1:Report( " SUGESTÃO DE REPARTE PARA " + dToC( aVars[ 2 ] ) ) TOOLTIP { "Imprimir na impressora padrão", "Impressão" } PROMPT "Imprimir"
DEFINE BUTTON OF oBar RESOURCE "EXCEL64X64" TOP NOBORDER ACTION oBrw1:ToExcel() TOOLTIP { "Exporta para o Excel", "Excel" } PROMPT "Excel"
//DEFINE BUTTON OF oBar RESOURCE "SAVE64X64" TOP NOBORDER ACTION MsgMeter( { | oMeter | SalvaSugestao( oMeter, aShow, aVars[ 2 ] ) }, "Salvando os repartes ...", "Aguarde", .F. ) TOOLTIP { "Salva os repartes sugeridos", "Salvar" } //PROMPT "Excel"
//@ 15, 350 DBCOMBO oCodp VAR cCodp ALIAS "PDV2" ITEMFIELD "CODP" LISTFIELD "NOME" SIZE 300,200 OF oBar PIXEL ON CHANGE ( Posiciona( cCodp, oBrw1:oWnd, aShow ) ) FONT oFont
oFont:End()
RETURN oBar