Correcion en complementos de PAGO

This commit is contained in:
2021-04-14 17:10:15 -07:00
parent 905ce69fb7
commit a826b2f1d4
2 changed files with 22 additions and 16 deletions

View File

@@ -72,7 +72,7 @@ Partial Class Bancos_RepComplementoPago
Dim Banco As New ClsBancos Dim Banco As New ClsBancos
Banco.IniciaTransacSQL() Banco.IniciaTransacSQL()
Try
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
If Banco.Mensaje = "" Then If Banco.Mensaje = "" Then
Banco.Commit() Banco.Commit()
@@ -83,12 +83,14 @@ Partial Class Bancos_RepComplementoPago
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> &nbsp; {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente")) Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> &nbsp; {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo")) MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
End If End If
Else Else
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje) Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
Banco.RollBack() Banco.RollBack()
End If End If
Catch ex As Exception
OnError("Ocurrió un error al generar el complemento de pago", ex)
Banco.RollBack()
End Try
Banco.Dispose() Banco.Dispose()
End If End If
Next Next

View File

@@ -456,7 +456,11 @@ Partial Class PopUpVerFactura
If UrlParametros("EXT").ToString.ToUpper = "PDF" Then If UrlParametros("EXT").ToString.ToUpper = "PDF" Then
If UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero > 0 Then If UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero > 0 Then
PDFReciboDePagos(-1, UrlParametros("CVEIE").ToString.ToEntero, UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero, False) 'genero el documento de no existir Dim CveIE As Integer = -1
If UrlParametros("CVEIE") IsNot Nothing Then
CveIE = UrlParametros("CVEIE").ToString.ToEntero
End If
PDFReciboDePagos(-1, CveIE, UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero, False) 'genero el documento de no existir
End If End If
End If End If