This commit is contained in:
Antonio Gonzalez
2019-10-14 10:44:31 -05:00
16 changed files with 10082 additions and 4540 deletions

View File

@@ -812,7 +812,7 @@ Public Class ClsNominas
Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Integer AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Nom_ConceptosAdd") DataAdapter("PA_Nom_ConceptosAdd")
@@ -838,6 +838,7 @@ Public Class ClsNominas
.Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal .Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal
.Add("Especie", SqlDbType.Bit).Value = Especie .Add("Especie", SqlDbType.Bit).Value = Especie
.Add("Imprimir", SqlDbType.Bit).Value = Imprimir .Add("Imprimir", SqlDbType.Bit).Value = Imprimir
.Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto
End With End With
Try Try
@@ -858,7 +859,7 @@ Public Class ClsNominas
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Boolean AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_ConceptosUpdate") DataAdapter("PA_Nom_ConceptosUpdate")
@@ -882,6 +883,7 @@ Public Class ClsNominas
.Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal .Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal
.Add("Especie", SqlDbType.Bit).Value = Especie .Add("Especie", SqlDbType.Bit).Value = Especie
.Add("Imprimir", SqlDbType.Bit).Value = Imprimir .Add("Imprimir", SqlDbType.Bit).Value = Imprimir
.Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto
End With End With
Try Try
@@ -1859,14 +1861,35 @@ Public Class ClsNominas
retorno = True retorno = True
Catch sqEx As SqlException Catch sqEx As SqlException
retorno = False retorno = False
OnError("Ocurrió un error al Realizar el calculo de utilidades.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception Catch ex As Exception
retorno = False retorno = False
OnError("Ocurrió un error al Realizar el calculo de utilidades.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return retorno Return retorno
End Function End Function
Public Function GetTablasNomina(CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False
Try
DTSet = New DataSet()
DataAdapter("PA_Nom_Tablas", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
SqlAdapter.Fill(DTSet)
retorno = True
Catch sqEx As SqlException
retorno = False
OnError("Ocurrió un error al obtener las tablas.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al obtener las tablas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)

36
App_Code/DSNominas.xsd Normal file
View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DSNominas" targetNamespace="http://tempuri.org/DSNominas.xsd" xmlns:mstns="http://tempuri.org/DSNominas.xsd" xmlns="http://tempuri.org/DSNominas.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections />
<Tables />
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="DSNominas" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="DSNominas" msprop:Generator_UserDSName="DSNominas">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="DtConcepto" msprop:Generator_TableClassName="DtConceptoDataTable" msprop:Generator_TableVarName="tableDtConcepto" msprop:Generator_RowChangedName="DtConceptoRowChanged" msprop:Generator_TablePropName="DtConcepto" msprop:Generator_RowDeletingName="DtConceptoRowDeleting" msprop:Generator_RowChangingName="DtConceptoRowChanging" msprop:Generator_RowEvHandlerName="DtConceptoRowChangeEventHandler" msprop:Generator_RowDeletedName="DtConceptoRowDeleted" msprop:Generator_RowClassName="DtConceptoRow" msprop:Generator_UserTableName="DtConcepto" msprop:Generator_RowEvArgName="DtConceptoRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="ConceptoP" msprop:Generator_ColumnVarNameInTable="columnConceptoP" msprop:Generator_ColumnPropNameInRow="ConceptoP" msprop:Generator_ColumnPropNameInTable="ConceptoPColumn" msprop:Generator_UserColumnName="ConceptoP" type="xs:string" minOccurs="0" />
<xs:element name="LabelValorP" msprop:Generator_ColumnVarNameInTable="columnLabelValorP" msprop:Generator_ColumnPropNameInRow="LabelValorP" msprop:Generator_ColumnPropNameInTable="LabelValorPColumn" msprop:Generator_UserColumnName="LabelValorP" type="xs:string" minOccurs="0" />
<xs:element name="CveConceptoP" msprop:Generator_ColumnVarNameInTable="columnCveConceptoP" msprop:Generator_ColumnPropNameInRow="CveConceptoP" msprop:Generator_ColumnPropNameInTable="CveConceptoPColumn" msprop:Generator_UserColumnName="CveConceptoP" type="xs:int" minOccurs="0" />
<xs:element name="ImporteP" msprop:Generator_ColumnVarNameInTable="columnImporteP" msprop:Generator_ColumnPropNameInRow="ImporteP" msprop:Generator_ColumnPropNameInTable="ImportePColumn" msprop:Generator_UserColumnName="ImporteP" type="xs:double" minOccurs="0" />
<xs:element name="ValorP" msprop:Generator_ColumnVarNameInTable="columnValorP" msprop:Generator_ColumnPropNameInRow="ValorP" msprop:Generator_ColumnPropNameInTable="ValorPColumn" msprop:Generator_UserColumnName="ValorP" type="xs:double" minOccurs="0" />
<xs:element name="EstatusP" msprop:Generator_ColumnVarNameInTable="columnEstatusP" msprop:Generator_ColumnPropNameInRow="EstatusP" msprop:Generator_ColumnPropNameInTable="EstatusPColumn" msprop:Generator_UserColumnName="EstatusP" type="xs:int" minOccurs="0" />
<xs:element name="ConceptoD" msprop:Generator_ColumnVarNameInTable="columnConceptoD" msprop:Generator_ColumnPropNameInRow="ConceptoD" msprop:Generator_ColumnPropNameInTable="ConceptoDColumn" msprop:Generator_UserColumnName="ConceptoD" type="xs:string" minOccurs="0" />
<xs:element name="LabelValorD" msprop:Generator_ColumnVarNameInTable="columnLabelValorD" msprop:Generator_ColumnPropNameInRow="LabelValorD" msprop:Generator_ColumnPropNameInTable="LabelValorDColumn" msprop:Generator_UserColumnName="LabelValorD" type="xs:string" minOccurs="0" />
<xs:element name="CveConceptoD" msprop:Generator_ColumnVarNameInTable="columnCveConceptoD" msprop:Generator_ColumnPropNameInRow="CveConceptoD" msprop:Generator_ColumnPropNameInTable="CveConceptoDColumn" msprop:Generator_UserColumnName="CveConceptoD" type="xs:int" minOccurs="0" />
<xs:element name="ImporteD" msprop:Generator_ColumnVarNameInTable="columnImporteD" msprop:Generator_ColumnPropNameInRow="ImporteD" msprop:Generator_ColumnPropNameInTable="ImporteDColumn" msprop:Generator_UserColumnName="ImporteD" type="xs:double" minOccurs="0" />
<xs:element name="ValorD" msprop:Generator_ColumnVarNameInTable="columnValorD" msprop:Generator_ColumnPropNameInRow="ValorD" msprop:Generator_ColumnPropNameInTable="ValorDColumn" msprop:Generator_UserColumnName="ValorD" type="xs:double" minOccurs="0" />
<xs:element name="EstatusD" msprop:Generator_ColumnVarNameInTable="columnEstatusD" msprop:Generator_ColumnPropNameInRow="EstatusD" msprop:Generator_ColumnPropNameInTable="EstatusDColumn" msprop:Generator_UserColumnName="EstatusD" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

12
App_Code/DSNominas.xss Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool to store the dataset designer's layout information.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:DtConcepto" ZOrder="1" X="355" Y="165" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
</Shapes>
<Connectors />
</DiagramLayout>

View File

@@ -72,9 +72,18 @@ Namespace Extensiones
Public Sub GuardaLog(Str As String) Public Sub GuardaLog(Str As String)
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String Dim strLineaTMP As String
Dim Urlstring As String = ""
Try
If Not IsNothing(System.Web.HttpContext.Current) Then
If Not IsNothing(System.Web.HttpContext.Current.Request) Then
Urlstring = $"{HttpContext.Current.Request.Url.LocalPath.ToString()}{HttpContext.Current.Request.Url.Query}{Environment.NewLine}"
End If
End If
Catch
End Try
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException

View File

@@ -3803,7 +3803,6 @@ Partial Class Bancos_IE
' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS) ' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
If dt.Rows(0)("FechaPol").ToString.ToDate < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then 'dt.Rows(0)("FechaPol").ToString.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then If dt.Rows(0)("FechaPol").ToString.ToDate < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then 'dt.Rows(0)("FechaPol").ToString.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
IdPolizaNueva = ObjAC.AddPoliza(dt.Rows(0)("CodigoTipoPoliza").ToString.ToEntero, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaCancelacion.Text.ToDate) IdPolizaNueva = ObjAC.AddPoliza(dt.Rows(0)("CodigoTipoPoliza").ToString.ToEntero, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaCancelacion.Text.ToDate)
If IdPolizaNueva > 0 Then If IdPolizaNueva > 0 Then
FolioPolizaNueva = ObjAC.Folio FolioPolizaNueva = ObjAC.Folio
@@ -3863,7 +3862,7 @@ Partial Class Bancos_IE
End If End If
End If End If
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Error al contabilizar poliza" MensajeError = "Error al contabilizar poliza"
End If End If

File diff suppressed because it is too large Load Diff

View File

@@ -190,7 +190,7 @@
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div id="Div3" runat="server" class="form-group form-md-line-input form-md-floating-label input-iconright"> <div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Tipo de gasto" AssociatedControlID="DdlTipoGasto"></asp:Label> <asp:Label runat="server" Text="Tipo de gasto" AssociatedControlID="DdlTipoGasto"></asp:Label>
<asp:DropDownList ID="DdlTipoGasto" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList> <asp:DropDownList ID="DdlTipoGasto" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div> </div>
@@ -199,12 +199,16 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div id="Div4" runat="server" class="form-group form-md-line-input form-md-floating-label input-iconright"> <div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Cuenta contable" AssociatedControlID="DdlCtaContable"></asp:Label> <asp:Label runat="server" Text="Cuenta contable" AssociatedControlID="DdlCtaContable"></asp:Label>
<asp:DropDownList ID="DdlCtaContable" runat="server" AppendDataBoundItems="True" DataTextField="CtaCodigo" DataValueField="Id" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList> <asp:DropDownList ID="DdlCtaContable" runat="server" AppendDataBoundItems="True" DataTextField="CtaCodigo" DataValueField="Id" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Concepto SAT" AssociatedControlID="DdlConceptoSAT"></asp:Label>
<asp:DropDownList ID="DdlConceptoSAT" runat="server" AppendDataBoundItems="True" DataTextField="NombreClave" DataValueField="CveSATConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
@@ -324,7 +328,7 @@
<asp:Label runat="server" Text="Estado" AssociatedControlID="ChkEstado"></asp:Label> <asp:Label runat="server" Text="Estado" AssociatedControlID="ChkEstado"></asp:Label>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<asp:CheckBox ID="ChkEstado" Text=" " CssClass="chksino" runat="server" /> <asp:CheckBox ID="ChkEstado" Text=" " Checked="true" CssClass="chksino" runat="server" />
</div> </div>
</div> </div>
</div> </div>

View File

@@ -199,7 +199,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
CargaClasificacion(); CargaClasificacion();
CargaTipoGasto(); CargaTipoGasto();
CargaCtaContable(); CargaCtaContable();
CargaConceptoSAT();
CargaDatos(); CargaDatos();
} }
@@ -241,6 +241,18 @@ public partial class Nomina_CatConcepto : ClsPaginas
DdlTipoGasto.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTipoGasto.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlTipoGasto.SelectedValueExist("-1"); DdlTipoGasto.SelectedValueExist("-1");
} }
protected void CargaConceptoSAT()
{
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetConceptos();
DdlConceptoSAT.DataSource = objnom.DtResultados;
}
DdlConceptoSAT.DataBind();
DdlConceptoSAT.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlConceptoSAT.SelectedValueExist("-1");
}
protected void CargaCtaContable() protected void CargaCtaContable()
{ {
@@ -298,6 +310,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
int AutomaticoGlobal = ChkAutomaticoGlobal.Checked ? 1 : 0; int AutomaticoGlobal = ChkAutomaticoGlobal.Checked ? 1 : 0;
int Especie = ChkEspecie.Checked ? 1 : 0; int Especie = ChkEspecie.Checked ? 1 : 0;
int Imprimir = ChkImprimir.Checked ? 1 : 0; int Imprimir = ChkImprimir.Checked ? 1 : 0;
int CveSATConcepto = DdlConceptoSAT.SelectedValue.ToEntero();
ClsNominas ObjNomina = new ClsNominas(); ClsNominas ObjNomina = new ClsNominas();
ObjNomina.IniciaTransacSQL(); ObjNomina.IniciaTransacSQL();
@@ -305,7 +318,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
if (EsEditar) if (EsEditar)
{ {
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir); TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto);
if (TieneError) if (TieneError)
{ {
@@ -319,7 +332,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
} }
else else
{ {
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir); CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto);
if (CveConcepto == -1) if (CveConcepto == -1)
{ {
@@ -403,6 +416,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]); DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]);
DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]); DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]);
DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]); DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]);
DdlConceptoSAT.SelectedValueExist(drow["CveSATConcepto"]);
} }
ObjNomina.Dispose(); ObjNomina.Dispose();
@@ -416,8 +430,8 @@ public partial class Nomina_CatConcepto : ClsPaginas
ChkRetencion.Checked = false; ChkRetencion.Checked = false;
DdlConceptoPadre.SelectedValueExist("-1"); DdlConceptoPadre.SelectedValueExist("-1");
DdlConceptoContable.SelectedValueExist("-1"); DdlConceptoContable.SelectedValueExist("-1");
ChkImprimir.Checked = true;
ChkEstado.Checked = false; ChkEstado.Checked = true;
ChkSistema.Checked = false; ChkSistema.Checked = false;
DdlClasificacion.SelectedValueExist("-1"); DdlClasificacion.SelectedValueExist("-1");

