eFacturas Vinculacion de complemento por Partida
This commit is contained in:
@@ -604,6 +604,70 @@ Partial Class Compras_eFacturas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property DTGVPagosVinculacion As DataTable
|
||||
|
||||
Get
|
||||
If ViewState("DTGVPagosVinculacion") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTGVPagosVinculacion"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTGVPagosVinculacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CurretUUIDPagoVincular As String
|
||||
|
||||
Get
|
||||
If ViewState("CurretUUIDPagoVincular") Is Nothing Then
|
||||
Return "-1"
|
||||
Else
|
||||
Return ViewState("CurretUUIDPagoVincular").ToString
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CurretUUIDPagoVincular") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property XMLNodosPagosModalCount As Integer
|
||||
Get
|
||||
If ViewState("XMLNodosPagosModalCount") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("XMLNodosPagosModalCount").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("XMLNodosPagosModalCount") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property MontoPago As Decimal
|
||||
Get
|
||||
If ViewState("MontoPago") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return (ViewState("MontoPago")).ToString.ToDecimal
|
||||
End If
|
||||
End Get
|
||||
|
||||
Set(value As Decimal)
|
||||
ViewState("MontoPago") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -2682,7 +2746,10 @@ Partial Class Compras_eFacturas
|
||||
Dim FechaPago As Date
|
||||
Dim PagosCantidad As Integer = 0
|
||||
|
||||
DTGVPagosVinculacion = New DataTable
|
||||
MontoPago = 0D
|
||||
|
||||
XMLNodosPagosModalCount = 0
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
@@ -2759,13 +2826,14 @@ Partial Class Compras_eFacturas
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
|
||||
Dim nodePagosN As XmlNodeList
|
||||
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", PrefijoPagos), namespaces)
|
||||
|
||||
|
||||
|
||||
For Each NodosPagos As XmlNode In nodePagosN
|
||||
For Each innernode As XmlNode In NodosPagos
|
||||
|
||||
@@ -2788,14 +2856,20 @@ Partial Class Compras_eFacturas
|
||||
Nrow("ImpPagado") = ValorXML(node, "ImpPagado").ToDecimal
|
||||
Nrow("Fecha") = FechaPago
|
||||
|
||||
Nrow("Tipo") = "17"
|
||||
Nrow("Manual") = False
|
||||
|
||||
DTDocumentosRelacionados.Rows.Add(Nrow)
|
||||
StrUUID.AppendFormat("'{0}',", ValorXML(node, "IdDocumento").Replace("'", ""))
|
||||
|
||||
XMLNodosPagosModalCount = XMLNodosPagosModalCount + 1
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
|
||||
MontoPago = Monto
|
||||
|
||||
Dim ObjCompraFolios As New ClsCompras
|
||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace($"{PrefijoPagos}:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then
|
||||
@@ -2820,19 +2894,13 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
If drow("CveIE").ToString.ToEntero > 0 Then
|
||||
|
||||
dRow2("CveIE") = drow("CveIE").ToString.ToEntero
|
||||
dRow2("ImportePago") = drow("Importe").ToString.ToDecimal
|
||||
|
||||
|
||||
End If
|
||||
|
||||
dRow2("FolioPago") = drow("FolioIE")
|
||||
dRow2("FechaPago") = drow("FechaDocumento")
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
@@ -2843,6 +2911,7 @@ Partial Class Compras_eFacturas
|
||||
GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados
|
||||
GVPDocumentosRelacionadosPagos.DataBind()
|
||||
|
||||
DTGVPagosVinculacion = DTDocumentosRelacionados
|
||||
|
||||
|
||||
If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then
|
||||
@@ -2873,6 +2942,7 @@ Partial Class Compras_eFacturas
|
||||
DT_ComprasSinIE.Columns.Add("SerieFolioCompra")
|
||||
|
||||
For Each dRow As DataRow In DTDocumentosRelacionados.Rows
|
||||
|
||||
Dim nRow As DataRow = DT_ComprasSinIE.NewRow
|
||||
nRow("CveCompra") = dRow("CveCompra").ToString.ToEntero
|
||||
' nRow("CveFactura") = dRow("CveFactura").ToString.ToEntero
|
||||
@@ -2881,7 +2951,6 @@ Partial Class Compras_eFacturas
|
||||
|
||||
DT_ComprasSinIE.Rows.Add(nRow)
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
@@ -3057,27 +3126,40 @@ Partial Class Compras_eFacturas
|
||||
|
||||
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
|
||||
If HdnCveIE.Value.ToEntero > 0 Then
|
||||
If Gv.DataKey("CveCompra").ToEntero > 0 And Gv.FCLabel("LblCveIE").Text.ToEntero > 0 Then
|
||||
|
||||
If Not ObjCompra.AddComplementoPago(Gv.FCLabel("LblCveIE").Text.ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero, CveFacturaPago) > 0 Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Gv.DataKey("CveCompra").ToEntero > 0 Then
|
||||
|
||||
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
If Gv.DataKey("CveCompra").ToEntero > 0 Then
|
||||
|
||||
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
' If HdnCveIE.Value.ToEntero > 0 Then
|
||||
' If Gv.DataKey("CveCompra").ToEntero > 0 And Gv.FCLabel("LblCveIE").Text.ToEntero > 0 Then
|
||||
|
||||
' If Not ObjCompra.AddComplementoPago(Gv.FCLabel("LblCveIE").Text.ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero, CveFacturaPago) > 0 Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Else
|
||||
' If Gv.DataKey("CveCompra").ToEntero > 0 Then
|
||||
|
||||
' If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If Not TieneError AndAlso Not ObjCompra.AddVincularPago(CveFacturaPago) Then
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -3096,13 +3178,21 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
|
||||
|
||||
If HdnCveIE.Value.ToEntero > 0 Then
|
||||
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
|
||||
For Each dRow As DataRow In DT_ComprasSinIE.Rows
|
||||
objEventos.AddEventoBitacora($"Complemento { dRow("SerieFolioPago").ToString } vinculado manualmente a compra {dRow("SerieFolioCompra").ToString}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=dRow("CveCompra").ToString.ToEntero)
|
||||
Next
|
||||
If Boolean.Parse(Gv.DataKey("Manual").ToString) Then
|
||||
objEventos.AddEventoBitacora($"Complemento { LblSerieFolioPago.Text} vinculado manualmente a compra {Gv.DataKey("SerieFolio").ToString} y Pago { Gv.DataKey("FolioPago").ToString }", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=Gv.DataKey("CveCompra").ToString.ToEntero)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'If HdnCveIE.Value.ToEntero > 0 Then
|
||||
|
||||
' For Each dRow As DataRow In DT_ComprasSinIE.Rows
|
||||
' objEventos.AddEventoBitacora($"Complemento { dRow("SerieFolioPago").ToString } vinculado manualmente a compra {dRow("SerieFolioCompra").ToString}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=dRow("CveCompra").ToString.ToEntero)
|
||||
' Next
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
@@ -3135,82 +3225,244 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
If HdnCveIE.Value <> "-1" AndAlso IsNumeric(HdnCveIE.Value) AndAlso HdnCveIE.Value.ToEntero > 0 Then
|
||||
'VincularComplementoManualGV(HdnCveIE.Value.ToEntero)
|
||||
|
||||
Dim ImportePago As Double = 0
|
||||
Dim ImporteIES As Double = 0
|
||||
Dim SerieFolioIE As String = ""
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ErrorVinculacion = True
|
||||
|
||||
If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then
|
||||
|
||||
For Each Drow As DataRow In ObjCompras.DtResultados.Rows
|
||||
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If Drow("CveCompra").ToString.ToEntero = GvRow.DataKey("CveCompra").ToEntero Then
|
||||
|
||||
GvRow.FCLabel("LblCveIE").Text = Drow("CveIE").ToString.ToEntero.ToString
|
||||
GvRow.FCLabel("LblCvePrePolizaDetalle").Text = Drow("CvePrePolizaDetalle").ToString.ToEntero.ToString
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Next
|
||||
For Each dRow As DataRow In DTGVPagosVinculacion.Rows
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If HdnIdDocumento.Value = dRow("IdDocumento").ToString Then 'And dRow("CveIE").ToString.ToEntero <= 0
|
||||
|
||||
If GvRow.FCLabel("LblCveIE").Text.ToEntero > 0 And GvRow.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero > 0 Then
|
||||
ErrorVinculacion = False
|
||||
dRow("CveIE") = HdnCveIE.Value.ToEntero
|
||||
|
||||
Else
|
||||
Dim ObjIE As New ClsBancos()
|
||||
|
||||
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||
GvRow.FCLabel("LblCveIE").Text = ObjCompras.DtResultados(0)("CveIE").ToString.ToEntero.ToString
|
||||
GvRow.FCLabel("LblCvePrePolizaDetalle").Text = ObjCompras.DtResultados(0)("CvePrePolizaDetalle").ToString.ToEntero.ToString
|
||||
Else
|
||||
ErrorVinculacion = True
|
||||
Exit For
|
||||
End If
|
||||
'If ObjIE.GetBancosIE(HdnCveIE.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' Try
|
||||
' dRow("FolioPago") = ObjIE.Folio
|
||||
' dRow("ImportePago") = dRow("ImpPagado")
|
||||
' dRow("FechaPago") = ObjIE.FechaDocumento
|
||||
' dRow("Tipo") = "E"
|
||||
' ' dRow("Diferencia") = 0D
|
||||
' dRow("Manual") = True
|
||||
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
|
||||
'End If
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then
|
||||
|
||||
Try
|
||||
dRow("FolioPago") = ObjCompras.DtResultados(0)("FolioIE")
|
||||
dRow("ImportePago") = dRow("ImpPagado")
|
||||
dRow("FechaPago") = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
||||
dRow("CvePrePolizaDetalle") = ObjCompras.DtResultados(0)("CvePrePolizaDetalle").ToString.ToEntero
|
||||
dRow("Tipo") = "E"
|
||||
' dRow("Diferencia") = 0D
|
||||
dRow("Manual") = True
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
DTGVPagosVinculacion.AcceptChanges()
|
||||
|
||||
HdnIdDocumento.Value = "-1"
|
||||
|
||||
GVPDocumentosRelacionadosPagos.DataSource = DTGVPagosVinculacion
|
||||
GVPDocumentosRelacionadosPagos.DataBind()
|
||||
|
||||
UpVincularPago.Update()
|
||||
CurretUUIDPagoVincular = ""
|
||||
|
||||
ValidaTablaDeVinculacion()
|
||||
|
||||
Exit Sub
|
||||
|
||||
'**********************************************************************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'If HdnCveIE.Value <> "-1" AndAlso IsNumeric(HdnCveIE.Value) AndAlso HdnCveIE.Value.ToEntero > 0 Then
|
||||
|
||||
' Dim ImportePago As Double = 0
|
||||
' Dim ImporteIES As Double = 0
|
||||
' Dim SerieFolioIE As String = ""
|
||||
' Dim ObjCompras As New ClsCompras
|
||||
' Dim ErrorVinculacion = True
|
||||
|
||||
' If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then
|
||||
|
||||
' For Each Drow As DataRow In ObjCompras.DtResultados.Rows
|
||||
' For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
|
||||
' If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' If Drow("CveCompra").ToString.ToEntero = GvRow.DataKey("CveCompra").ToEntero Then
|
||||
|
||||
' GvRow.FCLabel("LblCveIE").Text = Drow("CveIE").ToString.ToEntero.ToString
|
||||
' GvRow.FCLabel("LblCvePrePolizaDetalle").Text = Drow("CvePrePolizaDetalle").ToString.ToEntero.ToString
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' Next
|
||||
' Next
|
||||
|
||||
|
||||
' For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
' If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' If GvRow.FCLabel("LblCveIE").Text.ToEntero > 0 And GvRow.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero > 0 Then
|
||||
' ErrorVinculacion = False
|
||||
|
||||
' Else
|
||||
|
||||
' If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||
' GvRow.FCLabel("LblCveIE").Text = ObjCompras.DtResultados(0)("CveIE").ToString.ToEntero.ToString
|
||||
' GvRow.FCLabel("LblCvePrePolizaDetalle").Text = ObjCompras.DtResultados(0)("CvePrePolizaDetalle").ToString.ToEntero.ToString
|
||||
' Else
|
||||
' ErrorVinculacion = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
|
||||
' Else
|
||||
' ErrorVinculacion = True
|
||||
' End If
|
||||
|
||||
' If Not ErrorVinculacion Then
|
||||
' ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
' ObjCompras.Dispose()
|
||||
|
||||
' BtnVincularPago.Visible = True
|
||||
|
||||
' LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
|
||||
' LblImportePago.Text = ImportePago.FormatoNumero
|
||||
' 'LblSerieFolioIE.Text = SerieFolioIE
|
||||
' LblImporteIE.Text = ImporteIES.FormatoNumero
|
||||
|
||||
' GvVincularPago.DataBind()
|
||||
' UpVincularPago.Update()
|
||||
' ObjCompras.Dispose()
|
||||
|
||||
' Else
|
||||
' Alert("No se pudo realizar la vinculacion manual", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function ValidaTablaDeVinculacion() As Boolean
|
||||
|
||||
Dim ResPuesta As Boolean = False
|
||||
Dim Vinculados As Integer = 0
|
||||
Dim TodoVinculado As Boolean = False
|
||||
|
||||
Dim Diferencia As Boolean = If(Math.Abs(DTGVPagosVinculacion.SUM("ImpPagado") - DTGVPagosVinculacion.SUM("ImportePago")).ToDecimal > 0.1D, True, False)
|
||||
Dim VinculacionManual As Boolean = If(DTGVPagosVinculacion.FiltraParametros("Manual = 1").Rows.Count > 0, True, False)
|
||||
|
||||
|
||||
|
||||
|
||||
Dim PermisoVinculacionDiferencia As Boolean = UsuarioActual.TienePermisoProceso(286)
|
||||
Dim PermisoVinculacionManual As Boolean = UsuarioActual.TienePermisoProceso(286)
|
||||
|
||||
Dim MontoSuma As Decimal = DTGVPagosVinculacion.SUM("ImportePago").ToString.ToDecimal
|
||||
|
||||
For Each dRow As DataRow In DTGVPagosVinculacion.Rows
|
||||
If dRow("CveIE").ToString.ToEntero > 0 Then
|
||||
Vinculados = Vinculados + 1
|
||||
End If
|
||||
Next
|
||||
|
||||
If XMLNodosPagosModalCount = Vinculados Then
|
||||
TodoVinculado = True
|
||||
End If
|
||||
|
||||
|
||||
If TodoVinculado Then
|
||||
|
||||
If Diferencia Then
|
||||
If PermisoVinculacionDiferencia Then
|
||||
If VinculacionManual Then
|
||||
If PermisoVinculacionManual Then
|
||||
ResPuesta = True
|
||||
Else
|
||||
ResPuesta = False
|
||||
End If
|
||||
Else
|
||||
ResPuesta = True
|
||||
End If
|
||||
Else
|
||||
ResPuesta = False
|
||||
End If
|
||||
Else
|
||||
ErrorVinculacion = True
|
||||
|
||||
If VinculacionManual Then
|
||||
If PermisoVinculacionManual Then
|
||||
ResPuesta = True
|
||||
Else
|
||||
ResPuesta = False
|
||||
End If
|
||||
Else
|
||||
ResPuesta = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorVinculacion Then
|
||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
ObjCompras.Dispose()
|
||||
Else
|
||||
ResPuesta = False
|
||||
End If
|
||||
|
||||
BtnVincularPago.Visible = True
|
||||
|
||||
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
|
||||
LblImportePago.Text = ImportePago.FormatoNumero
|
||||
'LblSerieFolioIE.Text = SerieFolioIE
|
||||
LblImporteIE.Text = ImporteIES.FormatoNumero
|
||||
If Not MontoSuma = MontoPago And ResPuesta Then
|
||||
|
||||
GvVincularPago.DataBind()
|
||||
UpVincularPago.Update()
|
||||
ObjCompras.Dispose()
|
||||
|
||||
Else
|
||||
Alert("No se pudo realizar la vinculacion manual", TipoMensaje.MsgAdvertencia)
|
||||
If Not PermisoVinculacionDiferencia Then
|
||||
ResPuesta = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
If ResPuesta Then
|
||||
BtnVincularPago.Visible = True
|
||||
Else
|
||||
BtnVincularPago.Visible = False
|
||||
End If
|
||||
|
||||
UpVincularPago.Update()
|
||||
|
||||
Return ResPuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated
|
||||
|
||||
@@ -3220,7 +3472,7 @@ Partial Class Compras_eFacturas
|
||||
Dim HeaderCell = New TableCell
|
||||
|
||||
HeaderCell.Text = "Documentos Relacionados"
|
||||
HeaderCell.ColumnSpan = 8
|
||||
HeaderCell.ColumnSpan = 9
|
||||
HeaderCell.Attributes.Add("style", "border-top: 1px solid #ddd; vertical-align: top; background-color: #DDD; color: #333333;font-family: 'Open Sans', sans-serif;font-size: 12px; text-align:center!important; font-weight: bold;")
|
||||
HeaderGridRow.Cells.Add(HeaderCell)
|
||||
GVPDocumentosRelacionadosPagos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
@@ -3240,12 +3492,24 @@ Partial Class Compras_eFacturas
|
||||
e.Row.ToolTip = "Compra registrada"
|
||||
e.Row.Cells(4).ForeColor = Drawing.Color.Green
|
||||
|
||||
|
||||
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)
|
||||
|
||||
Else
|
||||
e.Row.Cells(4).Text = "<i class='fa fa-check-circle' aria-hidden='true'></i>"
|
||||
e.Row.ToolTip = "Factura recibida sin registrar"
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
e.Row.Cells(4).Text = "<i class='fa red fa-ban' aria-hidden='true'></i>"
|
||||
e.Row.ToolTip = "No se encontro el Folio Fiscal en el sistema"
|
||||
|
||||
Reference in New Issue
Block a user