correcion IE cancelado

This commit is contained in:
Rakcsle Supertramp
2019-08-21 10:25:52 -07:00
parent f99828ea9c
commit ea523387a9

View File

@@ -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("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-excel""></i></a>", 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("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-pdf""></i></a>", 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("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-excel""></i></a>", 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("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", 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: <b>{0}</b> &nbsp;", ObjBanco.ComplementoSerieFolio)
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class="" fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class="" fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
'Str.Append($"<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveID={gvr.DataKey("CveIE")}'>{gvr.DataKey("Folio")}</a> &nbsp; {gvr.DataKey("NombreCliente")}<br>")
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False)
Alert(Str.ToString, TipoMensaje.MsgInformacion)