diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 11d90c8d8..f99b79160 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -5753,7 +5753,7 @@
- diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 004c014db..1fc4a2307 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3850,6 +3850,7 @@ Partial Class Clientes End If ObjEventoBitacora.Dispose() GvEB.DataBind() + UPEventoBitacora.Update() End Sub Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs) @@ -4801,6 +4802,8 @@ Partial Class Clientes Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() + Dim ObjEventoBitacora As New ClsOIEventos(ObjConta.IniciaTransacSQL()) + Dim TieneError As Boolean = False @@ -4869,20 +4872,56 @@ Partial Class Clientes TieneError = True End If End If + End If + + + If Not TieneError Then + Dim CveIE As Integer = -1 + Dim Folio As String = Gvr.DataKey("Folio") + Dim Liga As String = "" + + Select Case Tipo + Case "Ant", "NC" + CveVenta = Gvr.DataKey("CveVenta").ToEntero() + Liga = $"./Ventas.aspx?CveVenta={CveVenta}" + Case "IxC" + CveIE = Gvr.DataKey("CveIE").ToEntero() + Liga = $"../Bancos/IE.aspx?CveIE={CveIE}" + End Select + + Dim DescripcioBitacora As String = $"Ha sido reclasificado el folio {Folio} al cliente: {DdlClienteImportarSaldos.txtText.Value}" + + If Not ObjEventoBitacora.AddEventoBitacora(DescripcioBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, DdlClienteImportarSaldos.SelectedValue.ToEntero(), -1, -1, -1, -1, -1) Then + TieneError = True + End If + + If Not TieneError Then + If Not ObjEventoBitacora.AddEventoBitacora(DescripcioBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then + TieneError = True + End If + End If + + End If - End If + End If + Next Else TieneError = True - End If - - + End If + + + + + + If Not TieneError Then ObjConta.Commit() Alert($"La importación de saldos se hizo correctamente.", TipoMensaje.MsgInformacion) TxtSaldoImportar.Text = "" ConsultarAnticiposSaldosClientes() + CargaEventoBitacora() Else ObjConta.RollBack() Alert("Ocurrió un error al importar los saldos. Por favor vuelva a intentar.", TipoMensaje.MsgError)