ALIAS XML_MOV

VARIAVEL zCmdsDurante = ""

VARIAVEL #TEXTO_FONTE
  
   oLst:cAlias_DataCols := 'xml_mov'
   oLst:Cab1( "DADOS DO XML DA NF "+Ltrim(Str(m_fNum,10))+", em "+Dtoc(s_datual)+" as "+time()  )
   oLst:Cab3( m_cp_nome +" (Cod "+Ltrim(Str(m_cp_cod_for,6))+" )" )
 
   oLst:AddCab( '_LINHA_FINA_' )
   oLst:AddCab( '_CABCOLS_' )
   oLst:AddCab( '_LINHA_GROSSA_' )

   oLst:AddCol('Descricao XML;xProd;C;@S30;30;S;')
   oLst:AddCol('Qtd\nXML;qCom;N;99999.999;9;S;')
   oLst:AddCol('Und\nXML;uCom;C;@S5;5;S;')
   IF sFgConfereXml
      oLst:AddCol('QtdConf;qtdConf;N;99999.999;9;S;')
   endif
   if sFgContaPecas
      oLst:AddCol('QPerfis;pPecas;N;99999;8;S;')
      IF sFgConfereXml
         oLst:AddCol('QPerfCnf;pPecasConf;N;99999;8;S;')
      ENDIF
   endif
   oLst:AddCol('PrUnt\nXML;vUnCom;N;99999.999;9;S;')
   oLst:AddCol('PrTot\nXML;vProd;N;99999.99;8;S;;Direita;Some;')
   oLst:AddCol('Meu\nCodigo;Pcod;N;999999;6;S;')
   oLst:AddCol('Minha\nDescricao;DicFornOk(pcod)+pDesc;P;@S24;22;N;')
   oLst:AddCol('Minha\nQtd;pitens*vUnCom;P;9999.999;8;S;;Direita;NaoSome;')
   oLst:AddCol('Minha\nUnd;pUnidade;C;@S7;7;N;Direita;;')
   oLst:AddCol('Minha\nFinalidade;if(pCod>0,se_prod->(Ptipoitem+" "+Efd_TipoItem()),"");P;@S15;15;N;')
   oLst:AddCol('Meu\nPrComp;pVluVen3;N;999999.99;9;N;')
   oLst:AddCol('NCM;ncm;C;@s9;9;N;')
   if sys_segmento='farma'
      oLst:AddCol('PMC;vpmc;N;9999.99;7;S;')
   endif
   // oLst:AddCol('CFOP;cfop;C;9999;4;N;')
   //   oLst:AddCol('Ean;cEAN;C;@S13;13;S;')
   //   oLst:AddCol('CodForn;cProd;C;@S10;10;N;')
   //   oLst:AddCol('PrXML;vUnCom/if(pitens>0,pItens,1);P;999999.99;9;N;')
   //   oLst:AddCol('IndTot;indTot;C;X;6;N;')
   //   oLst:AddCol('Orig;ICM_orig;C;X;4;N;')
   //   oLst:AddCol('CstIcm;ICM_Cst;C;XXX;6;N;')
   //   oLst:AddCol('modBC;ICM_modBC;C;X;5;N;')
   //   oLst:AddCol('BaseIcm;ICM_vBC;N;99999.99;9;N;')
   //   oLst:AddCol('%Icm;ICM_pICMS;N;99.99;5;N;')
   //   oLst:AddCol('Val_Icm;ICM_vICMS;N;99999.99;9;N;')
   //   oLst:AddCol('modBCST;ICM_mBCST;C;X;7;N;')
   //   oLst:AddCol('BaseIcmST;ICM_vBCST;N;99999.99;9;N;')
   //   oLst:AddCol('%IcmST;ICM_pICMST;N;99.99;6;N;')
   //   oLst:AddCol('Val_IcmST;ICM_vICMST;N;99999.99;9;N;')
   //   oLst:AddCol('%AgrST;ICM_pMVAST;N;99.99;6;N;')
   //   oLst:AddCol('CstPIS;PIS_CST;C;XXX;6;N;')
   //   oLst:AddCol('BasePIS;PIS_vBC;N;99999.99;9;N;')
   //   oLst:AddCol('%PIS;PIS_pPIS;N;99.99;5;N;')
   //   oLst:AddCol('Val_PIS;PIS_vPIS;N;99999.99;9;N;')
   //   oLst:AddCol('CstCOF;COF_CST;C;XXX;6;N;')
   //   oLst:AddCol('BasePIS;COF_vBC;N;99999.99;9;N;')
   //   oLst:AddCol('%Cof;COF_pCOF;N;99.99;5;N;')
   //   oLst:AddCol('Val_Cof;COF_vCOF;N;99999.99;9;N;')

   oLst:AddRodape( '_LINHA_FINA_', "", {|| "Pagina "+Str(++pag,4)+" / ####"} )

   // BLOCO_TXT zCmdsDurante
   //    znemis   := znemis + 1 
   //    ZVALEMIS := ZVALEMIS + CP_VALOR 
   // FIM_BLOCO_TXT

   // concilia->(DbGoTop(), oLst:DbEval(zCmdsDurante) )
   xml_mov->(DbGoTop(), oLst:DbEval() )

   oLst:lFecharGruposAbertos := .t.
   oLst:SetFormatSomaCol(1, {||"*Totais do XML: "}, .t.)
   oLst:PrtD('_LINHA_GROSSA_')
   oLst:PrtD({"style"=>"font:Courier-BoldOblique"}, '_SOMACOLS_GLOBAL_' )
   oLst:PrtD('_LINHA_FINA_')
   oLst:PrtD('')
   
   // debugalert('4')
   
   // oLst:PrtD('Valor das Emissoes :      '+Transform(zvalemis,'@e 999,999,999.99')+'   (Ref a '+Str(znemis,4)+' titulos) ' )
   // oLst:PrtD('Valor das Liquidacoes :   '+Transform(zvallqd, '@e 999,999,999.99')+'   (Ref a '+Str(znlqd,4)+' titulos) ' )
   // oLst:PrtD('Valor em Aberto :         '+Transform(zvalemis-zvallqd, '@e 999,999,999.99')+'   (Ref a '+Str(znemis-znlqd,4)+' titulos) ' )
   // oLst:PrtD('')
   // oLst:PrtD('Juros Pagos :             '+Transform(zjuros , '@e 999,999,999.99')+'   (Ref a '+Str(znlqdj,4)+' titulos) ' )
   // oLst:PrtD('Descontos Obtidos :       '+Transform(zdesct , '@e 999,999,999.99')+'   (Ref a '+Str(znlqdd,4)+' titulos) ' )

#FIM_TEXTO_FONTE