Jump to content

dev botao

Tratativa Valor PIS/COFINS


Go to solution Solved by Diego Foliene,
  • Este tópico foi criado há 349 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

  • Membros Pro
Posted

Existe alguma condição ou tratativa no ACBr para Zerar os campos abaixo?

     Produto.Imposto.PIS.vBC         := TVENDAS_ITENSBASE_PIS.AsCurrency;
     Produto.Imposto.PIS.pPIS        := TVENDAS_ITENSPIS.AsCurrency;
     Produto.Imposto.PIS.vPIS        := TVENDAS_ITENSVALOR_PIS.AsCurrency;

Em alguns casos mesmo informando o valor o ACBr informa 0 (zero) no XML.
 

  • Consultores
  • Solution
Posted
16 horas atrás, Datacaixa disse:

Existe alguma condição ou tratativa no ACBr para Zerar os campos abaixo?

     Produto.Imposto.PIS.vBC         := TVENDAS_ITENSBASE_PIS.AsCurrency;
     Produto.Imposto.PIS.pPIS        := TVENDAS_ITENSPIS.AsCurrency;
     Produto.Imposto.PIS.vPIS        := TVENDAS_ITENSVALOR_PIS.AsCurrency;

Em alguns casos mesmo informando o valor o ACBr informa 0 (zero) no XML.
 

Bom dia!

Não há.

Vide:

  TPIS = class(TObject)
  private
    FCST: TpcnCstPis;
    FvBC: Currency;
    FpPIS: Currency;
    FvPIS: Currency;
    FqBCProd: Currency;
    FvAliqProd: Currency;
  public
    procedure Assign(Source: TPIS);
    property CST: TpcnCstPis read FCST write FCST default pis01;
    property vBC: Currency read FvBC write FvBC;
    property pPIS: Currency read FpPIS write FpPIS;
    property vPIS: Currency read FvPIS write FvPIS;
    property qBCProd: Currency read FqBCProd write FqBCProd;
    property vAliqProd: Currency read FvAliqProd write FvAliqProd;
  end;
