diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 5baf8f444..101f4b302 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -1537,7 +1537,7 @@ Public Class ClsMovimientos Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha, Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha, - Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1) As Boolean + Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepRecuperacion") With SqlAdapter.SelectCommand.Parameters @@ -1569,6 +1569,7 @@ Public Class ClsMovimientos .Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString .Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 46f8dd8db..3bbcf579c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6873,26 +6873,26 @@ Public Class ClsPaginas RptParametro.Add(New ReportParameter("Puesto", Puesto)) 'DATOS NOMINA If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then - RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString)) - RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie)) - RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString)) - RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo)) - RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString)) - RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)" - RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)")) - RptParametro.Add(New ReportParameter("Cantidad", "1")) - RptParametro.Add(New ReportParameter("Unidad", "ACT")) - RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA")) - RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString())) - Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() - cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal) - RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras)) - RptParametro.Add(New ReportParameter("Clave", "84111505")) - Else - TieneError = True - End If + RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString)) + RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie)) + RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString)) + RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo)) + RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString)) + RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)" + RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)")) + RptParametro.Add(New ReportParameter("Cantidad", "1")) + RptParametro.Add(New ReportParameter("Unidad", "ACT")) + RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA")) + RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString())) + Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() + cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal) + RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras)) + RptParametro.Add(New ReportParameter("Clave", "84111505")) Else TieneError = True + End If + Else + TieneError = True End If If Not TieneError Then If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then @@ -9325,7 +9325,15 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325) PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331) PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332) +<<<<<<< HEAD PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 774) + +======= + PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617) + + + +>>>>>>> Indicadores por Proyecto #End Region #Region "Varios" 'Portal Cliente/Proveedor diff --git a/Bancos/RepCobrado.aspx.vb b/Bancos/RepCobrado.aspx.vb index 9e30438c3..c6e43162a 100644 --- a/Bancos/RepCobrado.aspx.vb +++ b/Bancos/RepCobrado.aspx.vb @@ -27,6 +27,9 @@ Partial Class Ventas_RepRecuperacion End If End Sub + + + Private Sub CargaCombos() 'CARGA PROVEEDORES DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) diff --git a/Bin/ADSNetLibrary.dll b/Bin/ADSNetLibrary.dll index 91c5f029d..effde59a8 100644 Binary files a/Bin/ADSNetLibrary.dll and b/Bin/ADSNetLibrary.dll differ diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb index 3df3654b1..5a081efb4 100644 --- a/Compras/RepCxP.aspx.vb +++ b/Compras/RepCxP.aspx.vb @@ -92,6 +92,7 @@ Partial Class Compras_RepCxP If Not Page.IsPostBack Then CargaCombos() CargaGvPersonalizarRaqngoColumnas() + ProcesaRequest() CargaDatos() If UsuarioActual.CveRol = 1 Then @@ -101,6 +102,36 @@ Partial Class Compras_RepCxP End Sub #Region "CARGAS" + + Private Sub ProcesaRequest() + + If Request("FechaInicio") IsNot Nothing AndAlso IsDate(Request("FechaInicio")) Then + txtFechaI.Text = Request("FechaInicio") + End If + If Request("FechaFin") IsNot Nothing AndAlso IsDate(Request("FechaFin")) Then + txtFechaF.Text = Request("FechaFin") + End If + + If Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").Length > 0 Then + Dim tipodoctos As String() = Request("TipoDocto").Split(","c) + + For Each itemTipoDocto As ListItem In DdlTipoDocto.Items + For Each tipoDocto As String In tipodoctos + itemTipoDocto.Selected = (tipoDocto.ToUpper = itemTipoDocto.Value.ToUpper) + Next + Next + + End If + + If Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero <> 0 Then + DdlMoneda.SelectedValueExist(Request("CveMoneda").ToEntero) + End If + + If Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero <> 0 Then + DdlSubProyecto.SelectedValueExist(Request("CveSubProyecto").ToEntero) + End If + + End Sub Private Sub CargaCombos() If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then diff --git a/Compras/RepPagado.aspx.cs b/Compras/RepPagado.aspx.cs index 23dc27109..77cf1f13a 100644 --- a/Compras/RepPagado.aspx.cs +++ b/Compras/RepPagado.aspx.cs @@ -31,6 +31,7 @@ public partial class Compras_RepPagado : ClsPaginas if (!IsPostBack) { InicializaValores(); + ProcesaRequest(); } } @@ -73,6 +74,50 @@ public partial class Compras_RepPagado : ClsPaginas TxtFechaFCompra.Text = DateTime.Now.ToShortDateString(); } + + private void ProcesaRequest() + { + if (DateTime.TryParse(Request["FechaInicio"], out DateTime fechaInicio)) + { + txtFechaI.Text = fechaInicio.ToString("yyyy-MM-dd"); + } + + if (DateTime.TryParse(Request["FechaFin"], out DateTime fechaFin)) + { + txtFechaF.Text = fechaFin.ToString("yyyy-MM-dd"); + } + + //if (Request["TipoDocto"] != null && Request["TipoDocto"].Length > 0) + //{ + // string[] tipodoctos = Request["TipoDocto"].Split(','); + // foreach (ListItem itemTipoDocto in DdlTipoDocto.Items) + // { + // foreach (string tipoDocto in tipodoctos) + // { + // itemTipoDocto.Selected = tipoDocto.ToUpper() == itemTipoDocto.Value.ToUpper(); + // } + // } + //} + + if (Request["CveMoneda"] != null && Request["CveMoneda"].ToEntero() != 0) + { + DdlMoneda.SelectedValueExist(Request["CveMoneda"].ToEntero()); + } + + if (Request["CveSubProyecto"] != null && Request["CveSubProyecto"].ToEntero() != 0) + { + DdlSubProyecto.SelectedValueExist(Request["CveSubProyecto"].ToEntero()); + } + + + + if ((DateTime.TryParse(Request["FechaInicio"], out DateTime fechaInicio2)) && (DateTime.TryParse(Request["FechaFin"], out DateTime fechaFin2))) + { + CargaDatos(); + } + } + + private void CargaCuentasBancarias() { DdlCuentaBancaria.Items.Clear(); diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index be381b986..4d164ee30 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -91,20 +91,56 @@ Partial Class RepCxC #End Region - 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 Not IsPostBack Then Index = 0 Modalidad = "" CargaCombos() CargaGvPersonalizarRaqngoColumnas() + ProcesaRequest() CargaDatos() If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True ActivaEnviarEstadoCuenta() If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True End If + End Sub #Region "CARGAS" + + + Private Sub ProcesaRequest() + + If Request("FechaInicio") IsNot Nothing AndAlso IsDate(Request("FechaInicio")) Then + txtFechaI.Text = Request("FechaInicio") + End If + If Request("FechaFin") IsNot Nothing AndAlso IsDate(Request("FechaFin")) Then + txtFechaF.Text = Request("FechaFin") + End If + + If Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").Length > 0 Then + Dim tipodoctos As String() = Request("TipoDocto").Split(","c) + + For Each itemTipoDocto As ListItem In DdlTipoDocto.Items + For Each tipoDocto As String In tipodoctos + itemTipoDocto.Selected = (tipoDocto.ToUpper = itemTipoDocto.Value.ToUpper) + Next + Next + + End If + + If Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero <> 0 Then + DdlMoneda.SelectedValueExist(Request("CveMoneda").ToEntero) + End If + + If Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero <> 0 Then + DdlSubProyecto.SelectedValueExist(Request("CveSubProyecto").ToEntero) + End If + + + End Sub + Private Sub CargaCombos() 'CargaClientes If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then diff --git a/Ventas/RepIndicadoresPorProyecto.aspx b/Ventas/RepIndicadoresPorProyecto.aspx new file mode 100644 index 000000000..10c7d027c --- /dev/null +++ b/Ventas/RepIndicadoresPorProyecto.aspx @@ -0,0 +1,339 @@ +<%@ Page Title="Indicadores por Proyecto" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadoresPorProyecto.aspx.vb" Inherits="Ventas_RepIndicadoresPorProyecto" %> + + + + + + + + + + + + + + + Indicadores por Proyecto + + + + + + + + +
+
+
+ +
+
+
+ + Sucursal: +
+ + + +
+ +
+
+ + + + +
+ + + + + + +
+ +
+
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+
+ + + + + + + + + +
+
+ +
+
+ +
+ + CxC +
+ +
+ +
+ +
+ + +
+ +
+
+ + + + + + + +
+
+ + + + + +
+
+ +
+
+
+ + CxP +
+
+ +
+ +
+ + +
+
+
+ + + + + + + +
+
+ + + +
+
+ + +
+
+ + + +
+
+
+ + Cobrado +
+
+ +
+ +
+ + +
+
+
+ + + + + + +
+
+ + + + +
+
+ +
+
+
+ + Pagado +
+
+ +
+ +
+ + +
+
+
+ + + + + + +
+
+ + + +
+
+ +
+
+ Margen Bruto: MXN +
+
+ +
+
+ + + +
+
+
+ + Ingresos Facturas +
+ <%--
+
+
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+ +
+
+
--%> +
+ +
+ +
+ + +
+
+
+ + + + + + + + +
+
+ + + + +
+
+ + + +
+
+
+ + Costos y Gastos +
+ <%--
+
+
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+ +
+
+
--%> +
+ +
+ +
+ + +
+
+
+ + + + + + + +
+
+ + + +
+
+ + +
+
+ + +
+ + diff --git a/Ventas/RepIndicadoresPorProyecto.aspx.vb b/Ventas/RepIndicadoresPorProyecto.aspx.vb new file mode 100644 index 000000000..29af6b202 --- /dev/null +++ b/Ventas/RepIndicadoresPorProyecto.aspx.vb @@ -0,0 +1,204 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports System.Data +Imports ADSNetLibrary.SIGAPI.Services.Generales +Imports ADSNetLibrary.SIGAPI.Models.Generales.Request +Imports ADSNetLibrary.SIGAPI.Models.Generales.Response +Imports MoreLinq + +Partial Class Ventas_RepIndicadoresPorProyecto + Inherits ClsPaginas + +#Region "Propiedades" + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + InicializaValores() + End If + End Sub + +#Region " INICIALIZA VALORES " + + Private Sub InicializaValores() + txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString + txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + End Sub + +#End Region + +#Region " CARGA DATOS " + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + Private Sub CargaDatos() + + If Not IsDate(txtFechaI.Text) Then + Alert("La fecha inicial no es valida.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If Not IsDate(txtFechaF.Text) Then + Alert("La fecha final no es valida.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + + GvResumenCxC.DataSource = Nothing + GvResumenCxP.DataSource = Nothing + GvRepCobrado.DataSource = Nothing + GvRepPagado.DataSource = Nothing + GvRepIngresosFact.DataSource = Nothing + GvRepCostosGastos.DataSource = Nothing + + Dim gralService = New GeneralesService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) + + + Dim DatResumenCxC = gralService.GetResumenCxC(New RequestResumenCxC() With {.tipoDocto = "Ing", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + Dim DatResumenCxP = gralService.GetResumenCxP(New RequestResumenCxP() With {.tipoDocto = "Fac", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + Dim DatRepCobrado = gralService.RepCobrado(New RequestRepCobrado() With {.tipoDocto = "Ing", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + Dim DatRepPagado = gralService.RepPagado(New RequestRepPagado() With {.tipoDocto = "Fac", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + Dim DatRepIngresosFact = gralService.RepIngresosFact(New RequestRepIngresosFact() With {.tipoDocto = "Ing", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + Dim DatRepCostosGastos = gralService.RepCostosGastos(New RequestRepCostosGastos() With {.tipoDocto = "Fac", + .cveUsuario = UsuarioActual.CveUsuario, + .cveEmpresa = UsuarioActual.CveEmpresa, + .cveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero, + .fechaInicial = txtFechaI.Text, + .fechaFinal = txtFechaF.Text}) + + If DatResumenCxC.Result.Count > 0 Then + GvResumenCxC.DataSource = DatResumenCxC.Result.ToDataTable + SPResumenCxC.InnerText = $"Total: {DatResumenCxC.Result.ToDataTable.SUMD("saldoMN").ToString("###,###,###.00")} MXN" + End If + If DatResumenCxP.Result.Count > 0 Then + GvResumenCxP.DataSource = DatResumenCxP.Result.ToDataTable + SPResumenCxP.InnerText = $"Total: {DatResumenCxP.Result.ToDataTable.SUMD("saldoMN").ToString("###,###,###.00")} MXN" + End If + If DatRepCobrado.Result.Count > 0 Then + GvRepCobrado.DataSource = DatRepCobrado.Result.ToDataTable + SPRepCobrado.InnerText = $"Total: {DatRepCobrado.Result.ToDataTable.SUMD("cobradoMN").ToString("###,###,###.00")} MXN" + End If + If DatRepPagado.Result.Count > 0 Then + GvRepPagado.DataSource = DatRepPagado.Result.ToDataTable + SPRepPagado.InnerText = $"Total: {DatRepPagado.Result.ToDataTable.SUMD("pagadoMN").ToString("###,###,###.00")} MXN" + End If + If DatRepIngresosFact.Result.Count > 0 Then + GvRepIngresosFact.DataSource = DatRepIngresosFact.Result.ToDataTable.FiltraParametros("nRow <= 50") + SPRepIngresosFact.InnerText = $"Total: {DatRepIngresosFact.Result.ToDataTable.SUMD("importeMN").ToString("###,###,###.00")} MXN" + End If + If DatRepCostosGastos.Result.Count > 0 Then + GvRepCostosGastos.DataSource = DatRepCostosGastos.Result.ToDataTable.FiltraParametros("nRow <= 50") + SPRepCostosGastos.InnerText = $"Total: {DatRepCostosGastos.Result.ToDataTable.SUMD("importeMN").ToString("###,###,###.00")} MXN" + End If + + + LblMargenBruto.Text = $"{(DatRepIngresosFact.Result.ToDataTable.SUMD("importeMN") - DatRepCostosGastos.Result.ToDataTable.SUMD("importeMN")).ToString("###,###,###.00")}" + + GvResumenCxC.DataBind() + GvResumenCxP.DataBind() + GvRepCobrado.DataBind() + GvRepPagado.DataBind() + GvRepIngresosFact.DataBind() + GvRepCostosGastos.DataBind() + + DVMargenBruto.Visible = True + + UpDatos.Update() + + End Sub + + Private Sub GvResumenCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvResumenCxC.RowDataBound + + If e.Row.RowType = DataControlRowType.DataRow Then + Dim liga As String = $"../CxC/RepCxC.aspx?CveSubProyecto={DdlSubProyecto.SelectedValue}&FechaInicio={txtFechaI.Text}&FechaFin={txtFechaF.Text}&CveMoneda={e.Row.DataKey("CveMoneda")}&TipoDocto=Ing" + e.Row.Cells(0).Text = $"{e.Row.Cells(0).Text}" + e.Row.Cells(1).Text = $"{e.Row.Cells(1).Text}" + e.Row.Cells(2).Text = $"{e.Row.Cells(2).Text}" + End If + + End Sub + Private Sub GvResumenCxP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvResumenCxP.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Dim liga As String = $"../Compras/RepCxP.aspx?CveSubProyecto={DdlSubProyecto.SelectedValue}&FechaInicio={txtFechaI.Text}&FechaFin={txtFechaF.Text}&CveMoneda={e.Row.DataKey("CveMoneda")}&TipoDocto=Fac" + e.Row.Cells(0).Text = $"{e.Row.Cells(0).Text}" + e.Row.Cells(1).Text = $"{e.Row.Cells(1).Text}" + e.Row.Cells(2).Text = $"{e.Row.Cells(2).Text}" + End If + End Sub + Private Sub GvRepCobrado_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRepCobrado.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Dim liga As String = $"../Ventas/RepRecuperacion.aspx?CveSubProyecto={DdlSubProyecto.SelectedValue}&FechaInicio={txtFechaI.Text}&FechaFin={txtFechaF.Text}&CveMoneda={e.Row.DataKey("CveMoneda")}&TipoDocto=Ing" + e.Row.Cells(0).Text = $"{e.Row.Cells(0).Text}" + e.Row.Cells(1).Text = $"{e.Row.Cells(1).Text}" + End If + End Sub + Private Sub GvRepPagado_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRepPagado.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Dim liga As String = $"../Compras/RepPagado.aspx?CveSubProyecto={DdlSubProyecto.SelectedValue}&FechaInicio={txtFechaI.Text}&FechaFin={txtFechaF.Text}&CveMoneda={e.Row.DataKey("CveMoneda")}&TipoDocto=Fac" + e.Row.Cells(0).Text = $"{e.Row.Cells(0).Text}" + e.Row.Cells(1).Text = $"{e.Row.Cells(1).Text}" + End If + End Sub + + Private Sub GvRepIngresosFact_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRepIngresosFact.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("Fecha").ToString.Trim = "01/01/0001 12:00:00 a. m." Then + e.Row.CssClass = "Totales" + e.Row.Cells(0).Text = "" + End If + End If + End Sub + Private Sub GvRepCostosGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRepCostosGastos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("CveClasificacion").ToString.Trim.ToEntero = 0 Then + e.Row.CssClass = "Totales" + End If + End If + End Sub + + +#End Region + +#Region " GV DATOS " + + +#End Region + + + +End Class diff --git a/Ventas/RepRecuperacion.aspx b/Ventas/RepRecuperacion.aspx index 0c1243e8e..bd0cc58e1 100644 --- a/Ventas/RepRecuperacion.aspx +++ b/Ventas/RepRecuperacion.aspx @@ -249,7 +249,19 @@ + + +
+ Moneda: +
+
+ + + + + +
diff --git a/Ventas/RepRecuperacion.aspx.vb b/Ventas/RepRecuperacion.aspx.vb index 8eb1e5fc5..bea502913 100644 --- a/Ventas/RepRecuperacion.aspx.vb +++ b/Ventas/RepRecuperacion.aspx.vb @@ -48,12 +48,51 @@ Partial Class Ventas_RepRecuperacion Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then CargaCombos() - 'CargaDatos() + ProcesaRequest() + 'CargaDatos() End If - End Sub - + End Sub + #Region "CARGAS" - + + + Private Sub ProcesaRequest() + + If Request("FechaInicio") IsNot Nothing AndAlso IsDate(Request("FechaInicio")) Then + txtFechaI.Text = Request("FechaInicio") + End If + If Request("FechaFin") IsNot Nothing AndAlso IsDate(Request("FechaFin")) Then + txtFechaF.Text = Request("FechaFin") + End If + + If Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").Length > 0 Then + Dim tipodoctos As String() = Request("TipoDocto").Split(","c) + + For Each itemTipoDocto As ListItem In DdlTipoDocto.Items + For Each tipoDocto As String In tipodoctos + itemTipoDocto.Selected = (tipoDocto.ToUpper = itemTipoDocto.Value.ToUpper) + Next + Next + + End If + + If Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero <> 0 Then + DdlMoneda.SelectedValueExist(Request("CveMoneda").ToEntero) + End If + + If Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero <> 0 Then + DdlSubProyecto.SelectedValueExist(Request("CveSubProyecto").ToEntero) + End If + + UPFiltros.Update() + + If IsDate(txtFechaF.Text) AndAlso IsDate(txtFechaF.Text) Then + CargaDatos() + End If + + End Sub + + Private Sub CargaCombos() 'Carga Clientes If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then @@ -138,7 +177,8 @@ Partial Class Ventas_RepRecuperacion If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, + CveMoneda:=DdlMoneda.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados Else