Nominas
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -125,3 +125,5 @@
|
||||
/Temp/637021627402424201-FormatoAlmacen (3).xlsx
|
||||
/Temp/637021547606916146-FormatoAlmacen (3).xlsx
|
||||
/Temp/637021529455078900-FormatoAlmacen (3).xlsx
|
||||
/Manuales
|
||||
/Metronic/descarga.pdf
|
||||
|
||||
@@ -13,6 +13,15 @@ Public Class ClsNominas
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
|
||||
Protected DTSet As DataSet
|
||||
|
||||
Public ReadOnly Property DTSetResultados() As DataSet
|
||||
Get
|
||||
Return DTSet
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades ClsNominas_Nominas"
|
||||
@@ -726,6 +735,20 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
#Region "ClsNominasConceptos"
|
||||
|
||||
Public Function GetNom_Refencias() As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("SELECT CveNomReferencia,CveNomReferenciaPadre,Nivel,Texto,Campo,Tipo,IIF(EsUltimo=0,0,1) EsUltimo FROM [dbo].[Nom_Referencia] WHERE Estatus =1 ORDER BY Nivel ASC,CveNomReferencia ", CommandType.Text)
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el o los conceptos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function GetConceptos(CveEmpresa As Integer, Optional CveTipo As String = "-1", Optional CveEstado As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ConceptosGet")
|
||||
@@ -1717,6 +1740,59 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function AddUPNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Nom_NominasDetallesAddUP")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("CveNomina", SqlDbType.Int).Value = CveNomina
|
||||
.Add("CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
.Add("Importe", SqlDbType.Float).Value = Importe
|
||||
.Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado
|
||||
.Add("ImporteExento", SqlDbType.Float).Value = ImporteExento
|
||||
.Add("CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DataAdapter("PA_Nom_NominaEmpleado", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
|
||||
SqlAdapter.Fill(DTSet)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al Realizar el calculo de utilidades.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al Realizar el calculo de utilidades.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
1
Metronic/assets/global/css/components4.min.css
vendored
Normal file
1
Metronic/assets/global/css/components4.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
@@ -53,10 +54,124 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
tree_Tables();
|
||||
InicializaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region Arboles conceptos
|
||||
DataTable dtrefrencias;
|
||||
StringBuilder strKeys;
|
||||
StringBuilder strKeys2;
|
||||
StringBuilder strKeys3;
|
||||
public void tree_Tables()
|
||||
{
|
||||
ClsNominas objnom = new ClsNominas();
|
||||
strKeys = new StringBuilder();
|
||||
strKeys2 = new StringBuilder();
|
||||
strKeys3 = new StringBuilder();
|
||||
StringBuilder tablaarbol = new StringBuilder();
|
||||
objnom.GetNom_Refencias();
|
||||
dtrefrencias = objnom.DtResultados;
|
||||
objnom.Dispose();
|
||||
strKeys.Append("{");
|
||||
int tipo = 1;
|
||||
#region tablas
|
||||
tablaarbol.AppendLine("<ul id=\"tree_1\">");
|
||||
foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
|
||||
{
|
||||
AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
|
||||
}
|
||||
tablaarbol.AppendLine("</ul>");
|
||||
LtlArbolTabla.Text = tablaarbol.ToString();
|
||||
#endregion
|
||||
|
||||
#region Formulas
|
||||
tablaarbol.Clear();
|
||||
tipo = 2;
|
||||
tablaarbol.AppendLine("<ul id=\"tree_2\">");
|
||||
foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
|
||||
{
|
||||
AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
|
||||
}
|
||||
tablaarbol.AppendLine("</ul>");
|
||||
LtlArbolFormulas.Text = tablaarbol.ToString();
|
||||
#endregion
|
||||
|
||||
#region Funciones
|
||||
tablaarbol.Clear();
|
||||
tipo = 3;
|
||||
tablaarbol.AppendLine("<ul id=\"tree_3\">");
|
||||
foreach (DataRow row in dtrefrencias.FiltraParametros($"Nivel=0 AND Tipo ={tipo}").Rows)
|
||||
{
|
||||
AddchildtoEnd(ref tablaarbol, row, " ", " ", tipo);
|
||||
}
|
||||
tablaarbol.AppendLine("</ul>");
|
||||
LtlArbolFunciones.Text = tablaarbol.ToString();
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
if (strKeys.Length > 2)
|
||||
{
|
||||
strKeys.Remove(1, 1);
|
||||
}
|
||||
strKeys.Append("}");
|
||||
LtlKeys.Text = string.Format(" MycurrentT ={0} ; strKeys2='{1}'; strKeys3='{2}'; ", strKeys.ToString(), strKeys2.ToString(), strKeys3.ToString());
|
||||
UpTablas.Update();
|
||||
//TxtMycurrentT.Text = strKeys.ToString();
|
||||
//TxtstrKeys2.Text = strKeys2.ToString();
|
||||
//TxtstrKeys3.Text = strKeys3.ToString();
|
||||
|
||||
}
|
||||
public void AddchildtoEnd(ref StringBuilder tablaarbol, DataRow item, string identacion, string identacion2, int tipo)
|
||||
{
|
||||
string identacion3 = string.Format("{0}{1}", identacion, identacion2);
|
||||
DataTable dt = dtrefrencias.FiltraParametros($"CveNomReferenciaPadre={item["CveNomReferencia"].ToString().ToEntero()} AND Nivel= {(item["Nivel"].ToString().ToEntero() + 1)} AND Tipo ={tipo}");
|
||||
string data_jstree = "";
|
||||
if (dt.Rows.Count == 0)
|
||||
{
|
||||
data_jstree = "data-jstree='{ \"icon\" : \"fa fa-file icon-state-info \" }'";
|
||||
}
|
||||
tablaarbol.AppendLine(string.Format("{0}<li {1}>", identacion, data_jstree));
|
||||
tablaarbol.AppendLine("");
|
||||
tablaarbol.Append(identacion3);
|
||||
if (item["EsUltimo"].ToString() == "1")
|
||||
{
|
||||
tablaarbol.Append("<a href=\"javascript:addtextFormula('").Append(item["Campo"]).Append("');\"> ");
|
||||
string campo = item["Campo"].ToString();
|
||||
if (tipo < 3)
|
||||
{
|
||||
strKeys2.Append(string.Format(" {0}", campo));
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] scampos = campo.Split('(');
|
||||
campo = "";
|
||||
if (scampos.Length > 0)
|
||||
{
|
||||
campo = scampos[0].Trim();
|
||||
}
|
||||
strKeys3.Append(string.Format(" {0}", campo));
|
||||
}
|
||||
strKeys.Append(string.Format(",'{0}':[]", campo));
|
||||
}
|
||||
tablaarbol.Append(item["Texto"]);
|
||||
if (item["EsUltimo"].ToString() == "1") { tablaarbol.Append("</a>"); }
|
||||
tablaarbol.AppendLine("");
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
tablaarbol.AppendLine(string.Format("{0}<ul>", identacion3));
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
AddchildtoEnd(ref tablaarbol, row, identacion3, identacion2, tipo);
|
||||
}
|
||||
tablaarbol.AppendLine(string.Format("{0}</ul>", identacion3));
|
||||
}
|
||||
tablaarbol.AppendLine(string.Format("{0}</li>", identacion));
|
||||
|
||||
}
|
||||
#endregion
|
||||
protected void InicializaDatos()
|
||||
{
|
||||
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
|
||||
@@ -260,7 +375,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
TxtCodigo.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Codigo");
|
||||
TxtConcepto.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Concepto");
|
||||
DdlTipo.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("Tipo"));
|
||||
TxtFormula.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
|
||||
TxtFormulaTotal.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("EsRetencion").Equals("1")) ChkRetencion.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("TipoCalculo").Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
DdlConceptoPadre.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoPadre"));
|
||||
@@ -307,4 +422,26 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
Alert("Ocurrio un error al eliminar el concepto de nómina", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkActualizarFormula_Click(object sender, EventArgs e)
|
||||
{
|
||||
tree_Tables();
|
||||
string tipo = "Total";
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
tipo = "Total";
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
tipo = "Gravada";
|
||||
}
|
||||
LtlTituloFormula.Text = $"Actualizar Formula {tipo}";
|
||||
RegistraScript("$('#ModalDivFormula').modal()");
|
||||
UpModalFormulas.Update();
|
||||
}
|
||||
|
||||
protected void BtnUpFormula_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
179
Nomina/ConceptoNominaB.aspx
Normal file
179
Nomina/ConceptoNominaB.aspx
Normal file
@@ -0,0 +1,179 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ConceptoNominaB.aspx.cs" Inherits="Nomina_CatConceptob" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Conceptos de Nómina"></asp:Literal> <asp:Literal ID="LtlContrato" runat="server"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" ID="UpGral" runat="server">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DivContent" visible="True" style="min-height: 500px">
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
<ajax:TabPanel ID="TabInformacionGeneral" runat="server" HeaderText="Información General">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos del Concepto</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding" >
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Código:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px" BehaviorID="VCECodigo"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Concepto:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="300px" BehaviorID="VCEConcepto"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Tipo:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px" BehaviorID="VCETipo"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Fórmula:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtFormula" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFormula" runat="server" ControlToValidate="TxtFormula" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fórmula''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFormula" runat="server" HighlightCssClass="vco" TargetControlID="RFVFormula" Width="300px" BehaviorID="VCEFormula"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate " style="width: 130px;">Retención:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:CheckBox ID="ChkRetencion" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate " style="width: 130px;">Tipo de cálculo:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:CheckBox ID="ChkTipoCalculo" runat="server" checked ="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Concepto padre:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlConceptoPadre" runat="server" AppendDataBoundItems="True" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Concepto contable:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlConceptoContable" runat="server" AppendDataBoundItems="True" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpProyecto">
|
||||
<ContentTemplate>
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>ESTATUS</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate">Estado:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:CheckBox ID="ChkEstado" runat="server"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate">Sistema:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:CheckBox ID="ChkSistema" runat="server"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>INFORMACIÓN</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Clasificación:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="True" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div id="Div3" runat="server" class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Tipo de gasto:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoGasto" runat="server" AppendDataBoundItems="True" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div id="Div4" runat="server" class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Cuenta contable:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCtaContable" runat="server" AppendDataBoundItems="True" DataTextField="CtaCodigo" DataValueField="Id" Class="form-control input-sm select2me" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" Visible="true" OnClick="BtnGuardar_Click" />
|
||||
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el Contrato?" data-btn-ok-label="si" OnClick="BtnEliminar_Click" />
|
||||
<%--<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />--%>
|
||||
|
||||
<asp:Button ID="BtnCancelar" CssClass="btn btn-default" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Nomina/CatConceptos.aspx';return false" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
310
Nomina/ConceptoNominaB.aspx.cs
Normal file
310
Nomina/ConceptoNominaB.aspx.cs
Normal file
@@ -0,0 +1,310 @@
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Nomina_CatConceptoB : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
private DataTable DTCuentas
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTCuentas"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTCuentas"] = value;
|
||||
}
|
||||
}
|
||||
private Boolean EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Boolean)ViewState["EsEditar"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private int CveConcepto
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveConcepto"].ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveConcepto"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
protected void InicializaDatos()
|
||||
{
|
||||
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveConcepto"] = Request["CveConcepto"];
|
||||
EsEditar = true;
|
||||
BtnGuardar.Text = "Guardar cambios";
|
||||
BtnEliminar.Visible = true;
|
||||
ChkTipoCalculo.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveConcepto"] = -1;
|
||||
EsEditar = false;
|
||||
}
|
||||
CargaTipo();
|
||||
CargaConceptoPadre();
|
||||
CargaConceptoContable();
|
||||
|
||||
CargaClasificacion();
|
||||
CargaTipoGasto();
|
||||
CargaCtaContable();
|
||||
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void CargaTipo()
|
||||
{
|
||||
DdlTipo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlTipo.Items.Insert(1, new ListItem("Percepciones", "P"));
|
||||
DdlTipo.Items.Insert(2, new ListItem("Deducciones", "D"));
|
||||
DdlTipo.Items.Insert(3, new ListItem("Obligaciones", "O"));
|
||||
DdlTipo.SelectedValueExist("-1");
|
||||
}
|
||||
|
||||
protected void CargaConceptoPadre()
|
||||
{
|
||||
DdlConceptoPadre.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
|
||||
DdlConceptoPadre.DataBind();
|
||||
DdlConceptoPadre.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlConceptoPadre.SelectedValueExist("-1");
|
||||
}
|
||||
protected void CargaConceptoContable()
|
||||
{
|
||||
DdlConceptoContable.DataSource = get_GlobalDTContaConceptosContables(-1);
|
||||
DdlConceptoContable.DataBind();
|
||||
DdlConceptoContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlConceptoContable.SelectedValueExist("-1");
|
||||
}
|
||||
protected void CargaClasificacion()
|
||||
{
|
||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlClasificacion.SelectedValueExist("-1");
|
||||
}
|
||||
|
||||
protected void CargaTipoGasto()
|
||||
{
|
||||
DdlTipoGasto.DataSource = get_GlobalDTTiposGastos(UsuarioActual.CveEmpresa);
|
||||
DdlTipoGasto.DataBind();
|
||||
DdlTipoGasto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlTipoGasto.SelectedValueExist("-1");
|
||||
}
|
||||
|
||||
protected void CargaCtaContable()
|
||||
{
|
||||
if(UsuarioActual.Empresa.UsaContabilidad)
|
||||
{
|
||||
ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
if (ObjConta.GetCuentas(-1, "-1", 1))
|
||||
{
|
||||
DdlCtaContable.DataSource = ObjConta.DtResultados;
|
||||
DdlCtaContable.DataBind();
|
||||
}
|
||||
|
||||
DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlCtaContable.SelectedValueExist("-1");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
String codigo = TxtCodigo.Text;
|
||||
String concepto = TxtConcepto.Text;
|
||||
String tipo = DdlTipo.SelectedValue;
|
||||
String formula = TxtFormula.Text;
|
||||
|
||||
if (!ValidaFormula(formula).Equals(""))
|
||||
{
|
||||
Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool retencion;
|
||||
if (ChkRetencion.Checked) retencion = true;
|
||||
else retencion = false;
|
||||
|
||||
bool tipoCalculo;
|
||||
if (ChkTipoCalculo.Checked) tipoCalculo = true;
|
||||
else tipoCalculo = false;
|
||||
|
||||
int CveConceptoPadre = DdlConceptoPadre.SelectedValue.ToEntero();
|
||||
int CveConceptoContable = DdlConceptoContable.SelectedValue.ToEntero();
|
||||
|
||||
bool estado;
|
||||
if (ChkEstado.Checked) estado = true;
|
||||
else estado = false;
|
||||
|
||||
bool sistema;
|
||||
if (ChkSistema.Checked) sistema = true;
|
||||
else sistema = false;
|
||||
|
||||
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||
int CveTipoGasto = DdlTipoGasto.SelectedValue.ToEntero();
|
||||
int IdCtaContable = DdlCtaContable.SelectedValue.ToEntero();
|
||||
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
ObjNomina.IniciaTransacSQL();
|
||||
|
||||
bool TieneError = false;
|
||||
|
||||
if (EsEditar)
|
||||
{
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
|
||||
|
||||
if (TieneError)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable);
|
||||
|
||||
if (CveConcepto == -1)
|
||||
{
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjNomina.Commit();
|
||||
Alert("El concepto de nómina fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion, $"document.location.href=\"/Nomina/ConceptoNomina.aspx?CveConcepto={CveConcepto}\"");
|
||||
}
|
||||
}
|
||||
|
||||
ObjNomina.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private string ValidaFormula(string Formula)
|
||||
{
|
||||
string retorno = "Error en Fórmula";
|
||||
|
||||
try
|
||||
{
|
||||
FormulaEvaluator.Expression exp;
|
||||
foreach (DataRow dr in GlobalDTNomConceptosFunciones.Rows)
|
||||
{
|
||||
exp = new FormulaEvaluator.Expression(String.Format("{0}:=1", dr["Funcion"]));
|
||||
exp.Eval();
|
||||
}
|
||||
|
||||
exp = new FormulaEvaluator.Expression(Formula);
|
||||
if (exp.Errors.Count > 0)
|
||||
{
|
||||
retorno = exp.Errors[0].Message;
|
||||
}
|
||||
Object val = exp.Eval();
|
||||
if (exp.Errors.Count == 0)
|
||||
{
|
||||
retorno = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
retorno = exp.Errors[0].Message;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
Alert(e.Message,ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
if(CveConcepto > 0)
|
||||
{
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
|
||||
if (ObjNomina.GetConceptos(UsuarioActual.CveEmpresa, CveConcepto: CveConcepto) && ObjNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
TxtCodigo.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Codigo");
|
||||
TxtConcepto.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Concepto");
|
||||
DdlTipo.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("Tipo"));
|
||||
TxtFormula.Text = ObjNomina.DtResultados.FiltroPrimeroValor("Formula");
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("EsRetencion").Equals("1")) ChkRetencion.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("TipoCalculo").Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
DdlConceptoPadre.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoPadre"));
|
||||
DdlConceptoContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoContable"));
|
||||
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Estado").Equals("Activo")) ChkEstado.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Sistema").Equals("Sí")) ChkSistema.Checked = true;
|
||||
|
||||
DdlClasificacion.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveClasificacion"));
|
||||
DdlTipoGasto.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveTipoGasto"));
|
||||
DdlCtaContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("IdCtaContable"));
|
||||
}
|
||||
ObjNomina.Dispose();
|
||||
|
||||
} else
|
||||
{
|
||||
TxtCodigo.Text = "";
|
||||
TxtConcepto.Text = "";
|
||||
DdlTipo.SelectedValueExist("-1");
|
||||
TxtFormula.Text = "";
|
||||
ChkRetencion.Checked = false;
|
||||
DdlConceptoPadre.SelectedValueExist("-1");
|
||||
DdlConceptoContable.SelectedValueExist("-1");
|
||||
|
||||
ChkEstado.Checked = false;
|
||||
ChkSistema.Checked = false;
|
||||
|
||||
DdlClasificacion.SelectedValueExist("-1");
|
||||
DdlTipoGasto.SelectedValueExist("-1");
|
||||
DdlCtaContable.SelectedValueExist("-1");
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
|
||||
if (ObjNomina.RemoveConcepto(CveConcepto, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Response.Redirect("./CatConceptos.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrio un error al eliminar el concepto de nómina", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
}
|
||||
221
Nomina/Nomina2.aspx
Normal file
221
Nomina/Nomina2.aspx
Normal file
@@ -0,0 +1,221 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Nomina2.aspx.cs" Inherits="Nomina_Nomina2" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Nominas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpAccciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink></li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Ejercicio: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Tipo Período:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged" CssClass="select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Período:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" OnSelectedIndexChanged="DdlPeriodo_SelectedIndexChanged" CssClass="select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo" Style="width: 100% !important;" AutoPostBack="True">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Mostrar" 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="BtnEmitir" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnActualizaNomina" runat="server" Text="Act Nomina" Visible="False" class="btn btn-primary" />
|
||||
<a style="display: none;" href="/Coolings.docx">Recibos</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Agrupador:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlAgrupador" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||
<asp:ListItem Text="Empresa" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Turno" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1">Proyecto: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">SubProyecto:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Turno:</label>
|
||||
<div class="col-md-2" style="width: 110px !important;">
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Turno" DataValueField="CveTurno" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList></td>
|
||||
</div>
|
||||
<asp:Label ID="LblFechaPago" runat="server" Visible="false" CssClass="col-md-1 ">Fecha Pago:</asp:Label>
|
||||
<div class="col-md-1" id="DivFechaPago" runat="server" visible="false">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaPago" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha Pago''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha Pago''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
|
||||
<ajax:TabPanel ID="TabNominas" runat="server" HeaderText="Nominas">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Nomina</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">
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('TxtBusqueda','GvNominas')" style="display: inline-block; margin-right: -20px; width: 150px;">
|
||||
<a href="javascript:;" onclick="FiltrarTabla('TxtBusqueda','GvNominas')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvNominas" ClientIDMode="Static" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None" EnableViewState="false"
|
||||
data-rows="2">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkSobreRecibo" OnClick="LnkSobreRecibo_Click" runat="server"><i class='fa fa-list-alt'></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="350px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div style="width: 70px; text-align: right;">
|
||||
<asp:LinkButton runat="server" ID="LnkTimbrar" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-bell'></i>" OnClick="LnkTimbrar_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Timbrar?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="ImgDelete" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" OnClick="ImgDelete_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && Eval("SeTimbro").ToString() == "False"? true :false)%>' OnClientClick="javascript:return confirm('¿Está seguro que desea eliminar la nómina?');" />
|
||||
<asp:LinkButton runat="server" ID="LnkCancelar" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fas fa-ban'></i>" OnClick="LnkCancelar_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && PermisoCancelarEmitido && Eval("SeTimbro").ToString() == "True"? true :false)%>' OnClientClick="javascript:return confirm('¿Está seguro que desea cancelar la nómina?');" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
|
||||
<RowStyle CssClass="Texto"></RowStyle>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DModalNominas" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Nomina de excel</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
-recuerda Solo editar de las tercer fila en adelante.<br />
|
||||
-No se debe editar el nombre de la hoja 'Nomina'.<br />
|
||||
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
|
||||
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
|
||||
-si no desea insertar un concepto puede borrar la columna.<br />
|
||||
-no se debe borrar la columna codigo.<br />
|
||||
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkFormatoEmpleados" OnClick="LnkFormatoEmpleados_Click" Visible="false" CssClass="btn btn-succes" runat="server">Formato</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFormato" OnClick="LnkFormato_Click" CssClass="btn btn-success" runat="server">Formato</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCargarNomina" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">cargar y autorizar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoEmpleados" />
|
||||
<asp:PostBackTrigger ControlID="LnkFormato" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
674
Nomina/Nomina2.aspx.cs
Normal file
674
Nomina/Nomina2.aspx.cs
Normal file
@@ -0,0 +1,674 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
private DataTable dtPeriodos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtPeriodos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtPeriodos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtPeriodos"] = value; }
|
||||
}
|
||||
private DataTable dtConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtConceptos"] = value; }
|
||||
}
|
||||
private DataTable dtempleados
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtempleados"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtempleados"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtempleados"] = value; }
|
||||
}
|
||||
|
||||
protected bool PermisoCancelarEmitido
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["PermisoCancelarEmitido"] == null) { return false; }
|
||||
else { return (bool)ViewState["PermisoCancelarEmitido"]; }
|
||||
}
|
||||
|
||||
set { ViewState["PermisoCancelarEmitido"] = value; }
|
||||
}
|
||||
protected bool PermisoAutorizar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["PermisoAutorizar"] == null) { return false; }
|
||||
else { return (bool)ViewState["PermisoAutorizar"]; }
|
||||
}
|
||||
|
||||
set { ViewState["PermisoAutorizar"] = value; }
|
||||
}
|
||||
protected bool PermisoEmitir
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["PermisoEmitir"] == null) { return false; }
|
||||
else { return (bool)ViewState["PermisoEmitir"]; }
|
||||
}
|
||||
|
||||
set { ViewState["PermisoEmitir"] = value; }
|
||||
}
|
||||
protected int CvePeriodoSeleccionado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CvePeriodoSeleccionado"] == null) { return 0; }
|
||||
else { return ViewState["CvePeriodoSeleccionado"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CvePeriodoSeleccionado"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
cargaEjercicios();
|
||||
CargaTiposPeriodo();
|
||||
cargaPeriodos();
|
||||
//Permisos
|
||||
if (UsuarioActual.TienePermisoProceso(82))
|
||||
{
|
||||
PermisoAutorizar = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PermisoAutorizar = false;
|
||||
}
|
||||
if (UsuarioActual.TienePermisoProceso(83))
|
||||
{
|
||||
PermisoEmitir = true;
|
||||
PermisoCancelarEmitido = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PermisoEmitir = false;
|
||||
PermisoCancelarEmitido = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#region Filtros
|
||||
private void cargaEjercicios()
|
||||
{
|
||||
int EjercicioActual = UsuarioActual.Empresa.EjercicioActual;
|
||||
DataTable dtejercicio = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
dtejercicio = objnom.DtResultados;
|
||||
}
|
||||
}
|
||||
DdlEjercicios.DataSource = dtejercicio;
|
||||
DdlEjercicios.DataBind();
|
||||
if ((dtejercicio != null) && dtejercicio.Rows.Count > 0)
|
||||
{
|
||||
if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", EjercicioActual)) == 0)
|
||||
{
|
||||
DdlEjercicios.Items.Insert(0, new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()));
|
||||
}
|
||||
if (dtejercicio.COUNT("Ejercicio", string.Format("Ejercicio={0}", (EjercicioActual - 1))) == 0)
|
||||
{
|
||||
DdlEjercicios.Items.Insert(1, new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlEjercicios.Items.Add(new ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()));
|
||||
DdlEjercicios.Items.Add(new ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()));
|
||||
|
||||
}
|
||||
if (DdlEjercicios.Items.Count > 0)
|
||||
{
|
||||
DdlEjercicios.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
private void CargaTiposPeriodo()
|
||||
{
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
|
||||
DdlTipoPeriodo.DataBind();
|
||||
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if (DdlTipoPeriodo.Items.Count > 0)
|
||||
{
|
||||
DdlTipoPeriodo.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
private void cargaPeriodos()
|
||||
{
|
||||
int tipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
dtPeriodos = null;
|
||||
if (DdlTipoPeriodo.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
using (ClsNominas objperiodos = new ClsNominas())
|
||||
{
|
||||
if (objperiodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1))
|
||||
{
|
||||
dtPeriodos = objperiodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)");
|
||||
}
|
||||
}
|
||||
}
|
||||
DdlPeriodo.DataSource = dtPeriodos;
|
||||
DdlPeriodo.DataBind();
|
||||
DdlPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
muestraPeriodo();
|
||||
}
|
||||
|
||||
protected void DdlEjercicios_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos();
|
||||
}
|
||||
|
||||
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos();
|
||||
}
|
||||
|
||||
protected void DdlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
muestraPeriodo();
|
||||
}
|
||||
private void muestraPeriodo()
|
||||
{
|
||||
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
LnkConsultar.Visible = (CvePeriodo > 0);
|
||||
UPFiltros.Update();
|
||||
UpDatos.Update();
|
||||
}
|
||||
#endregion
|
||||
#region Datos
|
||||
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = false;
|
||||
int CveProyecto = DdlProyecto.SelectedValue.ToEntero();
|
||||
int CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero();
|
||||
int CveTurno = DdlTurno.SelectedValue.ToEntero();
|
||||
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||
int Agrupador = DdlAgrupador.SelectedValue.ToEntero();
|
||||
|
||||
CvePeriodoSeleccionado = 0;
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[0];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[1];
|
||||
CvePeriodoSeleccionado = CvePeriodo;
|
||||
continuar = true;
|
||||
}
|
||||
|
||||
}
|
||||
#region CargaGrid
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
string ctipo = "P";
|
||||
while (GvNominas.Columns.Count > 3)
|
||||
{
|
||||
GvNominas.Columns.RemoveAt(2);
|
||||
}
|
||||
|
||||
int CurrentColumn = GvNominas.Columns.Count - 1;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Tipo = row["Tipo"].ToString();
|
||||
|
||||
if (Tipo != ctipo)
|
||||
{
|
||||
if (ctipo == "P")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
if (Tipo != "D")
|
||||
{
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
|
||||
field = new BoundField();
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(120);
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
if (dtempleados.SUM(string.Format("[{0}]", CveConcepto)) > 0)
|
||||
{
|
||||
BoundField field = new BoundField();
|
||||
field.HeaderText = Concepto;
|
||||
field.DataField = CveConcepto.ToString();
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(80);
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
}
|
||||
|
||||
BoundField field2 = new BoundField();
|
||||
field2.HeaderText = "Obligaciones";
|
||||
field2.DataField = "SumaObligaciones";
|
||||
field2.DataFormatString = "{0:N2}";
|
||||
field2.ItemStyle.Width = Unit.Pixel(120);
|
||||
field2.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field2.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field2);
|
||||
|
||||
|
||||
GvNominas.DataSource = dtempleados;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
GvNominas.DataSource = null;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
Literal LtlNombre = e.Row.FCLiteral("LtlNombre");
|
||||
LinkButton LnkTimbrar = (LinkButton)e.Row.FindControl("LnkTimbrar");
|
||||
int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
|
||||
int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
|
||||
int CveNomina = e.Row.DataKey("CveNomina").ToEntero();
|
||||
string SeTimbro = e.Row.DBCampo("SeTimbro").ToString();
|
||||
string Nombre = e.Row.DBCampo("Nombre").ToString();
|
||||
string Turno = e.Row.DBCampo("Turno").ToString();
|
||||
string SubProyecto = e.Row.DBCampo("SubProyecto").ToString();
|
||||
LnkTimbrar.Visible = false;
|
||||
if (cvePersonal > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<a class=\"Texto\" href=\"/RH/Personal.aspx?CvePersonal={0}\">{1}</a>", cvePersonal, Nombre);
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
if (SeTimbro == "False")
|
||||
{
|
||||
LnkTimbrar.Visible = true;
|
||||
e.Row.CssClass = "info";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.CssClass = "success";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlNombre.Text = "Total General";
|
||||
if (Turno.Length == 0 && SubProyecto.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Sub Proyecto: {0}<b>", SubProyecto);
|
||||
}
|
||||
else if (Turno.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Turno: {0}<b>", SubProyecto);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region SobreRecibo
|
||||
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void ImgDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkCancelar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkCargarNomina_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos;
|
||||
bool continuar = Filesgral.Count > 0;
|
||||
string stringError = "";
|
||||
Archivo fileItem = continuar ? Filesgral[0] : null;
|
||||
if (continuar)
|
||||
{
|
||||
string FileExtension = fileItem.Extencion.ToUpper();
|
||||
if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
stringError = "No se inserto un archivo de tipo Excel";
|
||||
}
|
||||
|
||||
}
|
||||
DataTable DTEXcel = new DataTable();
|
||||
if (continuar)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + fileItem.FileUrl))
|
||||
{
|
||||
conn.Open();
|
||||
string exceltableName = "Nomina";
|
||||
DataTable tables = conn.GetSchema("Tables");
|
||||
if (tables.FiltraParametros(string.Format("TABLE_NAME LIKE'%{0}%'", exceltableName)).Rows.Count == 0)
|
||||
{
|
||||
continuar = false;
|
||||
stringError = "El documento no contiene la hoja nomina";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
exceltableName = tables.FiltroPrimero(string.Format("TABLE_NAME LIKE'%{0}%'", exceltableName))["TABLE_NAME"].ToString();
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
using (System.Data.Odbc.OdbcCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
|
||||
cmd.CommandType = CommandType.Text;
|
||||
cmd.CommandText = $"SELECT * FROM [{exceltableName}] WHERE LEN(Codigo)>0 AND Codigo <> 'Codigo'";
|
||||
using (System.Data.Odbc.OdbcDataAdapter da = new System.Data.Odbc.OdbcDataAdapter(cmd))
|
||||
{
|
||||
da.Fill(DTEXcel);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
continuar = false;
|
||||
stringError = "Ocurrio un Error al procesar el excel ";
|
||||
string.Format(stringError, ex.ToString()).GuardaLog();
|
||||
}
|
||||
}
|
||||
if (continuar && DTEXcel.Rows.Count == 0)
|
||||
{
|
||||
|
||||
continuar = false;
|
||||
stringError = "No se encontraron cambios";
|
||||
}
|
||||
StringBuilder str = new StringBuilder();
|
||||
bool rollback = false;
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
int CveMoneda = 1;
|
||||
List<int> lConceptos = new List<int>();
|
||||
foreach (DataColumn item in DTEXcel.Columns)
|
||||
{
|
||||
if (item.ColumnName.ToEntero() > 0)
|
||||
{
|
||||
lConceptos.Add(item.ColumnName.ToEntero());
|
||||
}
|
||||
|
||||
}
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
foreach (DataRow row in DTEXcel.Rows)
|
||||
{
|
||||
string Codigo = row["Codigo"].ToString();
|
||||
int CvePersonal = 0;
|
||||
int CveNomina = 0;
|
||||
double SubTotal = 0;
|
||||
double Total = 0;
|
||||
int CveMetodoPago = 0;
|
||||
if (Codigo != "-1" && objpersonal.GetPersonal(-1, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) &&
|
||||
objpersonal.DtResultados.Rows.Count == 1)
|
||||
{
|
||||
CvePersonal = objpersonal.CvePersonal;
|
||||
CveMetodoPago = objpersonal.CveMetodoPago;
|
||||
}
|
||||
else
|
||||
{
|
||||
str.AppendLine(string.Format("No se encontro el codigo {0}<br>", Codigo));
|
||||
}
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (objNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
rollback = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rollback = true;
|
||||
}
|
||||
}
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
foreach (int CveConcepto in lConceptos)
|
||||
{
|
||||
decimal Importe = 0;
|
||||
decimal ImporteGravado = 0;
|
||||
decimal ImporteExento = 0;
|
||||
Importe = row[CveConcepto.ToString()].ToString().ToDecimal();
|
||||
try
|
||||
{
|
||||
ImporteExento = row[string.Format("E{0}",CveConcepto)].ToString().ToDecimal();
|
||||
}
|
||||
catch (Exception) { }
|
||||
ImporteGravado = Importe - ImporteExento;
|
||||
objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento,UsuarioActual.CveUsuario);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!continuar)
|
||||
{
|
||||
Alert(stringError, ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("La información se a actualizado satisfactoriamente");
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkFormatoEmpleados_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkFormato_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet("Nomina");
|
||||
int column = 1;
|
||||
libro.Row(1).Hide();
|
||||
|
||||
libro.Cell(1, column).Value = "Codigo";
|
||||
libro.Cell(2, column).Value = "Codigo";
|
||||
column++;
|
||||
libro.Cell(1, column).Value = "Empleado";
|
||||
libro.Cell(2, column).Value = "Empleado";
|
||||
libro.Column(column).Width = 35;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
column++;
|
||||
string CveConcepto = row["CveConcepto"].ToString();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
libro.Cell(1, column).Value = CveConcepto;
|
||||
libro.Cell(2, column).Value = Concepto;
|
||||
libro.Column(column).Width = 15;
|
||||
column++;
|
||||
CveConcepto = string.Format("E{0}", row["CveConcepto"]);
|
||||
Concepto = string.Format("Exento {0}", row["Concepto"]);
|
||||
libro.Cell(1, column).Value = CveConcepto;
|
||||
libro.Cell(2, column).Value = Concepto;
|
||||
libro.Column(column).Width = 15;
|
||||
|
||||
}
|
||||
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
//libro.Row(1).Cell(13).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(247, 150, 70));
|
||||
//libro.Row(1).Cell(14).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 240));
|
||||
//libro.Row(1).Cell(15).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
|
||||
int Fila = 2;
|
||||
foreach (DataRow erow in dtempleados.FiltraParametros("CvePersonal>0").Rows)
|
||||
{
|
||||
Fila++;
|
||||
column = 1;
|
||||
libro.Cell(Fila, column).Value = erow["Codigo"];
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = erow["Nombre"];
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
column++;
|
||||
string Concepto = row["CveConcepto"].ToString();
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
column++;
|
||||
Concepto = string.Format("{0}-E", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
|
||||
}
|
||||
}
|
||||
//libro.Row(2).SetAutoFilter();
|
||||
System.IO.Stream fs = new System.IO.MemoryStream();
|
||||
wb.SaveAs(fs);
|
||||
fs.Position = 0;
|
||||
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
|
||||
using (System.IO.Stream input = fs)
|
||||
|
||||
{
|
||||
input.CopyTo(memoryStream);
|
||||
}
|
||||
memoryStream.Position = 0;
|
||||
|
||||
Response.Clear();
|
||||
Response.Buffer = true;
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "FormatoCargaNominas"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,6 @@ Partial Class RH_MiPerfil
|
||||
DTConsumos = Nothing
|
||||
CargaEstados(1)
|
||||
CargaSuperioresOrganigrama()
|
||||
CargaPermisos()
|
||||
CargaPermisosReemplazos()
|
||||
CargaConceptos()
|
||||
CargaDatosPersonal()
|
||||
@@ -388,6 +387,7 @@ Partial Class RH_MiPerfil
|
||||
If clave > 0 Then
|
||||
ViewState("CvePersonal") = clave
|
||||
CargaDatos()
|
||||
CargaPermisos()
|
||||
LtlTitulo.Text = "Consulta de Personal:"
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
ImgImprimirExpediente.Visible = True
|
||||
|
||||
687
SigAyuda.aspx
Normal file
687
SigAyuda.aspx
Normal file
@@ -0,0 +1,687 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SigAyuda.aspx.vb" Inherits="Metronic_SigAyuda" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/css/components4.min.css" rel="stylesheet" id="style_components" type="text/css" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
.fa-file-pdf-o{
|
||||
color: #e43a45;
|
||||
}
|
||||
.fa-file-word-o{
|
||||
color: #337ab7;
|
||||
}
|
||||
.fa-3 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.tabbable-custom .tabs-left.nav-tabs > li {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.tabbable-custom .tabs-left.nav-tabs > li.active {
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
.tabbable-custom .tabs-left.nav-tabs > li:hover {
|
||||
background-color: #fff;
|
||||
/*border-top: 3px solid #F3565D;*/
|
||||
}
|
||||
|
||||
.tabbable-custom .tabs-left.nav-tabs > li.active > a:hover {
|
||||
border-right: none;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Ayuda
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%-- <div class="col-md-2 col-sm-3 ">
|
||||
<div class="tabbable-custom">
|
||||
<ul class="nav nav-tabs tabs-left">
|
||||
<li class="active">
|
||||
<asp:HyperLink ID="tabOrdenes_de_compra" NavigateUrl="#dtabOrdenes_de_compra" runat="server" data-toggle="tab">Ordenes de compra</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabCompras" NavigateUrl="#dtabCompras" runat="server" data-toggle="tab">Compras</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabBancos" NavigateUrl="#dtabBancos" runat="server" data-toggle="tab">Bancos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabContabilidad" NavigateUrl="#dtabContabilidad" runat="server" data-toggle="tab">Contabilidad</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabVentas" NavigateUrl="#dtabVentas" runat="server" data-toggle="tab">Ventas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabRecursos_Humanos" NavigateUrl="#dtabRecursos_Humanos" runat="server" data-toggle="tab">Recursos Humanos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabActivos_Fijos" NavigateUrl="#dtabActivos_Fijos" runat="server" data-toggle="tab">Activos Fijos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="tabInventarios" NavigateUrl="#dtabInventarios" runat="server" data-toggle="tab">Inventarios</asp:HyperLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10 col-sm-9 ">--%>
|
||||
|
||||
<div class="mt-element-list">
|
||||
<%--Titulo--%>
|
||||
<div class="mt-list-head list-todo red">
|
||||
<div class="list-head-title-container">
|
||||
<h3 class="list-title">Menu Ayuda</h3>
|
||||
</div>
|
||||
<a href="javascript:;">
|
||||
<%--<div class="list-count pull-right red-mint">
|
||||
<i class="fa fa-question-circle"></i>
|
||||
</div>--%>
|
||||
</a>
|
||||
</div>
|
||||
<%-- Ordenes de compra --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-tags"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskOC" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Ordenes de compra</div>
|
||||
<div class="badge badge-default pull-right bold">1</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskOC">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Ordenes de Compra/Manual Ordenes de Compra.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual Ordenes de Compra
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Compras --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-shopping-cart"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskCompras" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Compras</div>
|
||||
<div class="badge badge-default pull-right bold">5</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskCompras">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Compras/Catalogo de proveedores.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Catalogo de proveedores
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Compras/eFacturas y Proveedores.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">eFacturas y Proveedores
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Compras/Manual Proveedores Pagos .pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual Proveedores Pagos
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Compras/Manual Registro de factura.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual Registro de factura
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Compras/Recepción de Complementos de Pago.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Recepción de Complementos de Pago
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%-- Bancos --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-university"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskBancos" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Bancos</div>
|
||||
<div class="badge badge-default pull-right bold">6</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskBancos">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Cancelacion de complementos de pago.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Cancelacion de complementos de pago
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Manual Cuentas Bancarias.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual Cuentas Bancarias
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Procedimiento de caja chica.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Procedimiento de caja chica
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Procedimiento para actualizar gestor de cobranza.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Procedimiento para actualizar gestor de cobranza
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Surtir mercancía de contado.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Surtir mercancía de contado
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Bancos/Uso de cajas chicas y Cortes en Punto de Venta.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Uso de cajas chicas y Cortes en Punto de Venta
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Contabilidad --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="icon-calculator"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskContabilidad" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Contabilidad</div>
|
||||
<div class="badge badge-default pull-right bold">0</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskContabilidad">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Ventas --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskVentas" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Ventas</div>
|
||||
<div class="badge badge-default pull-right bold">2</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskVentas">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Ventas/Procesos de Ventas.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Procesos de Ventas
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Ventas/Reportes de Ventas.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Reportes de Ventas
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Recursos Humanos --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskRH" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Recursos Humanos</div>
|
||||
<div class="badge badge-default pull-right bold">4</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskRH">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/RH/Manual RH.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual RH
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/RH/Registro y asignación de uniformes.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Registro y asignación de uniformes
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/RH/Solicitud de permisos.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Solicitud de permisos
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-word-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/RH/Viaticos.docx');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Viaticos
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Activos Fijos --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class=" fa fa-building"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskAF" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Activos Fijos</div>
|
||||
<div class="badge badge-default pull-right bold">1</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskAF">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Activos Fijos/Manual Activo Fijo.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual Activo Fijo
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%-- Inventarios --%>
|
||||
<div class="mt-list-container list-todo">
|
||||
<div class="list-todo-line"></div>
|
||||
<ul>
|
||||
<li class="mt-list-item">
|
||||
<div class="list-todo-icon bg-white">
|
||||
<i class="fa fa-dropbox"></i>
|
||||
</div>
|
||||
<div class="list-todo-item grey">
|
||||
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskInventarios" aria-expanded="false">
|
||||
<div class="list-toggle done uppercase">
|
||||
<div class="list-toggle-title bold">Inventarios</div>
|
||||
<div class="badge badge-default pull-right bold">1</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="task-list panel-collapse collapse " id="taskInventarios">
|
||||
<ul>
|
||||
<li class="task-list-item done">
|
||||
<div class="task-icon">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-status">
|
||||
<a class="done" href="javascript:downFile('Manuales/Inventarios/Manual recepcion de Almacen.pdf');">
|
||||
<i class="fa fa-download fa-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="task-content">
|
||||
<h4 class="uppercase bold">Manual recepcion de Almacen
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<%--</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="dtabOrdenes_de_compra">
|
||||
<h4>Ordenes de compra</h4>
|
||||
|
||||
|
||||
<a onclick="">Descarga el manual de ordenes de compra aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabCompras">
|
||||
<h4>Compras</h4>
|
||||
<a onclick="downFile('Manuales/Compras/Catalogo de proveedores.pdf')">Descarga el Catalogo de proveedores aquí</a>
|
||||
<a onclick="downFile('Manuales/Compras/eFacturas y Proveedores.pdf')">Descarga eFacturas y Proveedores aquí</a>
|
||||
<a onclick="downFile('Manuales/Compras/Manual Proveedores Pagos .pdf')">Descarga el manual de proveedores pagos aquí</a>
|
||||
<a onclick="downFile('Manuales/Compras/Manual Registro de factura.pdf')">Descarga el manual de registro de factura aquí</a>
|
||||
<a onclick="downFile('Manuales/Compras/Recepción de Complementos de Pago.pdf')">Descarga el manual de recepción complementos de Pago aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabBancos">
|
||||
<h4>Bancos</h4>
|
||||
<a onclick="downFile('Manuales/Bancos/Cancelacion de complementos de pago.pdf')">Descarga el manual de cancelacion de complementos de pago aquí</a>
|
||||
<a onclick="downFile('Manuales/Bancos/Manual Cuentas Bancarias.pdf')">Descarga el manual de cuentas bancarias aquí</a>
|
||||
<a onclick="downFile('Manuales/Bancos/Procedimiento de caja chica.docx')">Descarga el procedimiento de caja chica aquí</a>
|
||||
<a onclick="downFile('Manuales/Bancos/Procedimiento para actualizar gestor de cobranza.docx')">Descarga el procedimiento para actualizar gestor de cobranza aquí</a>
|
||||
<a onclick="downFile('Manuales/Bancos/Surtir mercancía de contado.docx')">Descarga el manual de surtir mercancía de contado aquí</a>
|
||||
<a onclick="downFile('Manuales/Bancos/Uso de cajas chicas y Cortes en Punto de Venta.docx')">Descarga el manual de uso de cajas chicas y cortes en punto de venta aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabContabilidad">
|
||||
<h4>Contabilidad</h4>
|
||||
<a onclick="downFile('Manuales/.pdf')">Descarga el manual aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabVentas">
|
||||
<h4>Ventas</h4>
|
||||
<a onclick="downFile('Manuales/Ventas/Procesos de Ventas.pdf')">Descarga el manual de procesos de Ventas aquí</a>
|
||||
<a onclick="downFile('Manuales/Ventas/Reportes de Ventas.pdf')">Descarga el manual de reportes de ventas aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabRecursos_Humanos">
|
||||
<h4>Recursos Humanos</h4>
|
||||
<a onclick="downFile('Manuales/RH/Manual RH.pdf')">Descarga el manual de RH aquí</a>
|
||||
<a onclick="downFile('Manuales/RH/Registro y asignación de uniformes.docx')">Descarga el manual de registro y asignación de uniformes aquí</a>
|
||||
<a onclick="downFile('Manuales/RH/Solicitud de permisos.docx')">Descarga el manual de solicitud de permisos aquí</a>
|
||||
<a onclick="downFile('Manuales/RH/Viaticos.docx')">Descarga el manual de viaticos aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabActivos_Fijos">
|
||||
<h4>Activos Fijos</h4>
|
||||
<a onclick="downFile('Manuales/Activos Fijos/Manual Activo Fijo.pdf')">Descarga el manual de activo fijo aquí</a>
|
||||
</div>
|
||||
<div class="tab-pane " id="dtabInventarios">
|
||||
<h4>Inventarios</h4>
|
||||
<a onclick="downFile('Manuales/Inventarios/Manual recepcion de Almacen.pdf')">Descarga el manual de recepcion de Almacen aquí</a>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtDocto" CssClass="hidden TxtDocto" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="btnDownload" OnClick="btnDownload_Click" runat="server" UseSubmitBehavior="false" CssClass="hidden btnDownload" Text="dowm" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
function downFile(file) {
|
||||
$('.TxtDocto').val(file);
|
||||
$('.btnDownload').click();
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
32
SigAyuda.aspx.vb
Normal file
32
SigAyuda.aspx.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
Partial Class Metronic_SigAyuda
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
|
||||
Try
|
||||
Dim docto As String = TxtDocto.Text.Replace("/", "\")
|
||||
|
||||
Dim path As String = $"{AppDomain.CurrentDomain.BaseDirectory}{docto}"
|
||||
|
||||
|
||||
Dim file As New System.IO.FileInfo(path)
|
||||
Dim mimeType As String = "text/plain"
|
||||
Try
|
||||
mimeType = MimeMapping.GetMimeMapping(path)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
'Response.Write(path)
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}")
|
||||
Response.AddHeader("Content-Length", file.Length.ToString())
|
||||
Response.ContentType = mimeType
|
||||
Response.Flush()
|
||||
Response.TransmitFile(file.FullName)
|
||||
Response.End()
|
||||
Catch ex As Exception
|
||||
'GuardaLog($"GenerateFile: {ex.ToString()}")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user