diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index fffc527d3..986e9c64a 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -408,12 +408,27 @@ Partial Class Bancos_IE
Set(value As Integer)
ViewState("IdCtaAnticipoExtranjera") = value
End Set
- End Property
-
-
-
+ End Property
+
+ Private Property CveEstatusIE As Integer
+ Get
+ If ViewState("CveEstatusIE") Is Nothing Then
+ Return -1
+ Else
+ Return ViewState("CveEstatusIE").ToString.ToEntero
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveEstatusIE") = value
+ End Set
+
+ End Property
+
+
+
+
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
-
+
Property CveComplementoPagoCancelar As Integer
Get
If ViewState("CveComplementoPagoCancelar") Is Nothing Then
@@ -855,6 +870,8 @@ Partial Class Bancos_IE
LblRegistroFecha.Text = ObjIE.FechaIng.ToShortDateString
LblRegistroUsuario.Text = ObjIE.Usuario
+ CveEstatusIE = ObjIE.CveEstatusIE
+
Select Case ObjIE.CveEstatusIE
Case 1
If Not ObjIE.FueConciliado Then
@@ -954,6 +971,7 @@ Partial Class Bancos_IE
LnkComplementoPago.Visible = True
+
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
'cuando es cheque devuelto
TabCancelacion.Visible = True
@@ -1060,14 +1078,12 @@ Partial Class Bancos_IE
If Not ChkConciliado.Checked Then
-
- If Not VerificaComplementos(True) Then
+ If (Not VerificaComplementos(True)) And UsuarioActual.TienePermisoProceso(99) And ObjIE.CveEstatusIE <> 2 Then
BtnEditar.Visible = True
End If
UpGuardar.Update()
-
End If
@@ -4757,31 +4773,31 @@ Partial Class Bancos_IE
End If
ObjOI.Dispose()
Return ""
- End Function
+ End Function
#End Region
-
+
#Region " COMPLEMENTOS PAGO "
- Private Sub CargaComplementosPago()
-
+ Private Sub CargaComplementosPago()
+
+
+
+
Dim ObjBancos As New ClsBancos
If UsuarioActual.CveRol = 1 Then
GvComplementoPagos.Columns(7).Visible = True
- End If
-
+ End If
+
+ DVGenerarComplementoModal.Visible = False
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
GvComplementoPagos.DataSource = ObjBancos.DtResultados
- If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 Then
- DVGenerarComplementoModal.Visible = True
- Else
-
- DVGenerarComplementoModal.Visible = False
+ If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 And CveEstatusIE <> 2 Then
+ DVGenerarComplementoModal.Visible = True
End If
- Else
- DVGenerarComplementoModal.Visible = False
+ Else
GvComplementoPagos.DataSource = Nothing
End If
@@ -4801,8 +4817,8 @@ Partial Class Bancos_IE
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
- e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
+ e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
+ e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
@@ -4830,8 +4846,8 @@ Partial Class Bancos_IE
If ObjBanco.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, FolioFiscalPadre, EsRegeneracion:=True) Then
ObjBanco.Commit()
Str.AppendFormat("Folio: {0} ", ObjBanco.ComplementoSerieFolio)
- Str.AppendFormat("XML ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
- Str.AppendFormat("PDF ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
+ Str.AppendFormat("XML ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
+ Str.AppendFormat("PDF ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
'Str.Append($"{gvr.DataKey("Folio")} {gvr.DataKey("NombreCliente")}
")
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False)
Alert(Str.ToString, TipoMensaje.MsgInformacion)