meta data de esta página
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
ejemploenviarfactura [2022/03/29 19:58] scastillo |
ejemploenviarfactura [2024/03/30 08:56] (actual) 47.128.21.134 se ha restaurado la vieja versión (2022/03/29 19:44) |
||
---|---|---|---|
Línea 4: | Línea 4: | ||
<code csharp Enviar> | <code csharp Enviar> | ||
- | try | + | var url = " |
- | { | + | |
- | Cuerpo cuerpo | + | |
- | { | + | |
- | token = textBox161.Text, | + | |
- | documentoElectronico = new DocumentoElectronico() | + | |
- | }; | ||
- | cuerpo.documentoElectronico.encabezado | + | Autent autenticacion |
- | { | + | |
- | identificacionDocumento = new IdentificacionDocumento() | + | |
- | { | + | |
- | tipoDocumento = textBox4.Text, | + | |
- | ncf = textBox5.Text, | + | |
- | fechaVencimientoSecuencia = textBox6.Text, | + | |
- | indicadorEnvioDiferido = textBox7.Text, | + | |
- | indicadorMontoGravado = textBox8.Text, | + | |
- | tipoIngresos = textBox10.Text, | + | |
- | tipoPago = textBox11.Text, | + | |
- | tablaFormasPago = new List< | + | |
- | + | ||
- | + | ||
- | }, | + | |
- | emisor = new Emisor() | + | |
- | { | + | |
- | rnc = textBox19.Text, | + | |
- | razonSocial = textBox20.Text, | + | |
- | nombreComercial = textBox21.Text, | + | |
- | sucursal = textBox22.Text, | + | |
- | direccion = textBox23.Text, | + | |
- | municipio = textBox24.Text, | + | |
- | provincia = textBox25.Text, | + | |
- | tablaTelefono = new List< | + | |
- | correo = textBox26.Text, | + | |
- | webSite = textBox27.Text, | + | |
- | codigoVendedor = textBox29.Text, | + | |
- | numeroFacturaInterna = textBox30.Text, | + | |
- | numeroPedidoInterno = textBox31.Text, | + | |
- | zonaVenta = textBox32.Text, | + | |
- | // | + | |
- | fechaEmision = dateTimePicker1.Value.ToShortDateString().Replace("/"," | + | |
- | }, | + | |
- | + | ||
- | + | ||
- | comprador = new Comprador() | + | |
- | { | + | |
- | rnc = textBox39.Text, | + | |
- | razonSocial = textBox41.Text, | + | |
- | contacto = textBox42.Text, | + | |
- | correo = textBox43.Text, | + | |
- | direccion = textBox44.Text, | + | |
- | municipio = textBox45.Text, | + | |
- | provincia = textBox46.Text, | + | |
- | pais = textBox47.Text, | + | |
- | fechaEntrega = textBox48.Text, | + | |
- | fechaOrden = textBox52.Text, | + | |
- | numeroOrden = textBox53.Text, | + | |
- | codigoInterno = textBox54.Text, | + | |
- | + | ||
- | }, | + | |
- | informacionesAdicionales = new InformacionesAdicionales() | + | |
- | { | + | |
- | numeroContenedor = textBox59.Text, | + | |
- | numeroReferencia = textBox60.Text, | + | |
- | }, | + | |
- | + | ||
- | totales = new Totales() | + | |
- | { | + | |
- | montoGravadoTotal = textBox94.Text, | + | |
- | montoGravadoI1 = textBox95.Text, | + | |
- | itbiS1 = textBox99.Text, | + | |
- | totalITBIS = textBox102.Text, | + | |
- | totalITBIS1 = textBox103.Text, | + | |
- | montoTotal = textBox107.Text, | + | |
- | }, | + | |
- | + | ||
- | }; | + | |
- | TablaFormasPago item = new TablaFormasPago() | + | |
- | { | + | |
- | forma = " | + | |
- | monto = textBox107.Text | + | |
- | }; | + | |
- | + | ||
- | + | ||
- | cuerpo.documentoElectronico.encabezado.identificacionDocumento.tablaFormasPago.Add(item); | + | |
- | + | ||
- | + | ||
- | cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add(" | + | |
- | cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add(" | + | |
- | + | ||
- | DetallesItem detalles = new DetallesItem() | + | |
- | { | + | |
- | numeroLinea = " | + | |
- | indicadorFacturacion = " | + | |
- | nombre = "ASW DTU", | + | |
- | indicadorBienoServicio = " | + | |
- | cantidad = " | + | |
- | unidadMedida = " | + | |
- | precioUnitario = " | + | |
- | monto = " | + | |
- | descripcion=" | + | |
- | + | ||
- | }; | + | |
- | + | ||
- | | + | |
- | edit.Visible = true; | + | |
- | edit.Name = " | + | |
- | edit.Text = " | + | |
- | edit.UseColumnTextForButtonValue = true; | + | |
- | + | ||
- | dataGridView1.Columns.Add(edit); | + | |
- | + | ||
- | detallesItemBindingSource.DataSource = detalles; | + | |
- | cuerpo.documentoElectronico.detallesItems = new List< | + | |
- | cuerpo.documentoElectronico.detallesItems.Add(detalles); | + | |
- | HttpClient cliente = new HttpClient(); | + | |
- | cliente.BaseAddress = new Uri(" | + | |
- | cliente.DefaultRequestHeaders.Add(" | + | |
- | string jsonObject = JsonSerializer.Serialize(cuerpo); | + | |
- | var content = new StringContent(jsonObject.ToString(), | + | |
- | var resp = cliente.PostAsync(" | + | |
- | var resultado = resp.Content.ReadAsStringAsync(); | + | |
- | string dame = resultado.Result; | + | |
- | var Respuesta = JsonSerializer.Deserialize< | + | |
- | if (Respuesta.procesado == true) | + | |
- | { | + | |
- | richTextBox1.Text = Respuesta.codigo.ToString() + " | + | |
- | } | + | |
- | else | + | |
- | { | + | |
- | richTextBox1.Text = Respuesta.codigo.ToString() + " | + | |
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | catch (Exception b) | + | |
{ | { | ||
- | | + | |
- | | + | clave = " |
- | } | + | usuario |
- | + | ||
- | + | ||
- | </ | + | |
- | + | ||
- | Donde se encuentran las siguientes clases: | + | |
- | + | ||
- | <code csharp Clases > | + | |
- | using System; | + | |
- | using System.Collections.Generic; | + | |
- | using System.Linq; | + | |
- | using System.Text; | + | |
- | using System.Threading.Tasks; | + | |
- | + | ||
- | namespace TU_NAMESPACE | + | |
- | { | + | |
- | class Cuerpo | + | |
- | { | + | |
- | + | ||
- | public string token { get; set; } | + | |
- | public DocumentoElectronico documentoElectronico { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class credencial | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string expira { get; set; } | + | |
- | public string expedido { get; set; } | + | |
- | + | ||
- | } | + | |
- | + | ||
- | public class RespRecep | + | |
- | { | + | |
- | + | ||
- | public string trackId { get; set; } | + | |
- | public string error { get; set; } | + | |
- | + | ||
- | public string mensaje { get; set; } | + | |
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | public class Mensajes | + | |
- | { | + | |
- | public string valor { get; set; } | + | |
- | public int codigo { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class RespConsulta | + | |
- | { | + | |
- | public string trackId { get; set; } | + | |
- | public string codigo { get; set; } | + | |
- | public string estado { get; set; } | + | |
- | public string rnc { get; set; } | + | |
- | public string fechaRecepcion { get; set; } | + | |
- | public List< | + | |
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | class Recibido | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | + | ||
- | public string xmlBase64 { get; set; } | + | |
- | public bool procesado { get; set; } | + | |
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | class Aut | + | |
- | { | + | |
- | + | ||
- | public string usuario { get; set; } | + | |
- | public string | + | |
- | | + | |
- | } | + | |
- | + | ||
- | class Anulacion | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string Rnc { get; set; } | + | |
- | public List< | + | |
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | class Enviocorreo | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string documento { get; set; } | + | |
- | + | ||
- | public string Rnc { get; set; } | + | |
- | public List< | + | |
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | class Estatus | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string documento { get; set; } | + | |
- | public string Rnc { get; set; } | + | |
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | public class VerifLic | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string rnc { get; set; } | + | |
- | public string nombre { get; set; } | + | |
- | public string marca { get; set; } | + | |
- | public string modelo { get; set; } | + | |
- | public string idDispositivo { get; set; } | + | |
- | public string serial { get; set; } | + | |
- | public string tipo { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class EstatusLic | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string rnc { get; set; } | + | |
- | public string serial { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class CargaCert | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string rnc { get; set; } | + | |
- | public string cerificadoBase64 { get; set; } | + | |
- | public string claveBase64 { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class DescargaArch | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string rnc { get; set; } | + | |
- | public string documento { get; set; } | + | |
- | public string extension { get; set; } | + | |
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | class RespondAut | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | public string token { get; set; } | + | |
- | public string fechaExpiracion { get; set; } | + | |
- | } | + | |
- | + | ||
- | class RespondAnu | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | public bool procesado { get; set; } | + | |
- | } | + | |
- | + | ||
- | class RecibToken | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | + | ||
- | public string expira { get; set; } | + | |
- | public bool expedido { get; set; } | + | |
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | class RespondLic | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | public string tipo { get; set; } | + | |
- | + | ||
- | } | + | |
- | + | ||
- | public class RespondEstatusLic | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | public string servicio { get; set; } | + | |
- | public string codigoLicencia { get; set; } | + | |
- | public string fechaLicencia { get; set; } | + | |
- | public int cadencia { get; set; } | + | |
- | public int tiempo { get; set; } | + | |
- | public string etapa { get; set; } | + | |
- | public string cicloLicencia { get; set; } | + | |
- | public int utilizadosCiclo { get; set; } | + | |
- | public int total { get; set; } | + | |
- | public int disponible { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class RespondArch | + | |
- | { | + | |
- | public int codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | public string archivo { get; set; } | + | |
- | public bool procesado { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Autent | + | |
- | { | + | |
- | public string rnc { get; set; } | + | |
- | public string clave { get; set; } | + | |
- | public string | + | |
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | public class RespAutent | + | |
- | { | + | |
- | public string token { get; set; } | + | |
- | public string fechaExpiracion { get; set; } | + | |
- | + | ||
- | public double codigo { get; set; } | + | |
- | public string mensaje { get; set; } | + | |
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | // | + | |
- | public class Request | + | |
- | { | + | |
- | public string Type { get; set; } | + | |
- | public string Query { get; set; } | + | |
- | public string Language { get; set; } | + | |
- | public string Unit { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Location | + | |
- | { | + | |
- | public string Name { get; set; } | + | |
- | public string Country { get; set; } | + | |
- | public string Region { get; set; } | + | |
- | public string Lat { get; set; } | + | |
- | public string Lon { get; set; } | + | |
- | public string Timezone_id { get; set; } | + | |
- | public string Localtime { get; set; } | + | |
- | public int Localtime_epoch { get; set; } | + | |
- | public string Utc_offset { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Current | + | |
- | { | + | |
- | public string observation_time { get; set; } | + | |
- | public int temperature { get; set; } | + | |
- | public int weather_code { get; set; } | + | |
- | public List< | + | |
- | public List< | + | |
- | public int wind_speed { get; set; } | + | |
- | public int wind_degree { get; set; } | + | |
- | public string wind_dir { get; set; } | + | |
- | public int pressure { get; set; } | + | |
- | public double precip { get; set; } | + | |
- | public int humidity { get; set; } | + | |
- | public int cloudcover { get; set; } | + | |
- | public int feelslike { get; set; } | + | |
- | public int uv_index { get; set; } | + | |
- | public int visibility { get; set; } | + | |
- | public string is_day { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Clima | + | |
- | { | + | |
- | public Request request { get; set; } | + | |
- | public Location location { get; set; } | + | |
- | public Current current { get; set; } | + | |
- | } | + | |
- | + | ||
- | + | ||
- | public class TablaFormasPago | + | |
- | { | + | |
- | public string forma { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class IdentificacionDocumento | + | |
- | { | + | |
- | public string tipoDocumento { get; set; } | + | |
- | public string ncf { get; set; } | + | |
- | public string fechaVencimientoSecuencia { get; set; } | + | |
- | public string indicadorEnvioDiferido { get; set; } | + | |
- | public string indicadorMontoGravado { get; set; } | + | |
- | public string indicadorNotaCredito { get; set; } | + | |
- | public string tipoIngresos { get; set; } | + | |
- | public string tipoPago { get; set; } | + | |
- | public string fechaLimitePago { get; set; } | + | |
- | public string terminoPago { get; set; } | + | |
- | public List< | + | |
- | public string tipoCuentaPago { get; set; } | + | |
- | public string numeroCuentaPago { get; set; } | + | |
- | public string bancoPago { get; set; } | + | |
- | public string fechaDesde { get; set; } | + | |
- | public string fechaHasta { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Emisor | + | |
- | { | + | |
- | public string rnc { get; set; } | + | |
- | public string razonSocial { get; set; } | + | |
- | public string nombreComercial { get; set; } | + | |
- | public string sucursal { get; set; } | + | |
- | public string direccion { get; set; } | + | |
- | public string municipio { get; set; } | + | |
- | public string provincia { get; set; } | + | |
- | public List< | + | |
- | public string correo { get; set; } | + | |
- | public string webSite { get; set; } | + | |
- | public string actividadEconomica { get; set; } | + | |
- | public string codigoVendedor { get; set; } | + | |
- | public string numeroFacturaInterna { get; set; } | + | |
- | public string numeroPedidoInterno { get; set; } | + | |
- | public string zonaVenta { get; set; } | + | |
- | public string rutaVenta { get; set; } | + | |
- | public string informacionAdicional { get; set; } | + | |
- | public string fechaEmision { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Comprador | + | |
- | { | + | |
- | public string rnc { get; set; } | + | |
- | public string identificacionExtranjero { get; set; } | + | |
- | public string razonSocial { get; set; } | + | |
- | public string contacto { get; set; } | + | |
- | public string correo { get; set; } | + | |
- | public string direccion { get; set; } | + | |
- | public string municipio { get; set; } | + | |
- | public string provincia { get; set; } | + | |
- | public string pais { get; set; } | + | |
- | public string fechaEntrega { get; set; } | + | |
- | public string contactoEntrega { get; set; } | + | |
- | public string direccionEntrega { get; set; } | + | |
- | public string telefonoAdicional { get; set; } | + | |
- | public string fechaOrden { get; set; } | + | |
- | public string numeroOrden { get; set; } | + | |
- | public string codigoInterno { get; set; } | + | |
- | public string responsablePago { get; set; } | + | |
- | public string informacionAdicional { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class InformacionesAdicionales | + | |
- | { | + | |
- | public string fechaEmbarque { get; set; } | + | |
- | public string numeroEmbarque { get; set; } | + | |
- | public string numeroContenedor { get; set; } | + | |
- | public string numeroReferencia { get; set; } | + | |
- | public string pesoBruto { get; set; } | + | |
- | public string pesoNeto { get; set; } | + | |
- | public string unidadPesoBruto { get; set; } | + | |
- | public string unidadPesoNeto { get; set; } | + | |
- | public string cantidadBulto { get; set; } | + | |
- | public string unidadBulto { get; set; } | + | |
- | public string volumenBulto { get; set; } | + | |
- | public string unidadVolumen { get; set; } | + | |
- | public string nombrePuertoEmbarque { get; set; } | + | |
- | public string condicionesEntrega { get; set; } | + | |
- | public string totalFob { get; set; } | + | |
- | public string seguro { get; set; } | + | |
- | public string flete { get; set; } | + | |
- | public string otrosGastos { get; set; } | + | |
- | public string totalCif { get; set; } | + | |
- | public string regimenAduanero { get; set; } | + | |
- | public string nombrePuertoSalida { get; set; } | + | |
- | public string nombrePuertoDesembarque { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Transporte | + | |
- | { | + | |
- | public string conductor { get; set; } | + | |
- | public int documento { get; set; } | + | |
- | public string ficha { get; set; } | + | |
- | public string placa { get; set; } | + | |
- | public string ruta { get; set; } | + | |
- | public string zona { get; set; } | + | |
- | public string numeroAlbaran { get; set; } | + | |
- | public string via { get; set; } | + | |
- | public string paisOrigen { get; set; } | + | |
- | public string direccionDestino { get; set; } | + | |
- | public string paisDestino { get; set; } | + | |
- | public string rncIdentificacionCompaniaTransportista { get; set; } | + | |
- | public string nombreCompaniaTransportista { get; set; } | + | |
- | public string numeroViaje { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class ImpuestosAdicionale | + | |
- | { | + | |
- | public string tipoImpuesto { get; set; } | + | |
- | public string tasaImpuestoAdicional { get; set; } | + | |
- | public string montoImpuestoSelectivoConsumoEspecifico { get; set; } | + | |
- | public string montoImpuestoSelectivoConsumoAdvalorem { get; set; } | + | |
- | public string otrosImpuestosAdicionales { get; set; } | + | |
- | public string tipo { get; set; } | + | |
- | public string tasa { get; set; } | + | |
- | public string montoSelectivoConsumoEspecifico { get; set; } | + | |
- | public string montoSelectivoConsumoAdvalorem { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Totales | + | |
- | { | + | |
- | public string montoGravadoTotal { get; set; } | + | |
- | public string montoGravadoI1 { get; set; } | + | |
- | public string montoGravadoI2 { get; set; } | + | |
- | public string montoGravadoI3 { get; set; } | + | |
- | public string montoExento { get; set; } | + | |
- | public string itbiS1 { get; set; } | + | |
- | public string itbiS2 { get; set; } | + | |
- | public string itbiS3 { get; set; } | + | |
- | public string totalITBIS { get; set; } | + | |
- | public string totalITBIS1 { get; set; } | + | |
- | public string totalITBIS2 { get; set; } | + | |
- | public string totalITBIS3 { get; set; } | + | |
- | public string montoImpuestoAdicional { get; set; } | + | |
- | public List< | + | |
- | public string montoTotal { get; set; } | + | |
- | public string montoNoFacturable { get; set; } | + | |
- | public string montoPeriodo { get; set; } | + | |
- | public string saldoAnterior { get; set; } | + | |
- | public string montoAvancePago { get; set; } | + | |
- | public string valorPagar { get; set; } | + | |
- | public string totalITBISRetenido { get; set; } | + | |
- | public string totalISRRetencion { get; set; } | + | |
- | public string totalITBISPercepcion { get; set; } | + | |
- | public string totalISRPercepcion { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class OtraMoneda | + | |
- | { | + | |
- | public string tipoMoneda { get; set; } | + | |
- | public string tipoCambio { get; set; } | + | |
- | public string montoGravadoTotal { get; set; } | + | |
- | public string montoGravado1 { get; set; } | + | |
- | public string montoGravado2 { get; set; } | + | |
- | public string montoGravado3 { get; set; } | + | |
- | public string montoExento { get; set; } | + | |
- | public string montoExentoOtraMoneda { get; set; } | + | |
- | public string totalITBIS { get; set; } | + | |
- | public string totalITBIS1 { get; set; } | + | |
- | public string totalITBIS2 { get; set; } | + | |
- | public string totalITBIS3 { get; set; } | + | |
- | public string montoImpuestoAdicional { get; set; } | + | |
- | public List< | + | |
- | public string montoTotal { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Encabezado | + | |
- | { | + | |
- | public IdentificacionDocumento identificacionDocumento { get; set; } | + | |
- | public Emisor emisor { get; set; } | + | |
- | public Comprador comprador { get; set; } | + | |
- | public InformacionesAdicionales informacionesAdicionales { get; set; } | + | |
- | public Transporte transporte { get; set; } | + | |
- | public Totales totales { get; set; } | + | |
- | public OtraMoneda otraMoneda { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class TablaCodigo | + | |
- | { | + | |
- | public string tipo { get; set; } | + | |
- | public string codigo { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Retencion | + | |
- | { | + | |
- | public string indicadorAgente { get; set; } | + | |
- | public string montoITBIS { get; set; } | + | |
- | public string montoISR { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class TablaSubcantidad | + | |
- | { | + | |
- | public string subcantidad { get; set; } | + | |
- | public string codigo { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Mineria | + | |
- | { | + | |
- | public string pesoNetoKilogramo { get; set; } | + | |
- | public string pesoNeto { get; set; } | + | |
- | public string tipoAfiliacion { get; set; } | + | |
- | public string liquidacion { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class TablaSubDescuento | + | |
- | { | + | |
- | public string tipo { get; set; } | + | |
- | public string porcentaje { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class TablaSubRecargo | + | |
- | { | + | |
- | public string tipo { get; set; } | + | |
- | public string porcentaje { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class TablaImpuestoAdicional | + | |
- | { | + | |
- | public string tipoImpuesto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class OtraMonedaDetalle | + | |
- | { | + | |
- | public string precio { get; set; } | + | |
- | public string descuento { get; set; } | + | |
- | public string recargo { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class DetallesItem | + | |
- | { | + | |
- | public string numeroLinea { get; set; } | + | |
- | public List< | + | |
- | public string indicadorFacturacion { get; set; } | + | |
- | public Retencion retencion { get; set; } | + | |
- | public string nombre { get; set; } | + | |
- | public string indicadorBienoServicio { get; set; } | + | |
- | public string descripcion { get; set; } | + | |
- | public string cantidad { get; set; } | + | |
- | public string unidadMedida { get; set; } | + | |
- | public string cantidadReferencia { get; set; } | + | |
- | public string unidadReferencia { get; set; } | + | |
- | public List< | + | |
- | public string gradosAlcohol { get; set; } | + | |
- | public string precioUnitarioReferencia { get; set; } | + | |
- | public string fechaElaboracion { get; set; } | + | |
- | public string fechaVencimiento { get; set; } | + | |
- | public List< | + | |
- | public string precioUnitario { get; set; } | + | |
- | public string descuentoMonto { get; set; } | + | |
- | public List< | + | |
- | public string recargoMonto { get; set; } | + | |
- | public List< | + | |
- | public List< | + | |
- | public OtraMonedaDetalle otraMonedaDetalle { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class Subtotale | + | |
- | { | + | |
- | public int numero { get; set; } | + | |
- | public string descripcion { get; set; } | + | |
- | public int orden { get; set; } | + | |
- | public string montoGravadoTotal { get; set; } | + | |
- | public string montoGravadoI1 { get; set; } | + | |
- | public string montoGravadoI2 { get; set; } | + | |
- | public string montoGravadoI3 { get; set; } | + | |
- | public string itbiS { get; set; } | + | |
- | public string itbiS1 { get; set; } | + | |
- | public string itbiS2 { get; set; } | + | |
- | public string itbiS3 { get; set; } | + | |
- | public string impuestoAdicional { get; set; } | + | |
- | public string exento { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | public int lineas { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class DescuentosORecargo | + | |
- | { | + | |
- | public int numeroLinea { get; set; } | + | |
- | public string tipoAjuste { get; set; } | + | |
- | public string indicadorNorma1007 { get; set; } | + | |
- | public string descripcion { get; set; } | + | |
- | public string tipoValor { get; set; } | + | |
- | public string valor { get; set; } | + | |
- | public string monto { get; set; } | + | |
- | public string montoOtraMoneda { get; set; } | + | |
- | public string indicadorFacturacion { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class InformacionReferencia | + | |
- | { | + | |
- | public string ncfModificado { get; set; } | + | |
- | public string rncOtroContribuyente { get; set; } | + | |
- | public string fechaNCFModificado { get; set; } | + | |
- | public string codigoModificacion { get; set; } | + | |
- | public string razonModificacion { get; set; } | + | |
- | } | + | |
- | + | ||
- | public class DocumentoElectronico | + | |
- | { | + | |
- | public Encabezado encabezado { get; set; } | + | |
- | public List< | + | |
- | public List< | + | |
- | public List< | + | |
- | public InformacionReferencia informacionReferencia { get; set; } | + | |
- | } | + | |
+ | }; | ||
+ | var resultado = Post(autenticacion, | ||
+ | RespAutent Respuesta = new RespAutent(); | ||
+ | Respuesta = JsonSerializer.Deserialize< | ||
- | } | + | textBox161.Text = Respuesta.token; |
</ | </ | ||