eFacturas registra en bitacora cuando se vincula manuamente complemento de pago
This commit is contained in:
@@ -2603,17 +2603,50 @@ Partial Class Compras_eFacturas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DT_ComprasSinIE As DataTable
|
||||
Get
|
||||
If ViewState("DT_ComprasSinIE") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_ComprasSinIE"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_ComprasSinIE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
'Property ComplementoComprasSinIE As String
|
||||
' Get
|
||||
' If ViewState("ComplementoComprasSinIE") Is Nothing Then
|
||||
' Return ""
|
||||
' Else
|
||||
' Return ViewState("ComplementoComprasSinIE").ToString
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' ViewState("ComplementoComprasSinIE") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
|
||||
#Region "V I N C U L A R P A G O"
|
||||
|
||||
Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim sbSinIE As New StringBuilder
|
||||
|
||||
HdnCveIE.Value = ""
|
||||
MSGComplemento = ""
|
||||
ViculacionConPUE = False
|
||||
ListaComprasPUE.Clear()
|
||||
ComplementoConPUE = ""
|
||||
|
||||
DT_ComprasSinIE = New DataTable
|
||||
|
||||
|
||||
Dim ListaComprasPUEInterna As New List(Of Integer)
|
||||
|
||||
@@ -2809,6 +2842,26 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
DT_ComprasSinIE.Columns.Add("CveCompra", GetType(Integer))
|
||||
DT_ComprasSinIE.Columns.Add("CveFactura", GetType(Integer))
|
||||
DT_ComprasSinIE.Columns.Add("SerieFolioPago")
|
||||
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
|
||||
nRow("SerieFolioPago") = $"{SeriePago}-{FolioPago}"
|
||||
nRow("SerieFolioCompra") = dRow("SerieFolioCompra").ToString
|
||||
|
||||
DT_ComprasSinIE.Rows.Add(nRow)
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los archivos de complementos pago", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -2876,6 +2929,12 @@ Partial Class Compras_eFacturas
|
||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DiferenciaImportes = Monto - ImporteIES
|
||||
ObjCompras.Dispose()
|
||||
|
||||
@@ -2962,19 +3021,25 @@ Partial Class Compras_eFacturas
|
||||
|
||||
If ViculacionConPUE Then
|
||||
|
||||
|
||||
|
||||
|
||||
For Each CveCompraVinculada In ListaComprasPUE
|
||||
|
||||
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
|
||||
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
|
||||
|
||||
|
||||
|
||||
ObjCompra.Commit()
|
||||
|
||||
Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion)
|
||||
|
||||
Reference in New Issue
Block a user