This commit is contained in:
@@ -1298,8 +1298,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
CveMotivoCancelacion = rowc["CveSATMotivoCancelacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion))//,CveSATMotivoCancelacion:=
|
||||
var reultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
||||
if (true)//,CveSATMotivoCancelacion:=
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1685,6 +1685,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
#region SobreRecibo propiedades
|
||||
|
||||
protected int CveFonacot
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveFonacot"] == null) { return 0; }
|
||||
else { return ViewState["CveFonacot"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CveFonacot"] = value; }
|
||||
}
|
||||
protected int SRCvePersonal
|
||||
{
|
||||
get
|
||||
@@ -1837,12 +1847,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
|
||||
if (objpersonal.GetAsistencias(SRCvePersonal, -1, -1, -1, -1,-1, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa))
|
||||
|
||||
if (objpersonal.GetAsistencias(SRCvePersonal, -1, -1, -1, -1, -1, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa))
|
||||
{ GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL"); }
|
||||
else{
|
||||
else
|
||||
{
|
||||
GVAsistencia.DataSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
GVAsistencia.DataBind();
|
||||
}
|
||||
@@ -1888,7 +1899,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
bool continuar = false;
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.AddAsistencia(SRCvePersonal, -2, -2, TxtFechaAsistencia.Text.Trim().ToDate(),
|
||||
if (ObjPersonal.AddAsistencia(SRCvePersonal, -2, -2, TxtFechaAsistencia.Text.Trim().ToDate(),
|
||||
DdlTipoAsistenciasB.SelectedValue.ToEntero(), TxtPorPago.Text.Trim().ToDouble(), TxtHorasDobles.Text.Trim().ToDouble(),
|
||||
TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
@@ -1915,11 +1926,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
foreach (GridViewRow Row in GVAsistencia.Rows)
|
||||
{
|
||||
if (!ObjPersonal.AddAsistencia(SRCvePersonal, -2,-2, Row.FCLiteral("LtlFecha").Text.Trim().ToDate(),
|
||||
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(),
|
||||
Row.FCTextBox("TxtPorPago").Text.Trim().ToDouble(),
|
||||
Row.FCTextBox("TxtHorasDobles").Text.Trim().ToDouble(), Row.FCTextBox("TxtHorasTriples").Text.Trim().ToDouble(),
|
||||
Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim(),
|
||||
if (!ObjPersonal.AddAsistencia(SRCvePersonal, -2, -2, Row.FCLiteral("LtlFecha").Text.Trim().ToDate(),
|
||||
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(),
|
||||
Row.FCTextBox("TxtPorPago").Text.Trim().ToDouble(),
|
||||
Row.FCTextBox("TxtHorasDobles").Text.Trim().ToDouble(), Row.FCTextBox("TxtHorasTriples").Text.Trim().ToDouble(),
|
||||
Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim(),
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
OcurrioError = true;
|
||||
@@ -1956,7 +1967,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.Cells[3].HorizontalAlign = HorizontalAlign.Left;
|
||||
|
||||
//if ((e.Row.DBCampo("Fecha")))
|
||||
e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate().ToShortDateString();
|
||||
e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate().ToShortDateString();
|
||||
if (e.Row.FCLiteral("LtlCliente").Text != "N/A")
|
||||
e.Row.FCLiteral("LtlCliente").Text = "<a class=\"Texto\" href=\"/Ventas/Clientes.aspx?CveCliente=" + e.Row.DBCampo("CveCliente") + "\">" + e.Row.DBCampo("Cliente") + "</a>";
|
||||
e.Row.FCTextBox("TxtPorPago").Text = e.Row.DBCampo("PorcentajePago");
|
||||
@@ -2663,6 +2674,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
TxtmcImporteGrabado.Text = string.Format("{0:N2}", drow["ImporteGravado"]);
|
||||
Txtmcvalor.Text = string.Format("{0:N2}", drow["Valor"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChkCalAutomaticoV.Checked = true;
|
||||
ChkCalAutomaticoG.Checked = true;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2864,6 +2881,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
#endregion
|
||||
cargasobrericiboconceptos();
|
||||
CargaFonacot();
|
||||
#region "Infonavit"
|
||||
{
|
||||
using (ClsRH objper = new ClsRH())
|
||||
@@ -2891,24 +2909,24 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
frow = objper.DtResultados.FiltroPrimero("CveSistema =4");
|
||||
TxtFonValor.Text = "";
|
||||
DdlFonTipoAplicacion.SelectedValueExist("-1");
|
||||
TxtFonDescripcion.Text = "";
|
||||
TxtFonNumCredito.Text = "";
|
||||
TxtFonFechaInicio.Text = "";
|
||||
ChkFonacot.Checked = false;
|
||||
if (frow != null)
|
||||
{
|
||||
//frow = objper.DtResultados.FiltroPrimero("CveSistema =4");
|
||||
//TxtFonValor.Text = "";
|
||||
//DdlFonTipoAplicacion.SelectedValueExist("-1");
|
||||
//TxtFonDescripcion.Text = "";
|
||||
//TxtFonNumCredito.Text = "";
|
||||
//TxtFonFechaInicio.Text = "";
|
||||
//ChkFonacot.Checked = false;
|
||||
//if (frow != null)
|
||||
//{
|
||||
|
||||
TxtFonValor.Text = String.Format("{0:###,###.##}", frow["Importe"]);
|
||||
DdlFonTipoAplicacion.SelectedValueExist(frow["TipoAplicacion"].ToString());
|
||||
// TxtFonValor.Text = String.Format("{0:###,###.##}", frow["Importe"]);
|
||||
// DdlFonTipoAplicacion.SelectedValueExist(frow["TipoAplicacion"].ToString());
|
||||
|
||||
TxtFonDescripcion.Text = String.Format("{0}", frow["Descripcion02"]);
|
||||
TxtFonNumCredito.Text = String.Format("{0}", frow["Descripcion01"]);
|
||||
TxtFonFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow["FInicioAplicacion"]);
|
||||
ChkFonacot.Checked = frow["estatus"].ToString().ToUpper().Contiene("1", "TRUE");
|
||||
}
|
||||
// TxtFonDescripcion.Text = String.Format("{0}", frow["Descripcion02"]);
|
||||
// TxtFonNumCredito.Text = String.Format("{0}", frow["Descripcion01"]);
|
||||
// TxtFonFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow["FInicioAplicacion"]);
|
||||
// ChkFonacot.Checked = frow["estatus"].ToString().ToUpper().Contiene("1", "TRUE");
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2916,6 +2934,129 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
UpModalConceptos.Update();
|
||||
}
|
||||
|
||||
#region fonacot
|
||||
|
||||
public void LimpiarFonacot()
|
||||
{
|
||||
TxtFonValor.Text = "";
|
||||
TxtFonImporteCredito.Text = "";
|
||||
TxtFonPagosHechos.Text = "";
|
||||
DdlFonTipoAplicacion.SelectedValueExist("-1");
|
||||
TxtFonDescripcion.Text = "";
|
||||
TxtFonNumCredito.Text = "";
|
||||
TxtFonFechaInicio.Text = "";
|
||||
ChkFonacot.Checked = false;
|
||||
}
|
||||
protected void CargaFonacot()
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
onom.NomFonacotGet(UsuarioActual.CveEmpresa, -1, SRCvePersonal);
|
||||
GVNomFonacot.DataSource = onom.DtResultados;
|
||||
GVNomFonacot.DataBind();
|
||||
}
|
||||
UpFonacotGrid.Update();
|
||||
}
|
||||
|
||||
protected void LnAddFonacot_Click(object sender, EventArgs e)
|
||||
{
|
||||
LimpiarFonacot();
|
||||
CveFonacot = -1;
|
||||
RegistraScript("$('#ModalFonacot').modal();");
|
||||
}
|
||||
protected void LnkEditarNomFonacot_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveFonacot = gvrow.DataKey("CveFonacot").ToEntero();
|
||||
Int32 cvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
|
||||
string numeroCredito = gvrow.DataKey("NumeroCredito");
|
||||
string descripcion = gvrow.DataKey("Descripcion");
|
||||
Int32 periodo = gvrow.DataKey("Periodo").ToEntero();
|
||||
Int32 cveTipoCalculo = gvrow.DataKey("CveTipoCalculo").ToEntero();
|
||||
decimal importeCredito = gvrow.DataKey("ImporteCredito").ToDecimal();
|
||||
decimal importeFijo = gvrow.DataKey("ImporteFijo").ToDecimal();
|
||||
decimal pagosHechos = gvrow.DataKey("PagosHechos").ToDecimal();
|
||||
decimal montoAcumulado = gvrow.DataKey("MontoAcumulado").ToDecimal();
|
||||
decimal saldo = gvrow.DataKey("Saldo").ToDecimal();
|
||||
Int32 cveEstatus = gvrow.DataKey("CveEstatus").ToEntero();
|
||||
string observaciones = gvrow.DataKey("Observaciones");
|
||||
if ((periodo < 10000000))
|
||||
periodo = 20000101;
|
||||
LimpiarFonacot();
|
||||
|
||||
TxtFonValor.Text = importeFijo.ToString();
|
||||
TxtFonImporteCredito.Text = importeCredito.ToString();
|
||||
TxtFonPagosHechos.Text = pagosHechos.ToString();
|
||||
DdlFonTipoAplicacion.SelectedValueExist(cveTipoCalculo.ToString());
|
||||
TxtFonDescripcion.Text = descripcion;
|
||||
TxtFonNumCredito.Text = numeroCredito;
|
||||
TxtFonFechaInicio.Text = string.Format("{2}/{1}/{0}", periodo.ToString().Substring(0, 4), periodo.ToString().Substring(4, 2), periodo.ToString().Substring(6, 2));
|
||||
ChkFonacot.Checked = (cveEstatus == 1);
|
||||
UpModalFonacot.Update();
|
||||
RegistraScript("$('#ModalFonacot').modal();");
|
||||
}
|
||||
|
||||
protected void LnkEliminarNomFonacot_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
int cveFonacot = gvrow.DataKey("CveFonacot").ToEntero();
|
||||
bool Continuar = false;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
Continuar = onom.NomFonacotRemove(UsuarioActual.CveEmpresa, cveFonacot);
|
||||
}
|
||||
if ((Continuar))
|
||||
{
|
||||
CargaFonacot();
|
||||
Alert("El registro fonacot se ha eliminado");
|
||||
}
|
||||
}
|
||||
protected void LnkGuardarFonacot_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal importe = TxtFonValor.Text.ToDecimal();
|
||||
decimal importeTotal = TxtFonImporteCredito.Text.ToDecimal();
|
||||
decimal importePagado = TxtFonPagosHechos.Text.ToDecimal();
|
||||
int TipoAplicacion = DdlFonTipoAplicacion.SelectedValue.ToEntero();
|
||||
int NoPagos = 0;
|
||||
double SaldoIni = 0;
|
||||
string descripcion02 = TxtFonDescripcion.Text;
|
||||
string NumCredito = TxtFonNumCredito.Text;
|
||||
string fecha = TxtFonFechaInicio.Text.Replace("_", "");
|
||||
int estatus = ChkFonacot.Checked ? 1 : 0;
|
||||
int periodo = 20000101;
|
||||
if (fecha.Length > 8)
|
||||
{
|
||||
fecha = fecha.ToDateTime().ToString("yyyy/MM/dd");
|
||||
periodo = fecha.ToDateTime().ToString("yyyyMMdd").ToEntero();
|
||||
}
|
||||
else
|
||||
fecha = "";
|
||||
|
||||
bool continuar = false;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if ((CveFonacot == -1))
|
||||
continuar = onom.NomFonacotAdd(UsuarioActual.CveEmpresa, SRCvePersonal, NumCredito, descripcion02, periodo, TipoAplicacion, importeTotal, importe, importePagado, 0, 0, estatus, "", UsuarioActual.CveUsuario);
|
||||
else
|
||||
continuar = onom.NomFonacotUp(UsuarioActual.CveEmpresa, CveFonacot, SRCvePersonal, NumCredito, descripcion02, periodo, TipoAplicacion, importeTotal, importe, importePagado, 0, 0, estatus, "", UsuarioActual.CveUsuario);
|
||||
}
|
||||
// Old Borrar Caudillo 01/Marzo/2022
|
||||
// Using ObjPersonal As ClsRH = New ClsRH()
|
||||
// If Not ObjPersonal.AddConcepto(CvePersonal, -1, importe, TipoAplicacion, NoPagos, SaldoIni, UsuarioActual.CveUsuario, 4, NumCredito, descripcion02, fecha, "", estatus, UsuarioActual.CveEmpresa) Then continuar = False
|
||||
// End Using
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
Alert("Se actualizo el calculo de fonacot");
|
||||
CargaFonacot();
|
||||
RegistraScript("$('#ModalFonacot').modal('hide');");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void cargasobrericiboconceptos()
|
||||
{
|
||||
|
||||
@@ -3843,7 +3984,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
public void loadtablas()
|
||||
{
|
||||
|
||||
CargaVacacionesEmpresas();
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetTablasNomina(UsuarioActual.CveEmpresa) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
@@ -4035,7 +4176,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string strTipo = "";
|
||||
string strPeriodoNum = "";
|
||||
string strUbicacion = string.Format("{0}, {1}, {2}, {3}, C.P. {4}", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP).ToLower();
|
||||
string strRegPatImss = UsuarioActual.Empresa.RegistroPatronal;
|
||||
string strRegPatImss = "";// objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString();
|
||||
string strRFC = UsuarioActual.Empresa.RFC;
|
||||
string strfecha = DateTime.Now.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
||||
string strhora = DateTime.Now.ToString("HH:mm:ss", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
||||
@@ -5553,35 +5694,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
UpMovtosPermanentes.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LnkGuardarFonacot_Click(object sender, EventArgs e)
|
||||
{
|
||||
double importe = TxtFonValor.Text.ToDouble();
|
||||
int TipoAplicacion = DdlFonTipoAplicacion.SelectedValue.ToEntero();
|
||||
int NoPagos = 0;
|
||||
double SaldoIni = 0;
|
||||
string descripcion02 = TxtFonDescripcion.Text;
|
||||
string descripcion01 = TxtFonNumCredito.Text;
|
||||
string fecha = TxtFonFechaInicio.Text.Replace("_", "");
|
||||
int estatus = ChkFonacot.Checked ? 1 : 0;
|
||||
if (fecha.Length > 8)
|
||||
fecha = fecha.ToDateTime().ToString("yyyy/MM/dd");
|
||||
else
|
||||
fecha = "";
|
||||
bool continuar = true;
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (!ObjPersonal.AddConcepto(SRCvePersonal, -1, importe, TipoAplicacion, NoPagos, SaldoIni, UsuarioActual.CveUsuario, 4, descripcion01, descripcion02, fecha, "", estatus, UsuarioActual.CveEmpresa))
|
||||
continuar = false;
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
LnkConsultar_Click(null, null);
|
||||
mostrarConceptos();
|
||||
Alert("Se actualizo el calculo de fonacot");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -7844,7 +7957,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
decimal Total = TxtTotal.Text.ToDecimal();
|
||||
string RFCReceptor = TxtRFCReceptor.Text;
|
||||
string RFCEmisor = TxtRFCEmisor.Text;
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4))
|
||||
var resultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4);
|
||||
if (true)
|
||||
{
|
||||
Alert($"La nómina con folio fiscal '{FolioFiscal}' fue cancelada ante el SAT", TipoMensaje.MsgInformacion);
|
||||
}
|
||||
@@ -7957,6 +8071,55 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
protected void CargaVacacionesEmpresas()
|
||||
{
|
||||
using (ClsRH ObjVaca = new ClsRH())
|
||||
{
|
||||
ObjVaca.VacacionesEmpresasGet(UsuarioActual.CveEmpresa, -1, -1);
|
||||
GVVacacionesEmpresas.DataSource = ObjVaca.DtResultados;
|
||||
ObjVaca.Dispose();
|
||||
}
|
||||
GVVacacionesEmpresas.DataBind();
|
||||
upDatosVacaEmpre.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnVacaADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int diasVacaciones = TxtVacadiasVacaciones.Text.ToEntero();
|
||||
int Cinicio = TxtVacaInicio.Text.ToEntero();
|
||||
int Cfin = TxtVacaFin.Text.ToEntero();
|
||||
bool Continuar = false;
|
||||
using (ClsRH ObjVaca = new ClsRH())
|
||||
{
|
||||
|
||||
Continuar = ObjVaca.VacacionesEmpresasAdd(UsuarioActual.CveEmpresa, Cinicio, Cfin, diasVacaciones);
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalVacacionesEmpresas').modal('hide');");
|
||||
CargaVacacionesEmpresas();
|
||||
upDatosVacaEmpre.Update();
|
||||
this.Alert("El Vacaciones_Empresas Se ha agregado");
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkEliminarVaca_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CcveEmpresa = gvRow.DataKey("CveEmpresa").ToEntero();
|
||||
int Cinicio = gvRow.DataKey("Inicio").ToEntero();
|
||||
int Cfin = gvRow.DataKey("Fin").ToEntero();
|
||||
bool Continuar = false;
|
||||
using (ClsRH ObjVaca = new ClsRH())
|
||||
{
|
||||
Continuar = ObjVaca.VacacionesEmpresasRemove(CcveEmpresa, Cinicio, Cfin);
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
CargaVacacionesEmpresas();
|
||||
this.Alert("El Vacaciones_Empresas Se ha Eliminado");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user