Skip to content

Commit

Permalink
hotfix cfdi40
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfnsw committed Nov 15, 2022
1 parent f58441d commit 966859a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions SW.Tools/Entities/CFDI/Comprobante_Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ public void SetComprobante(string moneda, string tipoDeComprobante, string forma
this.MetodoPagoSpecified = !string.IsNullOrEmpty(this.MetodoPago);
this.lugarExpedicionField = lugarExpedicion;
this.Confirmacion = confirmacion;
this.TipoCambioSpecified = tipoCambio != 0 ? true : false;
this.TipoCambio = tipoCambio;
this.Exportacion = exportacion;
this.Fecha= DateTime.Now.CentralTime();
Expand Down
4 changes: 2 additions & 2 deletions SW.Tools/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.7.4")]
[assembly: AssemblyFileVersion("1.0.7.4")]
[assembly: AssemblyVersion("1.0.7.5")]
[assembly: AssemblyFileVersion("1.0.7.5")]
18 changes: 18 additions & 0 deletions SW.ToolsUT/UT_Tools_BuildInvoiceCFDI40.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ public void UT_StampInvoice()
Assert.IsTrue(response.status == "success");
}

[TestMethod]
public void UT_StampInvoice_2()
{
Comprobante comprobante = new Comprobante();

comprobante.SetComprobante("AMD", "I", "99", "PPD", "20000", "01", null, null, "Condicion", 1m);
comprobante.SetConcepto(1, "50211503", "ZZ", "Cigarros", "1", "NO APLICA", 200.00m, "02", 200.00m);
comprobante.SetConceptoImpuestoTraslado("Tasa", "002", 3592.83m, 0.160000m, 574.85m);
comprobante.SetEmisor("EKU9003173C9", "ESCUELA KEMPER URGATE", "601");
comprobante.SetReceptor("URE180429TM6", "UNIVERSIDAD ROBOTICA ESPAÑOLA", "G01", "65000", "601");
var invoice = comprobante.GetComprobante();
var xmlInvoice = SerializerCfdi40.SerializeDocument(invoice);
xmlInvoice = SignInvoice(xmlInvoice);
Stamp stamp = new Stamp(this.url, this.userStamp, this.passwordStamp);
StampResponseV2 response = stamp.TimbrarV2(xmlInvoice);
Assert.IsTrue(response.status == "success");
}

[TestMethod]
public void UT_CFDI40_InformacionGlobal()
{
Expand Down

0 comments on commit 966859a

Please sign in to comment.