View File

@@ -8,6 +8,12 @@
border: 1px solid #E87E04; border: 1px solid #E87E04;
} }
.ddlInfolabel {
font-size: 13px;
color: #888888;
opacity: 1;
}
table.GvConceptos td { table.GvConceptos td {
white-space: nowrap; white-space: nowrap;
} }
@@ -60,7 +66,11 @@
<asp:UpdatePanel ID="UpAccciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAccciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink></li> <asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server">Tablas</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
@@ -93,7 +103,9 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Mostrar" Visible="False" class="btn btn-primary" /> <asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Calcular" Visible="False" class="btn btn-primary" />
<%--<asp:Label AssociatedControlID="chkesListaderaya" runat="server" Text="¿es lista de raya?"></asp:Label>--%>
<%--<asp:CheckBox ID="chkesListaderaya" Text=" " data-checkbox=" icheckbox_minimal-blue blue " Checked="false" CssClass="icheck chekVal " runat="server" />--%>
<asp:Button ID="BtnAutorizar" runat="server" Text="Autorizar" Visible="False" class="btn btn-primary" /> <asp:Button ID="BtnAutorizar" runat="server" Text="Autorizar" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnGeneraPDF" runat="server" Text="PDF" Visible="False" class="btn btn-primary" /> <asp:Button ID="BtnGeneraPDF" runat="server" Text="PDF" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnEmitir" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" /> <asp:Button ID="BtnEmitir" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" />
@@ -162,7 +174,7 @@
<div class="portlet light xspadding bordered " id="pnldl"> <div class="portlet light xspadding bordered " id="pnldl">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption "> <div class="caption ">
<i class="icon-pin font-yellow-gold"></i> <i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina</span> <span class="caption-subject font-yellow-gold bold uppercase">Nomina</span>
</div> </div>
@@ -533,6 +545,7 @@
<asp:Button ID="BtnImprimirsobrerecibo" OnClick="BtnImprimirsobrerecibo_Click" runat="server" Text="Imprimir" CssClass="btn btn-primary hidden" />
<div id="ModalConceptos" class="modal ADS fade" role="dialog"> <div id="ModalConceptos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalConceptos" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
@@ -543,78 +556,260 @@
<asp:Label ID="LblEmpleado" runat="server" Text="Label"></asp:Label></h4> <asp:Label ID="LblEmpleado" runat="server" Text="Label"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="portlet light xspadding bordered " id="pnlConceptos">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Sobre Recibo</span>
</div>
<div class="portlet-body " style="padding: 0px;">
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos" <ajax:TabContainer ID="TabPersonal" runat="server" Width="100%">
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" <ajax:TabPanel ID="TabSobreRecivo" runat="server" HeaderText="Sobre Recibo">
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <div class="portlet light xspadding bordered " id="pnlConceptos">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Sobre Recibo</span>
</div>
<div class="actions">
<div class="btn-group">
<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-primary">Imprimir</a>
</div>
</div>
</div>
<div class="portlet-body " style="padding: 0px;">
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </ajax:TabPanel>
</div>
<ajax:TabPanel ID="TabInfonavit" runat="server" HeaderText="Infonavit">
<ContentTemplate>
<div class="portlet light bordered xspadding" id="porletInfonavit">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-home font-green"></i>
<span class="caption-subject bold uppercase">Infonavit</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:Button ID="BtnGuardarInfornavit" OnClick="BtnGuardarInfornavit_Click" runat="server" Text="Guardar" class="btn btn-primary" />
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtInfoNumCredito" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtInfoNumCredito" runat="server" Text="Número de crédito"></asp:Label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtInfoDescripcion" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtInfoDescripcion" runat="server" Text="Descripción"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="">
<asp:Label AssociatedControlID="DdlInfoTipoAplicacion" CssClass="ddlInfolabel" runat="server" Text="Tipo Aplicación"></asp:Label>
<asp:DropDownList ID="DdlInfoTipoAplicacion" AutoPostBack="true" runat="server" Class="form-control select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Infonavit(Movto Permanente)" Value="5000"></asp:ListItem>
<asp:ListItem Text="Infonavit(Porcentaje)" Value="5001"></asp:ListItem>
<asp:ListItem Text="Infonavit(Factor Descuento)" Value="5002"></asp:ListItem>
<asp:ListItem Text="Infonavit(Cuota Fija)" Value="5003"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtInfoValor" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtInfoValor" runat="server" Text="Valor"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright " style="width: 120px !important; display: inline-block;">
<asp:TextBox CssClass="form-control" ID="TxtInfoFechaInicio" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtInfoFechaInicio" runat="server" Text="Fecha Inicio"></asp:Label>
<asp:RequiredFieldValidator runat="server" ID="REQFechaF" ControlToValidate="TxtInfoFechaInicio" ErrorMessage="Debe ingresar una fecha" ValidationGroup="vgEstFin" />
<ajax:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="TxtInfoFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaF" TargetControlID="TxtInfoFechaInicio" PopupButtonID="ImgFechaFEstFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div style="display: inline-block; vertical-align: top; padding-top: 10px;">
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFEstFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
</div>
<div class="col-md-3">
<div class="">
<asp:Label AssociatedControlID="ChkInfo" runat="server" Text="Estado (Activo)"></asp:Label>
</div>
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkInfo" CssClass="chksino" runat="server" Text=" " />
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
<Triggers>
<%--<asp:PostBackTrigger ControlID="BtnImprimirsobrerecibo" />--%>
</Triggers>
</asp:UpdatePanel>
</div>
<div id="ModalTablas" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalTablas" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Label ID="Label1" runat="server" Text="Tablas"></asp:Label></h4>
</div>
<div class="modal-body">
<ajax:TabContainer ID="TabTablas" runat="server" Width="100%">
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible ="false">
<ContentTemplate>
<asp:GridView ID="gvAntigudad" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTFactorDesctInfonavit" runat="server" HeaderText="Factor descuento Infonavit">
<ContentTemplate>
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible ="false">
<ContentTemplate>
<asp:GridView ID="GVFactorSDI" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible ="false">
<ContentTemplate>
<asp:GridView ID="GVFiniquito" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible ="false">
<ContentTemplate>
<asp:GridView ID="GVRepartoMonetario" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTSalariosMinimos" runat="server" HeaderText="Salarios Minimos">
<ContentTemplate>
<asp:GridView ID="GVSalariosMinimos" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTIMMSRiesgot" runat="server" HeaderText="IMSS riesgo de trabajo">
<ContentTemplate>
<asp:GridView ID="GVIMMSRiesgot" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTInfonavitSegViv" runat="server" HeaderText="Infonavit seguro de vivienda">
<ContentTemplate>
<asp:GridView ID="GVInfonavitSegViv" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible ="false">
<ContentTemplate>
<asp:GridView ID="GVVigISRAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigISRMensual" runat="server" HeaderText="ISR Mensual">
<ContentTemplate>
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible ="false">
<ContentTemplate>
<asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigSubEmpMensual" runat="server" HeaderText="Subsidio Mensual">
<ContentTemplate>
<asp:GridView ID="GVVigSubEmpMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTUma" runat="server" HeaderText="UMA">
<ContentTemplate>
<asp:GridView ID="GVUma" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div>
</div>
<div id="DModalNominas" class="modal ADS fade" role="dialog"> <div id="DModalNominas" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">

