This commit is contained in:
@@ -378,7 +378,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
LnkConsultar.Visible = (CvePeriodo > 0);
|
||||
UPFiltros.Update();
|
||||
UPFiltros.Update();
|
||||
}
|
||||
#endregion
|
||||
#region Datos
|
||||
@@ -452,8 +452,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (dtempleados != null)
|
||||
{
|
||||
|
||||
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
|
||||
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
|
||||
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
|
||||
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,39 +551,39 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
if (Chkobligaciones.Checked)
|
||||
{
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
int SoloVisible = row["SoloVisible"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
if (SoloVisible == 1)
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = "isOnlyVisible ";
|
||||
}
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
int SoloVisible = row["SoloVisible"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
if (SoloVisible == 1)
|
||||
{
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = "isOnlyVisible ";
|
||||
}
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
|
||||
if (GvNominas.Columns[CurrentColumn].Visible)
|
||||
if (GvNominas.Columns[CurrentColumn].Visible)
|
||||
{
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].HeaderStyle.CssClass = " ";
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -969,6 +969,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string Turno = e.Row.DataKey("Turno").ToString();
|
||||
string Departamento = e.Row.DataKey("Departamento").ToString();
|
||||
string SubProyecto = e.Row.DataKey("SubProyecto").ToString();
|
||||
e.Row.FCHyperLink("LnkSobreRecibo").Attributes.Add("onclick", string.Format("GETSobreRecibo({0},{1})", cvePersonal, CvePeriodo));
|
||||
LnkTimbrar.Visible = false;
|
||||
if (cvePersonal > 0)
|
||||
{
|
||||
@@ -1126,13 +1127,23 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
//Usuario UsuarioActual = null;
|
||||
//using(ClsSisUsuarios ObjUsuario= new ClsSisUsuarios())
|
||||
//{
|
||||
// UsuarioActual =ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
//}
|
||||
//CreaObjetoEmpresa(ref UsuarioActual);
|
||||
//UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
Usuario UsuarioActual = null;
|
||||
if (EsProduccion ==false)
|
||||
{
|
||||
|
||||
//Usuario UsuarioActual = null;
|
||||
using (ClsSisUsuarios ObjUsuario = new ClsSisUsuarios())
|
||||
{
|
||||
UsuarioActual = ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
}
|
||||
CreaObjetoEmpresa(ref UsuarioActual);
|
||||
UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
UsuarioActual = this.UsuarioActual;
|
||||
}
|
||||
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
|
||||
@@ -1619,7 +1630,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
#endregion
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
//GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
TxtVacDiasPago.Text = "0";
|
||||
LnkSRVacacionesADD.Visible = false;
|
||||
if (DdlCtaContable.Items.Count == 0)
|
||||
{
|
||||
@@ -1630,7 +1642,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
|
||||
DdlCtaContable.DataSource = ObjConta.DtResultados;
|
||||
DdlCtaContable.DataBind();
|
||||
}
|
||||
@@ -1653,21 +1664,39 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlCtaContable.SelectedValueExist("-1");
|
||||
}
|
||||
string Nombre = gvrow.DataKey("Nombre").ToString();
|
||||
SRCvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
|
||||
SRCvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero();
|
||||
int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
|
||||
NomAutorizado = gvrow.DataKey("NomAutorizado").ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
//SRCvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
|
||||
//string Nombre = gvrow.DataKey("Nombre").ToString();
|
||||
//SRCvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero();
|
||||
//int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
|
||||
//NomAutorizado = gvrow.DataKey("NomAutorizado").ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
SRCvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
string Nombre = "";
|
||||
SRCvePeriodo = 0;
|
||||
int CveNomina = 0;
|
||||
NomAutorizado = false;
|
||||
if (drow != null)
|
||||
{
|
||||
Nombre = drow["Nombre"].ToString();
|
||||
SRCvePeriodo = drow["CvePeriodo"].ToString().ToEntero();
|
||||
CveNomina = drow["CveNomina"].ToString().ToEntero();
|
||||
NomAutorizado = drow["NomAutorizado"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
}
|
||||
cargaBitacora();
|
||||
|
||||
|
||||
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
if (nom.GetNom_Nominas(CveNomina, SRCvePersonal, SRCvePeriodo, -1, UsuarioActual.CveEmpresa) && nom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow drow = nom.DtResultados.Rows[0];
|
||||
ChkMetodoPago.Checked = drow["MetodoPagoFijo"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
DdlMetodoPago.SelectedValueExist(drow["CveMetodoPago"].ToString());
|
||||
DdlBanco.SelectedValueExist(drow["CveSATBanco"].ToString());
|
||||
TxtBancoNumCuenta.Text = drow["BancoNumCuenta"].ToString();
|
||||
TxtCLABE.Text = drow["CLABE"].ToString();
|
||||
DataRow drownom = nom.DtResultados.Rows[0];
|
||||
ChkMetodoPago.Checked = drownom["MetodoPagoFijo"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
DdlMetodoPago.SelectedValueExist(drownom["CveMetodoPago"].ToString());
|
||||
DdlBanco.SelectedValueExist(drownom["CveSATBanco"].ToString());
|
||||
TxtBancoNumCuenta.Text = drownom["BancoNumCuenta"].ToString();
|
||||
TxtCLABE.Text = drownom["CLABE"].ToString();
|
||||
}
|
||||
}
|
||||
LblEmpleado.Text = Nombre;
|
||||
@@ -1680,7 +1709,166 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CargaPersonalIncapacidad();
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
#region "CalculosSistema"
|
||||
private void showModalCalculo()
|
||||
{
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
TxtCCSysSalarioMinimo.Text = "";
|
||||
TxtCCSysUMA.Text = "$89.62";
|
||||
if (drow != null)
|
||||
{
|
||||
TxtCCSysSalarioMinimo.Text = string.Format("${0:N2}", drow["SalarioMinimo"]);
|
||||
|
||||
}
|
||||
UpModalCalculos.Update();
|
||||
RegistraScript("$('#ModalCalculosSys').modal();");
|
||||
}
|
||||
public void showhidepnlscalculo(int concepto)
|
||||
{
|
||||
PnlIMSSV.Visible = false;
|
||||
PnlIMSSF.Visible = false;
|
||||
PnlHorasExtras.Visible = false;
|
||||
PnlHorasExtrasF.Visible = false;
|
||||
LblcalculoTitulos.Text = "";
|
||||
switch (concepto)
|
||||
{
|
||||
case 1:
|
||||
LblcalculoTitulos.Text = "<i class='icon-bulb'></i> Calculo conceptos IMSS";
|
||||
PnlIMSSV.Visible = true;
|
||||
PnlIMSSF.Visible = true;
|
||||
break;
|
||||
case 2:
|
||||
LblcalculoTitulos.Text = "<i class='icon-bulb'></i> Calculo de importe gravado(horas extras)";
|
||||
PnlHorasExtras.Visible = true;
|
||||
PnlHorasExtrasF.Visible = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected void LnkCalculoIMSS_Click(object sender, EventArgs e)
|
||||
{
|
||||
TxtCCSysDiasIMSS.Text = "";
|
||||
TxtCCSysSalarioBC.Text = "";
|
||||
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
int Fechafin = string.Format("{0:yyyyMMdd}", drow["FechaFin"]).ToEntero();
|
||||
decimal UMA = 89.62M;
|
||||
decimal SalarioDiarioIMSS = drow["SalarioDiarioIMSS"].ToString().ToDecimal();
|
||||
decimal DiasIMSS = drow["DiasIMSS"].ToString().ToDecimal();
|
||||
decimal importeparacuota = SalarioDiarioIMSS > (3 * UMA) ? SalarioDiarioIMSS - (3 * UMA) : 0M;
|
||||
decimal CuotaExcedente = (DiasIMSS * 0.004M) * (importeparacuota > (25M * UMA) ? (25M * UMA) : importeparacuota);
|
||||
decimal PrestacionesDinero = (DiasIMSS * 0.0025M) * SalarioDiarioIMSS;
|
||||
decimal GastosMedicos = (DiasIMSS * (Fechafin > 20210831 ? 0.00375M : 0.0038M)) * SalarioDiarioIMSS;
|
||||
decimal retenfermadMaterObrero = CuotaExcedente + PrestacionesDinero + GastosMedicos;
|
||||
decimal RetInvYVida = (DiasIMSS * 0.00625M) * SalarioDiarioIMSS;
|
||||
decimal RetCesentia = (DiasIMSS * 0.01125M) * SalarioDiarioIMSS;
|
||||
decimal IMSS = retenfermadMaterObrero + RetInvYVida + RetCesentia;
|
||||
TxtCCSysDiasIMSS.Text = string.Format("{0:N0}", DiasIMSS);
|
||||
TxtCCSysSalarioBC.Text = string.Format("${0:N4}", drow["SalarioDiarioIMSS"]);
|
||||
|
||||
LblCCSysImporteCuotaExcedente.Text = string.Format("<pre class='text-center'> SI( [Salario base cotización] > (3 *[UMA]), [Salario base cotización] - (3 *[UMA]) , 0)\n SI({0}>(3*{1}), {0}-(3*{1}), 0 ) </pre>", SalarioDiarioIMSS, UMA);
|
||||
TxtCCSysImporteCuotaExcedente.Text = string.Format("{0:N4}", importeparacuota);
|
||||
|
||||
LblCCSysCuotaExcedente.Text = string.Format("<pre class='text-center'>(0.004 * [Días IMSS]) * SI( [Importe cuota e.] > (25 *[UMA]), (25 *[UMA]) , [Importe cuota e.] )\n SI( {0} > (25*{1}), (25*{1}), {0}) </pre>", importeparacuota, UMA);
|
||||
TxtCCSysCuotaExcedente.Text = string.Format("{0:N2}", CuotaExcedente);
|
||||
|
||||
LblCCSysPrestacionesenDinero.Text = string.Format("<pre class='text-center'> 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("<pre class='text-center'> 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("<pre class='text-center'> [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("<pre class='text-center'> 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("<pre class='text-center'> 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("<pre> [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("<pre> SI( [Salario diario({0:N2})] > [Salario mínimo({1:N2})], \"No\", \"Sí\" ) </pre>", drow["SalarioDiario"], drow["SalarioMinimo"]);
|
||||
TxtCCSysSeExcentanDobles.Text = seExentandobles ? "Sí" : "No";
|
||||
|
||||
LblCCSysTopeHorasDobles.Text = string.Format("<pre> [Semanas laboradas({0:N0})] * 9 </pre>", Semanaslaboradas);
|
||||
TxtCCSysTopeHorasDobles.Text = string.Format("{0:N0}", Semanaslaboradas * 9);
|
||||
|
||||
LblCCSysHorasExcentas.Text = string.Format("<pre> SI( [Horas dobles({0:N0})] > [Tope horas({1:N0})], [Tope horas({1:N0})] , [Horas dobles({0:N0})]) </pre>", HorasDobles, TopeHorasDobles);
|
||||
TxtCCSysHorasExcentas.Text = string.Format("{0:N0}", HorasExcentas);
|
||||
|
||||
LblCCSysImporteExentoAntesTope.Text = string.Format("<pre> [Horas exentas] * [Importe hora] * Si([se exentan dobles] , 2, 1) </pre>", Semanaslaboradas, UMA);
|
||||
TxtCCSysImporteExentoAntesTope.Text = string.Format("{0:N2}", ImporteHorasExtrasAntes);
|
||||
|
||||
LblCCSysTopeImporte.Text = string.Format("<pre> [Semanas laboradas({0:N0})] * 5 * [UMA({1:N2})] </pre>", Semanaslaboradas, UMA);
|
||||
TxtCCSysTopeImporte.Text = string.Format("{0:N2}", TopeImporte);
|
||||
|
||||
|
||||
LblCCSysImporteExento.Text = string.Format("<pre>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})]) </pre>", ImporteHorasExtrasAntes, TopeImporte);
|
||||
TxtCCSysImporteExento.Text = string.Format("{0:N2}", ImporteHorasExtras);
|
||||
|
||||
LblCCSysImporteGravado.Text = string.Format("<pre> [Total horas extras({0:N2})] - [Importe exento({1:N2})] </pre>", 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 <br/>{0}<br/>{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()),TipoMensaje.ToastInformacion);
|
||||
RegistraScript("$('#DModalModAsistencia').modal('hide');");
|
||||
Alert(string.Format("se ha guardado la asistencia satisfactoriamente <br/>{0}<br/>{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("<table>");
|
||||
str.Append("<tbody>");
|
||||
@@ -6475,12 +6720,104 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
str.Append("</tbody>");
|
||||
str.Append("</table>");
|
||||
Alert(string.Format("<div>no se pudo registrar la provisión, existen cuentas sin vincular.</div> {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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user