Fiz o seguinte, criei um botao para verificar antes de mandar a nfe, se a situacao fiscal do destinatario está habilitado, ou seja, estou usando a mesma rotina do acbrNfe "Consulta cadastro", mas até o momento não estou conseguindo verificar corretamente, porque está me retorno um erro 239- Rejeicao Cabeçalho - Versão do arquivo XML nao suportada - SP, acredito que ainda a receita não liberou, mas ja coloquei esta rotina no meu sistema.Caso, tenha alguem que já esteja funcionando favor, postar o codigo correto, o que estou usando é esse codigo:
UF := 'SP';
Documento := '99999999999999'
DataModuleNfe.NFe.WebServices.ConsultaCadastro.UF := UF;
if Length(Documento) > 11 then
DataModuleNfe.NFe.WebServices.ConsultaCadastro.CNPJ := Documento
else
DataModuleNfe.NFe.WebServices.ConsultaCadastro.CPF := Documento;
DataModuleNfe.NFe.WebServices.ConsultaCadastro.Executar;
MemoResp.Lines.Text := UTF8Encode(DataModuleNfe.NFe.WebServices.ConsultaCadastro.RetWS);
MemoResp.Lines.Text := UTF8Encode(DataModuleNfe.NFe.WebServices.ConsultaCadastro.RetornoWS);
LoadXML(MemoResp, WBResposta);
If RetiraSpace(DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo) <> '' Then
begin
If DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo = '999' Then
Mensagem('Favor, verificar situação fiscal do Destinatário no Sintegra ',2);
If DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo = '301' Then
Mensagem('Favor, verificar situação fiscal do Emitente no Sintegra',2);
If DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo = '302' Then
Mensagem('Favor, verificar situação fiscal do Destinatário no Sintegra',2);
If (DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo <> '999') and
(DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo <> '301') and
(DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo <> '302') Then
Mensagem('Favor, verificar situação fiscal do Emitente e Destinatário no Sintegra '+
DataModuleNfe.NFe.WebServices.ConsultaCadastro.xMotivo+' '+
DataModuleNfe.NFe.WebServices.ConsultaCadastro.RetConsCad.InfCad.Items[0].xNome,2);
end;