From 1c90f96759c239138c89a677212696b9658c667b Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 14 Jan 2020 13:17:16 -0700 Subject: [PATCH] Permiso vinculacion manual --- Compras/eFacturas.aspx.vb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index bf1189f9b..9ad938988 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2815,6 +2815,9 @@ Partial Class Compras_eFacturas CveProveedor = gvRow.DataKey("CveProveedor").ToEntero Dim ObjCompras As New ClsCompras + + Dim TieneRegistros As Boolean = False + If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then GvVincularPago.DataSource = ObjCompras.DtResultados @@ -2822,7 +2825,7 @@ Partial Class Compras_eFacturas SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString DivVincularPagoManualmente.Visible = False BtnVincularPago.Visible = True - + TieneRegistros = True Else DivVincularPagoManualmente.Visible = True BtnVincularPago.Visible = False @@ -2835,6 +2838,7 @@ Partial Class Compras_eFacturas + For Each drow As DataRow In ObjCompras.DtResultados.FiltraParametros("CveIE > 0 AND FechaDocumento IS NOT NULL", "", {"FechaDocumento"}).Rows Dim FechaDocumento As Date = drow("FechaDocumento").ToString.ToDate @@ -2873,12 +2877,18 @@ Partial Class Compras_eFacturas TextoDiferenciaImporte = $"  -   IE ${ImporteIES.FormatoNumero}
Diferencia { DiferenciaImportes.FormatoNumero() }
" BtnVincularPago.Visible = False MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})" + + If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then + DivVincularPagoManualmente.Visible = True + End If + Else 'BtnVincularPago.Visible = True 'TextoDiferenciaImporte = "" End If + LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}" LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero LblPagosCantidad.Text = PagosCantidad.ToString @@ -2893,7 +2903,7 @@ Partial Class Compras_eFacturas Else LblMensajeComlementoError.Text = "" DVMensajecomplementoError.Visible = False - + DivVincularPagoManualmente.Visible = False End If