-- filtros de reportes de contratos por fechaing

This commit is contained in:
2024-10-22 16:03:05 -07:00
parent 6203d060e5
commit b0a8a4b4e4
4 changed files with 17 additions and 33 deletions

View File

@@ -197,7 +197,12 @@ Public Class ClsContratos
#End Region
#Region " C O N T R A T O S "
Public Function GetContratosReporte(CveEmpresa As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveCliente As Integer, Optional CveEstatus As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveTipoContrato As Integer = -1) As Boolean
Public Function GetContratosReporte(CveEmpresa As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveCliente As Integer,
Optional CveEstatus As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1,
Optional CveTipoContrato As Integer = -1,
Optional FechaInicioIngreso As DateTime = MinFecha,
Optional FechaFinIngreso As DateTime = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosReporteGet")
@@ -210,7 +215,9 @@ Public Class ClsContratos
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaInicioIngreso", SqlDbType.DateTime).Value = FechaInicioIngreso
.Add("@FechaFinIngreso", SqlDbType.DateTime).Value = FechaFinIngreso
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -418,10 +418,7 @@ Partial Class RepContratoDetalle
ErrorProceso = True
End If
If Not ErrorProceso Then
If CveVentaRemision > 0 AndAlso (CveSubProyectoOriginal <> DdlSubProyecto.SelectedValue.ToEntero OrElse
CveMonedaOriginal <> DdlMoneda.SelectedValue.ToEntero OrElse
ImporteOrigial <> TxtImporte.Text.ToDecimal OrElse
@@ -434,8 +431,6 @@ Partial Class RepContratoDetalle
ErrorProceso = True
End If
End If
End If
If Not ErrorProceso Then
@@ -445,15 +440,11 @@ Partial Class RepContratoDetalle
AgregarABitacora($"Actualización del contrato {CveContrato}")
CargaDatos()
Alert("Contrato actualizado correctamente")
Else
Alert("Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
ObjContratos.RollBack()
End If
End Sub
Private Function UpdateRemision(ByRef transaccionSql As SqlTransaction, CveSubProyectoNew As Integer, CveMonedaNew As Integer, TotalNew As Decimal, DescripcionNew As String) As Boolean

View File

@@ -24,7 +24,7 @@ Partial Class ListadoContratos
If Not IsPostBack Then
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
txtFechaF.Text = DateTime.Now.AddDays(15).ToShortDateString
txtFechaF.Text = DateTime.Now.AddDays(1).ToShortDateString
InicializaCombos()
CargaDatos()
End If
@@ -60,7 +60,8 @@ Partial Class ListadoContratos
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) Then
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero,
FechaInicioIngreso:=txtFechaI.Text.ToDate, FechaFinIngreso:=txtFechaF.Text.ToDate) Then
GvContratos.DataSource = ObjContratos.DtResultados
End If

View File

@@ -662,7 +662,6 @@ Partial Class RepContratosCalendario
HidCveAF.Value = GvRow.DataKey("CveAF").ToString
HidCveAFDes.Value = DdlAF.SelectedItem.Text
End If
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
@@ -676,8 +675,6 @@ Partial Class RepContratosCalendario
LblSaldo.Text = ""
End If
CveContrato = GvRow.DataKey("CveContrato").ToEntero
OcultarMostrarSegundoChofer()
@@ -694,14 +691,12 @@ Partial Class RepContratosCalendario
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
DdlClientes.SelectedText = HidModClienteNombre.Value
DdlClientes.SelectedValue = HidModCveCliente.Value
DdlClientes.txtText.Value = HidModClienteNombre.Value
DdlClientes.txtValue.Value = HidModCveCliente.Value
chkSegundoChofer.Checked = If(HidNumChoferes.Value.ToEntero = 2, True, False)
OcultarMostrarSegundoChofer()
HypRemision.Text = HidRemisionSerieFolio.Value
@@ -713,14 +708,15 @@ Partial Class RepContratosCalendario
End If
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
DdlAF.SelectedValueExist(HidCveAF.Value)
If HidCveAF.Value.ToEntero > 0 AndAlso DdlAF.SelectedValue <> HidCveAF.Value Then
DdlAF.Items.Insert(0, New ListItem(GlobalDTActivoFijos(UsuarioActual.CveEmpresa, CveActivoFijo:=HidCveAF.Value.ToEntero).FiltroPrimeroValor("CodigoDescripcion"), HidCveAF.Value))
DdlAF.SelectedValueExist(HidCveAF.Value)
End If
HidCveAFDes.Value = DdlAF.SelectedItem.Text
UpModal.Update()
myModalLabel.InnerText = "Contrato: " & HdnNumContrato.Value
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
@@ -784,11 +780,7 @@ Partial Class RepContratosCalendario
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
Dim SubProyecto As String = ""
SubProyecto = DdlSubProyectos.SelectedItem.Text
Dim SubProyecto As String = DdlSubProyectos.SelectedItem.Text
Dim SbFiltros As New StringBuilder()
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
@@ -837,8 +829,6 @@ Partial Class RepContratosCalendario
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
@@ -850,11 +840,9 @@ Partial Class RepContratosCalendario
End Sub
Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaDiagramadeGant(DdlTipoVista.SelectedValue.ToEntero)
End Sub
Protected Sub DdlAF_SelectedIndexChanged(sender As Object, e As EventArgs)
DVMotivoCambioAF.Visible = False
@@ -865,11 +853,8 @@ Partial Class RepContratosCalendario
UpModal.Update()
End Sub
Protected Sub DdlTipoVistaCalendario_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaCronograma(DdlTipoVistaCalendario.SelectedValue.ToEntero)
End Sub
End Class