ALIAS HELP
VARIAVEL #TEXTO_FONTE

   Private zIdRecibo:=0, zFgQuerReimprimir:=.t., hReg

   se type('zRecnBrw')<>'U' entao (zIdRecibo:=zRecnBrw, zFgQuerReimprimir:=.f.)
   
   se select('sccrcli')=0 entao abra_arq("sccrcli")
   se select('sccrdup')=0 entao abra_arq("sccrdup")
   
   if zIdRecibo=0 .and..not. QuickDialog("recibo_sccrdup_fr3", "30;4;Reimpressao de Recibos", { ;
         {"2;2;Id do Recibo:", "@zIdRecibo",  @zIdRecibo,  "999999", "", "psq_brow;sccrdup;psccrdup;N;N;"} } )
      Return
   endif

   Select sccrdup
   DbGoTo(zIdRecibo)
   
   wCab1:="RECIBO"
   wCab2:="Numero "+lTrim(Str(zIdRecibo,10))
   
   oLst:lOutputPdf      := .f.
   oLst:lOutputFr3      := .t.
   oLst:cAliasMaster    := '_recibo' 
   oLst:cAlias_DataCols := '_recibo'
   oLst:cReport         := 'recibo_sccrdup'

   sccrcli->(DbGoTo(sccrdup->cr_cod_cli))
   oLst:PutRsFr3("_cli", sccrcli->(Scatter()) )
   oLst:PutRsFr3("_dup", sccrdup->(Scatter()) )
   
   hReg:={=>}
   hReg['REFERENTE']  := sccrdup->cr_obs
   hReg['CR_NUM_PED'] := sccrdup->CR_NUM_PED
   hReg['VALOR']      := sccrdup->cr_valor
   hReg['DATA']       := sccrdup->cr_dt_emis
   hReg['RECEBEDOR']  := sccrcli->cr_nome

   hReg['TP_CNPJCPF']  := ""
   hReg['REC_CNPJ']  := ""
   se Cgc_Ok(sccrcli->cr_cgc) entao hReg['TP_CNPJCPF'] := "CNPJ" senao se Cpf_Ok(sccrcli->cr_cgc) entao hReg['TP_CNPJCPF'] := "CPF" 
   se hReg['TP_CNPJCPF']=="CNPJ" entao hReg['REC_CNPJ'] := FormataCnpjCpf(sccrcli->cr_cgc,,,.t.)
   se hReg['TP_CNPJCPF']=="CPF"  entao hReg['REC_CNPJ'] := FormataCnpjCpf(sccrcli->cr_cgc,,,,.t. )
   
   // hReg['OBS']       := '(Obs: '+hReg['OBS']+')'
   
   oLst:PutRsFr3('_recibo', hReg )

   debugalert('7 vai :run e :end')

   _recibo->( oLst:Run() )
   oLst:End()
   
   dbCloseAll()
   dbDrop('mem:_recibo')
   dbDrop('mem:_cli')
   dbDrop('mem:_dup')

#FIM_TEXTO_FONTE
