Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
@@ -1105,18 +1106,32 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
bool continuar = false;
|
||||
bool continuar = true;
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"));
|
||||
if (onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
continuar = false;
|
||||
StringBuilder strbuild = new StringBuilder();
|
||||
strbuild.Append("No es posible guardar el finiquito ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.");
|
||||
foreach (DataRow drow in onom.DtResultados.Rows)
|
||||
{
|
||||
strbuild.AppendFormat("<br/> {0}", drow["PeriodoTexto"]);
|
||||
}
|
||||
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
if (continuar && ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
// Alert(string.Format("{0}: {1}", CvePeriodoIndemnizacion, CvePeriodoFiniquito));
|
||||
}
|
||||
else { continuar = false; }
|
||||
if (continuar)
|
||||
{
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
|
||||
@@ -1160,7 +1175,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
LnkAutorizar.Visible = true;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal,Neto:1) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal, Neto: 1) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
|
||||
|
||||
@@ -5783,7 +5783,7 @@ Partial Class RH_Personal
|
||||
ViewState("FilesMoveimgNew") = filemove
|
||||
End If
|
||||
End If
|
||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||
Next
|
||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
||||
@@ -7480,9 +7480,28 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
End If
|
||||
If continuar Then
|
||||
|
||||
Using onom As ClsNominas = New ClsNominas()
|
||||
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd"))
|
||||
|
||||
If onom.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
continuar = False
|
||||
Dim strbuild As StringBuilder = New StringBuilder()
|
||||
strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.")
|
||||
|
||||
For Each drow As DataRow In onom.DtResultados.Rows
|
||||
strbuild.AppendFormat("<br/> {0}", drow("PeriodoTexto"))
|
||||
Next
|
||||
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Using
|
||||
End If
|
||||
If continuar Then
|
||||
Using objrh As New ClsRH
|
||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(),)
|
||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(), Txobservacionesbaja.Text)
|
||||
End Using
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user