Transportes Mejoras
This commit is contained in:
@@ -6320,6 +6320,27 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetValidaFechaAlmacen(CveEmpresa As Integer, CveAlmacen As Integer, CvePS As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_ValidaFechaAlmacenGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar los productos por fechas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
@@ -6352,6 +6373,8 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2493,13 +2493,14 @@ Public Class ClsOIEventos
|
|||||||
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
|
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
|
||||||
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
|
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
|
||||||
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
|
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
|
||||||
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1) As Boolean
|
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1,
|
||||||
|
Optional CveContrato As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
|
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
|
||||||
CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
|
CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
|
||||||
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra,
|
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra,
|
||||||
CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento)
|
CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, CveContrato:=CveContrato)
|
||||||
|
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -4481,6 +4481,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ValidaFechaDeAlamacen() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
||||||
@@ -7803,6 +7807,54 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ValidaFechaDeAlamacen() As Boolean
|
||||||
|
Dim respuesta As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim objInventario As New ClsInventarios
|
||||||
|
Dim MovimientosError As Boolean = False
|
||||||
|
|
||||||
|
'Dim SB As New StringBuilder
|
||||||
|
'Dim FechaCompra As DateTime = TxtFecha.Text.ToDate
|
||||||
|
'FechaCompra
|
||||||
|
Dim FechaMinima As DateTime = TxtFecha.Text.ToDate
|
||||||
|
|
||||||
|
If DtInv IsNot Nothing Then
|
||||||
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
|
|
||||||
|
Dim CveTipoPS As Integer = Dr("CveTipoPS").ToString.ToEntero
|
||||||
|
|
||||||
|
If CveTipoPS = 2 Then
|
||||||
|
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=ddlAlmacenAdd.SelectedValue.ToEntero, CvePS:=Dr("CvePS").ToString.ToEntero) Then
|
||||||
|
|
||||||
|
If objInventario.DtResultados IsNot Nothing AndAlso objInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim FechamoMovimiento As DateTime = objInventario.DtResultados(0)("FechaMovto").ToString.ToDate
|
||||||
|
If FechamoMovimiento > FechaMinima Then
|
||||||
|
FechaMinima = FechamoMovimiento
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
objInventario.Dispose()
|
||||||
|
|
||||||
|
If FechaMinima > TxtFecha.Text.ToDate Then
|
||||||
|
Alert($"Los productos tienen movientos, la fecha minima que se puede aplicar es {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
|
||||||
|
respuesta = False
|
||||||
|
Else
|
||||||
|
respuesta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function GeneraStrinDoctosRelacionados() As String
|
Private Function GeneraStrinDoctosRelacionados() As String
|
||||||
|
|
||||||
Dim DoctosRelacionados As String = "-1"
|
Dim DoctosRelacionados As String = "-1"
|
||||||
|
|||||||
@@ -107,6 +107,32 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimeFormatoCartaPorteTimbrado(Request("CVETIMBRE").ToString.ToEntero)
|
ImprimeFormatoCartaPorteTimbrado(Request("CVETIMBRE").ToString.ToEntero)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Request("ArchivoContrato") IsNot Nothing AndAlso Request("ArchivoContrato") IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim ArchivoContrato As String = Decripta(Request("ArchivoContrato"))
|
||||||
|
Dim File As New FileInfo(ArchivoContrato)
|
||||||
|
|
||||||
|
If File.Exists Then 'set appropriate headers
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.ClearHeaders()
|
||||||
|
Response.ClearContent()
|
||||||
|
Response.AddHeader("Content-Disposition", "inline; filename=" & $"{File.Name}")
|
||||||
|
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||||
|
'Response.ContentType = "text/plain"
|
||||||
|
Response.ContentType = "application/octet-stream"
|
||||||
|
Response.Flush()
|
||||||
|
' Response.TransmitFile(File.FullName)
|
||||||
|
Response.WriteFile(File.FullName)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Request("RFC") IsNot Nothing AndAlso Request("File") IsNot Nothing Then
|
If Request("RFC") IsNot Nothing AndAlso Request("File") IsNot Nothing Then
|
||||||
Dim Path As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("File"))
|
Dim Path As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("File"))
|
||||||
Dim Archivo As New System.IO.FileInfo(Path)
|
Dim Archivo As New System.IO.FileInfo(Path)
|
||||||
|
|||||||
@@ -9036,16 +9036,23 @@ Namespace ADS.eFacturas
|
|||||||
Try
|
Try
|
||||||
Dim listaDS As New List(Of ReportDataSource)
|
Dim listaDS As New List(Of ReportDataSource)
|
||||||
Dim rdsTotales As New ReportDataSource()
|
Dim rdsTotales As New ReportDataSource()
|
||||||
Dim ltotales As New List(Of utilValores)()
|
'Dim ltotales As New List(Of utilValores)()
|
||||||
|
|
||||||
Dim DTTotales As New DataTable
|
Dim DTTotales As New DataTable
|
||||||
DTTotales.TableName = "DTTotales"
|
DTTotales.TableName = "DTTotales"
|
||||||
DTTotales.Columns.Add("Nombre")
|
DTTotales.Columns.Add("Nombre")
|
||||||
DTTotales.Columns.Add("Valor")
|
DTTotales.Columns.Add("Valor")
|
||||||
|
|
||||||
ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2")))
|
Dim nRowSubtotales As DataRow = DTTotales.NewRow
|
||||||
|
nRowSubtotales("Nombre") = "Subtotal"
|
||||||
|
nRowSubtotales("Valor") = objxml.comprobante.SubTotal.ToString("N2")
|
||||||
|
DTTotales.Rows.Add(nRowSubtotales)
|
||||||
|
|
||||||
If objxml.comprobante.Descuento > 0 Then
|
If objxml.comprobante.Descuento > 0 Then
|
||||||
ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
Dim nRowDescuento As DataRow = DTTotales.NewRow
|
||||||
|
nRowDescuento("Nombre") = "Descuento"
|
||||||
|
nRowDescuento("Valor") = objxml.comprobante.Descuento.ToString("N2")
|
||||||
|
DTTotales.Rows.Add(nRowDescuento)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each item As CFDIImpuesto In objxml.Impuestos
|
For Each item As CFDIImpuesto In objxml.Impuestos
|
||||||
@@ -9053,8 +9060,6 @@ Namespace ADS.eFacturas
|
|||||||
If item.Importe > 0 Then
|
If item.Importe > 0 Then
|
||||||
Dim TasaOCuota As Decimal = 0
|
Dim TasaOCuota As Decimal = 0
|
||||||
Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
||||||
ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
|
|
||||||
|
|
||||||
nRow("Nombre") = $"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}"
|
nRow("Nombre") = $"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}"
|
||||||
nRow("Valor") = item.Importe.ToString("N2")
|
nRow("Valor") = item.Importe.ToString("N2")
|
||||||
DTTotales.Rows.Add(nRow)
|
DTTotales.Rows.Add(nRow)
|
||||||
@@ -9062,7 +9067,11 @@ Namespace ADS.eFacturas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2")))
|
Dim nRowTotal As DataRow = DTTotales.NewRow
|
||||||
|
nRowTotal("Nombre") = "Subtotal"
|
||||||
|
nRowTotal("Valor") = objxml.comprobante.Total.ToString("N2")
|
||||||
|
DTTotales.Rows.Add(nRowTotal)
|
||||||
|
|
||||||
rdsTotales.Name = "dsTotales"
|
rdsTotales.Name = "dsTotales"
|
||||||
rdsTotales.Value = DTTotales 'ltotales.ToDataTable
|
rdsTotales.Value = DTTotales 'ltotales.ToDataTable
|
||||||
listaDS.Add(rdsTotales)
|
listaDS.Add(rdsTotales)
|
||||||
|
|||||||
@@ -716,6 +716,12 @@ Partial Class OI_PopUpAgenda
|
|||||||
CveMovimiento = Request("CveMovimiento").ToEntero
|
CveMovimiento = Request("CveMovimiento").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveContrato As Integer = -1
|
||||||
|
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
|
||||||
|
CveContrato = Request("CveContrato").ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'------------------------------------------
|
'------------------------------------------
|
||||||
'Recorrro Grid para obtener el usuario PARA
|
'Recorrro Grid para obtener el usuario PARA
|
||||||
For Each RowPara As GridViewRow In GVUsuarios.Rows
|
For Each RowPara As GridViewRow In GVUsuarios.Rows
|
||||||
@@ -741,7 +747,7 @@ Partial Class OI_PopUpAgenda
|
|||||||
Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
ElseIf CveTipoEvento = 2 Then
|
ElseIf CveTipoEvento = 2 Then
|
||||||
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento) Then
|
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento, CveContrato:=CveContrato) Then
|
||||||
Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||||
End If
|
End If
|
||||||
ElseIf CveTipoEvento = 3 Then
|
ElseIf CveTipoEvento = 3 Then
|
||||||
|
|||||||
@@ -1539,8 +1539,18 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Private Sub CargaOutSourcing()
|
Private Sub CargaOutSourcing()
|
||||||
|
|
||||||
|
Dim DtModulosEmpresa As New DataTable
|
||||||
|
Dim ObjEmpresas As New ClsSisEmpresas
|
||||||
|
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
|
||||||
|
DtModulosEmpresa = ObjEmpresas.DtResultados
|
||||||
|
Else
|
||||||
|
DtModulosEmpresa = Nothing
|
||||||
|
End If
|
||||||
|
ObjEmpresas.Dispose()
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 7 Then
|
If UsuarioActual.CveEmpresa = 7 Then
|
||||||
DdlEmpresaAsignada.DataSource = GlobalDTEmpresas.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)")
|
DdlEmpresaAsignada.DataSource = DtModulosEmpresa.FiltraParametros("CveEmpresa in (7,11,12,122,145,113)")
|
||||||
DdlEmpresaAsignada.DataBind()
|
DdlEmpresaAsignada.DataBind()
|
||||||
DvOutsourcing.Visible = True
|
DvOutsourcing.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -20,7 +20,10 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li>Empresa:
|
<li>Empresa:
|
||||||
<asp:DropDownList ID="DdlEmpresa" AutoPostBack="true" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa" CssClass=" select2me table-group-action-input form-control input-inline input-small input-sm" Style="width: 400px !important;" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlEmpresa" AutoPostBack="true" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa"
|
||||||
|
CssClass=" select2me table-group-action-input form-control input-inline input-small input-sm" Style="width: 400px !important;" ValidationGroup="GrpGuardar"
|
||||||
|
OnSelectedIndexChanged="DdlEmpresa_SelectedIndexChanged"
|
||||||
|
>
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -47,14 +47,23 @@ Partial Class Sistemas_EmpresasModulos
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargarEmpresa()
|
Private Sub CargarEmpresa()
|
||||||
|
|
||||||
|
Dim DTEmpresas As New DataTable
|
||||||
|
|
||||||
|
Using ObjEmpresas As New ClsSisEmpresas()
|
||||||
|
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
|
||||||
|
DTEmpresas = ObjEmpresas.DtResultados
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
If UsuarioActual.CveRol <> 1 Then
|
If UsuarioActual.CveRol <> 1 Then
|
||||||
DdlEmpresa.DataSource = GlobalDTEmpresas
|
DdlEmpresa.DataSource = DTEmpresas
|
||||||
DdlEmpresa.Enabled = False
|
DdlEmpresa.Enabled = False
|
||||||
Else
|
Else
|
||||||
DdlEmpresa.DataSource = GlobalDTEmpresas
|
DdlEmpresa.DataSource = DTEmpresas
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlEmpresa.SelectedValue = UsuarioActual.CveEmpresa.ToString
|
DdlEmpresa.SelectedValueExist(UsuarioActual.CveEmpresa.ToString)
|
||||||
DdlEmpresa.DataBind()
|
DdlEmpresa.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaModulosEmpresa()
|
Private Sub CargaModulosEmpresa()
|
||||||
@@ -71,7 +80,13 @@ Partial Class Sistemas_EmpresasModulos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaModulosDisponible()
|
Private Sub CargaModulosDisponible()
|
||||||
Dim DtModulosDisponible As DataTable = GlobalDTModulos().FiltraParametros("Liga <> ''")
|
Dim DtModulosDisponible As New DataTable '= GlobalDTModulos().FiltraParametros("Liga <> ''")
|
||||||
|
|
||||||
|
Using ObjModulos As New ClsModulos
|
||||||
|
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then
|
||||||
|
DtModulosDisponible = ObjModulos.DtResultados
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable()
|
Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable()
|
||||||
Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo")
|
Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo")
|
||||||
@@ -150,4 +165,8 @@ Partial Class Sistemas_EmpresasModulos
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlEmpresa_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
consultar_Click(Nothing, Nothing)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
#C_Tab_ctl00_DdlClientes{
|
#C_Tab_ctl00_DdlClientes{
|
||||||
width:100%!important;
|
width:100%!important;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
.font-light {
|
||||||
|
color:#666666;
|
||||||
|
}
|
||||||
.mx-1 {
|
.mx-1 {
|
||||||
margin: 0 5px 0 5px;
|
margin: 0 5px 0 5px;
|
||||||
}
|
}
|
||||||
@@ -127,12 +131,7 @@
|
|||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4 bold text-primary">Folio</label>
|
<label class="col-md-4 bold text-primary">Folio</label>
|
||||||
<asp:TextBox class="col-md-2" runat="server" ID="TxtFolio" Text="" MaxLength="50" style="margin-left:15px" Width="120px" Height="34px"></asp:TextBox>
|
<asp:TextBox class="col-md-2" runat="server" ID="TxtFolio" Text="" MaxLength="50" style="margin-left:15px" Width="120px" Height="34px"></asp:TextBox>
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row " style="border:0px!important">
|
<div class="row " style="border:0px!important">
|
||||||
@@ -358,61 +357,211 @@
|
|||||||
</div>
|
</div>
|
||||||
<%-- Contrato Digitalizado --%>
|
<%-- Contrato Digitalizado --%>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<div class="portlet light bordered xspadding">
|
|
||||||
<div class="portlet-title">
|
<div class="row">
|
||||||
<div class="tools">
|
<div class="col-md-12">
|
||||||
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
|
|
||||||
title=""></a><span class="hidden">
|
|
||||||
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
|
||||||
</div>
|
|
||||||
<div class="caption uppercase" style="position: relative;">
|
|
||||||
<i class="fa fa-file-pdf-o"></i>Contrato Digitalizado
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet light bordered xspadding">
|
||||||
<div class="row">
|
<div class="portlet-title">
|
||||||
<div class="col-md-12" style="text-align: center;">
|
<div class="tools">
|
||||||
<asp:UpdatePanel ID="UPAFUL" runat="server" UpdateMode="Conditional">
|
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
|
||||||
|
title=""></a><span class="hidden">
|
||||||
|
<input id="C_chkexpand3" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||||
|
</div>
|
||||||
|
<div class="caption uppercase" style="position: relative;">
|
||||||
|
<i class="fa fa-money"></i>Pagos
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ContentTemplate>
|
<div class="portlet-body rowpadding">
|
||||||
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:LinkButton>
|
<div class="row">
|
||||||
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
|
<div class="col-md-12" style="text-align: center;">
|
||||||
Width="200px"></asp:TextBox>
|
<asp:UpdatePanel ID="UpPagos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
|
<div class="row" runat="server" visible="false" id="DVFactura">
|
||||||
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true">
|
<label class="col-md-2">Factura: </label>
|
||||||
<i class="fa fa-upload"
|
<div class="col-md-2">
|
||||||
aria-hidden="true"></i>Subir Archivo</button>
|
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" ShowFooter="true"
|
||||||
|
DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal,TipoReferencia"
|
||||||
|
EmptyDataText="No se encontraron pagos" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" GridLines="None"
|
||||||
|
OnRowDataBound="GVAuxiliar_RowDataBound" >
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
|
<HeaderTemplate>Folio</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HplReferencia" runat="server" Text='<%# Eval("Referencia", "{0}") %>' Target="_blank"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFechaMovto" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<asp:Label ID="LbltotalText" runat="server" Text=""></asp:Label>
|
||||||
|
</FooterTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>Pago</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCargo" runat="server" Text='<%# If(CDbl(Eval("Abono")) = 0, "", Eval("Abono", "{0:N2}")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<asp:Label ID="Lbltotal" runat="server" Text=""></asp:Label>
|
||||||
|
</FooterTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
</ContentTemplate>
|
</Columns>
|
||||||
<Triggers>
|
<RowStyle CssClass="Texto" />
|
||||||
<asp:PostBackTrigger ControlID="BtnDescargar" />
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
</Triggers>
|
<HeaderStyle CssClass="Titulos" />
|
||||||
</asp:UpdatePanel>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="portlet light bordered xspadding">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
|
||||||
|
title=""></a><span class="hidden">
|
||||||
|
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||||
|
</div>
|
||||||
|
<div class="caption uppercase" style="position: relative;">
|
||||||
|
<i class="fa fa-file-pdf-o"></i>Contrato Digitalizado
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align: center;">
|
||||||
|
<asp:UpdatePanel ID="UPAFUL" runat="server" UpdateMode="Conditional">
|
||||||
|
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:HyperLink target="_blank" runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:HyperLink>
|
||||||
|
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
|
||||||
|
Width="200px"></asp:TextBox>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
|
||||||
|
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true">
|
||||||
|
<i class="fa fa-upload"
|
||||||
|
aria-hidden="true"></i>Subir Archivo</button>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%-- Bitácora --%>
|
<%-- Bitácora --%>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet light bordered xspadding">
|
<div class="portlet light bordered xspadding">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title=""
|
<%--<div class="caption uppercase" style="position: relative;">
|
||||||
title=""></a><span class="hidden">
|
|
||||||
<input id="C_chkexpand2" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
|
||||||
</div>
|
|
||||||
<div class="caption uppercase" style="position: relative;">
|
|
||||||
<i class="fa fa-commenting"></i>Bitácora
|
<i class="fa fa-commenting"></i>Bitácora
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||||
|
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
|
||||||
|
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||||
|
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||||
|
</div>--%>
|
||||||
|
<div class="caption font-default">
|
||||||
|
<%--<i class="fa fa-users font-green"></i>--%>
|
||||||
|
<span class="caption-subject bold uppercase">Bitacora</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-light " data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-light ' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||||
|
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-light " runat="server" Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-light ' ></i>Agendar</asp:HyperLink><br />
|
||||||
|
|
||||||
|
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||||
|
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||||
|
<%--<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>--%>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet-body rowpadding">
|
||||||
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvEventosBitacora" runat="server" AutoGenerateColumns="True"
|
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEvento" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||||
GridLines="None">
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFechaAgenda" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Descripción</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>Archivo</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
||||||
|
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
|
||||||
|
</asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -1036,4 +1185,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Bitácora</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<label>Bitácora/Observaciones</label>
|
||||||
|
<br />
|
||||||
|
<asp:TextBox CssClass="form-control" ID="TxtEventoDescripcion" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="8"></asp:TextBox>
|
||||||
|
<br />
|
||||||
|
<%-- <asp:CheckBox ID="ChkEventoPrioridad" CssClass="md-checksd2" Text="Bitácora de Atención" runat="server" />--%>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:TextBox ID="AnexoBit" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%--<div>
|
||||||
|
|
||||||
|
</div>--%>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnGuardarEventoBitacora" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -201,6 +201,22 @@ Partial Class RepContratoDetalle
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TotalPagos As Decimal
|
||||||
|
Get
|
||||||
|
If ViewState("TotalPagos") Is Nothing Then
|
||||||
|
ViewState("TotalPagos") = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return ViewState("TotalPagos").ToString.ToDecimal
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Decimal)
|
||||||
|
ViewState("TotalPagos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -209,20 +225,42 @@ Partial Class RepContratoDetalle
|
|||||||
|
|
||||||
#Region "Carga Página"
|
#Region "Carga Página"
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
|
|
||||||
If Request("CveContrato") Is Nothing Then
|
If Request("CveContrato") Is Nothing Then
|
||||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveContrato = Request("CveContrato").ToEntero
|
CveContrato = Request("CveContrato").ToEntero
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
InicializaCombos()
|
InicializaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
CargaAuxiliarClienteCxC(DdlClientes.SelectedValue.ToEntero, CveVentaRemision)
|
||||||
AsientoSeleccionado = ""
|
AsientoSeleccionado = ""
|
||||||
CveViajePasajero = 0
|
CveViajePasajero = 0
|
||||||
Session("FileExtension") = ""
|
Session("FileExtension") = ""
|
||||||
ArchivoUpdate = ""
|
ArchivoUpdate = ""
|
||||||
CargaGvBitacora()
|
CargaGvBitacora()
|
||||||
|
|
||||||
|
If CveContrato > 0 Then
|
||||||
|
HlEvento.Visible = True
|
||||||
|
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveContrato=" & CveContrato & "&TB_iframe=true&height=370&width=600;"
|
||||||
|
ImgAddObs.Visible = True
|
||||||
|
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-light"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveContrato:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveContrato)
|
||||||
|
CargaEventoBitacora()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveVentaRemision > 0 Then
|
||||||
|
DVFactura.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub InicializaCombos()
|
Private Sub InicializaCombos()
|
||||||
'Lista Tipo AF
|
'Lista Tipo AF
|
||||||
@@ -297,6 +335,14 @@ Partial Class RepContratoDetalle
|
|||||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||||
BtnDescargar.Visible = True
|
BtnDescargar.Visible = True
|
||||||
|
|
||||||
|
Dim File As New FileInfo(ViewState("FUrl").ToString)
|
||||||
|
BtnDescargar.NavigateUrl = $"~/Compras/PopUpVerFactura.aspx?ArchivoContrato={Encripta(File.FullName)}"
|
||||||
|
'If File.Exists Then
|
||||||
|
' RegistraScript($"window.open({Url}, ""_blank"");")
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
BtnDescargar.Visible = False
|
BtnDescargar.Visible = False
|
||||||
A1.Visible = True
|
A1.Visible = True
|
||||||
@@ -313,13 +359,13 @@ Partial Class RepContratoDetalle
|
|||||||
ObjTransportes.Dispose()
|
ObjTransportes.Dispose()
|
||||||
GvViajesPasajeros.DataBind()
|
GvViajesPasajeros.DataBind()
|
||||||
End If
|
End If
|
||||||
'Bitácora
|
''Bitácora
|
||||||
Dim ObjEventoBitacora As New ClsOIEventos
|
'Dim ObjEventoBitacora As New ClsOIEventos
|
||||||
If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
'If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||||
GvEventosBitacora.DataSource = ObjEventoBitacora.DtResultados
|
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||||
GvEventosBitacora.DataBind()
|
' GvEB.DataBind()
|
||||||
End If
|
'End If
|
||||||
ObjEventoBitacora.Dispose()
|
'ObjEventoBitacora.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -332,8 +378,113 @@ Partial Class RepContratoDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "Bitacora"
|
||||||
|
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.RowIndex = 0 Then
|
||||||
|
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||||
|
e.Row.Cells(1).Width = Unit.Pixel(200)
|
||||||
|
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||||
|
e.Row.Cells(3).Width = Unit.Pixel(500)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("Archivo").ToString <> "" Then
|
||||||
|
e.Row.FCLinkButton("LinkArchivo").Visible = True
|
||||||
|
e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString)
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
|
||||||
|
End If
|
||||||
|
|
||||||
|
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||||
|
Dim ObjEventoBitacora As New ClsOIEventos
|
||||||
|
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim Filesgral As List(Of Archivo) = AnexoBit.getfiles().Archivos
|
||||||
|
Dim Filename As String = ""
|
||||||
|
For Each fileItem As Archivo In Filesgral
|
||||||
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
Filename = fileItem.filename
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||||
|
If Filename <> "" Then
|
||||||
|
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||||
|
End If
|
||||||
|
|
||||||
|
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||||
|
TxtEventoDescripcion.Text = ""
|
||||||
|
AnexoBit.Text = "[]"
|
||||||
|
Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjEventoBitacora.Dispose()
|
||||||
|
GvEB.DataBind()
|
||||||
|
|
||||||
|
UPEventoBitacora.Update()
|
||||||
|
CargaEventoBitacora()
|
||||||
|
UPAddEventoBitacora.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaEventoBitacora()
|
||||||
|
|
||||||
|
If CveContrato > 0 Then
|
||||||
|
Dim ObjEventoBitacora As New ClsOIEventos()
|
||||||
|
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||||
|
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
|
||||||
|
Else
|
||||||
|
GvEB.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
ObjEventoBitacora.Dispose()
|
||||||
|
GvEB.DataBind()
|
||||||
|
UPEventoBitacora.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Protected Sub CargarArchivo(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
|
||||||
|
' If AFU.HasFile Then
|
||||||
|
|
||||||
|
|
||||||
|
' Dim UploadFolder As String = String.Format("{0}\Temp\", UsuarioActual.Empresa.Ruta)
|
||||||
|
' UploadFolder.DirectoryExistsCreate()
|
||||||
|
' Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
|
||||||
|
|
||||||
|
' If File.Exists(String.Format("{0}{1}{2}", UploadFolder, UsuarioActual.CveUsuario.ToString, Extension)) Then File.Delete(String.Format("{0}{1}{2}", UploadFolder, UsuarioActual.CveUsuario.ToString, Extension))
|
||||||
|
|
||||||
|
' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
|
||||||
|
' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
|
||||||
|
' Session("FileExtension") = Extension
|
||||||
|
' Session("FileFolder") = UploadFolder
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, CType(sender, LinkButton).CommandArgument)
|
||||||
|
Dim Archivo As New System.IO.FileInfo(filePath)
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Clear()
|
||||||
|
HttpContext.Current.Response.ClearContent()
|
||||||
|
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
|
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" + Path.GetFileName(filePath))
|
||||||
|
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||||
|
HttpContext.Current.Response.TransmitFile(filePath)
|
||||||
|
HttpContext.Current.Response.Flush()
|
||||||
|
HttpContext.Current.Response.End()
|
||||||
|
|
||||||
|
Archivo = Nothing
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "Información General"
|
#Region "Información General"
|
||||||
Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||||
|
|
||||||
Dim FileExtension As String = "-1"
|
Dim FileExtension As String = "-1"
|
||||||
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
|
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
|
||||||
Dim Filename As String = ""
|
Dim Filename As String = ""
|
||||||
@@ -375,32 +526,61 @@ Partial Class RepContratoDetalle
|
|||||||
BtnDescargar.Visible = True
|
BtnDescargar.Visible = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
'Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||||
DescargarArchivo()
|
' Dim File As New FileInfo(ViewState("FUrl").ToString)
|
||||||
End Sub
|
' Dim Url As String = $"{ObtenerUrlCompleta()}Compras/PopUpVerFactura.aspx?ArchivoContrato={Encripta(File.FullName)}"
|
||||||
Private Sub DescargarArchivo()
|
' If File.Exists Then
|
||||||
Dim File As New FileInfo(ViewState("FUrl").ToString)
|
' RegistraScript($"window.open({Url}, ""_blank"");")
|
||||||
|
' End If
|
||||||
|
|
||||||
If File.Exists Then 'set appropriate headers
|
|
||||||
Response.Clear()
|
|
||||||
Response.ClearHeaders()
|
|
||||||
Response.ClearContent()
|
|
||||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & TxtFolio.Text & $"{File.Extension}")
|
|
||||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
|
||||||
'Response.ContentType = "text/plain"
|
|
||||||
Response.ContentType = "application/octet-stream"
|
|
||||||
Response.Flush()
|
|
||||||
' Response.TransmitFile(File.FullName)
|
|
||||||
Response.WriteFile(File.FullName)
|
|
||||||
Response.End()
|
|
||||||
'if file does not exist
|
|
||||||
|
|
||||||
Alert("Descargado Correctamente.", TipoMensaje.MsgInformacion)
|
'End Sub
|
||||||
Else
|
|
||||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
Public Function ObtenerUrlCompleta() As String
|
||||||
|
|
||||||
|
Dim Solicitud As HttpRequest = HttpContext.Current.Request
|
||||||
|
Dim url As String = Solicitud.Url.Scheme & "://" & Solicitud.Url.Host
|
||||||
|
|
||||||
|
If (Solicitud.Url.Port <> 80 AndAlso Solicitud.Url.Port <> 443) Then
|
||||||
|
url &= ":" & Solicitud.Url.Port
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
url &= Solicitud.ApplicationPath
|
||||||
|
|
||||||
|
If Not url.EndsWith("/") Then
|
||||||
|
url &= "/"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return url
|
||||||
|
|
||||||
|
End Function
|
||||||
|
'Private Sub DescargaArchivo(urlArchivo As String)
|
||||||
|
|
||||||
|
' Dim File As New FileInfo(urlArchivo)
|
||||||
|
|
||||||
|
' If File.Exists Then 'set appropriate headers
|
||||||
|
|
||||||
|
' Response.Clear()
|
||||||
|
' Response.ClearHeaders()
|
||||||
|
' Response.ClearContent()
|
||||||
|
' Response.AddHeader("Content-Disposition", "inline; filename=" & TxtFolio.Text & $"{File.Extension}")
|
||||||
|
' Response.AddHeader("Content-Length", File.Length.ToString())
|
||||||
|
' 'Response.ContentType = "text/plain"
|
||||||
|
' Response.ContentType = "application/octet-stream"
|
||||||
|
' Response.Flush()
|
||||||
|
' ' Response.TransmitFile(File.FullName)
|
||||||
|
' Response.WriteFile(File.FullName)
|
||||||
|
' Response.End()
|
||||||
|
|
||||||
|
' Else
|
||||||
|
|
||||||
|
' Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
'End Sub
|
||||||
|
|
||||||
End If 'nothing in the URL as HTTP GET
|
|
||||||
End Sub
|
|
||||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||||
Dim ArchivoUpdate As String = "-1"
|
Dim ArchivoUpdate As String = "-1"
|
||||||
Dim ErrorProceso As Boolean = False
|
Dim ErrorProceso As Boolean = False
|
||||||
@@ -886,6 +1066,52 @@ Partial Class RepContratoDetalle
|
|||||||
GvBitacora.DataBind()
|
GvBitacora.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "PAGOS"
|
||||||
|
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveRemision As Integer)
|
||||||
|
|
||||||
|
If CveRemision > 0 Then
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
|
||||||
|
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveRemision) Then
|
||||||
|
|
||||||
|
Dim dtTemp As New DataTable
|
||||||
|
dtTemp = ObjMovtos.DtResultados.FiltraParametros(" Conceptocontable = 'Pago del Cliente' ")
|
||||||
|
TotalPagos = dtTemp.SUM("Abono")
|
||||||
|
GVAuxiliar.DataSource = dtTemp
|
||||||
|
|
||||||
|
Else
|
||||||
|
GVAuxiliar.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
GVAuxiliar.DataBind()
|
||||||
|
UpPagos.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DataKey("TipoReferencia").ToEntero = 1 Then
|
||||||
|
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DataKey("CveReferencia").ToEntero}"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If e.Row.RowType = DataControlRowType.Footer Then
|
||||||
|
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
|
||||||
|
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
||||||
|
e.Row.Cells(1).Text = "Total"
|
||||||
|
e.Row.FCLabel("Lbltotal").Text = TotalPagos.ToString("###,###,###.00")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -392,9 +392,10 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|
||||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
Width="100%"
|
Width="100%"
|
||||||
type="number" MaxLength="2" ></asp:TextBox>
|
type="number" MaxLength="2" ></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidadPasajeros" FilterType="Custom" ValidChars="1234567890" />
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
|||||||
@@ -102,6 +102,10 @@ Partial Class ListadoContratos
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If Not VallidaCantidadPasajeros(DdlTipoAF.SelectedValue.ToEntero, TxtCantidadPasajeros.Text.ToEntero) Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ErrorProceso As Boolean = False
|
Dim ErrorProceso As Boolean = False
|
||||||
Dim CveContrato As Integer = -1
|
Dim CveContrato As Integer = -1
|
||||||
|
|
||||||
@@ -221,6 +225,22 @@ Partial Class ListadoContratos
|
|||||||
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
|
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function VallidaCantidadPasajeros(CveTipoAF As Integer, Cantidad As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
|
If CveTipoAF = 181 And Cantidad < 30 Then 'autobus
|
||||||
|
Respuesta = False
|
||||||
|
Alert("El tipo unidad autobus debe de tener un minimo de 30 pasajeros.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf CveTipoAF = 184 And Cantidad > 21 Then 'sprinter
|
||||||
|
Respuesta = False
|
||||||
|
Alert("El tipo de unidad sprinter no puede tener más de 21 pasajeros.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Protected Sub ResetModal()
|
Protected Sub ResetModal()
|
||||||
'Reiniciamos modal
|
'Reiniciamos modal
|
||||||
TxtDescripcion.Text = ""
|
TxtDescripcion.Text = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user