View File

@@ -328,7 +328,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
GvNominas.Columns[i].Visible = false; GvNominas.Columns[i].Visible = false;
} }
if (false) bool tr = false;
if (tr)
{ {
bool sumaPercepciones = false; bool sumaPercepciones = false;
bool sumaDeducciones = false; bool sumaDeducciones = false;
@@ -734,7 +735,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
using (ClsRH objpersonal = new ClsRH()) using (ClsRH objpersonal = new ClsRH())
{ {
using (ClsNominas objNomina = new ClsNominas()) using (ClsNominas objNomina = new ClsNominas(objpersonal.IniciaTransacSQL()))
{ {
foreach (DataRow row in DTEXcel.Rows) foreach (DataRow row in DTEXcel.Rows)
{ {
@@ -799,6 +800,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
} }
if (rollback)
{
objpersonal.RollBack();
}
else
{
objpersonal.Commit();
}
} }
} }
@@ -821,15 +830,172 @@ public partial class Nomina_Nomina2 : ClsPaginas
#region SobreRecibo #region SobreRecibo
protected int SRCvePersonal
{
get
{
if (ViewState["SRCvePersonal"] == null) { return 0; }
else { return ViewState["SRCvePersonal"].ToString().ToEntero(); }
}
set { ViewState["SRCvePersonal"] = value; }
}
protected int SRCvePeriodo
{
get
{
if (ViewState["SRCvePeriodo"] == null) { return 0; }
else { return ViewState["SRCvePeriodo"].ToString().ToEntero(); }
}
set { ViewState["SRCvePeriodo"] = value; }
}
protected void LnkSobreRecibo_Click(object sender, EventArgs e) protected void LnkSobreRecibo_Click(object sender, EventArgs e)
{ {
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer); GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
string Nombre = gvrow.DataKey("Nombre").ToString(); string Nombre = gvrow.DataKey("Nombre").ToString();
int cvePersonal = gvrow.DataKey("CvePersonal").ToEntero(); SRCvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
int CvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero(); SRCvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero();
int CveNomina = gvrow.DataKey("CveNomina").ToEntero(); int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
LblEmpleado.Text = Nombre; LblEmpleado.Text = Nombre;
TabPersonal.ActiveTabIndex = 0;
mostrarConceptos();
RegistraScript("$('#ModalConceptos').modal();");
}
private void mostrarConceptos()
{
#region "Sobre Recibo"
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
}
if (maxded > i)
{
row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
}
lconc.Add(nConcepto);
}
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
GvConceptos.DataSource = lconc;
GvConceptos.DataBind();
}
#endregion
#region "Infonavit"
{
using (ClsRH objper = new ClsRH())
{
objper.GetPersonalConceptos(SRCvePersonal, UsuarioActual.CveEmpresa);
DataRow frow = objper.DtResultados.FiltroPrimero("CveSistema =3");
TxtInfoValor.Text = "";
DdlInfoTipoAplicacion.SelectedValueExist("-1");
TxtInfoDescripcion.Text = "";
TxtInfoNumCredito.Text = "";
TxtInfoFechaInicio.Text = "";
ChkInfo.Checked = false;
if (frow != null)
{
TxtInfoValor.Text = String.Format("{0:###,###.##}", frow["Importe"]);
DdlInfoTipoAplicacion.SelectedValueExist(frow["TipoAplicacion"].ToString());
TxtInfoDescripcion.Text = String.Format("{0}", frow["Descripcion02"]);
TxtInfoNumCredito.Text = String.Format("{0}", frow["Descripcion01"]);
TxtInfoFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow["FInicioAplicacion"]);
ChkInfo.Checked = frow["estatus"].ToString().ToUpper().Contiene("1", "TRUE");
}
}
}
#endregion
UpModalConceptos.Update();
}
protected void BtnImprimirsobrerecibo_Click(object sender, EventArgs e)
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 "); DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 "); DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
dtper.Columns.Add("BorradoLogico", typeof(int)); dtper.Columns.Add("BorradoLogico", typeof(int));
@@ -872,24 +1038,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
row = dtper.Rows[i]; row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero(); int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString(); string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0); //bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal)); double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoP = CveConcepto; nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto; nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe; nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal)); nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
} }
if (maxded > i) if (maxded > i)
{ {
row = dtded.Rows[i]; row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero(); int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString(); string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0); //bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal)); double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
nConcepto.CveConceptoD = CveConcepto; nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto; nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe; nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal)); nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
} }
lconc.Add(nConcepto); lconc.Add(nConcepto);
} }
@@ -900,55 +1070,116 @@ public partial class Nomina_Nomina2 : ClsPaginas
SubTotales.CveConceptoP = 0; SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones"; SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2; SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", cvePersonal)); SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
///Alert(SubTotales.ImporteP.ToString()); ///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0; SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones"; SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2; SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", cvePersonal)); SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
NConcepto Totales = new NConcepto(); NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0; Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total"; Totales.ConceptoD = "Total";
Totales.EstatusD = -3; Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", cvePersonal)); Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
lconc.Add(SubTotales); lconc.Add(SubTotales);
lconc.Add(Totales); lconc.Add(Totales);
GvConceptos.DataSource = lconc; List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
GvConceptos.DataBind(); Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
UpModalConceptos.Update(); rds.Name = "DataSet1";
RegistraScript("$('#ModalConceptos').modal();"); rds.Value = lconc;
//if (true) lrds.Add(rds);
//{ List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
// BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
// field.HeaderText = "Percepciones"; string CodigoEmpleado = "";
// field.DataField = "SumaPercepciones"; string NombreCompleto = "";
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray; string RFC = "";
// GvNominas.Columns[CurrentColumn].Visible = true; string CURP = "";
// CurrentColumn++; string TipoPeriodo = "";
//} string NSS = "";
string DiasLaborados = "";
string DiasFaltados = "";
string DiasVacaciones = "";
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
//if (true) {
//{ DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
// BoundField field = (BoundField)GvNominas.Columns[CurrentColumn]; if (drow != null)
// field.HeaderText = "Deducciones"; {
// field.DataField = "SumaDeducciones"; DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray; DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
// GvNominas.Columns[CurrentColumn].Visible = true; DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
// CurrentColumn++; FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
}
}
//string Codigo = "";
using (ClsRH objrh = new ClsRH())
{
if (objrh.GetPersonal(SRCvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
// field = (BoundField)GvNominas.Columns[CurrentColumn]; ImprimirPDF("D:/ADSistemas/Proyectos/SIG/WEB/Empresas/Grales/Formatos/SobreRecibo.rdlc", lrds, parametros, "SobreRecibo.pdf", "PDF", null);
// field.HeaderText = "Total"; }
// field.DataField = "Total"; protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray; {
// GvNominas.Columns[CurrentColumn].Visible = true; double importe = TxtInfoValor.Text.ToDouble();
// CurrentColumn++; int TipoAplicacion = DdlInfoTipoAplicacion.SelectedValue.ToEntero();
//} int NoPagos = 0;
double SaldoIni = 0;
string descripcion02 = TxtInfoDescripcion.Text;
string descripcion01 = TxtInfoNumCredito.Text;
string fecha = TxtInfoFechaInicio.Text.Replace("_", "");
int estatus = ChkInfo.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, 3, descripcion01, descripcion02, fecha, "", estatus, UsuarioActual.CveEmpresa))
continuar = false;
}
if (continuar)
{
LnkConsultar_Click(null, null);
mostrarConceptos();
Alert("Se actualizo el calculo de infonavit");
}
} }
protected void LnkFormato_Click(object sender, EventArgs e) protected void LnkFormato_Click(object sender, EventArgs e)
{ {
try try
@@ -1033,14 +1264,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
private class NConcepto private class NConcepto
{ {
public string NoConceptoP { get; set; }
public string ConceptoP { get; set; } public string ConceptoP { get; set; }
public string LabelValorP { get; set; }
public int CveConceptoP { get; set; } public int CveConceptoP { get; set; }
public double ImporteP { get; set; } public double ImporteP { get; set; }
public double ValorP { get; set; } public double ValorP { get; set; }
public int EstatusP { get; set; } public int EstatusP { get; set; }
public string NoConceptoD { get; set; }
public string ConceptoD { get; set; } public string ConceptoD { get; set; }
public string LabelValorD { get; set; }
public int CveConceptoD { get; set; } public int CveConceptoD { get; set; }
public double ImporteD { get; set; } public double ImporteD { get; set; }
public double ValorD { get; set; } public double ValorD { get; set; }
@@ -1107,4 +1342,34 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
} }
protected void LnkVerTablas_Click(object sender, EventArgs e)
{
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetTablasNomina (UsuarioActual.CveEmpresa) && objnom.DTSetResultados.Tables.Count > 1)
{
GVFactorDesctInfonavit.DataSource = objnom.DTSetResultados.Tables[0];
GVSalariosMinimos.DataSource = objnom.DTSetResultados.Tables[1];
GVIMMSRiesgot.DataSource = objnom.DTSetResultados.Tables[2];
GVInfonavitSegViv.DataSource = objnom.DTSetResultados.Tables[3];
GVVigISRMensual.DataSource = objnom.DTSetResultados.Tables[4];
GVVigSubEmpMensual.DataSource = objnom.DTSetResultados.Tables[5];
GVUma.DataSource = objnom.DTSetResultados.Tables[6];
}
}
GVFactorDesctInfonavit.DataBind();
GVSalariosMinimos.DataBind();
GVIMMSRiesgot.DataBind();
GVInfonavitSegViv.DataBind();
GVVigISRMensual.DataBind();
GVVigSubEmpMensual.DataBind();
GVVigSubEmpMensual.DataBind();
GVUma.DataBind();
UpModalTablas.Update();
RegistraScript("$('#ModalTablas').modal();");
}
} }

