Ir para conteúdo
  • Cadastre-se

  • Este tópico foi criado há 170 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Postado

Olá não estou conseguindo localizar alguns enumeradores para tipo de nota de crédito e débito. Segue código como está:

 

  //tcNenhum, tcMultaJuros, tcApropriacaoCreditoPresumido

  if DmTabelas.CdsVendasFINALIDADENFE.AsString = '5' then
  begin
    Ide.finNFe:= fnCredito;
    Ide.tpNFCredito:= tcNenhum;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '01' then
      Ide.tpNFCredito:= tcMultaJuros;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '02' then
      Ide.tpNFCredito:= tcApropriacaoCreditoPresumido;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '03' then
      Ide.tpNFCredito:= ; 

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '04' then
      Ide.tpNFCredito:= ;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '05' then
      Ide.tpNFCredito:=;

  end;


  //tdNenhum, tdTransferenciaCreditoCooperativa, tdAnulacao, tdDebitosNaoProcessadas,
  //tdMultaJuros, tdTransferenciaCreditoSucessao, tdPagamentoAntecipado, tdPerdaEmEstoque

  if DmTabelas.CdsVendasFINALIDADENFE.AsString = '6' then
  begin
    Ide.finNFe:= fnDebito;
    Ide.tpNFDebito:= tdNenhum;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '01' then
      Ide.tpNFDebito:= tdTransferenciaCreditoCooperativa;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '02' then
      Ide.tpNFDebito:=  tdAnulacao;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '03' then
      Ide.tpNFDebito:= tdDebitosNaoProcessadas;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '04' then
      Ide.tpNFDebito:= tdMultaJuros;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '05' then
      Ide.tpNFDebito:=  tdTransferenciaCreditoSucessao;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '06' then
      Ide.tpNFDebito:= tdPagamentoAntecipado;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '07' then
      Ide.tpNFDebito:= tdPerdaEmEstoque;

    if DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '08' then
      Ide.tpNFDebito:=  ;
  end;

Falta localizar o enumerador  de débito 08 e os enumeradores 03, 04 e 04 de crédito. Se alguém puder me ajudar agradeço.

Postado
3 minutes ago, Dinarte Moscon said:

 

 

3 minutes ago, Dinarte Moscon said:

Tenta utilizar dessa forma:


unit pcnConversaoNFe;


Ide.tpNFDebito := StrTotpNFDebito(FieldByName('tipo_debito').AsString);
Ide.tpNFCredito := StrTotpNFCredito(FieldByName('tipo_credito').AsString);

Dessa forma não preciso dos enumeradores? Mas os outros enumeradores existem?

Postado

Consegui descobrir. Obrigado a todos. Segue o código para quem precisar.

 

  if DmValores.CdsValoresREFORMATRIBUTARIA.AsString = 'S' then
  begin

   if (DmTabelas.CdsVendasFINALIDADENFE.AsString = '6') and
      (DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '03') then
   begin
      Ide.NFref.Clear;
      DFeReferenciado.chaveAcesso := DmTabelas.CdsVendasCHAVENFECOMPLEMENTAR.AsString;
   end;

   if (DmTabelas.CdsVendasFINALIDADENFE.AsString = '6') and
      (DmTabelas.CdsVendasTIPONOTADEBITO.AsString = '04') then
   begin
      Ide.NFref.Clear;
      DFeReferenciado.chaveAcesso := DmTabelas.CdsVendasCHAVENFECOMPLEMENTAR.AsString;
      DFeReferenciado.nItem := DmTabelas.CdsItensVendaITEMREF.AsInteger;
   end;

  end;

 

Postado

Na verdade ainda não deu certo alguns enumeradores. O 4 e 5 não estão indo

 

  if DmTabelas.CdsVendasFINALIDADENFE.AsString = '5' then
  begin
    Ide.finNFe:= fnCredito;
    Ide.tpNFCredito:= tcNenhum;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '01' then
      Ide.tpNFCredito:= tcMultaJuros;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '02' then
      Ide.tpNFCredito:= tcApropriacaoCreditoPresumido;

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '03' then
      Ide.tpNFCredito:= tcRetorno; //StrTotpNFCredito('03');

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '04' then
      Ide.tpNFCredito:= StrTotpNFCredito('04');

    if DmTabelas.CdsVendasTIPONOTACREDITO.AsString = '05' then
     Ide.tpNFCredito:= StrTotpNFCredito('05');

  end;

 

 

  • Este tópico foi criado há 170 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar Agora
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.