-- option strict on

This commit is contained in:
2023-08-23 00:03:55 -07:00
parent 7ee978059d
commit 3bc4f72658
23 changed files with 212 additions and 257 deletions

View File

@@ -83,7 +83,7 @@ Partial Class Compras_RepCxP
End Set
End Property
Private Property TCEspecifico As Double
Private Property TCEspecifico As Decimal
#End Region
@@ -197,8 +197,8 @@ Partial Class Compras_RepCxP
End Sub
Private Sub CargaDatos()
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text
If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
@@ -214,7 +214,7 @@ Partial Class Compras_RepCxP
If txtFechaF.Text = "" Then FechaF = "-1"
If txtFechaVI.Text = "" Then FechaVI = "-1"
If txtFechaVF.Text = "" Then FechaVF = "-1"
Dim TipoAgrupacion As Integer = IIf(chkAgruparMes.Checked, 1, -1)
Dim TipoAgrupacion As Integer = If(chkAgruparMes.Checked, 1, -1)
Dim CveProyecto As Integer = -1
If DdlProyecto.Visible Then
@@ -223,7 +223,7 @@ Partial Class Compras_RepCxP
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero(), DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion, CveProyecto:=CveProyecto) Then
GvCxP.DataSource = Mov.DtResultados
DtDatos = Mov.DtResultados
@@ -1082,10 +1082,10 @@ Partial Class Compras_RepCxP
If txtFechaF.Text = "" Then FechaF = "-1"
If txtFechaVI.Text = "" Then FechaVI = "-1"
If txtFechaVF.Text = "" Then FechaVF = "-1"
Dim TipoAgrupacion As Integer = IIf(chkAgruparMes.Checked, 1, -1)
Dim TipoAgrupacion As Integer = If(chkAgruparMes.Checked, 1, -1)
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, -1, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion) Then
End If
@@ -1109,16 +1109,15 @@ Partial Class Compras_RepCxP
Mes(10) = monthNames(Dr("NomMes11").ToString.ToDate.Month)
Mes(11) = monthNames(Dr("NomMes12").ToString.ToDate.Month)
Mes(12) = "12+"
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text
If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
Dim DtExcel As DataTable
If chkAgruparMes.Checked Then
DtExcel = (From row As DataRow In Mov.DtResultados.Rows
DtExcel = (From row As DataRow In Mov.DtResultados.AsEnumerable
Select New With
{
.GPO = row.Item("GPO"),
@@ -1440,8 +1439,8 @@ Partial Class Compras_RepCxP
If txtFechaVI.Text = "" Then FechaVencimientoI = "-1"
If txtFechaVF.Text = "" Then FechaVencimientoF = "-1"
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text
If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
@@ -1503,7 +1502,7 @@ Partial Class Compras_RepCxP
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{Clasificacion}{FechaIn}{FechaFn}{Registro}{Responsable}{Proyecto}{Sucursal}{TipoMoneda}{FVI}{FVF}"))
params.Add(New ReportParameter("CantColumnas", CantidadColumnas))
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepCxP.rdlc", DtDatos, params, "ReporteCxP", Formato)
@@ -1517,11 +1516,11 @@ Partial Class Compras_RepCxP
#Region "TIPO DE CAMBIO"
Private Sub DdlTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
If RblTipoCambio.SelectedValue = 3 Then
If RblTipoCambio.SelectedValue = "3" Then
Dim TipoCambio As Double
LiEspecifico.Visible = True
TipoCambio = GlobalTipoCambio(Now)
TxtEspecifico.Text = TipoCambio
TxtEspecifico.Text = TipoCambio.ToString
Else
LiEspecifico.Visible = False
End If