?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
----
=== Proceso para consumo EnviarNotaCredito ===
* Se inicializa un objeto ServiceClient o Servicio
* Se inicializa un objeto PeticionNotaCredito donde se ingresan el RUC, el usuario de Integración ,clave de Integración y Documento
* Se hace consumo del método EnviarNotaCredito contenido en el objeto serviceClient y se coloca como parámetro la petición anterior, la respuesta estará contenida en un objeto llamado RespuestaPeticion, la respuesta tendrá los parámetros Código,Mensaje y Archivo
try
{
ServiceClient servicio = new ServiceClient();
PeticionNotaCredito pet = new PeticionNotaCredito();
pet.Clave = "claveintegracion";
pet.RUC = "1792455544432";
pet.Usuario = "usuariointegracion";
pet.Documento = new NotaCredito();
NotaCredito not = new NotaCredito();
//******************************INFOTRIBUTARIA*********************************
not.InfoTributaria = new InfoTributaria();
not.InfoTributaria = InformacionTrib();
not.CorreoNotificar = textBox76.Text;
not.DirCliente = "Direccopn del clinete";
//*******************************INFONOTACREDITO*********************************
not.InfoNotaCredito = new InfoNotaCredito();
InfoNotaCredito infonot = new InfoNotaCredito
{
CodDocModificado = textBox47.Text,
ContribuyenteEspecial = textBox48.Text,
DirEstablecimiento = textBox49.Text,
FechaEmision = textBox50.Text,
IdentificacionComprador = textBox51.Text,
ObligadoContabilidad = textBox52.Text,
Rise = textBox53.Text,
FechaEmisionDocSustento = textBox54.Text,
NumDocModificado = textBox55.Text,
RazonSocialComprador = textBox56.Text,
TotalSinImpuestos = textBox57.Text,
TipoIdentificacionComprador = textBox58.Text,
Motivo = textBox59.Text,
ValorModificacion = textBox61.Text,
};
infonot.Moneda = "USD";
ImpuestoTotalNotaCredito totalConImpuesto = new ImpuestoTotalNotaCredito
{
BaseImponible = textBox35.Text,
Codigo = textBox36.Text,
CodigoPorcentaje = textBox37.Text,
Valor = textBox40.Text,
};
totalConImpuesto.ValorDevolucionIva = "0.00";
infonot.TotalConImpuestos = new List();
infonot.TotalConImpuestos.Add(totalConImpuesto);
not.InfoNotaCredito = infonot;
//**********************************************DETALLES*********************************
not.Detalles = new List();
DetalleNotaCredito det = new DetalleNotaCredito
{
CodigoAdicional = textBox67.Text,
CodigoInterno = textBox68.Text,
Descripcion = textBox69.Text,
Cantidad = textBox70.Text,
PrecioUnitario = textBox71.Text,
Descuento = textBox73.Text,
PrecioTotalSinImpuesto = textBox75.Text,
};
det.DetAdicional = new List();
DetAdicional detAd = new DetAdicional();
detAd.Nombre = "NOmbredetadicioanl";
detAd.Valor = "valordetadicional";
det.DetAdicional.Add(detAd);
det.Impuestos = new List();
det.Impuestos.Add(ImpuestDet());
not.Detalles.Add(det);
not.Notificar = "SI";
not.Version = "1.1.0";
pet.Documento = not;
var resp = servicio.EnviarNotaCredito(pet);
servicio.Close();
richTextBox1.Text = resp.Mensaje + "--" + resp.Codigo + "--" + "\r\n" + resp.Archivo;
}
catch (Exception ex)
{
MessageBox.Show("Mensaje error: " + ex);
}
== ARCHIVOS NOTA DE CREDITO XML/XSD ==
En este enlace se encuentran disponibles los xml y xsd de Nota de Credito
{{ :xml_y_xsd_nota_de_credito.zip |}}
----
[[manual_de_integracion_obj|{{:60577.png?30x30 }}]]