View File

@@ -1,4 +1,4 @@
<%@ Page Title="RH - Catálogo de Personal" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPersonal.aspx.vb" ValidateRequest="false" Inherits="RH_CatPersonal" %> <%@ Page Title="RH - Catálogo de Personal" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPersonal.aspx.vb" ValidateRequest="false" Inherits="RH_CatPersonal" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" /> <link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
@@ -53,23 +53,23 @@
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li> <li>
<asp:HyperLink runat="server" NavigateUrl="/RH/Personal.aspx" ID="HplAddVenta" style="color:#686868;"><i class="fa fa-plus" style="color:#686868;margin-left:2px;margin-right:2px;"></i>Nuevo Personal</asp:HyperLink> <asp:HyperLink runat="server" NavigateUrl="/RH/Personal.aspx" ID="HplAddVenta" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;margin-left:2px;margin-right:2px;"></i>Nuevo Personal</asp:HyperLink>
</li> </li>
<li> <li>
<asp:LinkButton ID="LinkPDF" runat="server" style="color:#686868;"> <i class="fa fa-ad-pdf" style="margin-right:5px;"></i>Imprimir</asp:LinkButton> <asp:LinkButton ID="LinkPDF" runat="server" Style="color: #686868;"> <i class="fa fa-ad-pdf" style="margin-right:5px;"></i>Imprimir</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkExportar" runat="server" style="color:#686868;"><i class="fa fa-ad-excel" style="margin-right:5px"></i>Excel</asp:LinkButton> <asp:LinkButton ID="LnkExportar" runat="server" Style="color: #686868;"><i class="fa fa-ad-excel" style="margin-right:5px"></i>Excel</asp:LinkButton>
</li> </li>
<li> <li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="HyperLink1" runat="server" style="color:#686868;"><i class="fa fa-pencil" style="color:#686868;margin-left:3px;margin-right:2px"></i>Personalizar</asp:HyperLink> <asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="HyperLink1" runat="server" Style="color: #686868;"><i class="fa fa-pencil" style="color:#686868;margin-left:3px;margin-right:2px"></i>Personalizar</asp:HyperLink>
</li> </li>
<asp:UpdatePanel runat="server" ID="UpPersonalizado" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpPersonalizado" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li runat="server" id="liLnkDescarPersonalizado" Visible="false"> <li runat="server" id="liLnkDescarPersonalizado" visible="false">
<asp:LinkButton ID="LnkDescarPersonalizados" runat="server" OnClick="LnkDescarPersonalizados_Click" OnClientClick=" LimpiarTabla(); return true;"> <asp:LinkButton ID="LnkDescarPersonalizados" runat="server" OnClick="LnkDescarPersonalizados_Click" OnClientClick=" LimpiarTabla(); return true;">
<i class="fa fa-ad-excel" style="margin-right:5px"></i>Excel Personalizado <i class="fa fa-ad-excel" style="margin-right:5px"></i>Excel Personalizado
</asp:LinkButton> </asp:LinkButton>
@@ -355,7 +355,7 @@
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Código</HeaderTemplate> <HeaderTemplate>Código</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HplCodigo" runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", If(Eval("CveEstatusPersonal").ToString() = "3", "~/RH/Reclutamiento.aspx?CvePersonal={0}", "~/RH/Personal.aspx?CvePersonal={0}")) %>'></asp:HyperLink> <asp:HyperLink ID="HplCodigo" runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", If(Eval("CveEstatusPersonal").ToString() = "3", "~/RH/Reclutamiento.aspx?CvePersonal={0}", "~/RH/Personal.aspx?CvePersonal={0}")) %>'></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -625,7 +625,7 @@
<ContentTemplate> <ContentTemplate>
<div id="DivPersonalizar" class="modal fade" role="dialog"> <div id="DivPersonalizar" class="modal fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog modal-lg">
<!-- Modal content SucursalCobranza--> <!-- Modal content SucursalCobranza-->
<div class="modal-content"> <div class="modal-content">
@@ -634,146 +634,163 @@
<h4 class="modal-title"> <h4 class="modal-title">
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4> <asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body chkSave">
<table class="table table-striped table-advance table-hover"> <div class="row">
<tbody> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkCodigo" runat="server" Text="Codigo" Checked="true" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkCodigo" runat="server" Text="Codigo" Checked="true" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkNombre" runat="server" Text="Nombre" Checked="true" />
<asp:CheckBox ID="ChkNombre" runat="server" Text="Nombre" Checked="true" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkNSS" runat="server" Text="NSS" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkNSS" runat="server" Text="NSS" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChlRFC" runat="server" Text="RFC" />
<asp:CheckBox ID="ChlRFC" runat="server" Text="RFC" /></td> </div>
</tr> </div>
<tr> <div class="row">
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkTurno" runat="server" Text="Turno" Checked="true" /></td> <asp:CheckBox ID="ChkTurno" runat="server" Text="Turno" Checked="true" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkPuesto" runat="server" Text="Puesto" Checked="true" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkPuesto" runat="server" Text="Puesto" Checked="true" />
<tr> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkDepartamento" runat="server" Text="Departamento" /></td> <asp:CheckBox ID="ChkDepartamento" runat="server" Text="Departamento" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkRuta" runat="server" Text="Ruta" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkRuta" runat="server" Text="Ruta" />
</div>
<tr> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkEscolaridad" runat="server" Text="Escolaridad" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkEscolaridad" runat="server" Text="Escolaridad" />
<asp:CheckBox ID="ChkEstadoCivil" runat="server" Text="Estado Civil" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkEstadoCivil" runat="server" Text="Estado Civil" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkGenero" runat="server" Text="Genero" Checked="true" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkGenero" runat="server" Text="Genero" Checked="true" />
<asp:CheckBox ID="ChkEstatusPersonal" runat="server" Text="Estatus Personal" Checked="true" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkEstatusPersonal" runat="server" Text="Estatus Personal" Checked="true" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkSubProyecto" runat="server" Text="SubProyecto" /></td> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkSupervisor" runat="server" Text="Suupervisor" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkSubProyecto" runat="server" Text="SubProyecto" />
<tr> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkTipoPeriodo" runat="server" Text="Tipo Periodo" Checked="true" /></td> <asp:CheckBox ID="ChkSupervisor" runat="server" Text="Supervisor" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="Método de Pago" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkTipoPeriodo" runat="server" Text="Tipo Periodo" Checked="true" />
<tr> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkTipoContrato" runat="server" Text="TipoContrato" /></td> <asp:CheckBox ID="ChkMetodoPago" runat="server" Text="Método de Pago" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td> </div>
</tr> <div class="row">
<tr> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkTipoContrato" runat="server" Text="TipoContrato" />
<asp:CheckBox ID="ChkMotivoBaja" runat="server" Text="Motivo de Baja" /></td> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkProyecto" runat="server" Text="Proyecto" /></td> <asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" />
</tr> </div>
<tr> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkMotivoBaja" runat="server" Text="Motivo de Baja" />
<asp:CheckBox ID="ChkFechaIngreso" runat="server" Text="Fecha de Ingreso" /></td> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkSeInscribioSS" runat="server" Text="SeInscribioSS" /></td> <asp:CheckBox ID="ChkProyecto" runat="server" Text="Proyecto" />
</tr> </div>
<tr> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkSalarioDiarioPago" runat="server" Text="SalarioDiarioPago" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkFechaIngreso" runat="server" Text="Fecha de Ingreso" />
<asp:CheckBox ID="ChkSalarioDiario" runat="server" Text="SalarioDiario" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkSeInscribioSS" runat="server" Text="SeInscribioSS" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkSDI" runat="server" Text="SDI" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkSalarioDiarioPago" runat="server" Text="SalarioDiarioPago" />
<asp:CheckBox ID="ChkSalarioDiarioSS" runat="server" Text="SalarioDiarioSS" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkSalarioDiario" runat="server" Text="SalarioDiario" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkBono" runat="server" Text="Bono" /></td> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkNumDiasAguinaldo" runat="server" Text="NumDiasAguinaldo" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkSDI" runat="server" Text="SDI" />
<tr> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkPorPrimaVacacional" runat="server" Text="PorPrimaVacacional" /></td> <asp:CheckBox ID="ChkSalarioDiarioSS" runat="server" Text="SalarioDiarioSS" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkUbicacion" runat="server" Text="Ubicacion" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkBono" runat="server" Text="Bono" />
<tr> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkFechaNacimiento" runat="server" Text="FechaNacimiento" /></td> <asp:CheckBox ID="ChkNumDiasAguinaldo" runat="server" Text="NumDiasAguinaldo" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkLugarNacimiento" runat="server" Text="LugarNacimiento" /></td> </div>
</tr> <div class="row">
<tr> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkPorPrimaVacacional" runat="server" Text="PorPrimaVacacional" />
<asp:CheckBox ID="ChkDireccion" runat="server" Text="Direccion" /></td> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkCP" runat="server" Text="CP" /></td> <asp:CheckBox ID="ChkUbicacion" runat="server" Text="Ubicacion" />
</tr> </div>
<tr> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkFechaNacimiento" runat="server" Text="FechaNacimiento" />
<asp:CheckBox ID="ChkCiudad" runat="server" Text="Ciudad" /></td> </div>
<td style="text-align: left"> <div class="col-md-3">
<asp:CheckBox ID="ChkEstado" runat="server" Text="Estado" /></td> <asp:CheckBox ID="ChkLugarNacimiento" runat="server" Text="LugarNacimiento" />
</tr> </div>
<tr> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkTelefono" runat="server" Text="Telefono" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkDireccion" runat="server" Text="Direccion" />
<asp:CheckBox ID="ChkCelular" runat="server" Text="Celular" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkCP" runat="server" Text="CP" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkCURP" runat="server" Text="CURP" /></td> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkCiudad" runat="server" Text="Ciudad" />
<asp:CheckBox ID="ChkNombrePadre" runat="server" Text="NombrePadre" /></td> </div>
</tr> <div class="col-md-3">
<tr> <asp:CheckBox ID="ChkEstado" runat="server" Text="Estado" />
<td style="text-align: left"> </div>
<asp:CheckBox ID="ChkNombreMadre" runat="server" Text="NombreMadre" /></td> </div>
<td style="text-align: left"> <div class="row">
<asp:CheckBox ID="ChkClienteAsignado" runat="server" Text="ClienteAsignado" /></td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkTelefono" runat="server" Text="Telefono" />
</div>
<tr> <div class="col-md-3">
<td style="text-align: left"> <asp:CheckBox ID="ChkCelular" runat="server" Text="Celular" />
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" Checked="true" /></td> </div>
<td>&nbsp;</td> <div class="col-md-3">
</tr> <asp:CheckBox ID="ChkCURP" runat="server" Text="CURP" />
</tbody> </div>
</table> <div class="col-md-3">
<asp:CheckBox ID="ChkNombrePadre" runat="server" Text="NombrePadre" />
</div>
</div>
<div class="row">
<div class="col-md-3">
<asp:CheckBox ID="ChkNombreMadre" runat="server" Text="NombreMadre" />
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkClienteAsignado" runat="server" Text="ClienteAsignado" />
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" Checked="true" />
</div>
<div class="col-md-3">
</div>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<%--<asp:HyperLink onclick="SavePersonalizar()" class="btn btn-primary" runat="server">Guardar</asp:HyperLink>--%>
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" /> <asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div> </div>
@@ -785,12 +802,12 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>
<asp:TextBox runat="server" ID="txtDatos" ClientIDMode="Static" TextMode="MultiLine" row="10" Columns="60" style="display:none"></asp:TextBox>
<asp:TextBox runat="server" ID="txtDatos" ClientIDMode="Static" TextMode="MultiLine" row="10" Columns="60" Style="display: none"></asp:TextBox>
@@ -800,7 +817,10 @@
<script src="/Metronic/assets/global/scripts/datatable.js"></script> <script src="/Metronic/assets/global/scripts/datatable.js"></script>
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script> <script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function OrdenarGV() {
}
function Show() { function Show() {
document.getElementById("ImgS").style.display = "none"; document.getElementById("ImgS").style.display = "none";
document.getElementById("ImgH").style.display = ""; document.getElementById("ImgH").style.display = "";
@@ -819,13 +839,40 @@
var TablaClonada = $('#<%= UPDatos.ClientID %>').clone(); var TablaClonada = $('#<%= UPDatos.ClientID %>').clone();
$('.trnopadding.ADtr.SearchADHeader').remove('.trnopadding.ADtr.SearchADHeader'); $('.trnopadding.ADtr.SearchADHeader').remove('.trnopadding.ADtr.SearchADHeader');
$('#txtDatos').val($('#<%= UPDatos.ClientID %>').html()); $('#txtDatos').val($('#<%= UPDatos.ClientID %>').html());
} }
function SavePersonalizar() {
let listaChked = [];
$('.chkSave input[type="checkbox"]').each(function () {
_this = $(this);
let id = _this.attr('id');
let ischecked = _this.is(':checked');
console.log(_this.attr('id') + _this.is(':checked'))
listaChked.push({ id: id, ischecked: ischecked })
});
let CatPersonal_listaChked = JSON.stringify(listaChked);
localStorage.setItem('CatPersonal_listaChked', CatPersonal_listaChked);
}
jQuery(document).ready(function () {
let CatPersonal_listaChked = localStorage.getItem('CatPersonal_listaChked');
if (CatPersonal_listaChked != null && CatPersonal_listaChked.length > 0) {
try {
listaChked = JSON.parse(CatPersonal_listaChked);
listaChked.forEach(function (_this) {
$("#" + _this.id).prop("checked", _this.ischecked);
});
$('#C_BtnPersonalizar').click();
} catch (e) {
}
}
} );
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -513,7 +513,7 @@ Partial Class RH_CatPersonal
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
RegistraScript("OrdenarGV();") RegistraScript("OrdenarGV();")
End If End If
RegistraScript("SavePersonalizar();")
liLnkDescarPersonalizado.Visible = True liLnkDescarPersonalizado.Visible = True
UpPersonalizado.Update() UpPersonalizado.Update()

