diff --git a/AC/RepPresupuestoEgresosMensual.aspx b/AC/RepPresupuestoEgresosMensual.aspx index 5f9f72882..4deec460f 100644 --- a/AC/RepPresupuestoEgresosMensual.aspx +++ b/AC/RepPresupuestoEgresosMensual.aspx @@ -10,9 +10,24 @@ Estado del Ejercicio del Presupuesto de Egresos - Mensual - -   -   + + + + +
  • + Exporta Excel +
  • +
  • + Imprimir +
  • +
    + + + + +
    + +
    diff --git a/AC/RepPresupuestoEgresosMensual.aspx.vb b/AC/RepPresupuestoEgresosMensual.aspx.vb index f081fa26b..70514d7bd 100644 --- a/AC/RepPresupuestoEgresosMensual.aspx.vb +++ b/AC/RepPresupuestoEgresosMensual.aspx.vb @@ -18,6 +18,8 @@ Partial Class AC_RepPresupuestoEgresosMensual If Not Page.IsPostBack Then CargaEjercicios() CargaCombos() + + End If End Sub @@ -68,6 +70,10 @@ Partial Class AC_RepPresupuestoEgresosMensual Private Sub CargaDatos() + + ImgExcel.Visible = False + BtnImprimir.Visible = False + Dim objAC As New ClsContPAQi(UsuarioActual.Empresa) Dim Capitulo As String = If(DdlCapituloClasificaciones.SelectedValue.ToEntero = -1, "-1", GlobalDTACClasificadorObjetoGasto.FiltraParametros(String.Format("CveClasificacion = {0}", DdlCapituloClasificaciones.SelectedValue.ToEntero)).Rows(0)("Codigo").ToString.Substring(0, 1)) UPPDatos.Update() @@ -83,6 +89,11 @@ Partial Class AC_RepPresupuestoEgresosMensual End If Gv.DataSource = DtPresupuestoEgresos + If DtPresupuestoEgresos IsNot Nothing AndAlso DtPresupuestoEgresos.Rows.Count > 0 Then + ImgExcel.Visible = True + BtnImprimir.Visible = True + End If + Else Gv.DataSource = Nothing DtPresupuestoEgresos = Nothing diff --git a/AC/Reportes/RepPresupuestoEgresosMensual.rdlc b/AC/Reportes/RepPresupuestoEgresosMensual.rdlc index 8223a6e20..3565217d5 100644 --- a/AC/Reportes/RepPresupuestoEgresosMensual.rdlc +++ b/AC/Reportes/RepPresupuestoEgresosMensual.rdlc @@ -1,1439 +1,5 @@ - - - - - External - = Parameters!pImg.Value - FitProportional - 0.17639cm - 0.76271cm - 1.76458cm - 1.8175cm - - - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox11 - 0.07056cm - 22.60218cm - 1.02333cm - 4.21979cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!pEmp.Value - - - - - - - Textbox1 - 0.07056cm - 6.67449cm - 0.81167cm - 14.52244cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Presupuesto de Egresos Mensual del Ejercicio - - - - =Parameters!pEjercicio.Value - - - - - - - - - =Parameters!pMomentoContable.Value - - - - - - - Textbox5 - 0.9175cm - 4.55304cm - 0.74538cm - 17.17202cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.86309cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.75cm - - - 1.97212cm - - - - - 0.6cm - - - - - true - true - - - - - Grupo - - - - - - - Textbox2 - - - - - - - - true - true - - - - - Ene - - - - - - - Textbox29 - - - - - - - - true - true - - - - - Feb - - - - - - - Textbox31 - - - - - - - - true - true - - - - - Mar - - - - - - - Textbox4 - - - - - - - - true - true - - - - - Abr - - - - - - - Textbox8 - - - - - - - - true - true - - - - - May - - - - - - - Textbox10 - - - - - - - - true - true - - - - - Jun - - - - - - - Textbox14 - - - - - - - - true - true - - - - - Jul - - - - - - - Textbox5 - - - - - - - - true - true - - - - - Ago - - - - - - - Textbox13 - - - - - - - - true - true - - - - - Sep - - - - - - - Textbox16 - - - - - - - - true - true - - - - - Oct - - - - - - - Textbox18 - - - - - - - - true - true - - - - - Nov - - - - - - - Textbox20 - - - - - - - - true - true - - - - - Dic - - - - - - - Textbox22 - - - - - - - - true - true - - - - - Total - - - - - - - Textbox24 - - - - - - - - 0.6cm - - - - - true - true - - - - - =Code.Niveles(Fields!GPO.Value,Fields!Clasificacion1.Value,Fields!Clasificacion2.Value,Fields!Clasificacion3.Value,Fields!Nivel.Value) - - - - - - - Textbox26 - - - - - - - - true - true - - - - - =Fields!Ene.Value - - - - - - - Ene - - - - - - - - true - true - - - - - =Fields!Feb.Value - - - - - - - Feb - - - - - - - - true - true - - - - - =Fields!Mar.Value - - - - - - - Mar - - - - - - - - true - true - - - - - =Fields!Abr.Value - - - - - - - Abr - - - - - - - - true - true - - - - - =Fields!May.Value - - - - - - - May - - - - - - - - true - true - - - - - =Fields!Jun.Value - - - - - - - Jun - - - - - - - - true - true - - - - - =Fields!Jul.Value - - - - - - - Jul - - - - - - - - true - true - - - - - =Fields!Ago.Value - - - - - - - Ago - - - - - - - - true - true - - - - - =Fields!Sep.Value - - - - - - - Sep - - - - - - - - true - true - - - - - =Fields!Oct.Value - - - - - - - Oct - - - - - - - - true - true - - - - - =Fields!Nov.Value - - - - - - - Nov - - - - - - - - true - true - - - - - =Fields!Dic.Value - - - - - - - Dic - - - - - - - - true - true - - - - - =Fields!TotalAcumulado.Value - - - - - - - TotalAcumulado - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After - true - - - - - - - DataSet1 - 2.11736cm - 0.36197cm - 1.2cm - 26.83521cm - 4 - - - - - - 1.40986in - - - - =Parameters!pEjercicio.Value - - - - - - - - - =Parameters!pMomentoContable.Value - - - - - - - Textbox5 - 0.18197cm - 4.55304cm - 0.6cm - 17.17202cm - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox8 - 0.20285cm - 23.32948cm - 0.57912cm - 3.49249cm - 1 - - = (Globals.PageNumber=1) - - - - 2pt - 2pt - - - - - - - - - 0.94395cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.17639cm - 21.30572cm - 0.6cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21.59cm - 27.94cm - 0.25cm - 0.25cm - 0.25cm - 0.25cm - 0.13cm - + + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox11 + 0.07056cm + 22.60218cm + 1.02333cm + 4.21979cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!pEmp.Value + + + + + + + + + + + Textbox1 + 0.07056cm + 6.67449cm + 0.81167cm + 14.52244cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Presupuesto de Egresos Mensual del Ejercicio + + + + =Parameters!pEjercicio.Value + + + + - + + + + =Parameters!pMomentoContable.Value + + + + + + + Textbox5 + 0.9175cm + 4.55304cm + 0.74538cm + 17.17202cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.86309cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.75cm + + + 1.97212cm + + + + + 0.6cm + + + + + true + true + + + + + Grupo + + + + + + + Textbox2 + + + + + + + + true + true + + + + + Ene + + + + + + + Textbox29 + + + + + + + + true + true + + + + + Feb + + + + + + + Textbox31 + + + + + + + + true + true + + + + + Mar + + + + + + + Textbox4 + + + + + + + + true + true + + + + + Abr + + + + + + + Textbox8 + + + + + + + + true + true + + + + + May + + + + + + + Textbox10 + + + + + + + + true + true + + + + + Jun + + + + + + + Textbox14 + + + + + + + + true + true + + + + + Jul + + + + + + + Textbox5 + + + + + + + + true + true + + + + + Ago + + + + + + + Textbox13 + + + + + + + + true + true + + + + + Sep + + + + + + + Textbox16 + + + + + + + + true + true + + + + + Oct + + + + + + + Textbox18 + + + + + + + + true + true + + + + + Nov + + + + + + + Textbox20 + + + + + + + + true + true + + + + + Dic + + + + + + + Textbox22 + + + + + + + + true + true + + + + + Total + + + + + + + Textbox24 + + + + + + + + 0.6cm + + + + + true + true + + + + + =Code.Niveles(Fields!GPO.Value,Fields!Clasificacion1.Value,Fields!Clasificacion2.Value,Fields!Clasificacion3.Value,Fields!Nivel.Value) + + + + + + + Textbox26 + + + + + + + + true + true + + + + + =Fields!Ene.Value + + + + + + + Ene + + + + + + + + true + true + + + + + =Fields!Feb.Value + + + + + + + Feb + + + + + + + + true + true + + + + + =Fields!Mar.Value + + + + + + + Mar + + + + + + + + true + true + + + + + =Fields!Abr.Value + + + + + + + Abr + + + + + + + + true + true + + + + + =Fields!May.Value + + + + + + + May + + + + + + + + true + true + + + + + =Fields!Jun.Value + + + + + + + Jun + + + + + + + + true + true + + + + + =Fields!Jul.Value + + + + + + + Jul + + + + + + + + true + true + + + + + =Fields!Ago.Value + + + + + + + Ago + + + + + + + + true + true + + + + + =Fields!Sep.Value + + + + + + + Sep + + + + + + + + true + true + + + + + =Fields!Oct.Value + + + + + + + Oct + + + + + + + + true + true + + + + + =Fields!Nov.Value + + + + + + + Nov + + + + + + + + true + true + + + + + =Fields!Dic.Value + + + + + + + Dic + + + + + + + + true + true + + + + + =Fields!TotalAcumulado.Value + + + + + + + TotalAcumulado + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + + + + + + + DataSet1 + 2.11736cm + 0.36197cm + 1.2cm + 26.83521cm + 4 + + + + + + 1.40986in + + + + =Parameters!pEjercicio.Value + + + + - + + + + =Parameters!pMomentoContable.Value + + + + + + + Textbox5 + 0.18197cm + 4.55304cm + 0.6cm + 17.17202cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.20285cm + 23.32948cm + 0.57912cm + 3.49249cm + 1 + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + + + + + + + + + 0.94395cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.17639cm + 21.30572cm + 0.6cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21.59cm + 27.94cm + 0.25cm + 0.25cm + 0.25cm + 0.25cm + 0.13cm + @@ -68,7 +69,7 @@
    -
    +
    @@ -102,58 +103,66 @@
    - -
    - +
    + Proyecto: +
    +
    + + +
    + SubProyecto: +
    +
    - +
    - - + + + + @@ -257,604 +266,604 @@ -
    - - - + +
    +
    + + + - -
    - - -
    -
    + + +
    +
    - - + + - - - - <%----%> - + + + + <%----%> + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - <%-- + <%-- --%> - <%----%> - - - - - - - - - -
    -
    - + <%----%> + + + + + + + +
    +
    +
    +
    + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - <%-- + <%-- --%> - <%-- --%> - - - - - - - - + <%-- --%> + + + + + + + + - -
    -
    - - + +
    +
    + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - + +
    -
    - - + + -
    +
    - - - - - - - - - - - - + + + + + + + + + + + +
    - + @@ -892,41 +901,41 @@ - + + + - + - + - + - + - + - + - + - + - + - + - - - + @@ -941,7 +950,7 @@

    - @@ -960,41 +969,41 @@ - + + + - + - + - + - + - + - + - + - + - + - + - - - + @@ -1018,8 +1027,8 @@

    - @@ -1039,41 +1048,41 @@ - + + + - + - + - + - + - + - + - + - + - + - + - - - + <%-- @@ -1084,7 +1093,7 @@ --%> <%-- --%> - + @@ -1146,60 +1155,60 @@ - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + <%-- @@ -1237,59 +1246,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + <%-- @@ -1306,7 +1315,7 @@ - + @@ -1328,59 +1337,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1390,7 +1399,7 @@ - + @@ -1407,6 +1416,11 @@
    +
    +
    + + + diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index 646220e6c..fc4e90480 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -126,6 +126,23 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal ' End Set 'End Property + Private Property CveProyecto As Integer + Get + CveProyecto = ViewState("CveProyecto").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveProyecto") = value + End Set + End Property + Private Property CveSubProyecto As Integer + Get + CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveSubProyecto") = value + End Set + End Property + #End Region @@ -333,8 +350,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal CargaEjercicios() - CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto) - TabSubProyecto.HeaderText = LblSubProyecto.Text & " " + CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) + TabSubProyecto.HeaderText = LblProyecto.Text & " " & LblSubProyecto.Text & " " @@ -344,11 +361,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End If End Sub + Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged + CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos") + End Sub + Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs) If TAB.ActiveTabIndex = 0 Then - LiSubProyectoDdl.Visible = True - LiSubProyectoLbl.Visible = True + 'LiSubProyectoDdl.Visible = True + 'LiSubProyectoLbl.Visible = True LiEjercicioDdl.Visible = True LiEjercicioLbl.Visible = True @@ -368,8 +389,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If TAB.ActiveTabIndex = 1 Then - LiSubProyectoDdl.Visible = True - LiSubProyectoLbl.Visible = True + 'LiSubProyectoDdl.Visible = True + 'LiSubProyectoLbl.Visible = True LiEjercicioDdl.Visible = True LiEjercicioLbl.Visible = True @@ -397,8 +418,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal ValidaEjercicios() - LiSubProyectoDdl.Visible = True - LiSubProyectoLbl.Visible = True + 'LiSubProyectoDdl.Visible = True + 'LiSubProyectoLbl.Visible = True LiEjercicioDdl.Visible = True LiEjercicioLbl.Visible = True @@ -420,8 +441,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End If If TAB.ActiveTabIndex = 3 Then - LiSubProyectoDdl.Visible = True - LiSubProyectoLbl.Visible = True + 'LiSubProyectoDdl.Visible = True + 'LiSubProyectoLbl.Visible = True LiEjercicioDdl.Visible = True LiEjercicioLbl.Visible = True @@ -437,8 +458,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal LblTri.Visible = False DVTri.Visible = False - LiPeriodoDdl.Visible = False - LiPeriodoLbl.Visible = False + LiPeriodoDdl.Visible = True + LiPeriodoLbl.Visible = True DdlPeriodo.SelectedValueExist(12) End If @@ -547,11 +568,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal FechaIMes = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaIMes))).ToString("dd/MM/yyyy") 'Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1) - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero + CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero + CveProyecto = DdlProyecto.SelectedValue.ToEntero 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosMensual(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + If ObjConta.GetEstadosMensual(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DtDatosMes = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") Else DtDatosMes = Nothing @@ -675,8 +697,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, CveProyecto, CveSubProyecto) If DdlDivisor.SelectedValue.ToEntero > 1 Then @@ -713,8 +735,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, CveProyecto, CveSubProyecto) End If If DdlDivisor.SelectedValue.ToEntero > 1 Then @@ -752,11 +774,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim FechaFin As Date = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}".ToDate FechaFMes = $"{FechaFin.LastDayOfMonth.Day.ToString("00")}/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}" - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero + CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero + CveProyecto = DdlProyecto.SelectedValue.ToEntero 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosMensualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + If ObjConta.GetEstadosMensualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DtDatosMesH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") Else DtDatosMesH = Nothing @@ -1244,27 +1267,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&TRCU={DdlTri.SelectedValue}" - e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) - e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) - e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) @@ -1352,27 +1375,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensualHorizontal.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1" e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}&TRCU={DdlTri.SelectedValue}" - e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) - e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) - e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) - e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) + e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString, CveProyecto, CveSubProyecto) 'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}" @@ -1530,11 +1553,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}" FechaFMes = $"31/12/{DdlEjercicio2.SelectedValue}" - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero + CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero + CveProyecto = DdlProyecto.SelectedValue.ToEntero 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero) Then + If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero) Then DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") Else DtDatosAnualH = Nothing @@ -1631,7 +1655,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") - Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + Else + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0" + End If + Next @@ -1706,7 +1735,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") - Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + + If DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then + Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + Else + Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = "0" + End If + + + Next Row.Item("Nombre") = "TOTAL GASTOS" @@ -1733,7 +1771,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + + + If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") > 0 Then + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Else + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0" + End If + + + Next Row.Item("Nombre") = "Resultados del Ejercicio" @@ -1913,11 +1960,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal FechaFMes = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}" FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaFMes))).ToString("dd/MM/yyyy") - Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero + CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero + CveProyecto = DdlProyecto.SelectedValue.ToEntero Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DTSubProyectosCabecerasH = ObjConta.DSResultados.Tables(0) DtDatosSubProyectoH = ObjConta.DSResultados.Tables(1).FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") 'se limpian los subproyectos con importe cero @@ -2106,11 +2154,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row.Item("CtaMayor") = -1 DtIngresosSubProyectoH.Rows.Add(Row) - Row.Item("Nombre") = "TOTAL INGRESOS " - Row.Item("ImporteActual") = "0.00" - Row.Item("ImporteAcumulado") = "0.00" - Row.Item("CtaMayor") = -1 - DtIngresosSubProyectoH.Rows.Add(Row) End If Dim T1 = TotalActual, T2 = TotalAnterior diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt index 2874e9072..a1124d4e7 100644 Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ diff --git a/General/ColectivasDetalle.aspx.vb b/General/ColectivasDetalle.aspx.vb index 2141cb428..33d300abc 100644 --- a/General/ColectivasDetalle.aspx.vb +++ b/General/ColectivasDetalle.aspx.vb @@ -112,7 +112,7 @@ Partial Class General_ColectivasDetalle If TempDTCuentasBancos.Rows.Count > 0 Then For Each row As DataRow In TempDTCuentasBancos.Rows - If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, CveColectiva:=NuevoCveColectiva) Then + If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=NuevoCveColectiva) Then ErrorBancos = True End If Next @@ -205,7 +205,7 @@ Partial Class General_ColectivasDetalle Dim Row As DataRow If CveColectiva > 0 Then - If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, CveColectiva:=CveColectiva) Then + If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=CveColectiva) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva))) @@ -294,7 +294,7 @@ Partial Class General_ColectivasDetalle Dim ObjCuentasBancos As New ClsGenerales If CveColectiva > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1) Then + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1, UsuarioActual.CveEmpresa) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva))) Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion) @@ -322,7 +322,7 @@ Partial Class General_ColectivasDetalle Dim ObjCuentasBancos As New ClsGenerales If CveColectiva > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva))) Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 2d3778ac7..67d851a82 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales If Not ErrorCuentaDeposito Then Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL) - If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then + If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then 'ErrorProv = True End If End If @@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales If Not dt.Columns.Contains("CveCuentaContable") Then dt.Columns.Add("CveCuentaContable", GetType(Integer)) End If + If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then + dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer)) + End If Dim sbErrores As New StringBuilder For Each Row As DataRow In dt.Rows @@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales ErrorAF = True End If End If + CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "") + + If CuentaContable.Length > 0 Then + Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero() + + If CveCuentaContable > 0 Then + Row("CveCuentaContableDepreciacion") = CveCuentaContable + Else + sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.
    ") + ErrorAF = True + End If + End If Next If Not ErrorAF Then @@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales End If Dim ObjAF As New ClsAF + ObjAF.IniciaTransacSQL() + Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL) Try - ObjAF.IniciaTransacSQL() + Dim Contador As Integer = 0 Dim NumRow As Integer = 0 @@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero() Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero() Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero() - + Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero() 'VALIDACIONES If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For @@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales If CveAF > 0 Then If CveCuentaContable > 0 Then - - Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL) - If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1, -1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF, CveTipoGasto:=-1, RegeneraCuenta:=False) Then ErrorAF = True End If - + End If + If CveCuentaContableDepreciacion > 0 Then + If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1, + -1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF, + CveTipoGasto:=-1, RegeneraCuenta:=False) Then + ErrorAF = True + End If End If Else ErrorAF = True Exit For End If End If - - NumRow = NumRow + 1 Next - If Not ErrorAF Then If Contador > 0 Then Alert(String.Format("Se agregaron: {0} Activos Fijos correctamente.
    Se Omitieron: {1} Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion) @@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales Finally ObjAF.Dispose() + ObjConta.Dispose() End Try #End Region - - ' C U E N T A S C O N T A B L E S ElseIf RblFormato.SelectedValue = "8" Then Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) ObjConta.IniciaTransacSQL() Try - Dim TieneError As Boolean = False Dim ContadorUpdate As Integer = 0 Dim ContadorError As Integer = 0 diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 029c3cf8a..06de2d38f 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -77,7 +77,7 @@ Partial Class Inventarios_Default DivEquivalentes.Visible = True DivPS.Visible = False End If - If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then + If UsuarioActual.CveEmpresa = 119 Then TrCompuesto.Visible = True End If Dim Txt As String = IfNull(Request("Txt"), "").ToString @@ -98,7 +98,7 @@ Partial Class Inventarios_Default If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then CargarDatosMedRin() CargaEquivalencia() - ElseIf UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then + ElseIf UsuarioActual.CveEmpresa = 119 Then CargaDatosCompuesto() Else CargaDatos(DDlPS.SelectedValue.ToEntero, 1) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 2394c7a2c..39c126845 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1006,13 +1006,15 @@ Partial Class Inventarios_TraspasoAlmacen Dim CveConceptoEntrada As Integer = 27 If Not ChkTransitorio.Checked Then CveConceptoEntrada = 27 Else CveConceptoEntrada = 9 + Dim CveFolioGarantia As Integer = Request.QueryString("CveFolioGarantia").ToEntero + 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble, CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:="", FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:="", ResponsableCarga:="", ResponsableRecibio:="", Identificacion:="", Domicilio:="", - Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2") + Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1)) FolioSalida = ObjInventario.Folio Folio = ObjInventario.Folio If CveMovimientoSalida <= 0 Then @@ -1033,7 +1035,7 @@ Partial Class Inventarios_TraspasoAlmacen 'ENTRADA CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, CveConceptoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), - CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3") + CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1)) FolioEntrada = ObjInventario.Folio If CveMovimientoEntrada <= 0 Then TextoError = "Ocurrió un error al generar el movimiento de entrada" diff --git a/Nomina/Finiquito.aspx.cs b/Nomina/Finiquito.aspx.cs index 5091cc40f..9c54bca1d 100644 --- a/Nomina/Finiquito.aspx.cs +++ b/Nomina/Finiquito.aspx.cs @@ -75,12 +75,12 @@ public partial class Nomina_Finiquito : ClsPaginas } set { ViewState["dtempleados"] = value; } - } + } #endregion protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) - { + { GvFinOrdinario.DataSource = new DataTable(); GVFinIndemnizacion.DataSource = new DataTable(); GvFinOrdinario.DataBind(); @@ -154,22 +154,20 @@ public partial class Nomina_Finiquito : ClsPaginas FechaInicio = LblFechaAlta.Text.ToDateTime(); TxtObservaciones.Text = da["Observaciones"].ToString(); TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]); + if (da["CveMotivoBaja"].ToString() == "") { - if (da["CveMotivoBaja"].ToString() == "") - { - chkIndemnizacion.Checked = true; - chkSeparacionUnica.Checked = true; - chkPrimaantiguedad.Checked = true; - } - else - { - chkIndemnizacion.Checked = da["ValIndemnizacion"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); - chkSeparacionUnica.Checked = da["ValSeparacionunica"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); - chkPrimaantiguedad.Checked = da["ValPrimadeantiguedad"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); - } + chkIndemnizacion.Checked = true; + chkSeparacionUnica.Checked = true; + chkPrimaantiguedad.Checked = true; } - - DdlTipoPeriodo.SelectedValueExist(((da["CveTipoPeriodo"]).ToString()=="6"?"-2":"-1")); + else + { + chkIndemnizacion.Checked = da["ValIndemnizacion"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); + chkSeparacionUnica.Checked = da["ValSeparacionunica"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); + chkPrimaantiguedad.Checked = da["ValPrimadeantiguedad"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); + } + + DdlTipoPeriodo.SelectedValueExist(((da["CveTipoPeriodo"]).ToString() == "6" ? "-2" : "-1")); DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]); TxtSalarioMinimo.Text = $"{da["SalarioMinimo"]:N2}"; ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE"); @@ -183,6 +181,30 @@ public partial class Nomina_Finiquito : ClsPaginas { loadsobrerecibo(onom); } + + if (da["Autorizado"].ToString().ToEntero() == 1) + { + + LnkAutorizar.Visible = false; + LnkTimbrar.Visible = true; + + LnkGuardarDatos.Enabled = false; + + LnkGuardarDatos.CssClass = "btn btn-default"; + LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado."; + } + + if (da["SeTimbro"].ToString().ToEntero() == 1) + { + LnkAutorizar.Visible = false; + LnkTimbrar.Visible = false; + + LnkGuardarDatos.Enabled = false; + + LnkGuardarDatos.CssClass = "btn btn-default"; + LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado."; + } + UpAcciones.Update(); } } CamposCalculados(); @@ -537,13 +559,13 @@ public partial class Nomina_Finiquito : ClsPaginas string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "CveNomina", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" }; - DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", CvePersonal), "", getcolumnas); + DataTable dtr = dtempleados.FiltraParametros(string.Format(" CvePersonal={0} ", CvePersonal), "", getcolumnas); int CveNomina = dtr.Rows[0]["CveNomina"].ToString().ToEntero(); LogicNominas lognom = new LogicNominas(); string Msg = ""; - Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual,versionTimbre:(UsuarioActual.CveEmpresa == 119? VersionTimbradoEnum.PorDefectoEmpresa: VersionTimbradoEnum.Version3_3)); + Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); if (Msg != null && Msg.Length > 0) { Alert(Msg, TipoMensaje.MsgAdvertencia); } @@ -738,7 +760,7 @@ public partial class Nomina_Finiquito : ClsPaginas DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero()); DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero()); FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]); - FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]); + //FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]); DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero()); DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero()); } @@ -753,6 +775,7 @@ public partial class Nomina_Finiquito : ClsPaginas NombreCompleto = drow["NombreCompleto"].ToString(); RFC = drow["RFC"].ToString(); CURP = drow["CURP"].ToString(); + FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]); TipoPeriodo = drow["TipoPeriodo"].ToString(); NSS = drow["NSS"].ToString(); } @@ -1087,7 +1110,7 @@ public partial class Nomina_Finiquito : ClsPaginas using (ClsRH ObjPersonal = new ClsRH()) using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL())) { - if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked,TxtObservaciones.Text ) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0) + if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0) { DataRow da = ObjPersonal.DtResultados.Rows[0]; CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero(); @@ -1136,7 +1159,8 @@ public partial class Nomina_Finiquito : ClsPaginas }*/ dtempleadosConceptos = null; dtempleados = null; - if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1) + LnkAutorizar.Visible = true; + if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal,Neto:1) && objnom.DTSetResultados.Tables.Count > 1) { dtempleados = objnom.DTSetResultados.Tables[3]; LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0); @@ -1164,7 +1188,6 @@ public partial class Nomina_Finiquito : ClsPaginas LnkGuardarDatos.CssClass = "btn btn-default"; LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado."; } - LnkAutorizar.Visible = true; } protected void LnkAutorizar_Click(object sender, EventArgs e) @@ -1350,7 +1373,7 @@ public partial class Nomina_Finiquito : ClsPaginas if (continuar) { continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero()); - if(onom.DtResultados.Rows.Count > 0) + if (onom.DtResultados.Rows.Count > 0) { DataRow drow = onom.DtResultados.Rows[0]; @@ -1358,7 +1381,7 @@ public partial class Nomina_Finiquito : ClsPaginas LtlSFSDI.Text = string.Format("
    {0:##,###,###.00##}
    ", drow["SDI"]); LtlSFDias.Text = string.Format("
    {0:##,###,###}
    ", drow["diasMesAnterior"]); LtlSFPercepciones.Text = string.Format("
    {0:##,###,###.00##}
    ", drow["TotalPercepciones"]); - LtlSFVar.Text = string.Format("
    (Percepciones /días)\r\n{0:##,###,###.00##}
    ", drow["TotalPercepciones"].ToString().ToDecimal() / drow["diasMesAnterior"].ToString().ToDecimal() ); + LtlSFVar.Text = string.Format("
    (Percepciones /días)\r\n{0:##,###,###.00##}
    ", drow["TotalPercepciones"].ToString().ToDecimal() / drow["diasMesAnterior"].ToString().ToDecimal()); LtlSF.Text = string.Format("
    Si((Tipo de salario ='Fijo'),SDI,(Salario Variable + SDI))\r\n{0:##,###,###.00##}
    ", drow["SalarioBC"]); } GVSDF.DataSource = onom.DTSetResultados.Tables[1]; diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 0cc9067cb..03caae8d9 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -106,6 +106,16 @@ public partial class Nomina_Nomina2 : ClsPaginas set { ViewState["DtSuaProcesado"] = value; } } + protected bool enviarCorreoEnTimbrado + { + get + { + if (ViewState["enviarCorreoEnTimbrado"] == null) { return false; } + else { return (bool)ViewState["enviarCorreoEnTimbrado"]; } + } + + set { ViewState["enviarCorreoEnTimbrado"] = value; } + } protected bool PermisoCancelarEmitido { get @@ -249,6 +259,7 @@ public partial class Nomina_Nomina2 : ClsPaginas if (!IsPostBack) { + enviarCorreoEnTimbrado = (UsuarioActual.CveEmpresa == 141 ? false : true); LnkCargaNetos.Visible = (UsuarioActual.Empresa.Funcionalidad(267) == "1") || (UsuarioActual.CveRol == 1); if (UsuarioActual.CveEmpresa == 141) { ddlfiniquito.SelectedValueExist("2"); } using (ClsRH objrh = new ClsRH()) @@ -556,7 +567,7 @@ public partial class Nomina_Nomina2 : ClsPaginas LnkFormatoTabular.Visible = true; HypPDFSTimbrados.Visible = true; - if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador,Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4) + if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4) { dtempleados = objnom.DTSetResultados.Tables[3]; dtempleadosConceptos = objnom.DTSetResultados.Tables[4]; @@ -1237,9 +1248,8 @@ public partial class Nomina_Nomina2 : ClsPaginas if (pdf != null) { List objarch = new List(); - objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); - if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) + if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa)) { string Ruta = ""; string PathXML = ""; @@ -1252,7 +1262,8 @@ public partial class Nomina_Nomina2 : ClsPaginas PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; - + objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" }); + //this.GuardaLog(PathXML); if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) { objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname }); @@ -1326,96 +1337,97 @@ public partial class Nomina_Nomina2 : ClsPaginas objrh.GetPersonal(-1, UsuarioActual.CveEmpresa); dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "Correo", "NombreCompleto", "RFC", "CURP" }); } - using (ClsNominas ObjNomina = new ClsNominas()) { - foreach (GridViewRow gvRow in GvNominas.Rows) + using (ClsNominas ObjNomina = new ClsNominas()) { - CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero(); - int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero(); - int CveNomina = gvRow.DataKey("CveNomina").ToEntero(); - LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar"); - string Correo = string.Empty; - string NombreCompleto = string.Empty; - string RFC = string.Empty; - string CURP = string.Empty; - if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null) + foreach (GridViewRow gvRow in GvNominas.Rows) { - Correo = drow["Correo"].ToString(); - NombreCompleto = drow["NombreCompleto"].ToString(); - RFC = drow["RFC"].ToString(); - CURP = drow["CURP"].ToString(); - } - if (CvePersonal > 0 && LnkTimbrar.Visible) - { - LogicNominas lognom = new LogicNominas(); - - string Msg = ""; - Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); - - if (Msg != null && Msg.Length > 0) + CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero(); + int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero(); + int CveNomina = gvRow.DataKey("CveNomina").ToEntero(); + LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar"); + string Correo = string.Empty; + string NombreCompleto = string.Empty; + string RFC = string.Empty; + string CURP = string.Empty; + if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null) { - Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP); - msggral = string.Format("{0}{3}{2}
    {1}
    ", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo")); + Correo = drow["Correo"].ToString(); + NombreCompleto = drow["NombreCompleto"].ToString(); + RFC = drow["RFC"].ToString(); + CURP = drow["CURP"].ToString(); } - else + if (CvePersonal > 0 && LnkTimbrar.Visible) { - LnkTimbrar.Visible = false; - gvRow.CssClass = "success"; - gvRow.FindControl("ImgDelete").Visible = false; - gvRow.FindControl("Imgdesautorizar").Visible = false; + LogicNominas lognom = new LogicNominas(); - gvRow.FindControl("LnkCancelar").Visible = true; - gvRow.FindControl("HypXml").Visible = true; - gvRow.FindControl("HypPDF").Visible = true; + string Msg = ""; + Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); - gvRow.ForeColor = Color.Green; - - if (Correo.Trim().Length > 0) + if (Msg != null && Msg.Length > 0) { - byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); - if (pdf != null) + Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP); + msggral = string.Format("{0}{3}{2}
    {1}
    ", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo")); + } + else + { + LnkTimbrar.Visible = false; + gvRow.CssClass = "success"; + gvRow.FindControl("ImgDelete").Visible = false; + gvRow.FindControl("Imgdesautorizar").Visible = false; + + gvRow.FindControl("LnkCancelar").Visible = true; + gvRow.FindControl("HypXml").Visible = true; + gvRow.FindControl("HypPDF").Visible = true; + + gvRow.ForeColor = Color.Green; + + if (enviarCorreoEnTimbrado && Correo.Trim().Length > 0) { - List objarch = new List(); - objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); - - if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) + byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); + if (pdf != null) { - string Ruta = ""; - string PathXML = ""; - string PathXMLF = ""; - string Xmlname = ""; - string XmlnameF = ""; - string empleado = ""; - Ruta = UsuarioActual.Empresa.Ruta; - PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml"; - PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; - Xmlname = $"{ObjNomina.SerieFolio}.xml"; - XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; + List objarch = new List(); - if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) + if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa)) { - objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname }); + string Ruta = ""; + string PathXML = ""; + string PathXMLF = ""; + string Xmlname = ""; + string XmlnameF = ""; + string empleado = ""; + Ruta = UsuarioActual.Empresa.Ruta; + PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml"; + PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; + Xmlname = $"{ObjNomina.SerieFolio}.xml"; + XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; + objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" }); + + if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) + { + objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname }); + } + if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF)) + { + objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXMLF, NombreArchivo = XmlnameF }); + } } - if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF)) + Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch); + //Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), Correo.Trim(), "", objarch); + using (ClsRH objrh = new ClsRH()) { - objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXMLF, NombreArchivo = XmlnameF }); + objrh.NomBitacoraCorreoAdd(CvePeriodoSeleccionado, CvePersonal, Correo.Trim(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario); } } - Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch); - //Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), Correo.Trim(), "", objarch); - using (ClsRH objrh = new ClsRH()) - { - objrh.NomBitacoraCorreoAdd(CvePeriodoSeleccionado, CvePersonal, Correo.Trim(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario); - } } + + } } - - } } - } if (msggral.Length > 0) { @@ -1492,16 +1504,15 @@ public partial class Nomina_Nomina2 : ClsPaginas if (Correo.Trim().Length > 0) { - byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); + byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); if (pdf != null) { - List objarch = new List(); - objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); + List objarch = new List(); using (ClsNominas ObjNomina = new ClsNominas()) { - if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) + if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa)) { string Ruta = ""; string PathXML = ""; @@ -1514,6 +1525,7 @@ public partial class Nomina_Nomina2 : ClsPaginas PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; + objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" }); if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) { @@ -1597,18 +1609,17 @@ public partial class Nomina_Nomina2 : ClsPaginas ClsNominas ObjPeriodo = new ClsNominas(); ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjPeriodo.Dispose(); - if (Correo.Trim().Length > 0) + if (enviarCorreoEnTimbrado && Correo.Trim().Length > 0) { byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); if (pdf != null) { - List objarch = new List(); - objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); + List objarch = new List(); using (ClsNominas ObjNomina = new ClsNominas()) { - if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) + if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa)) { string Ruta = ""; string PathXML = ""; @@ -1621,6 +1632,7 @@ public partial class Nomina_Nomina2 : ClsPaginas PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; + objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" }); if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) { @@ -7057,7 +7069,7 @@ public partial class Nomina_Nomina2 : ClsPaginas while (Neto != NetoSimulado && continuarV) { - if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, Neto,ddlfiniquito.SelectedValue.ToEntero()) + if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, Neto, ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1) { dtempleadosSimula = objnom.DTSetResultados.Tables[3]; diff --git a/Nomina/RepFiniquito.aspx b/Nomina/RepFiniquito.aspx index 6eac3f490..7fea45c34 100644 --- a/Nomina/RepFiniquito.aspx +++ b/Nomina/RepFiniquito.aspx @@ -30,7 +30,7 @@
    - + diff --git a/Nomina/RepFiniquito.aspx.cs b/Nomina/RepFiniquito.aspx.cs index 1e9468c57..7ac7410bb 100644 --- a/Nomina/RepFiniquito.aspx.cs +++ b/Nomina/RepFiniquito.aspx.cs @@ -29,10 +29,10 @@ public partial class Nomina_RepFiniquito : ClsPaginas int diafin = DateTime.DaysInMonth(dnow.Year, dnow.Month); TxtFechaInicio.Text = string.Format("01/{0:MM/yyyy}", dnow); TxtFechaFin.Text = string.Format("{1}/{0:MM/yyyy}", dnow,diafin); - RcveEstatusFiniquito = Request["cveEstatusFiniquito"] == null ? 0 : Request["cveEstatusFiniquito"].ToString().ToEntero(); + RcveEstatusFiniquito = Request["cveEstatusFiniquito"] == null ? -1 : Request["cveEstatusFiniquito"].ToString().ToEntero(); RcveSubProyecto = Request["cveSubProyecto"] == null ? 0 : Request["cveSubProyecto"].ToString().ToEntero(); - - + DdlEstatusFiniquito.SelectedValueExist(RcveEstatusFiniquito); + RcveEstatusFiniquito = DdlEstatusFiniquito.SelectedValue.ToEntero(); CargaRepFiniquitos(); } } @@ -48,6 +48,7 @@ public partial class Nomina_RepFiniquito : ClsPaginas } protected void BtnConsultar_Click(object sender, EventArgs e) { + RcveEstatusFiniquito = DdlEstatusFiniquito.SelectedValue.ToEntero(); CargaRepFiniquitos(); } } diff --git a/OC/RepOCSinFactura.aspx b/OC/RepOCSinFactura.aspx index 026109788..d42dba4b3 100644 --- a/OC/RepOCSinFactura.aspx +++ b/OC/RepOCSinFactura.aspx @@ -69,7 +69,7 @@ - + diff --git a/OC/RepOCSinFactura.aspx.vb b/OC/RepOCSinFactura.aspx.vb index ef5494c07..508f7bf7c 100644 --- a/OC/RepOCSinFactura.aspx.vb +++ b/OC/RepOCSinFactura.aspx.vb @@ -17,7 +17,7 @@ Partial Class OC_RepOCSinFactura Private Sub CargaCombos() 'CargaSucursales - DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) + DdlSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSucursal.DataBind() 'Vendedor diff --git a/RH/CalculoSBC.aspx b/RH/CalculoSBC.aspx index ed40d0ff9..af9b49c14 100644 --- a/RH/CalculoSBC.aspx +++ b/RH/CalculoSBC.aspx @@ -861,26 +861,41 @@
    +
    - Formato Registro Patronal - Formato Salario +
    + Formatos + + +
    - - -
    - - - - -
    - Fecha : -
    + + +
    + + + + + +
    + Fecha : +
    - + @@ -911,6 +926,7 @@ + diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index 66359a12a..e9b93cc30 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -391,6 +391,75 @@ public partial class RH_CalculoSBC : ClsPaginas Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia); } } + protected void LnkFormatocMasivaTS_Click(object sender, EventArgs e) + { + try + { + bool continuar = true; + string msgerror = ""; + if (dtsalario == null || dtsalario.Rows.Count == 0) + { + msgerror = "favor de calcular primero"; + continuar = false; + } + if (continuar) + { + + ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(); + + var libro = wb.AddWorksheet("Salario"); + int column = 1; + libro.Cell(1, column).Value = "Codigo"; + column++; + libro.Cell(1, column).Value = "Empleado"; + column++; + libro.Cell(1, column).Value = "TipodeSalario"; + libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White; + libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189)); + + int Fila = 1; + foreach (DataRow erow in dtsalario.Rows) + { + Fila++; + column = 1; + libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]); + column++; + libro.Cell(Fila, column).Value = erow["Nombre"]; + + column++; + libro.Cell(Fila, column).Value = erow["TipodeSalario"]; + } + + libro.Columns().AdjustToContents(); + System.IO.Stream fs = new System.IO.MemoryStream(); + wb.SaveAs(fs); + fs.Position = 0; + System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); + using (System.IO.Stream input = fs) + + { + input.CopyTo(memoryStream); + } + memoryStream.Position = 0; + + Response.Clear(); + Response.Buffer = true; + + Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; + Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Plantilla Salario ")); + Response.BinaryWrite(memoryStream.ToArray()); + Response.End(); + } + else + { + Alert(msgerror, TipoMensaje.MsgAdvertencia); + } + } + catch (Exception ex) + { + Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia); + } + } protected void LnkProcesarArchvo_Click(object sender, EventArgs e) { @@ -475,7 +544,7 @@ public partial class RH_CalculoSBC : ClsPaginas StringBuilder str = new StringBuilder(); bool rollback = false; - using (ClsClaseBase objNomina = new ClsClaseBase( )) + using (ClsClaseBase objNomina = new ClsClaseBase()) using (ClsRH objpersonal = new ClsRH()) { @@ -483,7 +552,7 @@ public partial class RH_CalculoSBC : ClsPaginas { string Codigo = row["Codigo"].ToString(); int CvePersonal = -1; // row["CvePersonal"].ToString().ToEntero(); - string RegistroPatronal = row["RegistroPatronal"].ToString() ; + string RegistroPatronal = row["RegistroPatronal"].ToString(); int CveMetodoPago = 0; if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-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.CveEmpresa) && objpersonal.DtResultados.Rows.Count == 1) @@ -501,7 +570,47 @@ public partial class RH_CalculoSBC : ClsPaginas objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalRPUpdate {0},'{1}'", CvePersonal, RegistroPatronal)); } } - + + + + } + } + if (ddltipoCarga.SelectedValue.ToEntero() == 3) + { + + List Filesgral = TxtArchivoNomina.getfiles().Archivos; + Archivo fileItem = Filesgral.Count > 0 ? Filesgral[0] : null; + DataTable DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true); + + StringBuilder str = new StringBuilder(); + bool rollback = false; + using (ClsClaseBase objNomina = new ClsClaseBase()) + using (ClsRH objpersonal = new ClsRH()) + { + + foreach (DataRow row in DTEXcel.FiltraParametros("LEN(Codigo)>0 ").Rows) + { + string Codigo = row["Codigo"].ToString(); + int CvePersonal = -1; // row["CvePersonal"].ToString().ToEntero(); + string TipodeSalario = row["TipodeSalario"].ToString(); + int CveMetodoPago = 0; + if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-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.CveEmpresa) && + objpersonal.DtResultados.Rows.Count == 1) + { + CvePersonal = objpersonal.CvePersonal; + CveMetodoPago = objpersonal.CveMetodoPago; + } + else + { + CvePersonal = 0; + str.AppendLine(string.Format("No se encontro el codigo {0}
    ", Codigo)); + } + if (CvePersonal > 0) + { + objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalTSUpdate {0},'{1}'", CvePersonal, TipodeSalario)); + } + } + } diff --git a/RH/CatAsistenciasInasistencias.aspx b/RH/CatAsistenciasInasistencias.aspx index f0a363f8c..1a45620ae 100644 --- a/RH/CatAsistenciasInasistencias.aspx +++ b/RH/CatAsistenciasInasistencias.aspx @@ -31,7 +31,7 @@ - + @@ -86,6 +86,16 @@ + + + + + + + + + + @@ -174,6 +184,10 @@
    +
    +
    + +
    @@ -184,12 +198,22 @@
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    -
    -
    - +
    diff --git a/RH/CatAsistenciasInasistencias.aspx.vb b/RH/CatAsistenciasInasistencias.aspx.vb index d565fb916..df5eb6a3a 100644 --- a/RH/CatAsistenciasInasistencias.aspx.vb +++ b/RH/CatAsistenciasInasistencias.aspx.vb @@ -85,10 +85,13 @@ Partial Class RH_CatAsistenciasInasistencias Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked + Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0) + Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0) + Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0) If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then +chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac) Then TipoTxt.Text = "" Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion) UpTitulos.Update() @@ -129,6 +132,11 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False) AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False) + ChkAplicaPago.Checked = If(GvRow.DataKey("AplicaPago") = "Aplica", True, False) + ChkAplicaPagoDoble.Checked = If(GvRow.DataKey("AplicaPagoDoble") = "Aplica", True, False) + ChkAplicaPrimaVac.Checked = If(GvRow.DataKey("AplicaPrimaVac") = "Aplica", True, False) + + ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" @@ -156,9 +164,16 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked + Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0) + Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0) + Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0) + + + If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias, - chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then + chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, + aplicaPrimaVac) Then GvDatos.EditIndex = -1 ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 077c0520a..3825b4499 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1999,7 +1999,7 @@ Partial Class RH_Personal If TempDTCuentasBancos.Rows.Count > 0 Then For Each row As DataRow In TempDTCuentasBancos.Rows - If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then + If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then TieneError = True Exit For End If @@ -3353,7 +3353,7 @@ Partial Class RH_Personal If CvePersonal > 0 Then Dim ObjCuentasBancos As New ClsGenerales - If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then + If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) @@ -3539,7 +3539,7 @@ Partial Class RH_Personal End If Dim ObjCuentasBancos As New ClsGenerales If CvePersonal > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion) @@ -3570,7 +3570,7 @@ Partial Class RH_Personal Dim ObjCuentasBancos As New ClsGenerales If CvePersonal > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 2feb7d74d..0ee976b6b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -6542,7 +6542,7 @@ Partial Class Clientes DTCuentasBancos = New DataTable TempDTCuentasBancos = New DataTable - If ObjCuentasBancos.GetCuentasDepositos(CveCliente:=CveCliente) Then + If ObjCuentasBancos.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados) Else Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia) @@ -6624,11 +6624,11 @@ Partial Class Clientes If CveCliente > 0 Then - If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveCliente:=CveCliente) Then + If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then DTCuentasBancos.Clear() - DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias")) + CargaCuentasBancarias() Else Alert("Error al registrar la cuenta bancaria. Por favor intente nuevamente", TipoMensaje.MsgError) End If @@ -6654,16 +6654,15 @@ Partial Class Clientes Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias")) - End If - + End If + Else - If CveCliente > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda) Then - DTCuentasBancos.Clear() - DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa) Then + DTCuentasBancos.Clear() + CargaCuentasBancarias() Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias")) Else @@ -6716,9 +6715,8 @@ Partial Class Clientes TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index Next TempDTCuentasBancos.AcceptChanges() - End If - - + End If + If e.Row.DBCampo("Estatus") = "True" Then e.Row.FCLabel("LlbEstatusTexto").Text = "Activo" Else @@ -6734,9 +6732,9 @@ Partial Class Clientes Dim ObjCuentasBancos As New ClsGenerales If CveCliente > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero()) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DTCuentasBancos.Clear() - DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) + CargaCuentasBancarias() Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion) Else diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 3bc89f608..6225d3e6e 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -255,15 +255,9 @@ Partial Class Ventas_RepProductosServicios Protected Sub CargarMarcas() If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then DivMarca.Visible = True - LblMarca.Visible = True - - 'Using ObjMarcas As New ClsProductosServicios - ' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then - ' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados - ' DdlMarcaPSDes.DataBind() - ' End If - 'End Using - DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) + LblMarca.Visible = True + DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) + DdlMarcaPSDes.DataBind() End If DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1")) End Sub diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5a0089e03..51dd9afac 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7686,7 +7686,7 @@ Partial Class Ventas DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") Else - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("Estado = 1", Orderby:="Clasificacion") + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("UsoClasificacion IN (1,3) and Estado = 1", Orderby:="Clasificacion") DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("", Orderby:="Clasificacion") End If 'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)