<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{90,98,1022,598}</property>
    <property name="Name">[sccrcli.scr]</property>
    <property name="Caption">[Clientes/Empresas Conveniadas]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Font">
      <font name="Verdana" width="0" height="-13" weight="400"/>
    </property>
    <property name="FormType">[dlgModal]</property>
    <property name="Modal">.F.</property>
    <property name="ScopeVarObj">[Private]</property>
    <property name="lClipper">.T.</property>
    <property name="lExitOnEnter">.F.</property>
    <property name="lExitOnESC">.T.</property>
    <property name="Variables">{.....}</property>
    <property name="FromStyle">[Center]</property>
    <property name="Clipsiblings">.F.</property>
    <property name="Clipchildren">.F.</property>
    <property name="TitleBar">.T.</property>
    <property name="StyleBorder">[3 - Sizable (Default)]</property>
    <property name="nBackColor">14215660</property>
    <property name="Icon">[]</property>
    <property name="Bitmap">[icon\tela.jpg]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.T.</property>
    <property name="Minimizebox">.F.</property>
    <property name="Maximizebox">.T.</property>
    <property name="AbsAlignment">.T.</property>
    <property name="WindowState">[1 - Normal (Default)]</property>
    <property name="minHeight">-1</property>
    <property name="maxHeight">-1</property>
    <property name="minWidth">-1</property>
    <property name="maxWidth">-1</property>
    <property name="ScrollBars">[0 - None (Default)]</property>
    <property name="DSControl">.F.</property>
  </style>
  <method name="onDlgInit">
    <![CDATA[parameters oDlg

//skel VARIAVEL zRecnCli := SCCRCLI->(Recno())
//skel VARIAVEL zSelCli  := SCCRCLI->(lTrim(Str(Select(),3)))
//skel VARIAVEL zNumOsSelecionada := 0
//skel variavel zbOpenAll = #TEXTO_FONTE
//skel      DbCloseAll()
//skel      Abra_Arq("SCCRCLI",,zSelCli,r_siga)
//skel      ABRA("0NOIDX", r_siga, "OSOT", "OSOT", "OSOT", "CR_COD_CLI")
//skel      ABRA("0NOIDX", r_siga, sf_pn, "SF_PN", sf_pn_cli, "FCLI")
//skel      ABRA("0NOIDX", r_siga, "SCCRDUP", "SCCRDUP", "SCCRDUP", "STRZERO(CR_COD_CLI,6)+DTOS(CR_DT_EMIS)")
//skel      DbSelectArea("SCCRCLI")
//skel      DbGoto(zRecnCli)
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zbAction := {|bFunction| zRecnCli:=Sccrcli->(Recno()), eVal(bFunction), eVal(zbOpenAll), DobRefresh()}
//skel VARIAVEL zbStatus := {|| osot->(if(fatprecno=0,"Sem_DAV",if(day(fDataSai)>0,"Faturado","ComPedido")))}
//skel VARIAVEL zbPrtOs  := {|| zNumOsSelecionada:=OsOt->fNumOs, Relat('lst_exec("OSOT")','nb','NaoFecheTabelasNaSaida','X') }
//skel variavel znil     := eVal(zbOpenAll) 
//skel variavel zFgConfirmouGerarPedido:=.f.
//skel 
//skel variavel ztEmi=0
//skel variavel ztVc=0
//skel variavel ztAv=0
//skel VARIAVEL ztAvHoje=0
//skel 
//skel VARIAVEL zbCor0 = ""
//skel VARIAVEL zbCor = ""
//skel VARIAVEL zbCor2 = ""
//skel VARIAVEL znAzul0:=16711680
//skel VARIAVEL znAzul1:=10027008
//skel VARIAVEL zAzul2:=16776960
//skel VARIAVEL zWhite:=16777215
//skel VARIAVEL zBlack:=0
//skel VARIAVEL zRed:=255
//skel VARIAVEL zGreen:=32768
//skel VARIAVEL znCinza:=8421504
//skel VARIAVEL zYellow:=65535
//skel 
//skel VARIAVEL zCorVc := {zRed,zWhite,zWhite,zRed}
//skel VARIAVEL zCorHoje:= {znAzul0,zWhite,zWhite,znAzul0}
//skel VARIAVEL zCorAv:= {8388736,zWhite,zWhite,8388736}
//skel VARIAVEL zCorQtOk:={zGreen,zWhite,zWhite,zGreen}
//skel 
//skel variavel z_BlkF9 = #TEXTO_FONTE
//skel    Private zSele:=Select(), zCodTb:=cr_tabela, zTabFile:='VB_PR'+StrZero(zCodTb,2)+if(cr_TabGp='S','G','P'), zTbBrow:='SE_PROM'+if(cr_TabGp='S','G','P')
//skel    if xFile(R_siga+zTabFile-".dbf")
//skel       Abra("0",R_SIGA,zTabFile,"SE_PROM",zTabFile,if(cr_TabGp="S","GRUPO","PCOD"))
//skel       Brow_Db(zTbBrow,.t.)
//skel       Se_prom->(DbCloseArea())
//skel    else
//skel       Alert("Tabela Inexistente...Crie-a pela Opcao Precos Promocionais do Estoque...")
//skel    endif
//skel    DbSelectArea(zSele)
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zBlkDelete = #TEXTO_FONTE
//skel    if Alert( "Confirma cancelar ficha do cliente ("+Str(SccrCli->Cr_Cod_Cli,6)+") "+AllTrim(SccrCli->Cr_Nome)+" ?",{"1.Sim","2.Nao"},"B/W")=1
//skel       DebCli(SccrCli->Cr_Cod_Cli,,,@ztEmi)
//skel       if ztEmi=0
//skel          SccrCli->(Tb_Del(W_dOb))
//skel       else
//skel          Alert("O Cliente "+AllTrim(SccrCli->Cr_Nome)+" NAO PODE SER CANCELADO pois possui Emissoes...")
//skel       endif
//skel    endif
//skel #FIM_TEXTO_FONTE
//skel 
//skel variavel zBlkCompras = #TEXTO_FONTE
//skel    Private m_fcli:=if(Cr_Cod_Cli=0.or.Cr_Cod_Cli<>Recno(),Recno(),Cr_Cod_Cli)
//skel    if Cr_Cod_Cli<>Recno()
//skel       alert('Cr_Cod_Cli<>Recno()')
//skel    endif
//skel    DebCli(m_fcli,.t.,,@ztEmi,@ztVc,@ztAv)
//skel    if ztEmi=0
//skel       Alert("O Cliente ("+Str(SccrCli->Cr_Cod_Cli,6)+") "+AllTrim(SccrCli->Cr_Nome)+" nao possui Emissoes no Cadastro de Duplicatas...",,"R/W")
//skel    else
//skel       ABRA("0NOIDX", r_siga, "sf_vend", "sf_vend")
//skel       DbSelectArea("_duplcli")
//skel       dbCreateIndex( "_duplcli", 'if(day(cr_dt_lqd)=0,"0","1")+Str(99999999-Val(Dtos(Cr_Dt_Lqd)))', {||if(day(cr_dt_lqd)=0,"0","1")+Str(99999999-Val(Dtos(Cr_Dt_Lqd)))} )
//skel       __SetCentury("off")
//skel       DbSetFilter({||!(left(cr_num_ped,2)$'/CX/CZ/').or.day(Cr_Dt_Lqd)=0},"!cr_num_ped")
//skel       DbGoTop()
//skel       Brow_Db("SCCRDUP_CLI1",.t.)
//skel       _duplcli->(DbCloseArea())
//skel       DbDrop("mem:_crdup")
//skel       sf_vend->(DbCloseArea())
//skel       DbSelectArea("SccrCli")
//skel    endif
//skel #FIM_TEXTO_FONTE
//skel 
//skel comando saida if( Select("osot")>0, osot->(DbCloseArea()), "")
//skel comando saida if( Select("sf_fatnf")>0, sf_fatnf->(DbCloseArea()), "")
//skel comando saida if( Select("Sccrdup")>0, SccrDup->(DbCloseArea()), "")
//skel 
   
oContextMenu:=Hwg_ContextMenu()
hwg_Btn(oToolbar,5,5,64,64)
hwg_TbMt(oToolbar,'22;tb_insert(D_OB);Ins-Inclui ;Ins-Inclui;cadastrar.ico;;;;;Inclui;;;')
hwg_TbMt(oToolbar,'65;tb_update(D_OB);A-Altera ;A-Altera;alterar.ico;;;;;&A-Altera;;;')
hwg_TbMt(oToolbar,'7;Eval(zBlkDelete, Cr_Cod_Cli);Del-Exclui ;Del-Deleta;deletar.ico;;;;;Deleta;;;')
hwg_TbMt(oToolbar,'80;tb_pesq(D_OB);P-Pesquisa ;P-Pesquisa na coluna do cursor;pesquisa.ico;;;;;&P-Pesquisa;;;')
d_ob:lEditable = .t.
hwg_TbMt(oToolbar,'79;tb_index(D_oB);O-Ordena ;O-Ordena a coluna do cursor;ordenar.ico;;;;;&O-Ordena;;;')
hwg_TbMt(oToolbar,'73;eval(zbAction,{||Lst_alias(D_OB)});I-Imprime ;I-Imprime;impressora.ico;;;;;&I-Imprime;;;')
hwg_Btn(oToolbar,10,544,70,24)
hwg_TbMt(oToolbar,'13;doget(D_ob);Enter-Altera ;Enter - Altera;sembitmap;;;Lucida Bright;-11;Altera;;6;')

hwg_TbMt(oToolbar,'81;eval(zbAction,{||Select("SccrDup")>0.and.(SccrDup->(DbCloseArea()),.t.),vb_quit_dupl(D_oB)});Q-Quitacao ;Q - Quitacao;sembitmap;;;Lucida Bright;-11;&Q-Quitacao;;6;')
hwg_TbMt(oToolbar,'32;eval(zbAction,{||vb_ass_cli()});Barra-Associados ;Barra - Associados;sembitmap;;;Lucida Bright;-11;Associados;;6;')
hwg_TbMt(oToolbar,'92;eval(zbAction,{||PrtBordero("RTF", , , "carne.rtf",     cr_cod_cli)});\-Carnes_rtf ;\ - Carnes_rtf;sembitmap;;;Lucida Bright;-11;&\-Carnes_rtf;;6;')
hwg_TbMt(oToolbar,'74;eval(zbAction,{||PrtBordero("PDF", , , "duplicata.pdf", cr_cod_cli)});J-BOLETOS_pdf ;J - BOLETOS_pdf;sembitmap;;;Lucida Bright;-11;&J-BOLETOS_pdf;;6;')
hwg_TbMt(oToolbar,'75;eval(zbAction,{||PrtBordero("HTM", , , "duplicata.htm", cr_cod_cli)});K-BOLETOS_htm ;K - BOLETOS_htm;sembitmap;;;Lucida Bright;-11;&K-BOLETOS_htm;;6;')
hwg_TbMt(oToolbar,'47;eval(zbAction,{||PrtBordero("RTF", , , "duplicata.rtf", cr_cod_cli)});/-Duplicatas_rtf ;/ - Duplicatas_rtf;sembitmap;;;Lucida Bright;-11;&/-Duplicatas_rtf;;6;')
hwg_TbMt(oToolbar,'69;eval(zbAction,zBlkCompras);E-Extrato ;E - Extrato;sembitmap;;;Lucida Bright;-11;&E-Extrato;;6;')
hwg_TbMt(oToolbar,'-7;eval(zbAction,{||Relat( "vb_r5(.f.,"+str(zRecnCli,5)+")",,"SemDbCloseall" )});F8-Extrato de Produtos;F8 - Extrato de Produtos;sembitmap;;;Lucida Bright;-11;Extrato;;6;')
hwg_TbMt(oToolbar,'68;vb_opcdc();D-Descontos;D - Descontos;sembitmap;;;Lucida Bright;-11;&D-Descontos;;6;')
hwg_TbMt(oToolbar,'-8;eval(zbAction,z_blkf9);F9-Tab_Prom ;F9 - Tab_Prom;sembitmap;;;Lucida Bright;-11;Tab_Prom;;6;')

hwg_Btn(oToolbar,897-380,296,100,24)
hwg_TbMt(oToolbar,'-1;eval(zbAction,{||zFgConfirmouGerarPedido:=.f., DbGet("OSOT",1,,,"OSOT"),if(zFgConfirmouGerarPedido,(ConverteReceitaOticaEmPedido(),oBrwOsOt:Refresh()),)});F2-NovoReceituario ;F2 - Registra Novo Receituario para o Cliente;sembitmap;;;Lucida Bright;-11;F&2-NovoReceituario;;6;')

hwg_Btn(oToolbar,897-380,296+30,100,24)
hwg_TbMt(oToolbar,'-2;eval(zbAction,{||zFgConfirmouGerarPedido:=.f., if(osot->cr_cod_cli=sccrcli->(recno()),DbGet("OSOT",2,,,"OSOT"),DbGet("OSOT",1,,,"OSOT")),if(zFgConfirmouGerarPedido,(ConverteReceitaOticaEmPedido(),oBrwOsOt:Refresh()),)});F3-AlteraReceituario ;F3 - Altera Receituario Selecionado;sembitmap;;;Lucida Bright;-11;F&3-AlteraReceituario;;6;')

hwg_Btn(oToolbar,897-380,296+60,100,24)
hwg_TbMt(oToolbar,'-3;eval(zbAction,zbPrtOs);F4-ImprimeReceituario ;F4 - ImprimeReceituario;sembitmap;;;Lucida Bright;-11;F&4-ImprimeReceituario;;6;')

hwg_Btn(oToolbar,897-380,296+90,100,24)
hwg_TbMt(oToolbar,'-4;eval(zbAction,{||ConverteReceitaOticaEmPedido(),oBrwOsOt:Refresh()});F5-ConfirmarPedido ;F5 - Confirmar Pedido;sembitmap;;;Lucida Bright;-11;F&5-ConfirmarPedido;;6;')

SetDlgKey(oDlg,8,26,{|| (aBrowses[nBrwAtivo,2])->(moveRec(aBrowses[nBrwAtivo,1],"UP"))})
SetDlgKey(oDlg,8,28,{|| (aBrowses[nBrwAtivo,2])->(moveRec(aBrowses[nBrwAtivo,1],"DOWN"))})
Hwg_EndMenu()

CiSetKey( "VK_F2",'DbGet("OSOT",1,,,"OSOT")',,,"F2:Novo Receituario")
CiSetKey( "VK_F3",'DbGet("OSOT",2,,,"OSOT")',,,"F3:Alterar Receituario")
CiSetKey( "VK_F4","eVal(zbPrtOs)",,,"F4:Imprime Receituario") 
CiSetKey( "VK_F5","eval(zbAction,{||ConverteReceitaOticaEmPedido()})",,,"F5:Confirmar Pedido") 

oDlg:MAXIMIZE()

]]>
  </method>
  <method name="onPaint">
    <![CDATA[Parameters oCtrl,hDC
oCtrl:bpaint:=NIL
D_oB:setFocus()]]>
  </method>
  <part class="status">
    <style>
      <property name="Geometry">{0,568,1022,30}</property>
      <property name="Name">[oDlgStatusBar]</property>
      <property name="aParts">{608,152,0}</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{10,77,1000,211}</property>
      <property name="Name">[D_oB]</property>
      <property name="Anchor">15</property>
      <property name="font">
        <font name="Lucida Sans Unicode" width="0" height="-16" weight="400"/>
      </property>
      <property name="GridLinesSepColor">0</property>
      <property name="TabIndex">4</property>
    </style>
    <method name="onGetFocus">
      <![CDATA[nBrwAtivo:=1]]>
    </method>
    <method name="onPosChange">
      <![CDATA[oBrwFat:Refresh()
oBrwOsOt:Refresh() ]]>
    </method>
    <method name="onInit">
      <![CDATA[   if sGuiMode
      IF xGetEnv("USA_CORES_NO_BROWSE")="S"
         zbCor0:= {||IF(ztVc>0,zCorVc,IF(ztAvHoje>0, zCorHoje, If(ztAv>0,zCorAv,If(ztEmi-ztVc-ztAv>0,zCorQtOk,{d_ob:tcolor,d_ob:bcolor,D_oB:tColorSel,D_oB:bColorSel})) ))}
         zbCor := {||DebCli(sccrcli->(if(cr_cod_cli=0,Recno(),cr_cod_cli)),.f.,.f.,@ztEmi,@ztVc,@ztAv,@ztAvHoje), EVAL(zbCor0) }
         hwg_TbFi(D_oB,'CodCli;if(Cr_Cod_Cli=0,Recno(),Cr_Cod_Cli);P;999999;6;N;')
         hwg_TbFi(D_oB, 'Nome;Cr_nome;C;@s40;40;N;zbCor;')
         hwg_TbFi(D_oB, 'Quitacoes;if(ztEmi-ztVc-ztAv>0,ztEmi-ztVc-ztAv,0);P;999999.99;9;N;zbCor0;')
         hwg_TbFi(D_oB, 'Vencidas;ztVc;P;999999.99;9;N;zbCor0;')
         hwg_TbFi(D_oB, 'A_Vencer;ztAv;P;999999.99;9;N;zbCor0;')
      ELSE
         hwg_TbFi(D_oB,'CodCli;if(Cr_Cod_Cli=0,Recno(),Cr_Cod_Cli);P;999999;6;N;')
         hwg_TbFi(D_oB, 'Nome;Cr_nome;C;@s40;40;N;')
      ENDIF
      hwg_TbFi(D_oB, 'Ult Comp;tv_desd(recno());C;@s9;9;;')
      hwg_TbFi(D_oB, 'T;cr_tip_cli;C;9;1;N;')
      hwg_TbFi(D_oB, 'Tb;cr_tabela;N;99;2;S;')
      hwg_TbFi(D_oB, 'Fone;Cr_fone;C;@s15;15;N;')
      hwg_TbFi(D_oB, 'Bairro;Cr_bairro;C;@s30;30;S;')
      hwg_TbFi(D_oB, 'Rua;Cr_rua;C;@s40;40;N;')
      hwg_TbFi(D_oB, 'Vd;CR_ZONA;C;99;2;N;')
      hwg_TbFi(D_oB, 'Acesso;rec_del();N;999999;6;N;')
   else
      hwg_TbFi(@D_oB,"CodCli;if(Cr_Cod_Cli=0,rec_del(),Cr_Cod_Cli);N;999999;6;N;")
      hwg_TbFi(@D_oB,"Nome;Cr_nome;C;@s20;20;N;")
      hwg_TbFi(@D_oB,"Bairro;Cr_bairro;C;@s12;12;S;")
      hwg_TbFi(@D_oB,"Ult Comp;tv_desd(recno());C;@s9;9;;")
      hwg_TbFi(@D_oB,"Rua;Cr_rua;C;@s25;20;N;")
      hwg_TbFi(@D_oB,"T;cr_tip_cli;C;9;1;N;")
      hwg_TbFi(@D_oB,"Vd;CR_ZONA;C;99;2;N;")
      hwg_TbFi(@D_oB,"Cod;cr_cod_cli;N;999999;6;N;")
      hwg_TbFi(@D_oB,"Fone;Cr_fone;C;@s14;14;N;")
      hwg_TbFi(@D_oB,"Tb;cr_tabela;N;99;2;S;")
   endif
   hwg_TbFi(@D_oB,"gp;cr_TabGp;C;x;2;S;")
   hwg_TbFi(@D_oB,"Ponto Ref;Cr_PONTORE;C;@s30;30;N;")
   hwg_TbFi(@D_oB,"Contato;Cr_contato;C;@s15;15;N;")
   hwg_TbFi(@D_oB,"CGC/CPF;Cr_cgc;C;@s18;18;N;")
   hwg_TbFi(@D_oB,"Cidade;Cr_cidade;C;@s20;25;N;")
   hwg_TbFi(@D_oB,"CEP;Cr_CEP;C;@s9;9;N;")
   hwg_TbFi(@D_oB,"UF;Cr_UF;C;xx;2;N;")
   hwg_TbFi(@D_oB,"Fantasia;Cr_fantasi;C;@s30;30;N;")
D_oB:bColorSel:= RGB(3,23,233)
D_oB:tColorSel:= RGB(255,255,255)
D_oB:Alias := alias()
D_oB:lDisableVScrollPos := .t.
D_oB:bKeyDown := {|self, wParam| (aBrowses[nBrwAtivo,2])->(hwg_oDlgKey(self, wparam,1)) , .T. }
D_oB:bOther:={|o,m,wp,lp| MessagesBrowse(o,m,wp,lp)}
D_oB:cargo:={.T.,.T.,"SCCRCLI",.F.,.T.,{||.T.} }
AADD(aBrowses,{D_oB,D_oB:Alias,{||.f.},{|| .T.},})
]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{501,0,372,47}</property>
      <property name="Name">[oLabel1]</property>
      <property name="Caption">[Cadastro de Clientes]</property>
      <property name="Justify">[Right]</property>
      <property name="font">
        <font name="Arial" width="0" height="-37" weight="700"/>
      </property>
      <property name="Transparent">.T.</property>
      <property name="TabIndex">5</property>
    </style>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{630,316,378,216}</property>
      <property name="Name">[oBrwFat]</property>
      <property name="Anchor">14</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Border">.F.</property>
      <property name="TabIndex">6</property>
    </style>
    <method name="onInit">
      <![CDATA[DbSelectArea( 'sf_pn' )
oBrwFat:Alias := 'sf_pn'
oBrwFat:bColorSel:= RGB(3,23,133)
oBrwFat:tColorSel:= RGB(255,255,255)
hwg_TbFi(@oBrwFat, 'Status;if(fg_fat="N","*Pendente*","Confirmado");P;@S10;10;N;')
hwg_TbFi(@oBrwFat, 'Valor;fVal;N;999999.99;9;;;')
hwg_TbFi(@oBrwFat, 'Pedido;fnumped;N;999999;  6;N;')
hwg_TbFi(@oBrwFat, 'DtFatura;fDataEmi;D;;8;;;')
hwg_TbFi(@oBrwFat, 'VD;FVENDEDOR;N;99;2;N;')
hwg_TbFi(@oBrwFat, 'FechCx;SI_NumFech;N;999999;6;N;')
hwg_TbFi(@oBrwFat, 'Cli;Fcli;N;99999;5;S;')
hwg_TbFi(@oBrwFat, 'Controle;fnum;N;9999999;  7;N;')

oBrwFat:lFilter := .T.
oBrwFat:bFirst := {|| sf_pn->( DBSEEK( sccrcli->(RECNO()), .F. ) ) } 
oBrwFat:bLast  := {|| sf_pn->( DBSEEK( sccrcli->(RECNO()) , .F., .T. ) ) }
oBrwFat:bWhile := {|| sf_pn->fCli = sccrcli->(RECNO()) }
oBrwFat:Refresh()
DbSelectArea( 'Sccrcli' )]]>
    </method>
  </part>
  <part class="browse">
    <style>
      <property name="Geometry">{10,316,493,216}</property>
      <property name="Name">[oBrwOsOt]</property>
      <property name="Anchor">6</property>
      <property name="font">
        <font name="Arial" width="0" height="-12" weight="400"/>
      </property>
      <property name="Border">.F.</property>
      <property name="TabIndex">6</property>
    </style>
    <method name="onInit">
      <![CDATA[DbSelectArea( 'osot' )
oBrwOsOt:Alias := 'osot'
oBrwOsOt:bColorSel:= RGB(3,23,133)
oBrwOsOt:tColorSel:= RGB(255,255,255)
hwg_TbFi(@oBrwOsOt, 'Situacao;eval(zbStatus);C;@S10; 10;;')
hwg_TbFi(@oBrwOsOt, 'NumeroOS;FNUMOS;N;9999999999; 10;;')
hwg_TbFi(@oBrwOsOt, 'Pedido;FNUMPED;N;9999999999; 10;;')
hwg_TbFi(@oBrwOsOt, 'Data_Os;FDATAPED;D;;  8;S;')
//hwg_TbFi(@oBrwOsOt, 'Valor;fValLoca;N;999999.99;9;;;')
hwg_TbFi(@oBrwOsOt, 'DtReceit;MDATARECEI;D;;  8;;')
hwg_TbFi(@oBrwOsOt, 'Obs;Left(OBS,30);P;@S30; 10;;')
hwg_TbFi(@oBrwOsOt, 'Atendente;FVENDEDOR;N;; 4;S;')
hwg_TbFi(@oBrwOsOt, 'Crm;CRM;C;@S10; 10;;')
hwg_TbFi(@oBrwOsOt, 'Cli;CR_COD_CLI;N;999999;  6;S;')

oBrwOsOt:lFilter := .T.
oBrwOsOt:bFirst := {|| osot->( DBSEEK( sccrcli->(RECNO()) , .F. ) ) } 
oBrwOsOt:bLast  := {|| osot->( DBSEEK( sccrcli->(RECNO()) , .F., .T. ) ) }
oBrwOsOt:bWhile := {|| osot->cr_cod_Cli = sccrcli->(RECNO()) }
oBrwOsOt:Refresh()
DbSelectArea( 'sccrcli' )]]>
    </method>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{12,294,150,19}</property>
      <property name="Name">[oLabel2]</property>
      <property name="Caption">[Receituarios x Pedidos]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
  <part class="label">
    <style>
      <property name="Geometry">{630,294,171,19}</property>
      <property name="Name">[oLabel3]</property>
      <property name="Caption">[Pedidos do Cliente]</property>
      <property name="Anchor">6</property>
      <property name="TabIndex">7</property>
    </style>
  </part>
</part>
