Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions CTe.Classes/Informacoes/autXML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ public string CNPJ
get { return cnpj; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(cpf))
cnpj = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(cpf))
throw new ArgumentException(ErroCpfCnpjPreenchidos);
}

cnpj = value;
}
}

Expand All @@ -34,13 +33,12 @@ public string CPF
get { return cpf; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(cnpj))
cpf = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(cnpj))
throw new ArgumentException(ErroCpfCnpjPreenchidos);
}

cpf = value;
}
}
}
Expand Down
26 changes: 11 additions & 15 deletions CTe.Classes/Servicos/DistribuicaoDFe/distDFeInt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ public string CNPJ
get { return _cNPJ; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(_cPF))
_cNPJ = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(_cPF))
throw new ArgumentException(ErroCpfCnpjPreenchidos);
}

_cNPJ = value;
}
}

Expand All @@ -56,13 +55,12 @@ public string CPF
get { return _cPF; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(_cNPJ))
_cPF = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(_cNPJ))
throw new ArgumentException(ErroCpfCnpjPreenchidos);
}

_cPF = value;
}
}

Expand All @@ -74,8 +72,6 @@ public string CPF
/// <summary>
/// A09 - Grupo para consultar um DF-e a partir de um NSU específico
/// </summary>
public consNSU consNSU { get; set; }


public consNSU consNSU { get; set; }
}
}
33 changes: 15 additions & 18 deletions CTe.Classes/Servicos/Evento/dest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ public string CNPJ
get { return _cnpj; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(CPF) & string.IsNullOrEmpty(idEstrangeiro))
_cnpj = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(CPF) || !string.IsNullOrEmpty(idEstrangeiro))
throw new ArgumentException(ErroCpfCnpjIdEstrangeiroPreenchidos);
}

_cnpj = value;
}
}

Expand All @@ -45,13 +44,12 @@ public string CPF
get { return _cpf; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(CNPJ) & string.IsNullOrEmpty(idEstrangeiro))
_cpf = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(CNPJ) || !string.IsNullOrEmpty(idEstrangeiro))
throw new ArgumentException(ErroCpfCnpjIdEstrangeiroPreenchidos);
}

_cpf = value;
}
}

Expand All @@ -63,13 +61,12 @@ public string idEstrangeiro
get { return _idEstrangeiro; }
set
{
if (string.IsNullOrEmpty(value)) return;
if (string.IsNullOrEmpty(CNPJ) & string.IsNullOrEmpty(CPF))
_idEstrangeiro = value;
else
{
if (string.IsNullOrEmpty(value))
return;
if (!string.IsNullOrEmpty(CNPJ) || !string.IsNullOrEmpty(CPF))
throw new ArgumentException(ErroCpfCnpjIdEstrangeiroPreenchidos);
}

_idEstrangeiro = value;
}
}

Expand Down
3 changes: 2 additions & 1 deletion NFe.AppTeste/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,8 @@ protected virtual dest GetDestinatario(VersaoServico versao, ModeloDocumento mod
{
var dest = new dest(versao)
{
CNPJ = "99999999000191",
CNPJ = "0ZEN3MS8000127",
//CNPJ = "99999999000191",
//CPF = "99999999999",
};
dest.xNome = "NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"; //Obrigatório para NFe e opcional para NFCe
Expand Down
Loading