eFacturas Complementos vincula solo no sugeridos, se requiere vincular todo lo que tenga compra para abilitar vinculacion.
This commit is contained in:
@@ -668,6 +668,21 @@ Partial Class Compras_eFacturas
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property ComprasEnComplemento As Integer
|
||||
Get
|
||||
If ViewState("ComprasEnComplemento") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("ComprasEnComplemento").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("ComprasEnComplemento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -2748,6 +2763,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
DTGVPagosVinculacion = New DataTable
|
||||
MontoPago = 0D
|
||||
ComprasEnComplemento = 0
|
||||
|
||||
XMLNodosPagosModalCount = 0
|
||||
|
||||
@@ -2914,6 +2930,11 @@ Partial Class Compras_eFacturas
|
||||
DTGVPagosVinculacion = DTDocumentosRelacionados
|
||||
|
||||
|
||||
ComprasEnComplemento = DTGVPagosVinculacion.COUNT("CveCompra", " CveCompra > 0")
|
||||
|
||||
|
||||
|
||||
|
||||
If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then
|
||||
TieneCompras = True
|
||||
Else
|
||||
@@ -3402,7 +3423,9 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
Next
|
||||
|
||||
If XMLNodosPagosModalCount = Vinculados Then
|
||||
|
||||
'If XMLNodosPagosModalCount = Vinculados Then
|
||||
If ComprasEnComplemento = Vinculados Then '
|
||||
TodoVinculado = True
|
||||
End If
|
||||
|
||||
@@ -3493,18 +3516,20 @@ Partial Class Compras_eFacturas
|
||||
e.Row.Cells(4).ForeColor = Drawing.Color.Green
|
||||
|
||||
|
||||
e.Row.Cells(6).Controls.Clear()
|
||||
Dim LiteralVincular As New Literal
|
||||
If e.Row.DataKey("CveIE").ToEntero <= 0 Or Boolean.Parse(e.Row.DataKey("Manual")) = True Then
|
||||
|
||||
e.Row.Cells(6).Controls.Clear()
|
||||
Dim LiteralVincular As New Literal
|
||||
If UsuarioActual.TienePermisoProceso(286) Then ' permiso vinculación manual
|
||||
LiteralVincular.Text = $"<a title='Vinculación manual' onclick="" { $"$('#HdnIdDocumento').val('{ e.Row.DataKey("IdDocumento") }');AbrirVentana('/Bancos/PopUpBuscarIE.aspx?OPCION=Complementos',800,600,'N');" }"" ><i class='fa fa-external-link' aria-hidden='true'></i></a>"
|
||||
Else
|
||||
LiteralVincular.Text = "-"
|
||||
End If
|
||||
e.Row.Cells(6).Controls.Add(LiteralVincular)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(286) Then ' permiso vinculación manual
|
||||
LiteralVincular.Text = $"<a title='Vinculación manual' onclick="" { $"$('#HdnIdDocumento').val('{ e.Row.DataKey("IdDocumento") }');AbrirVentana('/Bancos/PopUpBuscarIE.aspx?OPCION=Complementos',800,600,'N');" }"" ><i class='fa fa-external-link' aria-hidden='true'></i></a>"
|
||||
Else
|
||||
LiteralVincular.Text = "-"
|
||||
End If
|
||||
|
||||
|
||||
e.Row.Cells(6).Controls.Add(LiteralVincular)
|
||||
|
||||
Else
|
||||
e.Row.Cells(4).Text = "<i class='fa fa-check-circle' aria-hidden='true'></i>"
|
||||
e.Row.ToolTip = "Factura recibida sin registrar"
|
||||
|
||||
Reference in New Issue
Block a user