-
Total de ítens
504 -
Registro em
-
Última visita
Community Answers
-
Hetosoft Sistemas's post in WebService SOAP Delphi was marked as the answer
Era isso Mesmo, segue abaixo como consegui pegar caminho exato:
uses
Winapi.Windows
function TWM.GetModuleFileSpec: String;
var
cret: integer;
ModName: array[0..MAX_PATH - 1] of Char;
begin
GetModuleFileName(HInstance, ModName, SizeOf(ModName));
cret := GetLongPathName(ModName, ModName, SizeOf(ModName));
SetString(Result, ModName, cret);
end;
function TWM.GetModulePath: String;
begin
Result := ExtractFilePath(GetModuleFileSpec);
end;
var Caminho := GetModulePath;
-
Hetosoft Sistemas's post in Iss.net Erro Ao Enviar was marked as the answer
Desativei o CONSULTALOTEAPOSENVIO = False
e mudei minha rotina de enviar
try
if Form_NFSe.ACBrNFSe1.Enviar(vNumLote) then
begin
//MessagemH( 0, 'Form_NFSe.ACBrNFSe1.Enviar(vNumLote)' );
DM12.Client_NotaFiscal.edit;
DM12.Client_NotaFiscalNFS_PROTOCOLO.Text:= Form_NFSe.ACBrNFSe1.WebServices.Enviar.Protocolo;
DM12.Client_NotaFiscalNFS_PROTOCOLO_LOTE.Text:= Form_NFSe.ACBrNFSe1.WebServices.ConsLote.Protocolo;
DM12.Client_NotaFiscalNFS_CODVERIFICACAO.Text:= Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.CodigoVerificacao;
DM12.Client_NotaFiscalNUMERO.Text:= Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.Numero;
DM12.Client_NotaFiscal.ApplyUpdates(-1);
Form_NFSe.ACBrNFSe1.NotasFiscais.Clear;
//COSNULTA 1 SEGUNDOS 5 TENTATIVA
//CONSUTA RPS RPS + 12 - RPS.XML
//
//
try
Form_NFSe.ACBrNFSe1.NotasFiscais.Clear;
Form_NFSe.ACBrNFSe1.NotasFiscais.LoadFromFile(
RAIZ+'\Controles_SQL\NFSe\EnvioDeResposta\'+
Copy( DM12.Client_NotaFiscalC_EMISSAO.Text,7,4 )+
Copy( DM12.Client_NotaFiscalC_EMISSAO.Text,4,2 )+
'\RPS\'+DM12.Client_NotaFiscalNFS_RPS.Text+Form_NFSe.Edit2.Text+'-RPS.XML'
);
Form_NFSe.ACBrNFSe1.ConsultarNFSeporRps(Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.IdentificacaoRps.Numero,
Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.IdentificacaoRps.Serie,
TipoRPSToStr(Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.IdentificacaoRps.Tipo),
Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.Prestador.Cnpj,
Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.Prestador.InscricaoMunicipal);
Form_NFSe.MemoResp.Lines.Text := UTF8Encode(Form_NFSe.ACBrNFSe1.WebServices.ConsNfseRps.RetWS);
Form_NFSe.memoRespWS.Lines.Text := UTF8Encode(Form_NFSe.ACBrNFSe1.WebServices.ConsNfseRps.RetWS);
Form_NFSe.LoadXML(Form_NFSe.MemoResp, Form_NFSe.WBResposta);
DM12.Client_NotaFiscal.edit;
DM12.Client_NotaFiscalNFS_CODVERIFICACAO.Text:= Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.CodigoVerificacao;
DM12.Client_NotaFiscalNUMERO.Text:= Form_NFSe.ACBrNFSe1.NotasFiscais.Items[0].NFSe.Numero;
DM12.Client_NotaFiscal.ApplyUpdates(-1);
if Tipo=0 then
begin
//IMPRIMIR
Form_NotaFiscal.BitBtn99Click(nil);
end;
Form_NFSe.ACBrNFSe1.NotasFiscais.Clear;
except
MessagemH(2,'NFS-e NºPED:'+DM12.Client_NotaFiscalCOD.Text+' RPS:'+FormatFloat('#########0', StrToInt(NumNFSe))+''+#13+
'Sem Retorno !');
Abort;
end;
end else
begin
MessagemH(2,'NFS-e NºPED:'+DM12.Client_NotaFiscalCOD.Text+' RPS:'+FormatFloat('#########0', StrToInt(NumNFSe))+''+#13+
'Não Enviada !');
Abort;
end;
except
on E: Exception do
begin
MessagemH(2,'NFS-e NºPED:'+DM12.Client_NotaFiscalCOD.Text+' RPS:'+FormatFloat('#########0', StrToInt(NumNFSe))+''+#13+
'Não Enviada !'+#13+
E.Message);
Form_NFSe.ACBrNFSe1.NotasFiscais.Clear;
Abort;
end;
end;
-
Hetosoft Sistemas's post in Nome Computador Da Conexao Remota was marked as the answer
Conseguir
USERNAME = nome do usuario conexao remota
CLIENTNAME = nome da maquina que abrio a conexao remota
USERPROFILE = caminho da pasta de meus documentos do usuario
Edit1.Text := GetEnv('USERNAME');
function TForm1.GetEnv(Variable: string): string;
var Buffer : Integer;
begin
Buffer := GetEnvironmentVariable(PChar(Variable), nil, 0);
if Buffer > 0 then
begin
SetLength(Result, Buffer - 1);
GetEnvironmentVariable(PChar(Variable), PChar(Result), Buffer);
end
else
Result := '';
end;
essa é pra saber se esta em uma conexao remota ou desktop
procedure TForm1.Button1Click(Sender: TObject);
begin
if IsRemoteSession=True then
Edit1.Text:='Conexao Remota' else
Edit1.Text:= 'Desktop' ;
end;
function TForm1.IsRemoteSession: boolean;
var res : integer;
begin
res := GetSystemMetrics (SM_REMOTESESSION);
Result := (res <> 0);
end;
-
Hetosoft Sistemas's post in Acbrboleto1.lerretorno was marked as the answer
procedure TfrmDemo.Button8Click(Sender: TObject);
Var
i: integer;
Titulo : TACBrTitulo;
begin
ACBrBoleto1.LerRetorno;
try
For I := 0 to ACBrBoleto1.ListadeBoletos.Count - 1 do
begin
Titulo := ACBrBoleto1.ListadeBoletos.Objects;
Memo1.Lines.Add('Numero do Documento = ' + Titulo.NumeroDocumento);
Memo1.Lines.Add('Valor Recebido = ' + FloatToStr(Titulo.ValorRecebido));
Memo1.Lines.Add('Nosso Numero = ' + Titulo.NossoNumero);
Memo1.Lines.Add('Nome do Cliente = ' + Titulo.ACBrBoleto.Name);
end;
finally
end;
end;
-
Hetosoft Sistemas's post in Caminho Do Servidor Para Baixar Todas As Pasta Acbr was marked as the answer
Post
Falei tanto que esqueci de postar a "solução".
Na unit ACBrHTMLtoXML,
alterar a linha:
if Trim(Versao)<>'2.00' then
para:
if (Trim(Versao)<>'2.00') and (Trim(Versao)<>'XML2.00') then
Pelo que vi, na consulta completa mudou somente a versão: de "2.00" para "XML2.00"
[]´s
Edson.
-
Hetosoft Sistemas's post in Acbrboleto1.gerarpdf Nao Funciona Mais was marked as the answer
Descomentei
ACBrBoletoFCQuickFr
uses
SysUtils, StdCtrls, Classes, Graphics, Controls, Forms, Dialogs, ACBrBoleto,
QRMultiExport, QRCtrls, QuickRpt, ExtCtrls, QRExport, ACBrBarCode, QRWebFilt, QRPDFFilt;
// RLFilters, RLPDFFilter ;
case Filtro of
fiPDF :
begin
FiltroExportacao := TQRPDFDocumentFilter.Create(NomeArquivo);
try
TQRPDFDocumentFilter(FiltroExportacao).CompressionOn := true;
RLLayout.ExportToFilter(FiltroExportacao);
finally
FiltroExportacao.Free;
end;
MultiExport := TQRMultiExport.Create(self);
try
MultiExport.Report := RLLayout ;
MultiExport.ExportFormat := qrxPDF ;
MultiExport.FileName := NomeArquivo ;
MultiExport.ShowDialog := MostrarSetup ;
MultiExport.DPI := 300 ;
MultiExport.DoExport ;
finally
MultiExport.Free ;
end ;
end ;
-
Hetosoft Sistemas's post in Erro Nao Foi Possivel Carregar O Arquivo was marked as the answer
Varzea grande( ISS.NET ) so usar o Gerar e Enviar Lote
-
Hetosoft Sistemas's post in Gerar E Enviar Nfse was marked as the answer
Sim ronei ta 100%, vou te mostra minha configuracao para homologacao ok
procedure TfrmDemo_ACBrNFSe.btnGerarEnviarLoteClick(Sender: TObject);
var
vAux, vNumLote : String;
begin
if not(InputQuery('Gerar e Enviar Lote', 'Numero do RPS', vAux))
then exit;
if not(InputQuery('Gerar e Enviar Lote', 'Numero do Lote', vNumLote))
then exit;
ACBrNFSe1.NotasFiscais.Clear;
GerarNFSe(vAux);
ACBrNFSe1.Enviar(vNumLote);
Memo1.Lines.Add( ACBrNFSe1.WebServices.RecepcaoLoteRps );
Memo1.Lines.Add( ACBrNFSe1.WebServices.ConsLote.Protocolo );
Memo1.Lines.Add( ACBrNFSe1.WebServices.ConsSitLote.Protocolo );
Memo1.Lines.Add( ACBrNFSe1.NotasFiscais.Items[0].NFSe.Protocolo );
Memo1.Lines.Add( DateToStr( ACBrNFSe1.NotasFiscais.Items[0].NFSe.dhRecebimento ) );
Memo1.Lines.Add( ACBrNFSe1.NotasFiscais.Items[0].NFSe.Numero );
Memo1.Lines.Add( ACBrNFSe1.NotasFiscais.Items[0].NFSe.CodigoVerificacao );
--------------------------------------------------------------------------------------
procedure TfrmDemo_ACBrNFSe.GerarNFSe(NumNFSe: String);
var
ValorISS: Double;
begin
ACBrNFSe1.NotasFiscais.Clear;
with ACBrNFSe1 do
begin
NotasFiscais.NumeroLote:='0001';
with NotasFiscais.Add.NFSe do
begin
IdentificacaoRps.Numero := FormatFloat('#########0', StrToInt(NumNFSe));
// Para o provedor ISS.NET em ambiente de Homologação mudar a série para '8'
IdentificacaoRps.Serie := '8';
// TnfseTipoRPS = ( trRPS, trNFConjugada, trCupom );
IdentificacaoRps.Tipo := trRPS;
DataEmissao := Date;
// TnfseNaturezaOperacao = ( noTributacaoNoMunicipio, noTributacaoForaMunicipio, noIsencao, noImune, noSuspensaDecisaoJudicial, noSuspensaProcedimentoAdministrativo );
NaturezaOperacao := noTributacaoNoMunicipio;
// NaturezaOperacao := noTributacaoNoMunicipio51;
// TnfseRegimeEspecialTributacao = ( retNenhum, retMicroempresaMunicipal, retEstimativa, retSociedadeProfissionais, retCooperativa, retMicroempresarioIndividual, retMicroempresarioEmpresaPP );
// RegimeEspecialTributacao := retNenhum;
RegimeEspecialTributacao := retMicroempresaMunicipal;
// TnfseSimNao = ( snSim, snNao );
OptanteSimplesNacional := snSim;
// TnfseSimNao = ( snSim, snNao );
IncentivadorCultural := snSim;
// TnfseSimNao = ( snSim, snNao );
// snSim = Ambiente de Produção
// snNao = Ambiente de Homologação
Producao := snNao;
// TnfseStatusRPS = ( srNormal, srCancelado );
Status := srNormal;
(* Usando quando o RPS for substituir outro
RpsSubstituido.Numero := FormatFloat('#########0', i);
RpsSubstituido.Serie := 'UNICA';
// TnfseTipoRPS = ( trRPS, trNFConjugada, trCupom );
RpsSubstituido.Tipo := trRPS;
*)
Servico.Valores.ValorServicos := 100.00;
Servico.Valores.ValorDeducoes := 0.00;
Servico.Valores.ValorPis := 0.00;
Servico.Valores.ValorCofins := 0.00;
Servico.Valores.ValorInss := 0.00;
Servico.Valores.ValorIr := 0.00;
Servico.Valores.ValorCsll := 0.00;
// TnfseSituacaoTributaria = ( stRetencao, stNormal, stSubstituicao );
// stRetencao = snSim
// stNormal = snNao
Servico.Valores.IssRetido := stNormal;
Servico.Valores.OutrasRetencoes := 0.00;
Servico.Valores.DescontoIncondicionado := 0.00;
Servico.Valores.DescontoCondicionado := 0.00;
Servico.Valores.BaseCalculo := Servico.Valores.ValorServicos -
Servico.Valores.ValorDeducoes -
Servico.Valores.DescontoIncondicionado;
Servico.Valores.Aliquota := 2.00;
if Servico.Valores.IssRetido = stNormal
then begin
ValorISS := Servico.Valores.BaseCalculo * Servico.Valores.Aliquota;
ValorISS := 2.00;
// A função RoundTo5 é usada para arredondar valores, sendo que o segundo
// parametro se refere ao numero de casas decimais.
// exemplos: RoundTo5(50.532, -2) ==> 50.53
// exemplos: RoundTo5(50.535, -2) ==> 50.54
// exemplos: RoundTo5(50.536, -2) ==> 50.54
Servico.Valores.ValorIss := RoundTo5(ValorISS, -2);
Servico.Valores.ValorIssRetido := 0.00;
end
else begin
ValorISS := Servico.Valores.BaseCalculo * Servico.Valores.Aliquota;
ValorISS := 2.00;
Servico.Valores.ValorIss := 0.00;
Servico.Valores.ValorIssRetido := RoundTo5(ValorISS, -2);
end;
Servico.Valores.ValorLiquidoNfse := Servico.Valores.ValorServicos -
Servico.Valores.ValorPis -
Servico.Valores.ValorCofins -
Servico.Valores.ValorInss -
Servico.Valores.ValorIr -
Servico.Valores.ValorCsll -
Servico.Valores.OutrasRetencoes -
Servico.Valores.ValorIssRetido -
Servico.Valores.DescontoIncondicionado -
Servico.Valores.DescontoCondicionado;
Servico.ItemListaServico := '105'; //'01.07';
// Para o provedor ISS.NET em ambiente de Homologação
// o Codigo CNAE tem que ser '6511102'
Servico.CodigoCnae := '6511102';
Servico.CodigoTributacaoMunicipio := '50000024'; //VARZEA GRANDE - MT pegue da sua cidade
//Servico.CodigoCnae := '6202300'; // Informação Opcional
//Servico.CodigoTributacaoMunicipio := '7221400'; //'118879';
Servico.Discriminacao := 'Aluguel de SoftWare'; //'discriminacao';
// Para o provedor ISS.NET em ambiente de Homologação
// o Codigo do Municipio tem que ser '999'
//Servico.CodigoMunicipio := edtCodCidade.Text;
Servico.CodigoMunicipio :='999';
// Informar A Exigibilidade ISS para fintelISS [1/2/3/4/5/6/7]
Servico.ExigibilidadeISS := exiExigivel;
// Informar para Saatri
Servico.CodigoPais := 1058; // Brasil
Servico.MunicipioIncidencia := StrToIntDef(edtCodCidade.Text, 0);
with Servico.ItemServico.Add do
begin
Descricao := 'SERVICO 1';
Quantidade := 1;
ValorUnitario := 100.00;
end;
Prestador.Cnpj := edtEmitCNPJ.Text;
Prestador.InscricaoMunicipal := edtEmitIM.Text;
// Para o provedor ISSDigital deve-se informar também:
Prestador.Senha := 'senha';
Prestador.FraseSecreta := 'frase secreta';
Prestador.cUF := 33;
Tomador.IdentificacaoTomador.CpfCnpj := '03953552000102';
//Tomador.IdentificacaoTomador.InscricaoMunicipal := '20370';
Tomador.IdentificacaoTomador.InscricaoMunicipal := '';
Tomador.RazaoSocial := 'NERY E ANDRADE NERY LTDA - ME';
Tomador.Endereco.Endereco := 'RUA PRINCIPAL';
Tomador.Endereco.Numero := '100';
Tomador.Endereco.Complemento := 'APTO 11';
Tomador.Endereco.Bairro := 'CENTRO';
Tomador.Endereco.CodigoMunicipio := edtCodCidade.Text;
Tomador.Endereco.UF := edtEmitUF.Text;
Tomador.Endereco.CEP := edtEmitCEP.Text;
Tomador.Contato.Telefone := '1122223333';
Tomador.Contato.Email := 'nome@provedor.com.br';
(* Usando quando houver um intermediario na prestação do serviço
IntermediarioServico.RazaoSocial := 'razao';
IntermediarioServico.CpfCnpj := '00000000000';
IntermediarioServico.InscricaoMunicipal := '12547478';
*)
(* Usando quando o serviço for uma obra
ConstrucaoCivil.CodigoObra := '88888';
ConstrucaoCivil.Art := '433';
*)
end;
end;
end;
----------------------------------------------------
Qualqer duvida to ai blz.
-
Hetosoft Sistemas's post in Erro Imprimir Nfs-E was marked as the answer
eu utilizei a pesquisa e nao tinha nenhim sobre nfs-e
mais o erro esta aqui
D:\All_Delphi\ACBr_7\Fontes\ACBrNFSe\DANFSE_QR3
so substituir
D:\All_Delphi\ACBr_7\Fontes\ACBrNFSe\
-
Hetosoft Sistemas's post in Sitef Pre Homologacao Seq. 13 was marked as the answer
brigadoooooo
os eventos do form OnObtemCampo
nao estavaao linkado ao componetes.
-
Hetosoft Sistemas's post in Sitef Pre Homologacao Seq. 2 was marked as the answer
Veja que no roteiro, os campos Data da transação: e NSU: aparecem em todos os quadros de testes, mas isso não significa que todas operações irão gerar NSU... ainda mais uma transação que não foi executada....
ja compriendi, NSU nao é a msn, e sim o registro no relatorio sitef.
eu pesanva que tinha que aperecer
Data
da transação: 15/06/2009
NSU: 150001
iqual o tef discado.