diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb index 20a6fdb07..238079690 100644 --- a/App_Code/ClsFinanzas.vb +++ b/App_Code/ClsFinanzas.vb @@ -258,6 +258,58 @@ Public Class ClsFinanzas Return Retorno End Function + + Public Function GetRazonesFinancierasEstadoResultadosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_EstadoResultadosRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Periodo", SqlDbType.Int).Value = Periodo + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Razones Financieras (2).", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + + Public Function GetRazonesFinancierasRatiosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_RatiosRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Periodo", SqlDbType.Int).Value = Periodo + + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Ratios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + #Region "RazonesFinancierasCuentas" Public Function AddRazonesFinancierasCuentas(CveRazonFinancieraConcepto As Integer, CveCuenta As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 98a12b85b..215aada2b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9000,6 +9000,7 @@ Public Class ClsPaginas PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649) PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649) PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal2.aspx".ToUpper(), -1) + PaginaDict.Add("/Finanzas/RepRazonesFinancieras2.aspx".ToUpper(), 1337) #End Region #Region "Flotillas" PaginaDict.Add("/Flotillas/CatCombustibles.aspx".ToUpper(), 284) diff --git a/Empresas/119/Formatos/CHQ-7260.rdlc b/Empresas/119/Formatos/CHQ-7260.rdlc index 24ae6ff90..0b58cd17b 100644 --- a/Empresas/119/Formatos/CHQ-7260.rdlc +++ b/Empresas/119/Formatos/CHQ-7260.rdlc @@ -1,498 +1,5 @@ - - - - - true - true - - - - - - - - - =Parameters!Folio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCASE(day(Parameters!Fecha.Value) & " DE " & CHOOSE(MONTH(Parameters!Fecha.Value),"Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre") & " DE " & year(Parameters!Fecha.Value)) - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ImporteLetra.Value - - - - - - - Textbox1 - 3.73754cm - 1.11125cm - 0.6cm - 14.79409cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Beneficiario.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox1 - 2.78553cm - 16.60737cm - 0.75875cm - 3.23497cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.35611cm - - - 11.2824cm - - - 2.29715cm - - - 2.63229cm - - - - - 0.54708cm - - - - - true - true - - - - - =Fields!CODIGO.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cuenta.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cargo.Value - - - - - - - Cargo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Abono.Value - - - - - - - Abono - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - DataSet1 - 11.32099cm - 0.73766cm - 0.54708cm - 19.56795cm - 6 - - - - - - - - - - - - - - - - - - 7.26042in - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0cm - 0cm - 0cm - 0.13cm - + + + =Parameters!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCASE(day(Parameters!Fecha.Value) & " DE " & CHOOSE(MONTH(Parameters!Fecha.Value),"Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre") & " DE " & year(Parameters!Fecha.Value)) + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + Textbox1 + 3.89629cm + 1.11125cm + 0.6cm + 14.79409cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Beneficiario.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox1 + 2.94428cm + 16.60737cm + 0.75875cm + 3.23497cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.35611cm + + + 11.2824cm + + + 2.29715cm + + + 2.63229cm + + + + + 0.54708cm + + + + + true + true + + + + + =Fields!CODIGO.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cuenta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cargo.Value + + + + + + + Cargo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abono.Value + + + + + + + Abono + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + DataSet1 + 11.32099cm + 0.73766cm + 0.54708cm + 19.56795cm + 6 + + + + + + + + + + + + + + + + + + 7.26042in + @@ -187,6 +182,7 @@ 1pt Silver + 2pt @@ -238,159 +234,7 @@ 1pt Silver - - - - - - - - true - true - - - - - % de Pago - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - - - - - - - - true - true - - - - - Horas Dobles - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - - - - - - - - true - true - - - - - Horas Triples - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver + 2pt @@ -442,6 +286,59 @@ 1pt Silver + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt @@ -449,7 +346,7 @@ - 0.36188cm + 0.5cm @@ -496,6 +393,7 @@ 0.5pt + 2pt @@ -545,6 +443,7 @@ 0.5pt + 2pt @@ -594,134 +493,7 @@ 0.5pt - - - - - - - - true - true - - - - - =Fields!PorcentajePago.Value - - - - - 0.5pt - - - - - - - - - true - true - - - - - =IIf(Fields!HorasDobles.Value>0,Fields!HorasDobles.Value.ToString(),"") - - - - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - - - - - - - true - true - - - - - =IIf(Fields!HorasTriples.Value>0,Fields!HorasTriples.Value.ToString(),"") - - - - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - - - Gray - - 0.5pt - + 2pt @@ -771,6 +543,57 @@ 0.5pt + 2pt + + + + + + + + true + true + + + + + + + + + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt @@ -786,8 +609,6 @@ - - @@ -803,8 +624,8 @@ DataSet1 3.2953cm 0.31432cm - 0.77667cm - 19.31368cm + 1cm + 19.31369cm diff --git a/GPS/WizardDispositivos.aspx.cs b/GPS/WizardDispositivos.aspx.cs index c85998c46..cfef6afc5 100644 --- a/GPS/WizardDispositivos.aspx.cs +++ b/GPS/WizardDispositivos.aspx.cs @@ -355,11 +355,11 @@ public partial class GPS_WizardDispositivos : ClsPaginas string icono = "rsz_11rsz_car"; string Color = "#0088FF"; string NumTelefono = ChkTipoLinea.Checked ? TxtTelefonoMovil.Text.Trim().Replace("(","").Replace(")","").Replace("-","").Replace(" ","") : "-1"; - if(DdlMarca.SelectedValue =="19" && DevId.Length != 16 ) - { - continuar = false; - Alert("el IMEI y DEVID de los dispositivos concox debe ser igual a 16 dígitos.", ModExtensiones.TipoMensaje.MsgAdvertencia); - } + //if(DdlMarca.SelectedValue =="19" && DevId.Length != 16 ) + //{ + // continuar = false; + // Alert("el IMEI y ID del Dispositivo de los dispositivos concox debe ser igual a 16 dígitos.", ModExtensiones.TipoMensaje.MsgAdvertencia); + //} if (continuar) { ClsGPS ObjGPS = new ClsGPS(); diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index d3e7ed58d..8efad22ff 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -1,472 +1,492 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadorResumen.aspx.vb" Inherits="General_RepIndicadorResumen" %> - - -
  • - Exportar PDF -
  • +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadorResumen.aspx.vb" Inherits="General_RepIndicadorResumen" %> + + +
  • + Exportar PDF +
  • <%--
  • Exportar Excel
  • Imprimir -
  • --%> -
    - - - - - - - Reporte de Resumen de Indicadores - - - <%--Tabla con los campos para filtrar--%> - - -
    -
    -
    + --%> + + + + + + + + Reporte de Resumen de Indicadores + + + <%--Tabla con los campos para filtrar--%> + + +
    +
    +
    - "> - -
    -
    -
    - -
    Fecha Inicio
    -
    -
    - - - - -
    - - -
    - -
    Fecha Fin
    -
    -
    - - - - -
    - - -
    -
    - SubProyecto: -
    -
    - - -
    - -
    - -
    -
    -
    > -
    -
    - - - -
    -
    - - -
    -
    - - Ventas por Productos -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%> - - - <%--TODO: Esto puede tronar si el valor es DBNull --%> - <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %> - - - - -
    -
    -
    -
    - -
    - - -
    -
    - - Ventas por Productos - Gráfica -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Compras Productores -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%> - - - <%--TODO: Esto puede tronar si el valor es DBNull --%> - <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %> - - - <%----%> - - -
    -
    -
    -
    - -
    - - -
    -
    - - Compras Productores - Gráfica por Cantidad(Kg) -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Gastos -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    - - Compras por clasificación - Gráfica -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Cuentas por cobrar -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    - - Cuentas por cobrar - Gráfica Saldo VS Recuperado -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Cuentas por Pagar productores -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    - - Cuentas por Pagar productores - Gráfica -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Cuentas por Pagar no productores -
    -
    - -
    -
    - - -
    -
    -
    - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    - - Cuentas por Pagar no productores - Gráfica -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - Saldo acumulado de Cuentas por Pagar -
    -
    - - -
    -
    -
    -
    -
    - - -
    - -
    - - - - -
    - -
    -
    - -
    - + + "> + +
    +
    +
    + +
    Fecha Inicio
    +
    +
    + + + + +
    + + +
    + +
    Fecha Fin
    +
    +
    + + + + +
    + + +
    +
    + SubProyecto: +
    +
    + + +
    + +
    + +
    +
    +
    > +
    +
    + + + +
    +
    + + +
    +
    + + Ventas por Productos +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%> + + + <%--TODO: Esto puede tronar si el valor es DBNull --%> + <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %> + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + Ventas por Productos - Gráfica +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Compras Productores +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + <%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%> + + + <%--TODO: Esto puede tronar si el valor es DBNull --%> + <%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %> + + + <%----%> + + +
    +
    +
    +
    + +
    + + +
    +
    + + Compras Productores - Gráfica por Cantidad(Kg) +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Gastos +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + Compras por clasificación - Gráfica +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Cuentas por cobrar +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + Cuentas por cobrar - Gráfica Saldo VS Recuperado +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Cuentas por Pagar productores +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + Cuentas por Pagar productores - Gráfica +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Cuentas por Pagar no productores +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + Cuentas por Pagar no productores - Gráfica +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + Saldo acumulado general (CxC - CxP) +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Saldo acumulado de Cuentas por Pagar +
    +
    + + +
    +
    +
    +
    +
    + + +
    + +
    + + + + +
    + +
    +
    + +
    + <%-- - --%> - <%----%> - + --%> + <%----%> + - - + +
    + diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index d76f7677e..aeae30958 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -74,7 +74,8 @@ Partial Class General_RepIndicadorResumen GvCxC.HeaderRow.Cells(2).Text = "Recuperado" End If - Dim SaldoConjCxP = 0 + Dim SaldoConjCxP As Decimal = 0D + Dim SaldoCxC As Decimal = 0D 'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla If GvVxP.Rows.Count > 0 Then @@ -101,8 +102,10 @@ Partial Class General_RepIndicadorResumen End If If GvCxC.Rows.Count > 0 Then UPGraficaCxC.Visible = True - PLCxCTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("SaldoMN", "CveCliente IS NOT NULL")) - Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL") + SaldoCxC = CType(GvCxC.DataSource, DataTable).SUMD("SaldoMN", "CveCliente IS NOT NULL") + + PLCxCTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxC) + Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUMD("RecuperadoMN", "CveCliente IS NOT NULL") If (Recuper > 0) Then PLCxCTot.InnerHtml += "" + "Rec: " + "" + String.Format("{0:c} MXN", Recuper) Else UPGraficaCxC.Visible = False @@ -110,7 +113,7 @@ Partial Class General_RepIndicadorResumen End If If GvCxP192.Rows.Count > 0 Then UPGraficaCxP192.Visible = True - Dim SaldoCxP192 = CType(GvCxP192.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL") + Dim SaldoCxP192 = CType(GvCxP192.DataSource, DataTable).SUMD("SaldoMN", "CveProveedor IS NOT NULL") SaldoConjCxP += SaldoCxP192 PLCxP192Tot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP192) Else @@ -119,7 +122,7 @@ Partial Class General_RepIndicadorResumen End If If GvCxP.Rows.Count > 0 Then UPGraficaCxP.Visible = True - Dim SaldoCxP = CType(GvCxP.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL") + Dim SaldoCxP = CType(GvCxP.DataSource, DataTable).SUMD("SaldoMN", "CveProveedor IS NOT NULL") SaldoConjCxP += SaldoCxP PLCxPTot.InnerHtml = "" + "Saldo: " + "" + String.Format("{0:c} MXN", SaldoCxP) Else @@ -135,7 +138,9 @@ Partial Class General_RepIndicadorResumen PLSaldoCxPTot.InnerHtml = Nothing End If - 'Si no había datos en ninguna tabla no cargar función de gráficos + LblSaldoTotal.InnerHtml = String.Format("{0:C} MXN", (SaldoCxC - SaldoConjCxP)) + + 'Si no había datos en ninguna tabla no cargar función de gráficos If GvVxP.Rows.Count = 0 _ AndAlso GvCompProductores.Rows.Count = 0 _ AndAlso GvCompAcreed.Rows.Count = 0 _ diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index b98e6eb41..a223f1f8c 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -2136,99 +2136,100 @@ Partial Class RH_Personal CargaGvBitacora() If EnviarCorreoNomina AndAlso DDLUsuarioNomina.SelectedValue.ToEntero > 0 Then - EnviarCorreoNominista() + 'EnviarCorreoNominista() + EviarCorreoBajaReingresoNomista(TipoMovimientoRH.Alta) End If End Sub - Private Sub EnviarCorreoNominista() + 'Private Sub EnviarCorreoNominista() - If UsuarioActual.CveEmpresa.Contiene(7) Then + ' If UsuarioActual.CveEmpresa.Contiene(7) Then - Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).Rows(0)("Correo").ToString + ' Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).Rows(0)("Correo").ToString - If CorreoNominista = "" Then - Alert($"No se envio el correo de notificación a nominas, el nominista no tiene {DDLUsuarioNomina.SelectedItem.Text} correo electronico", TipoMensaje.MsgAdvertencia) - Exit Sub + ' If CorreoNominista = "" Then + ' Alert($"No se envio el correo de notificación a nominas, el nominista no tiene {DDLUsuarioNomina.SelectedItem.Text} correo electronico", TipoMensaje.MsgAdvertencia) + ' Exit Sub - End If + ' End If - Dim correo As New ClsSisMail - Dim Cuerpo As New StringBuilder + ' Dim correo As New ClsSisMail + ' Dim Cuerpo As New StringBuilder - Dim Puesto As String = "" - Dim Padre As String = "" - Dim Madre As String = "" - Dim FechaIngreso As String = "" + ' Dim Puesto As String = "" + ' Dim Padre As String = "" + ' Dim Madre As String = "" + ' Dim FechaIngreso As String = "" - Dim EmpresaDestino As String = If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, GlobalDTEmpresas(DdlEmpresaAsignada.SelectedValue.ToEntero).Rows(0)("Empresa").ToString, UsuarioActual.Empresa.Empresa) + ' Dim EmpresaDestino As String = If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, GlobalDTEmpresas(DdlEmpresaAsignada.SelectedValue.ToEntero).Rows(0)("Empresa").ToString, UsuarioActual.Empresa.Empresa) - Dim objRH As New ClsRH + ' Dim objRH As New ClsRH - If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then + ' If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then - Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") + ' Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") - If DtFamiliares.Rows.Count > 0 Then - Padre = DtFamiliares.Rows(0)("Nombre").ToString - End If + ' If DtFamiliares.Rows.Count > 0 Then + ' Padre = DtFamiliares.Rows(0)("Nombre").ToString + ' End If - DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") + ' DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") - If DtFamiliares.Rows.Count > 0 Then - Madre = DtFamiliares.Rows(0)("Nombre").ToString - End If + ' If DtFamiliares.Rows.Count > 0 Then + ' Madre = DtFamiliares.Rows(0)("Nombre").ToString + ' End If - End If + ' End If - objRH.Dispose() - Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine("") - Cuerpo.AppendLine("
    { EmpresaDestino }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    Notificacion por Alta de Nomina
    ") + ' objRH.Dispose() + ' Cuerpo.AppendLine("") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine("
    { EmpresaDestino }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    Notificacion por Alta de Nomina
    ") - Cuerpo.AppendLine("
    ") - Cuerpo.AppendLine("
    ") + ' Cuerpo.AppendLine("
    ") + ' Cuerpo.AppendLine("
    ") - Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine("
    Datos del Candidato
    Puesto:{If(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
    Ruta/Servicio:{ If(DdlRuta.SelectedValue.ToEntero > 0, DdlRuta.SelectedItem.Text, "") }
    Fecha de ingreso:{TxtFechaIngreso.Text}
    Nombre:{ NombreCompleto }
    Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
    Numero IMSS:{ TxtNumeroSS.Text }
    Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
    Sexo:{ If(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
    R.F.C.:{ TxtRFC.Text }
    CURP:{ TxtCURP.Text }
    ") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") - If Padre.Length > 0 Then - Cuerpo.AppendLine($"") - End If + ' If Padre.Length > 0 Then + ' Cuerpo.AppendLine($"") + ' End If - If Madre.Length > 0 Then - Cuerpo.AppendLine($"") - End If + ' If Madre.Length > 0 Then + ' Cuerpo.AppendLine($"") + ' End If - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") - Cuerpo.AppendLine("
    Datos del Candidato
    Puesto:{If(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
    Ruta/Servicio:{ If(DdlRuta.SelectedValue.ToEntero > 0, DdlRuta.SelectedItem.Text, "") }
    Fecha de ingreso:{TxtFechaIngreso.Text}
    Nombre:{ NombreCompleto }
    Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
    Numero IMSS:{ TxtNumeroSS.Text }
    Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
    Sexo:{ If(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
    R.F.C.:{ TxtRFC.Text }
    CURP:{ TxtCURP.Text }
    Nombre del Padre:{ Padre }
    Nombre del Padre:{ Padre }
    Nombre de la Madre:{ Madre }
    Nombre de la Madre:{ Madre }
    Dirección:{ TxtCalle.Text }
    Escolaridad:{ If(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }
    Telefono:{ TxtCelular.Text},{TxtTelefono.Text}
    Correo:{ TxtCorreo.Text }
    ") + ' Cuerpo.AppendLine($"Dirección:{ TxtCalle.Text }") + ' Cuerpo.AppendLine($"Escolaridad:{ If(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }") + ' Cuerpo.AppendLine($"Telefono:{ TxtCelular.Text},{TxtTelefono.Text}") + ' Cuerpo.AppendLine($"Correo:{ TxtCorreo.Text }") + ' Cuerpo.AppendLine("") - correo.SendMail(EmpresaNotificaciones, CorreoNominista, "Notificacion por Alta de Nomina: " & NombreCompleto, Cuerpo.ToString) + ' correo.SendMail(EmpresaNotificaciones, CorreoNominista, "Notificacion por Alta de Nomina: " & NombreCompleto, Cuerpo.ToString) - End If + ' End If - End Sub + 'End Sub 'Private Sub MandaMails(Rutas As Object) ' Try @@ -7505,6 +7506,12 @@ Partial Class RH_Personal End Using End If + If continuar Then + + EviarCorreoBajaReingresoNomista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja)) + + End If + If continuar Then RegistraScript("$('#ModalUpEstatus').modal('hide');") @@ -7647,5 +7654,115 @@ Partial Class RH_Personal End Sub + + +#Region "ENVIAR CORREO NOMINISTA" + + Enum TipoMovimientoRH + Alta + Baja + Reingreso + End Enum + + Private Sub EviarCorreoBajaReingresoNomista(eTipoMovimientoRH As TipoMovimientoRH) + + + Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).FiltroPrimeroValor("Correo") + Dim correo As New ClsSisMail + Dim Cuerpo As New StringBuilder + + Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") + Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "") + + If CorreoNominista = "" Then + Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim Puesto As String = "" + Dim Padre As String = "" + Dim Madre As String = "" + Dim FechaIngreso As String = "" + + Dim objRH As New ClsRH + + If objRH.PersonalFamiliaresGet(-1, CvePersonal) Then + + Dim DtFamiliares As DataTable = objRH.DtResultados.FiltraParametros(" CveParentesco = 1 ") + + If DtFamiliares.Rows.Count > 0 Then + Padre = DtFamiliares.Rows(0)("Nombre").ToString + End If + + DtFamiliares = objRH.DtResultados.FiltraParametros(" CveParentesco = 2 ") + + If DtFamiliares.Rows.Count > 0 Then + Madre = DtFamiliares.Rows(0)("Nombre").ToString + End If + + End If + + Dim TimpoMovimiento As String = "" + + Select Case eTipoMovimientoRH + Case TipoMovimientoRH.Alta + TimpoMovimiento = "Alta" + Exit Select + Case TipoMovimientoRH.Baja + TimpoMovimiento = "Baja" + Exit Select + Case TipoMovimientoRH.Reingreso + TimpoMovimiento = "Reingreso" + Exit Select + End Select + + objRH.Dispose() + Cuerpo.AppendLine("") + Cuerpo.AppendLine($"") + + Cuerpo.AppendLine($"") + Cuerpo.AppendLine("
    { UsuarioActual.Empresa.Empresa }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    Notificacion por { TimpoMovimiento } de Nomina
    ") + + Cuerpo.AppendLine("
    ") + Cuerpo.AppendLine("
    ") + + Cuerpo.AppendLine("") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + + Cuerpo.AppendLine($"") + + If eTipoMovimientoRH = TipoMovimientoRH.Baja Then + Cuerpo.AppendLine($"") + If Txobservacionesbaja.Text.Trim.Length > 0 Then + Cuerpo.AppendLine($"") + End If + End If + + + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") + Cuerpo.AppendLine("
    Datos del Candidato
    Puesto:{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }
    Ruta/Servicio:{ DdlRuta.SelectedItem.Text }
    Fecha de { TimpoMovimiento }:{TxtFechaEstatus.Text}
    Motivo de Baja:{ DdlMotivoBaja.SelectedItem.Text }
    Observaciones :{ Txobservacionesbaja.Text.Trim }
    Nombre:{ NombreCompleto }
    Fecha y Lugar de Nacimiento:{TxtFechaNacimiento.Text} {TxtLugarNacimiento.Text}
    Numero IMSS:{ TxtNumeroSS.Text }
    Numero Infonavit:{ If(TxtInfoNumCredito.Text.Trim = "", "NO CUENTA CON CREDITO", TxtInfoNumCredito.Text) }
    Sexo:{ IIf(DdlGenero.SelectedValue = "1", "Masculino", "Femenino") }
    R.F.C.:{ TxtRFC.Text }
    CURP:{ TxtCURP.Text }
    Nombre del Padre:{ Padre }
    Nombre de la Madre:{ Madre }
    Dirección:{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}
    Escolaridad:{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }
    Telefono:{ TxtCelular.Text},{TxtCelularPersonal.Text}
    Tel en Caso de Emergencia:{ TxtTelefonoEmergencia.Text }
    Correo:{ TxtCorreo.Text }
    ") + + correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento }de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP) + + End Sub + + +#End Region + End Class