IsaRoGaMX.Cfdi.LeyendasFiscales 1.1.0

dotnet add package IsaRoGaMX.Cfdi.LeyendasFiscales --version 1.1.0                
NuGet\Install-Package IsaRoGaMX.Cfdi.LeyendasFiscales -Version 1.1.0                
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="IsaRoGaMX.Cfdi.LeyendasFiscales" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IsaRoGaMX.Cfdi.LeyendasFiscales --version 1.1.0                
#r "nuget: IsaRoGaMX.Cfdi.LeyendasFiscales, 1.1.0"                
#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 IsaRoGaMX.Cfdi.LeyendasFiscales as a Cake Addin
#addin nuget:?package=IsaRoGaMX.Cfdi.LeyendasFiscales&version=1.1.0

// Install IsaRoGaMX.Cfdi.LeyendasFiscales as a Cake Tool
#tool nuget:?package=IsaRoGaMX.Cfdi.LeyendasFiscales&version=1.1.0                

IsaRoGaMX.Cfdi.LeyendasFiscales

Librería para generar el Complemento de Leyendas Fiscales

Versiones soportadas
  • 1.0

Ejemplo

string xsltFile = @"cadenaoriginal_4_0.xslt";
string cerFile = @"EKU9003173C9.cer";
string keyFile = @"EKU9003173C9.key";
string password = "12345678a";

// Se lee el Certificado
var cerInfo = CsdUtils.LeerCertificado(cerFile);

// Se crea el comprobante
IsaRoGaMX.Cfdi.v40.Comprobante cfdi = new IsaRoGaMX.Cfdi.v40.Comprobante();

// Datos de la Factura
cfdi["Serie"] = "LF";
cfdi["Folio"] = "1234";
cfdi["Fecha"] = DateTime.Now.ToString("s");
cfdi["FormaPago"] = "99";
cfdi["CondicionesDePago"] = "CondicionesDePago";
cfdi["SubTotal"] = "200";
cfdi["Moneda"] = "MXN";
cfdi["TipoCambio"] = "1";
cfdi["Total"] = "232.00";
cfdi["TipoDeComprobante"] = "I";
cfdi["Exportacion"] = "01";
cfdi["MetodoPago"] = "PUE";            
cfdi["LugarExpedicion"] = "20000";
cfdi["Certificado"] = cerInfo.Certificado;
cfdi["NoCertificado"] = cerInfo.NoCertificado;

// Emisor
cfdi.Emisor["Rfc"] = "EKU9003173C9";
cfdi.Emisor["Nombre"] = "ESCUELA KEMPER URGATE";
cfdi.Emisor["RegimenFiscal"] = "601";

// Receptor
cfdi.Receptor["Rfc"] = "URE180429TM6";
cfdi.Receptor["Nombre"] = "UNIVERSIDAD ROBOTICA ESPAÑOLA";
cfdi.Receptor["DomicilioFiscalReceptor"] = "65000";
cfdi.Receptor["RegimenFiscalReceptor"] = "601";
cfdi.Receptor["UsoCFDI"] = "G01";

// Concepto
cfdi.Conceptos[0]["ClaveProdServ"] = "50211503";
cfdi.Conceptos[0]["NoIdentificacion"] = "UT421511";
cfdi.Conceptos[0]["Cantidad"] = "1";
cfdi.Conceptos[0]["ClaveUnidad"] = "H87";
cfdi.Conceptos[0]["Unidad"] = "Pieza";
cfdi.Conceptos[0]["Descripcion"] = "Cigarros";
cfdi.Conceptos[0]["ValorUnitario"] = "200.00";
cfdi.Conceptos[0]["Importe"] = "200.00";
cfdi.Conceptos[0]["ObjetoImp"] = "02";

cfdi.Conceptos[0].Impuestos.Traslados[0]["Base"] = "200";
cfdi.Conceptos[0].Impuestos.Traslados[0]["Impuesto"] = "002";
cfdi.Conceptos[0].Impuestos.Traslados[0]["TipoFactor"] = "Tasa";
cfdi.Conceptos[0].Impuestos.Traslados[0]["TasaOCuota"] = "0.160000";
cfdi.Conceptos[0].Impuestos.Traslados[0]["Importe"] = "32.00";

// Impuestos
cfdi.Impuestos["TotalImpuestosTrasladados"] = "32.00";

cfdi.Impuestos.Traslados[0]["Base"] = "200";
cfdi.Impuestos.Traslados[0]["Impuesto"] = "002";
cfdi.Impuestos.Traslados[0]["TasaOCuota"] = "0.160000";
cfdi.Impuestos.Traslados[0]["TipoFactor"] = "Tasa";
cfdi.Impuestos.Traslados[0]["Importe"] = "32.00";

// Complemento Leyendas Fiscales
var leyendasFisc = new IsaRoGaMX.Cfdi.LeyendasFiscales.v10.LeyendasFiscales();

// Primera leyenda
leyendasFisc[0]["disposicionFiscal"] = "ISR";
leyendasFisc[0]["norma"] = "133";
leyendasFisc[0]["textoLeyenda"] = "Efectos fiscales al pago";

// Se agrega el complemento
cfdi.AgregaComplemento(leyendasFisc);

// Genera cadena original
string cadenaOriginal = XsltTransform.GeneraCadenaOriginal(cfdi.Documento, xsltFile);

// Genera sello
cfdi["Sello"] = CsdUtils.GeneraSelloFiscalDigital(cadenaOriginal, keyFile, password);

// Se guarda el XML
cfdi.Documento.Save("cfdi.xml");
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net35 is compatible.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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
1.1.0 109 8/2/2024
1.1.0-rc 177 6/11/2022