0.0025 * [Días IMSS] * [Salario base cotización] \n 0.0025 * {1:#} * {0:#.0000}", SalarioDiarioIMSS, DiasIMSS);
+ TxtCCSysPrestacionesenDinero.Text = string.Format("{0:N2}", PrestacionesDinero);
+
+ LblCCSysGastosMedicos.Text = string.Format(" 0.00375 * [Días IMSS] * [Salario base cotización] \n 0.00375 * {1:#} * {0:#.0000}", SalarioDiarioIMSS, DiasIMSS);
+ TxtCCSysGastosMedicos.Text = string.Format("{0:N2}", GastosMedicos);
+
+ LblCCSysRetEnfYMatOb.Text = string.Format(" [Cuota excedente] + [Prestaciones en dinero] + [Gastos médicos pensionados] \n {0:#.00} + {1:#.00} + {2}:#.00", CuotaExcedente, PrestacionesDinero, GastosMedicos);
+ TxtCCSysRetEnfYMatOb.Text = string.Format("{0:N2}", retenfermadMaterObrero);
+
+ LblCCSysRetInvYVida.Text = string.Format(" 0.00625 * [Días IMSS] * [Salario base cotización] \n 0.00625 * {1:#} * {0:#.0000}", SalarioDiarioIMSS, DiasIMSS);
+ TxtCCSysRetInvYVida.Text = string.Format("{0:N2}", RetInvYVida);
+
+ LblCCSysRetCesentia.Text = string.Format(" 0.01125 * [Días IMSS] * [Salario base cotización] \n 0.01125 * {1:#} * {0:#.0000}", SalarioDiarioIMSS, DiasIMSS);
+ TxtCCSysRetCesentia.Text = string.Format("{0:N2}", RetCesentia);
+
+ LblCCSysImporteIMSS.Text = string.Format(" [Ret. Enf. y Mat. obrero] + [Ret. Inv. y vida] + [Ret. Cesantia] \n {0:#.00} + {1:#.00} + {2:#.00}", retenfermadMaterObrero, RetInvYVida, RetCesentia);
+ TxtCCSysImporteIMSS.Text = string.Format("{0:N2}", IMSS);
+ }
+ showhidepnlscalculo(1);
+ showModalCalculo();
+ }
+
+ protected void LnkCalculoHorasExtras_Click(object sender, EventArgs e)
+ {
+
+ showhidepnlscalculo(2);
+ //AreaGeografica HorasDobles HorasTriples
+ TxtCCSysHorasDobles.Text = "";
+ TxtCCSysHorasTriples.Text = "";
+ TxtCCSysDiasLaborados.Text = "";
+ DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
+ if (drow != null)
+ {
+ decimal UMA = 89.62M;
+ decimal HorasDobles = drow["HorasDobles"].ToString().ToDecimal();
+ decimal HorasTriples = drow["HorasTriples"].ToString().ToDecimal();
+ decimal ImporteHora = drow["SalarioDiario"].ToString().ToDecimal() / 8;
+ decimal Semanaslaboradas = Decimal.Truncate((drow["DiasLaborados"].ToString().ToDecimal() / 7));
+ bool seExentandobles = !(drow["SalarioDiario"].ToString().ToDecimal() > drow["SalarioMinimo"].ToString().ToDecimal());
+ decimal TopeHorasDobles = Semanaslaboradas * 9;
+ decimal HorasExcentas = HorasDobles > TopeHorasDobles ? TopeHorasDobles : HorasDobles;
+ decimal ImporteHorasExtrasAntes = HorasExcentas * ImporteHora * (seExentandobles ? 2 : 1);
+ decimal TopeImporte = Semanaslaboradas * 5 * UMA;
+ decimal ImporteHorasExtras = ImporteHorasExtrasAntes > TopeImporte ? TopeImporte : ImporteHorasExtrasAntes;
+ decimal TotalHorasextras = ImporteHora * ((HorasDobles * 2) + (HorasTriples * 3));
+
+ TxtCCSysHorasDobles.Text = string.Format("{0:N2}", HorasDobles);
+ TxtCCSysHorasTriples.Text = string.Format("{0:N2}", HorasTriples);
+ TxtCCSysSalarioDiario.Text = string.Format("${0:N2}", drow["SalarioDiario"]);
+ TxtCCSysDiasLaborados.Text = string.Format("{0:N0}", drow["DiasLaborados"]);
+ TxtCCSysImporteHora.Text = string.Format("${0:N2}", ImporteHora);
+
+ LblCCSysSeExcentanDobles.Text = string.Format(" SI( [Salario diario({0:N2})] > [Salario mínimo({1:N2})], \"No\", \"Sí\" ) ", drow["SalarioDiario"], drow["SalarioMinimo"]);
+ TxtCCSysSeExcentanDobles.Text = seExentandobles ? "Sí" : "No";
+
+ LblCCSysTopeHorasDobles.Text = string.Format(" [Semanas laboradas({0:N0})] * 9 ", Semanaslaboradas);
+ TxtCCSysTopeHorasDobles.Text = string.Format("{0:N0}", Semanaslaboradas * 9);
+
+ LblCCSysHorasExcentas.Text = string.Format(" SI( [Horas dobles({0:N0})] > [Tope horas({1:N0})], [Tope horas({1:N0})] , [Horas dobles({0:N0})]) ", HorasDobles, TopeHorasDobles);
+ TxtCCSysHorasExcentas.Text = string.Format("{0:N0}", HorasExcentas);
+
+ LblCCSysImporteExentoAntesTope.Text = string.Format(" [Horas exentas] * [Importe hora] * Si([se exentan dobles] , 2, 1)
", Semanaslaboradas, UMA);
+ TxtCCSysImporteExentoAntesTope.Text = string.Format("{0:N2}", ImporteHorasExtrasAntes);
+
+ LblCCSysTopeImporte.Text = string.Format(" [Semanas laboradas({0:N0})] * 5 * [UMA({1:N2})] ", Semanaslaboradas, UMA);
+ TxtCCSysTopeImporte.Text = string.Format("{0:N2}", TopeImporte);
+
+
+ LblCCSysImporteExento.Text = string.Format("SI( [Importe exento(antes del tope)({0:N2})] > [Tope importe({1:N2})],\n[Tope importe({1:N2})] ,\n [Importe exento(antes del tope)({0:N2})]) ", ImporteHorasExtrasAntes, TopeImporte);
+ TxtCCSysImporteExento.Text = string.Format("{0:N2}", ImporteHorasExtras);
+
+ LblCCSysImporteGravado.Text = string.Format(" [Total horas extras({0:N2})] - [Importe exento({1:N2})] ", TotalHorasextras, ImporteHorasExtras);
+ TxtCCSysImporteGravado.Text = string.Format("{0:N2}", TotalHorasextras - ImporteHorasExtras);
+
+ }
+ showModalCalculo();
+ }
+
+ protected void LnkCalculoSubsidio_Click(object sender, EventArgs e)
+ {
+
+ showhidepnlscalculo(3);
+ showModalCalculo();
+ }
+
+ protected void LnkCalculoISR_Click(object sender, EventArgs e)
+ {
+
+ showhidepnlscalculo(4);
+ showModalCalculo();
+ }
+ #endregion
#region Vacaciones
protected int CvePersonalVacaciones
{
@@ -1726,6 +1914,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
PnlVacFechapago.Visible = false;
PnlVacDiasPago.Visible = false;
PnlVacChecks.Visible = false;
+ TxtVacDiasPago.Text = "0";
switch (DdlFormapagovacaciones.SelectedValue.ToEntero())
{
case 1://Pagar en fecha
@@ -1753,8 +1942,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
PnlVacChecks.Visible = true;
break;
case 5://Solo disfrutar
- PnlVacFechapago.Visible = true;
- PnlVacDiasPago.Visible = true;
+ PnlVacfechas.Visible = true;
break;
case 6://Solo prima
PnlVacFechapago.Visible = true;
@@ -1808,7 +1996,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago,
diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero(),
- Ejercicio: TxtVacEjercicio.Text.ToEntero(), PrimaVacacional:(ChkVacPrimaVacacional.Checked?1:0),CobrarImss: (ChkVacCobrarIMSS.Checked ? 1 : 0), diasPago: TxtVacDiasPago.Text.ToEntero()
+ Ejercicio: TxtVacEjercicio.Text.ToEntero(), PrimaVacacional: (ChkVacPrimaVacacional.Checked ? 1 : 0), CobrarImss: (ChkVacCobrarIMSS.Checked ? 1 : 0), diasPago: TxtVacDiasPago.Text.ToEntero()
);
if (objRH.DtResultados.Rows.Count > 0)
{
@@ -2019,7 +2207,19 @@ public partial class Nomina_Nomina2 : ClsPaginas
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia);*/
}
#endregion
+ public void cargaBitacora()
+ {
+ using (ClsGenerales ObjGral = new ClsGenerales())
+ {
+
+ if (ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CvePersonal: SRCvePersonal, CvePeriodo: SRCvePeriodo))
+ {
+ GvBitacora.DataSource = ObjGral.DtResultados;
+ GvBitacora.DataBind();
+ }
+ }
+ }
protected void LnkImportexCalculo_Click(object sender, EventArgs e)
{
@@ -2147,7 +2347,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
TxtmcImporte.Text = "";
TxtmcImporteGrabado.Text = "";
Txtmcvalor.Text = "";
- ChkCalAutomaticoG.Checked = false;
+ ChkCalAutomaticoG.Checked = false;
ChkCalAutomatico.Checked = false;
ChkCalAutomaticoV.Checked = false;
if (CveConcepto > 0)
@@ -2208,7 +2408,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
protected void BtnAceptarMC_Click(object sender, EventArgs e)
{
- int chkImporte = ChkCalAutomatico.Checked? 0:1;
+ int chkImporte = ChkCalAutomatico.Checked ? 0 : 1;
int chkImporteGravado = ChkCalAutomaticoG.Checked ? 0 : 1;
int chkImporteValor = ChkCalAutomaticoV.Checked ? 0 : 1;
bool continuar = true;
@@ -2222,91 +2422,91 @@ public partial class Nomina_Nomina2 : ClsPaginas
CvePersonal = DdlmcPersonal.SelectedValue.ToEntero();
}
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
- decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
- decimal ImporteGravadoConcepto = ChkCalAutomaticoG.Checked ? 0.0m : TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
- decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
- decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
- if ((ImporteConcepto>= 0 && ImporteGravadoConcepto<= ImporteConcepto)|| (ImporteConcepto < 0 && ImporteGravadoConcepto >= ImporteConcepto))
+ decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
+ decimal ImporteGravadoConcepto = ChkCalAutomaticoG.Checked ? 0.0m : TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
+ decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
+ decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
+ if ((ImporteConcepto >= 0 && ImporteGravadoConcepto <= ImporteConcepto) || (ImporteConcepto < 0 && ImporteGravadoConcepto >= ImporteConcepto))
{
- if (CveConcepto > 0 && CvePersonal > 0)
- {
- using (ClsNominas objNomina = new ClsNominas())
+ if (CveConcepto > 0 && CvePersonal > 0)
{
-
- if (continuar)
+ using (ClsNominas objNomina = new ClsNominas())
{
- if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
+
+ if (continuar)
{
- if (objNomina.DtResultados.Rows.Count > 0)
+ if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
{
- CveNomina = objNomina.CveNomina;
- }
- else
- {
- if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
- "", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false))
+ if (objNomina.DtResultados.Rows.Count > 0)
{
CveNomina = objNomina.CveNomina;
}
else
+ {
+ if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
+ "", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false))
+ {
+ CveNomina = objNomina.CveNomina;
+ }
+ else
+ {
+ continuar = false;
+ }
+ }
+ }
+ }
+ if (CveNomina == 0)
+ {
+ continuar = false;
+ }
+
+
+
+ if (continuar)
+ {
+
+ if (continuar)
+ {
+
+ if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, true, chkImporte, chkImporteGravado, chkImporteValor))
{
continuar = false;
}
}
}
}
- if (CveNomina == 0)
- {
- continuar = false;
- }
-
-
if (continuar)
{
+ cargaDatos();
+ cargaBitacora();
- if (continuar)
- {
+ cargasobrericiboconceptos();
+ UpModalConceptos.Update();
+
+ RegistraScript("$('#ModalUpConcepto').modal('hide');");
+ Alert("El cambio se ha guardado correctamente.");
- if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, true, chkImporte, chkImporteGravado, chkImporteValor))
- {
- continuar = false;
- }
- }
}
- }
- if (continuar)
- {
- cargaDatos();
-
- cargasobrericiboconceptos();
- UpModalConceptos.Update();
-
- RegistraScript("$('#ModalUpConcepto').modal('hide');");
- Alert("El cambio se ha guardado correctamente.");
-
- }
-
- }
- else
- {
- if (CveConcepto > 0)
- {
- Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
}
else
{
- Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
- }
+ if (CveConcepto > 0)
+ {
+ Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
+ }
+ else
+ {
+ Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
+ }
}
}
else
{
- Alert("el importe gravado no puede ser mayor al importe total, en caso de que el importe total sea negativo no puede ser menor.",TipoMensaje.MsgAdvertencia );
+ Alert("el importe gravado no puede ser mayor al importe total, en caso de que el importe total sea negativo no puede ser menor.", TipoMensaje.MsgAdvertencia);
}
-
}
private void mostrarConceptos()
{
@@ -2378,7 +2578,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LblSRSbc.Text = SalarioDiarioIMSS;
#endregion
- cargasobrericiboconceptos();
+ cargasobrericiboconceptos();
#region "Infonavit"
{
using (ClsRH objper = new ClsRH())
@@ -2461,7 +2661,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
)
{
- if(!row["CveSistema"].ToString().ToEntero().Contiene(new int[] { 20,21,112,202, 203,204,205,206,207,50,51 }))
+ if (!row["CveSistema"].ToString().ToEntero().Contiene(new int[] { 20, 21, 112, 202, 203, 204, 205, 206, 207, 50, 51 }))
{
BorradoLogico = 1;
}
@@ -4913,7 +5113,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
DataRow drow = dt.NewRow();
drow["CveConcepto"] = "-1";
drow["Concepto"] = "Seleccione";
- dt.Rows.InsertAt(drow,0);
+ dt.Rows.InsertAt(drow, 0);
DdlConcepto.DataSource = dt;
DdlConcepto.SelectedValueExist("-1");
DdlConcepto.DataBind();
@@ -5103,7 +5303,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
using (ClsNominas objNomina = new ClsNominas())
{
- if (objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodoSeleccionado) && objNomina.DtResultados.Rows.Count >0)
+ if (objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodoSeleccionado) && objNomina.DtResultados.Rows.Count > 0)
{
DataRow drow = objNomina.DtResultados.Rows[0];
int Estatus = drow["Estatus"].ToString().ToEntero();
@@ -5193,12 +5393,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
- ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
+ ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
ImporteValor = rcon["Valor"].ToString().ToDecimal();
if (continuar)
{
- if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario,false, chkImporte, chkImporteGravado, chkImporteValor))
+ if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, false, chkImporte, chkImporteGravado, chkImporteValor))
{
continuar = false;
}
@@ -5327,8 +5527,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (objpersonal.AddAsistencia(CvePersonal, -1, DdlAsisSubProyecto.SelectedValue.ToEntero(), fecha, DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim().ToDouble(), TxtHorasDobles.Text.Trim().ToDouble(),
TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
- Alert(string.Format("se ha guardado la asistencia satisfactoriamente
{0}
{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()),TipoMensaje.ToastInformacion);
- RegistraScript("$('#DModalModAsistencia').modal('hide');");
+ Alert(string.Format("se ha guardado la asistencia satisfactoriamente
{0}
{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()), TipoMensaje.ToastInformacion);
+ RegistraScript("$('#DModalModAsistencia').modal('hide');");
}
}
@@ -6413,7 +6613,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
-
+ DataTable Contasource;
+ DataTable ContaConceptossource;
protected void LnkRegistrarProvision_Click(object sender, EventArgs e)
{
using (ClsNominas objnom = new ClsNominas())
@@ -6441,6 +6642,50 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (objnom.DTSetResultados.Tables.Count > 1)
{
+
+ using (ClsContabilidad ObjContaz = new ClsContabilidad())
+ {
+ if (ObjContaz.GetConta_ConceptosContables())
+ {
+ ContaConceptossource = ObjContaz.DtResultados;
+
+ }
+
+ }
+
+ if (UsuarioActual.Empresa.TipoContabilidad == 1)
+ {
+
+ using (ClsContabilidad ObjConta = new ClsContabilidad())
+ {
+ if (ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa))
+ {
+ DdlCtaContable.DataSource = ObjConta.DtResultados;
+ DdlCtaContable.DataBind();
+ Contasource = ObjConta.DtResultados;
+ }
+ }
+ }
+ else
+ {
+ using (ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa))
+ {
+ if (ObjConta.Conectado && ObjConta.GetCuentas(-1, "-1", 1))
+ {
+ Contasource = ObjConta.DtResultados;
+ DdlCtaContable.DataValueField = "Id";
+ DdlCtaContable.DataSource = ObjConta.DtResultados;
+ DdlCtaContable.DataBind();
+ }
+ }
+ }
+ DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ DdlCtaContable.SelectedValueExist("-1");
+ GVProvision.DataSource = objnom.DTSetResultados.Tables[1];
+ GVProvision.DataBind();
+ RegistraScript("$('#ModalRegistraProvision').modal();");
+ UpRegistroProvision.Update();
+ /*
StringBuilder str = new StringBuilder();
str.Append("no se pudo registrar la provisión, existen cuentas sin vincular.
{0}", str));
+ */
}
}
}
}
}
+ protected void LnkGuardarConceptosProvision_Click(object sender, EventArgs e)
+ {
+ bool continuar = true;
+ DataTable dtconta = null;
+ using (ClsContabilidad ObjConta = new ClsContabilidad())
+ {
+ int CveProveedor = -1;
+ int CveClientes = -1;
+ int CveClasificacion = -1;
+ int CveAlmacen = -1;
+
+
+ if (ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa))
+ {
+ dtconta = ObjConta.DtResultados;
+ }
+ ObjConta.IniciaTransacSQL();
+ foreach (GridViewRow gvrow in GVProvision.Rows)
+ {
+ int CveConceptoNomina = gvrow.DataKey("CveConcepto").ToEntero();
+ if (continuar && CveConceptoNomina > 0)
+ {
+ int CvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
+ int CveconceptosContables = ((DropDownList)gvrow.FindControl("DdlCconceptosContables")).SelectedValue.ToEntero();
+ int Cve = ((DropDownList)gvrow.FindControl("Ddlcuentassd")).SelectedValue.ToEntero();
+
+ int CveCuenta = -1;
+ int IdCuentaContable = -1;
+ if (UsuarioActual.Empresa.TipoContabilidad == 1)
+ {
+ DataRow drcuenta = dtconta.FiltroPrimero(string.Format(" CveCuenta ={0}", Cve));
+ if (drcuenta != null)
+ {
+ IdCuentaContable = drcuenta["IdCompaq"].ToString().ToEntero();
+ }
+ CveCuenta = Cve;
+ }
+ else
+ {
+ DataRow drcuenta = dtconta.FiltroPrimero(string.Format("IdCompaq ={0}", Cve));
+ if (drcuenta != null)
+ {
+ CveCuenta = drcuenta["CveCuenta"].ToString().ToEntero();
+ }
+ IdCuentaContable = Cve;
+ }
+ if (CveconceptosContables > 0 && CveCuenta > 0)
+ {
+ if (!ObjConta.AddCuentasAsignaciones(CveconceptosContables, UsuarioActual.CveEmpresa, CveCuenta, IdCuentaContable, CveProveedor, CveClientes,
+ CvePersonal, CveClasificacion, CveAlmacen, -1, CveBancoCuenta: -1, CveConceptoNomina: CveConceptoNomina))
+ { continuar = false; }
+
+ }
+ else { continuar = false; }
+ }
+ }
+ if (continuar)
+ {
+
+ ObjConta.Commit();
+ }
+ else
+ {
+ ObjConta.RollBack();
+ }
+ }
+
+ if (continuar)
+ {
+ Alert("las cuentas hán sido asignadas.");
+ RegistraScript("$('#ModalRegistraProvision').modal('hide');");
+ }
+ }
+ protected void GVProvision_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ DropDownList ddllist = (DropDownList)e.Row.FindControl("Ddlcuentassd");
+ DropDownList DdlCconceptosContables = (DropDownList)e.Row.FindControl("DdlCconceptosContables");
+
+ DdlCconceptosContables.DataSource = ContaConceptossource;
+ DdlCconceptosContables.DataBind();
+ DdlCconceptosContables.SelectedValueExist("174");
+ ddllist.DataValueField = DdlCtaContable.DataValueField;
+ ddllist.DataSource = Contasource;
+ ddllist.DataBind();
+ ddllist.Items.Insert(0, new ListItem("Seleccione", "-1"));
+ ddllist.SelectedValueExist("-1");
+ }
+
+ }
protected void LnkupPrimaRiesgo_Click(object sender, EventArgs e)
{
@@ -6846,4 +7183,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.End();
}
+
+
+
+
+ protected void GvBitacora_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ for (int j = 0; j < e.Row.Cells.Count; j++)
+ {
+ string encoded = e.Row.Cells[j].Text;
+ e.Row.Cells[j].Text = Context.Server.HtmlDecode(encoded);
+ }
+
+ }
+ }
}
diff --git a/Nomina/ReportedeAcumulados.aspx.cs b/Nomina/ReportedeAcumulados.aspx.cs
index 5cbbc8a75..cec0972c3 100644
--- a/Nomina/ReportedeAcumulados.aspx.cs
+++ b/Nomina/ReportedeAcumulados.aspx.cs
@@ -655,7 +655,17 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
libro.Range(4, 1, 4, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
- System.IO.Stream fs = new System.IO.MemoryStream();
+
+ libro.Row(1).InsertRowsAbove(4);
+ libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
+ libro.Range(2, 2, 2, 6).Merge().Value = "Reporte de acumulados nómina";
+ libro.Range(1, 2, 2, 6).Style.Font.Bold = true; libro.Range(1, 2, 2, 6).Style.Font.FontSize = 16;
+ libro.Range(3, 2, 3, 6).Merge().Value = $"del {TxtRpdFechaInicio.Text.ToDateTime():dd/MM/yyyy} al {TxtRpdFechaFin.Text.ToDateTime():dd/MM/yyyy}";
+ libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
+ libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
+
+
+ System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
diff --git a/RH/CatPersonal.aspx b/RH/CatPersonal.aspx
index bbc0f16ed..e55325a71 100644
--- a/RH/CatPersonal.aspx
+++ b/RH/CatPersonal.aspx
@@ -59,7 +59,7 @@