File diff suppressed because it is too large Load Diff

View File

@@ -620,139 +620,143 @@ Partial Class RH_Personal
Const wdCharacter As Integer = 1 Const wdCharacter As Integer = 1
'Configuración 'Configuración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
ViewState("Orden") = "" If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
ViewState("Orden1") = "" pnlSalarioIMSS.Visible = False
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
End If
SetValues()
'SetPermisos()
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
End If
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CargaViaticosPersonal()
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares()
CargaFamiliares()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
End If End If
ViewState("Orden") = ""
ViewState("Orden1") = ""
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
End If
SetValues()
'SetPermisos()
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
End If
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CargaViaticosPersonal()
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares()
CargaFamiliares()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
End If
'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' HplAbonarMasivo.Visible = True 'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' GvGxC.Columns(7).Visible = True ' HplAbonarMasivo.Visible = True
'End If ' GvGxC.Columns(7).Visible = True
'End If
If Not CvePersonal > 0 Then If Not CvePersonal > 0 Then
DivSuperiorInmediato.Visible = False DivSuperiorInmediato.Visible = False
End If End If
'09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte '09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
If DTConsumos IsNot Nothing Then If DTConsumos IsNot Nothing Then
If DTConsumos.Rows.Count > 0 Then If DTConsumos.Rows.Count > 0 Then
UpDescargaConsumos.Visible = True UpDescargaConsumos.Visible = True
End If End If
End If End If
CargaLicencias() CargaLicencias()
End If End If
AgregarEventosAsincronosGvVacaciones() AgregarEventosAsincronosGvVacaciones()
End Sub End Sub
Private Sub CargaCuentasContables() Private Sub CargaCuentasContables()
@@ -1089,22 +1093,9 @@ Partial Class RH_Personal
End Sub End Sub
Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(120)
e.Row.Cells(1).Width = Unit.Pixel(180)
e.Row.Cells(2).Width = Unit.Pixel(110)
e.Row.Cells(3).Width = Unit.Pixel(110)
e.Row.Cells(4).Width = Unit.Pixel(70)
e.Row.Cells(5).Width = Unit.Pixel(50)
e.Row.Cells(6).Width = Unit.Pixel(56)
e.Row.Cells(7).Width = Unit.Pixel(56)
e.Row.Cells(8).Width = Unit.Pixel(110)
e.Row.Cells(9).Width = Unit.Pixel(90)
e.Row.Cells(10).Width = Unit.Pixel(60)
End If
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
@@ -1441,6 +1432,9 @@ Partial Class RH_Personal
End If End If
End If End If
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
TxtSalarioCotizado.Text = TxtSDI.Text
End If
If CvePersonal = -1 Then If CvePersonal = -1 Then
URL = "" URL = ""
@@ -2183,32 +2177,46 @@ Partial Class RH_Personal
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado" e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado"
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(4).Text = "Permanente" e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(4).Text = "Permanente"
Else Else
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then Dim TipoAplicacion As String = e.Row.DBCampo("TipoAplicacion").ToString()
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = "2600" e.Row.FCDropDownList("DdlTipoAplicacion").Items.Clear()
Else e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Seleccione", "-1"))
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = e.Row.DBCampo("TipoAplicacion") If (e.Row.DBCampo("CveSistema").ToString() = "3") Then
End If e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Movto Permanente)", "5000"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003"))
Else
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Permanente", "2600"))
End If
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
TipoAplicacion = "2600"
End If
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
End If End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
End If
End Sub End Sub
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs) Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
@@ -5874,4 +5882,11 @@ Partial Class RH_Personal
#End Region #End Region
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
If ddl.SelectedItem.Text = "Retardo" Then
gvrow.FCTextBox("TxtPorPago").Text = "87.5"
End If
End Sub
End Class End Class

