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 Set
|
||||||
End Property
|
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"
|
#Region "V I N C U L A R P A G O"
|
||||||
|
|
||||||
Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim sbSinIE As New StringBuilder
|
||||||
|
|
||||||
|
HdnCveIE.Value = ""
|
||||||
MSGComplemento = ""
|
MSGComplemento = ""
|
||||||
ViculacionConPUE = False
|
ViculacionConPUE = False
|
||||||
ListaComprasPUE.Clear()
|
ListaComprasPUE.Clear()
|
||||||
ComplementoConPUE = ""
|
ComplementoConPUE = ""
|
||||||
|
|
||||||
|
DT_ComprasSinIE = New DataTable
|
||||||
|
|
||||||
|
|
||||||
Dim ListaComprasPUEInterna As New List(Of Integer)
|
Dim ListaComprasPUEInterna As New List(Of Integer)
|
||||||
|
|
||||||
@@ -2809,6 +2842,26 @@ Partial Class Compras_eFacturas
|
|||||||
End If
|
End If
|
||||||
Next
|
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
|
Else
|
||||||
Alert("Ocurrió un error al cargar los archivos de complementos pago", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar los archivos de complementos pago", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -2876,6 +2929,12 @@ Partial Class Compras_eFacturas
|
|||||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DiferenciaImportes = Monto - ImporteIES
|
DiferenciaImportes = Monto - ImporteIES
|
||||||
ObjCompras.Dispose()
|
ObjCompras.Dispose()
|
||||||
|
|
||||||
@@ -2962,19 +3021,25 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
If ViculacionConPUE Then
|
If ViculacionConPUE Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For Each CveCompraVinculada In ListaComprasPUE
|
For Each CveCompraVinculada In ListaComprasPUE
|
||||||
|
|
||||||
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
|
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
|
||||||
Next
|
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
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjCompra.Commit()
|
ObjCompra.Commit()
|
||||||
|
|
||||||
Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion)
|
Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
|||||||
Reference in New Issue
Block a user