Permiso vinculacion manual

This commit is contained in:
Rakcsle Supertramp
2020-01-14 13:17:16 -07:00
parent 20d1fd4dae
commit 1c90f96759

View File

@@ -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 = $"<b>&nbsp;&nbsp;-&nbsp;&nbsp; IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
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