View File

@@ -1697,6 +1697,32 @@ function loadsortadscroll() {
}); });
} }
var listaADScroller = [];
function saveposicionADScroller() {
$('.ADScroller-body>table').each(function () {
let _this = $(this);
let id = _this.attr("id");
let scrollleft = $(_this.parent()).scrollLeft();
let scrolltop = $(_this.parent()).scrollTop();
listaADScroller.push({ id: id, scrollleft: scrollleft, scrolltop: scrolltop })
});
}
function setposicionADScroller() {
setTimeout(
function () {
listaADScroller.forEach(function (_this) {
let id = _this.id;
let scrollleft = _this.scrollleft;
let scrolltop = _this.scrolltop;
$($('#' + id).parent()).scrollLeft(scrollleft);
$($('#' + id).parent().parent()).find('> .ADScroller-header').scrollLeft(scrollleft);
$($('#' + id).parent()).scrollTop(scrolltop);
});
}, 99);
}
function loaderinit() { function loaderinit() {
setTimeout( setTimeout(
@@ -1727,7 +1753,6 @@ jQuery(document).ready(function () {
setTimeout(loadadscroll, 10) setTimeout(loadadscroll, 10)
}); });
loadsortadscroll(); loadsortadscroll();
QuickSidebar.init(); QuickSidebar.init();
@@ -1804,6 +1829,8 @@ jQuery(document).ready(function () {
prm.add_initializeRequest(function (s, e) { prm.add_initializeRequest(function (s, e) {
objscollapse = $('.portlet-title .collapse').closest('.portlet[id]'); objscollapse = $('.portlet-title .collapse').closest('.portlet[id]');
objsexpand = $('.portlet-title .expand').closest('.portlet[id]'); objsexpand = $('.portlet-title .expand').closest('.portlet[id]');
saveposicionADScroller();
loaderinit(); loaderinit();
}); });
prm.add_endRequest(function (s, e) { prm.add_endRequest(function (s, e) {
@@ -1816,6 +1843,7 @@ jQuery(document).ready(function () {
Metronic.initAjax(); Metronic.initAjax();
loadjquerys(); loadjquerys();
loaderEnd(); loaderEnd();
setposicionADScroller();
error = false; error = false;
}); });
ADSSignalR(); ADSSignalR();

View File

@@ -14965,6 +14965,7 @@ Partial Class Ventas
Else Else
OcurrioError = True OcurrioError = True
Alert("Error traspaso almacen(sin Movtos. Detalle). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End If End If
MovDetalle.Dispose() MovDetalle.Dispose()
@@ -15106,6 +15107,7 @@ Partial Class Ventas
Dim CveVentaDetalle = If(ConceptoEntrada = 3, TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero) Dim CveVentaDetalle = If(ConceptoEntrada = 3, TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
If CveVentaDetalle < 0 Then If CveVentaDetalle < 0 Then
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -15164,6 +15166,7 @@ Partial Class Ventas
'End If 'End If
Catch ex As Exception Catch ex As Exception
OcurrioError = True OcurrioError = True
Alert("Error inesperado (15147). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try End Try
Cont += 1 Cont += 1
Next Next