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 CveProveedor = gvRow.DataKey("CveProveedor").ToEntero
Dim ObjCompras As New ClsCompras 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 If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
GvVincularPago.DataSource = ObjCompras.DtResultados GvVincularPago.DataSource = ObjCompras.DtResultados
@@ -2822,7 +2825,7 @@ Partial Class Compras_eFacturas
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
DivVincularPagoManualmente.Visible = False DivVincularPagoManualmente.Visible = False
BtnVincularPago.Visible = True BtnVincularPago.Visible = True
TieneRegistros = True
Else Else
DivVincularPagoManualmente.Visible = True DivVincularPagoManualmente.Visible = True
BtnVincularPago.Visible = False 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 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 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>" TextoDiferenciaImporte = $"<b>&nbsp;&nbsp;-&nbsp;&nbsp; IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
BtnVincularPago.Visible = False BtnVincularPago.Visible = False
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})" 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 Else
'BtnVincularPago.Visible = True 'BtnVincularPago.Visible = True
'TextoDiferenciaImporte = "" 'TextoDiferenciaImporte = ""
End If End If
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}" LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero
LblPagosCantidad.Text = PagosCantidad.ToString LblPagosCantidad.Text = PagosCantidad.ToString
@@ -2893,7 +2903,7 @@ Partial Class Compras_eFacturas
Else Else
LblMensajeComlementoError.Text = "" LblMensajeComlementoError.Text = ""
DVMensajecomplementoError.Visible = False DVMensajecomplementoError.Visible = False
DivVincularPagoManualmente.Visible = False
End If End If