Inventia.Facturacion 4.0.4

dotnet add package Inventia.Facturacion --version 4.0.4
NuGet\Install-Package Inventia.Facturacion -Version 4.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Inventia.Facturacion" Version="4.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Inventia.Facturacion --version 4.0.4
#r "nuget: Inventia.Facturacion, 4.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Inventia.Facturacion as a Cake Addin
#addin nuget:?package=Inventia.Facturacion&version=4.0.4

// Install Inventia.Facturacion as a Cake Tool
#tool nuget:?package=Inventia.Facturacion&version=4.0.4

Ejemplo de uso de la librería con la transmisión de una factura en el entorno beta de SUNAT.

Credenciales credenciales;
DatosEmpresa DatosEmisor;
DatosEmpresa DatosClienteRUC;

Uri UrlServicioWebAPI = new Uri("http://sunatservice.inventia.pe");

credenciales = new Credenciales()
{
	Ruc = "20131371617",
	Token = "B8916317-1BEC-45C1-A36F-2D5B968EB6A5",
	Usuario = "MODDATOS",
	Password = "MODDATOS",
	Entorno = EntornoSunat.Beta
};

DatosEmisor = new DatosEmpresa()
{
	Informacion = new InfoCliente()
	{
		RazonSocial = "MINISTERIO DE JUSTICIA Y DERECHOS HUMANOS",
		NombreComercial = "MINISTERIO DE JUSTICIA Y DERECHOS HUMANOS",
		TipoDocumento = "6",
		NumeroDocumento = "20131371617"
	},
	Direccion = new DatosDireccion()
	{
		CodigoUbigeo = "150122",
		DireccionCompleta = "Jr. Scipion Llona Nro. 350 (Altura Cuadra 42 de Arequipa)",
		Urbanizacion = "LIMA",
		Provincia = "LIMA",
		Departamento = "LIMA",
		Distrito = "MIRAFLORES",
		CodigoPais = "PE"
	}
};

DatosClienteRUC = new DatosEmpresa()
{
	Informacion = new InfoCliente()
	{
		RazonSocial = "GOBIERNO REGIONAL LAMBAYEQUE",
		NombreComercial = "GOBIERNO REGIONAL LAMBAYEQUE",
		TipoDocumento = "6",
		NumeroDocumento = "20479569780"
	}
};

var comprobanteElectronico = new ComprobanteElectronico();
comprobanteElectronico.Documento = new Documento();

var cabecera = new Cabecera()
{
	VersionUBL = TipoVersionUBL.Version_2_1,
	TipoDocumento = "01",
	Serie = "F001",
	Numero = "00020125",
	FechaEmision = new DateTime(2018, 10, 12),
	MonedaDocumento = "PEN",
	TotalEnLetras = "SON CUATROCIENTOS DIECINUEVE Y 76/100 SOLES",
	Transmitir = true,
	DatosEmisor = DatosEmisor,
	DatosCliente = DatosClienteRUC,
	Importes = new Importes()
	{
		MontoTotalImpuestos = 64.03M,
		TotalIGV = 64.03M,
		ImporteTotalPagar = 419.76M,
		TotalOperacionesGravadas = 355.73M,
		DatosDetraccion = new DatosDetraccion()
		{
			ServicioTransporteFormaPago = "001"
		},
		TotalValorVenta = 355.73M,
		TotalPrecioVenta = 419.76M
	},
	TipoOperacion = "0101"
};

var detalles = new List<Detalle>();
detalles.Add(new Detalle()
{
	NumeroItem = "1",
	UnidadMedida = "EA",
	CantidadUnidades = 1,
	Descripcion = " PRODUCTO 1",
	ValorVentaUnitario = 295.32M,
	PrecioVentaUnitario = 348.48M,
	MontoTotalImpuestos = 53.16M,
	TotalIGV = 53.16M,
	TotalIGVBase = 295.32M,
	PorcentajeIGV = 18.00M,
	AfectacionIGV = "10",
	IdentificadorItem = "39845",
	ImporteTotalItem = 295.32M,
	TipoSistemaISC = "01"
});

detalles.Add(new Detalle()
{
	NumeroItem = "2",
	UnidadMedida = "PR",
	CantidadUnidades = 1,
	Descripcion = " PRODUCTO 2",
	ValorVentaUnitario = 60.41M,
	PrecioVentaUnitario = 71.28M,
	MontoTotalImpuestos = 10.87M,
	TotalIGV = 10.87M,
	TotalIGVBase = 60.41M,
	PorcentajeIGV = 18.00M,
	AfectacionIGV = "10",
	IdentificadorItem = "23177",
	ImporteTotalItem = 60.41M,
	TipoSistemaISC = "01"
});

comprobanteElectronico.Documento.Credenciales = credenciales;
comprobanteElectronico.Documento.Cabecera = cabecera;
comprobanteElectronico.Documento.Detalles = detalles;

var operaciones = new OperacionesWeb(UrlServicioWebAPI);
try
{
	var respuesta = operaciones.Transmitir(comprobanteElectronico);
}
catch (Exception ex)
{
	throw;
}
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.4 632 7/25/2019