procedure TNFeW.GerarDetImpostoPIS(const i: Integer);
begin
  if (NFe.Ide.modelo <> 55) and
   ((NFe.Det[i].Imposto.PIS.vBC = 0) and
    (NFe.Det[i].Imposto.PIS.pPIS = 0) and
    (NFe.Det[i].Imposto.PIS.vPIS = 0) and
    (NFe.Det[i].Imposto.PIS.qBCProd = 0) and
    (NFe.Det[i].Imposto.PIS.vAliqProd = 0) and
    (not (NFe.Det[i].Imposto.PIS.CST in [pis04, pis05, pis06, pis07, pis08, pis09, pis49, pis99]))) then      //No caso da NFC-e, o grupo de tributação do PIS e o grupo de tributação da COFINS são opcionais.
      exit;

  Gerador.wGrupo('PIS', 'Q01');
  if NFe.Det[i].Imposto.PIS.CST in [pis01, pis02] then
  begin
    Gerador.wGrupo('PISAliq', 'Q02');
    Gerador.wCampo(tcStr, 'Q06', 'CST      ', 02, 02, 1, CSTPISTOStr(NFe.Det[i].Imposto.PIS.CST), DSC_CST);
    Gerador.wCampo(tcDe2, 'Q07', 'vBC      ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vBC, DSC_VBC);
    Gerador.wCampo(IIf(FUsar_tcDe4,tcDe4,tcDe2), 'Q08', 'pPIS     ', 01, IIf(FUsar_tcDe4,07,05), 1, NFe.Det[i].Imposto.PIS.pPIS, DSC_PPIS);
    Gerador.wCampo(tcDe2, 'Q09', 'vPIS     ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vPIS, DSC_VPIS);
    Gerador.wGrupo('/PISAliq');
  end
  else if NFe.Det[i].Imposto.PIS.CST = pis03 then
  begin
    Gerador.wGrupo('PISQtde', 'Q03');
    Gerador.wCampo(tcStr, 'Q06', 'CST      ', 02, 02, 1, CSTPISTOStr(NFe.Det[i].Imposto.PIS.CST), DSC_CST);
    Gerador.wCampo(tcDe4, 'Q10', 'qBCProd  ', 01, 16, 1, NFe.Det[i].Imposto.PIS.qBCProd, DSC_QBCPROD);
    Gerador.wCampo(tcDe4, 'Q11', 'vAliqProd', 01, 15, 1, NFe.Det[i].Imposto.PIS.vAliqProd, DSC_VALIQPROD);
    Gerador.wCampo(tcDe2, 'Q09', 'vPIS     ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vPIS, DSC_VPIS);
    Gerador.wGrupo('/PISQtde');
  end
  else if NFe.Det[i].Imposto.PIS.CST in [pis04, pis05, pis06, pis07, pis08, pis09] then
  begin
    Gerador.wGrupo('PISNT', 'Q04');
    Gerador.wCampo(tcStr, 'Q06', 'CST      ', 02, 02, 1, CSTPISTOStr(NFe.Det[i].Imposto.PIS.CST), DSC_CST);
    Gerador.wGrupo('/PISNT');
  end
  else if NFe.Det[i].Imposto.PIS.CST in [pis49, pis50, pis51, pis52, pis53, pis54, pis55, pis56, pis60, pis61, pis62, pis63, pis64, pis65, pis66, pis67, pis70, pis71, pis72, pis73, pis74, pis75, pis98, pis99] then
  begin

    if (NFe.Det[i].Imposto.PIS.vBC + NFe.Det[i].Imposto.PIS.pPIS > 0) and (NFe.Det[i].Imposto.PIS.qBCProd + NFe.Det[i].Imposto.PIS.vAliqProd > 0) then
      Gerador.wAlerta('Q05', 'PISOutr', DSC_PISOUTR, 'As TAG <vBC> e <pPIS> não podem ser informadas em conjunto com as TAG <qBCProd> e <vAliqProd>');

    if (NFe.Det[i].Imposto.PIS.qBCProd + NFe.Det[i].Imposto.PIS.vAliqProd > 0) then
    begin
      Gerador.wGrupo('PISOutr', 'Q05');
      Gerador.wCampo(tcStr, 'Q06', 'CST      ', 02, 02, 1, CSTPISTOStr(NFe.Det[i].Imposto.PIS.CST), DSC_CST);
      Gerador.wCampo(tcDe4, 'Q10', 'qBCProd  ', 01, 16, 1, NFe.Det[i].Imposto.PIS.qBCProd, DSC_QBCPROD);
      Gerador.wCampo(tcDe4, 'Q11', 'vAliqProd', 01, 15, 1, NFe.Det[i].Imposto.PIS.vAliqProd, DSC_VALIQPROD);
      Gerador.wCampo(tcDe2, 'Q09', 'vPIS     ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vPIS, DSC_VPIS);
      Gerador.wGrupo('/PISOutr');
    end
    else
    begin
      Gerador.wGrupo('PISOutr', 'Q05');
      Gerador.wCampo(tcStr, 'Q06', 'CST      ', 02, 02, 1, CSTPISTOStr(NFe.Det[i].Imposto.PIS.CST), DSC_CST);
      Gerador.wCampo(tcDe2, 'Q07', 'vBC      ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vBC, DSC_VBC);
      Gerador.wCampo(IIf(FUsar_tcDe4,tcDe4,tcDe2), 'Q08', 'pPIS     ', 01, IIf(FUsar_tcDe4,07,05), 1, NFe.Det[i].Imposto.PIS.pPIS, DSC_PPIS);
      Gerador.wCampo(tcDe2, 'Q09', 'vPIS     ', 01, 15, 1, NFe.Det[i].Imposto.PIS.vPIS, DSC_VPIS);
      Gerador.wGrupo('/PISOutr');
    end;
  end;
  Gerador.wGrupo('/PIS');
end;

 

Verifique se a sua aplicação não está zerando estes valores em algum momento antes de chamar a rotina do componente.

Também é válido colocar um break-point na rotina que gera o XML e ver quais valores estão chegando nela.

Consultor SAC ACBr

Diego Folieni
Ajude o Projeto ACBr crescer - Assine o SAC

Projeto ACBr     Telefone:(15) 2105-0750 WhatsApp(15)99790-2976.  Discord

Projeto ACBr - A maior comunidade Open Source de Automação Comercial do Brasil


Participe de nosso canal no Discord e fique ainda mais próximo da Comunidade !!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

The popup will be closed in 10 seconds...