Nominas
This commit is contained in:
@@ -7,9 +7,20 @@
|
||||
<webopt:BundleReference runat="server" Path="~/Metronic/assets/global/plugins/codemirror/CSS" />
|
||||
<webopt:BundleReference runat="server" Path="~/Metronic/assets/global/plugins/jstree/dist/themes/default/style.min.css" />
|
||||
<style>
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[disabled="disabled"] ~ .CodeMirror.cm-s-material pre {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
z-index: 700;
|
||||
}
|
||||
|
||||
.CodeMirror,
|
||||
.CodeMirror-scroll {
|
||||
max-height: 150px;
|
||||
@@ -217,19 +228,30 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
<ajax:TabPanel ID="tabFormulaTotal" runat="server" HeaderText="Total">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaTotal" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="tabFormulaGravada" runat="server" HeaderText="Gravada">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaGravada" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
<asp:UpdatePanel ID="UpFormulas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="tabFormulaImporte" runat="server" HeaderText="Importe">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaImporte" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="tabFormulaTotal" runat="server" HeaderText="Total">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaTotal" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="tabFormulaGravada" runat="server" HeaderText="Gravada">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtFormulaGravada" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
@@ -259,7 +281,7 @@
|
||||
</div>
|
||||
<label class="col-md-3 truncate ">Automatico Liquidación:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkAutomaticoLiquidacion" CssClass="chksino" Text=" " runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkAutomaticoLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -269,7 +291,7 @@
|
||||
</div>
|
||||
<label class="col-md-3 truncate ">Imprimir:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkImprimir" CssClass="chksino" Text=" " runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkImprimir" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -289,7 +311,7 @@
|
||||
<asp:Label runat="server" Text="Tipo de cálculo" AssociatedControlID="ChkTipoCalculo"></asp:Label>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<asp:CheckBox ID="ChkTipoCalculo" Text=" " CssClass="chksino" runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkTipoCalculo" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -332,7 +354,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <asp:TextBox ID="TxtMycurrentT" CssClass=" TxtMycurrentT" runat="server"></asp:TextBox>
|
||||
<%-- <asp:TextBox ID="TxtMycurrentT" CssClass=" TxtMycurrentT" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtstrKeys2" CssClass="TxtstrKeys2" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtstrKeys3" CssClass="TxtstrKeys3" runat="server"></asp:TextBox>--%>
|
||||
|
||||
@@ -492,12 +514,12 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTablas" class="jdTables" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LtlKeys" CssClass="LtlKeys" runat="server"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTablas" class="jdTables" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LtlKeys" CssClass="LtlKeys" runat="server"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%: System.Web.Optimization.Scripts.Render("~/Metronic/assets/global/plugins/codemirror/JS") %>
|
||||
@@ -913,10 +935,10 @@
|
||||
let MycurrentT;
|
||||
let strKeys2;
|
||||
let strKeys3;
|
||||
eval($('.LtlKeys').html())
|
||||
eval($('.LtlKeys').html())
|
||||
$('.ShowModalDivFormula').on('shown.bs.modal', function (e) {
|
||||
$('.BtnupView').click();
|
||||
});
|
||||
});
|
||||
$('.ShowModalDivFormula').removeClass('ShowModalDivFormula');
|
||||
ReloadcodeMirror(MycurrentT, strKeys2, strKeys3);
|
||||
|
||||
@@ -934,8 +956,8 @@
|
||||
hintOptions: {
|
||||
tables: MycurrentT
|
||||
},
|
||||
change: function (cm) { } ,
|
||||
readOnly: _input.prop('disabled')
|
||||
change: function (cm) { },
|
||||
readOnly: _input.prop('disabled')
|
||||
});
|
||||
editor.on('change', function (cMirror) {
|
||||
// get value right from instance
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Nomina_CatConcepto : ClsPaginas
|
||||
public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
private DataTable DTCuentas
|
||||
@@ -54,6 +54,20 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
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;
|
||||
LnkActualizarFormula.Visible = false;
|
||||
}
|
||||
tree_Tables();
|
||||
InicializaDatos();
|
||||
}
|
||||
@@ -71,7 +85,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
strKeys2 = new StringBuilder();
|
||||
strKeys3 = new StringBuilder();
|
||||
StringBuilder tablaarbol = new StringBuilder();
|
||||
objnom.GetNom_Refencias();
|
||||
objnom.GetNom_Refencias(UsuarioActual.CveEmpresa);
|
||||
dtrefrencias = objnom.DtResultados;
|
||||
objnom.Dispose();
|
||||
strKeys.Append("{");
|
||||
@@ -136,7 +150,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
tablaarbol.AppendLine(string.Format("{0}<li {1}>", identacion, data_jstree));
|
||||
tablaarbol.AppendLine("");
|
||||
tablaarbol.Append(identacion3);
|
||||
if (item["EsUltimo"].ToString() == "1")
|
||||
if (item["EsUltimo"].ToString() == "1" || item["EsUltimo"].ToString().ToUpper() == "TRUE")
|
||||
{
|
||||
tablaarbol.Append("<a href=\"javascript:addtextFormula('").Append(item["Campo"]).Append("');\"> ");
|
||||
string campo = item["Campo"].ToString();
|
||||
@@ -157,7 +171,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
strKeys.Append(string.Format(",'{0}':[]", campo));
|
||||
}
|
||||
tablaarbol.Append(item["Texto"]);
|
||||
if (item["EsUltimo"].ToString() == "1") { tablaarbol.Append("</a>"); }
|
||||
if (item["EsUltimo"].ToString() == "1" || item["EsUltimo"].ToString().ToUpper() == "TRUE") { tablaarbol.Append("</a>"); }
|
||||
tablaarbol.AppendLine("");
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
@@ -170,23 +184,10 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
}
|
||||
tablaarbol.AppendLine(string.Format("{0}</li>", identacion));
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
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();
|
||||
@@ -239,7 +240,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void CargaCtaContable()
|
||||
{
|
||||
if(UsuarioActual.Empresa.UsaContabilidad)
|
||||
if (UsuarioActual.Empresa.UsaContabilidad)
|
||||
{
|
||||
ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
if (ObjConta.GetCuentas(-1, "-1", 1))
|
||||
@@ -261,68 +262,71 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
String tipo = DdlTipo.SelectedValue;
|
||||
String formula = TxtFormula.Text;
|
||||
|
||||
if (!ValidaFormula(formula).Equals(""))
|
||||
//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();
|
||||
int AplicaFiniquito = ChkAutomaticoLiquidacion.Checked ? 1 : 0;
|
||||
int AutomaticoGlobal = ChkAutomaticoGlobal.Checked ? 1 : 0;
|
||||
int Especie = ChkEspecie.Checked ? 1 : 0;
|
||||
int Imprimir = ChkImprimir.Checked ? 1 : 0;
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
ObjNomina.IniciaTransacSQL();
|
||||
|
||||
bool TieneError = false;
|
||||
|
||||
if (EsEditar)
|
||||
{
|
||||
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;
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir);
|
||||
|
||||
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)
|
||||
if (TieneError)
|
||||
{
|
||||
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}\"");
|
||||
}
|
||||
ObjNomina.RollBack();
|
||||
}
|
||||
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.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, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir);
|
||||
|
||||
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();
|
||||
@@ -357,8 +361,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
retorno = exp.Errors[0].Message;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
Alert(e.Message,ModExtensiones.TipoMensaje.MsgError);
|
||||
catch (Exception e)
|
||||
{
|
||||
Alert(e.Message, ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
@@ -366,31 +371,39 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
if(CveConcepto > 0)
|
||||
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"));
|
||||
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"));
|
||||
DdlConceptoContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveConceptoContable"));
|
||||
DataRow drow = ObjNomina.DtResultados.Rows[0];
|
||||
TxtCodigo.Text = drow["Codigo"].ToString();
|
||||
TxtConcepto.Text = drow["Concepto"].ToString();
|
||||
DdlTipo.SelectedValueExist(drow["Tipo"]);
|
||||
TxtFormulaImporte.Text = drow["Formula"].ToString();
|
||||
TxtFormulaTotal.Text = drow["FormulaTotal"].ToString();
|
||||
TxtFormulaGravada.Text = drow["FormulaGravada"].ToString();
|
||||
if (drow["EsRetencion"].Equals("1")) ChkRetencion.Checked = true;
|
||||
if (drow["TipoCalculo"].Equals("True")) ChkTipoCalculo.Checked = true;
|
||||
DdlConceptoPadre.SelectedValueExist(drow["CveConceptoPadre"]);
|
||||
DdlConceptoContable.SelectedValueExist(drow["CveConceptoContable"]);
|
||||
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Estado").Equals("Activo")) ChkEstado.Checked = true;
|
||||
if (ObjNomina.DtResultados.FiltroPrimeroValor("Sistema").Equals("Sí")) ChkSistema.Checked = true;
|
||||
ChkEstado.Checked = drow["Estado"].Equals("Activo");
|
||||
ChkSistema.Checked = drow["Sistema"].Equals("Sí");
|
||||
ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkEspecie.Checked = drow["Especie"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkImprimir.Checked = drow["Imprimir"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
|
||||
DdlClasificacion.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveClasificacion"));
|
||||
DdlTipoGasto.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("CveTipoGasto"));
|
||||
DdlCtaContable.SelectedValueExist(ObjNomina.DtResultados.FiltroPrimeroValor("IdCtaContable"));
|
||||
DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]);
|
||||
DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]);
|
||||
DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]);
|
||||
}
|
||||
ObjNomina.Dispose();
|
||||
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
TxtCodigo.Text = "";
|
||||
TxtConcepto.Text = "";
|
||||
@@ -427,13 +440,20 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
tree_Tables();
|
||||
string tipo = "Total";
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
tipo = "Importe";
|
||||
TxtFormula.Text = TxtFormulaImporte.Text;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
tipo = "Total";
|
||||
TxtFormula.Text = TxtFormulaTotal.Text;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
tipo = "Gravada";
|
||||
TxtFormula.Text = TxtFormulaGravada.Text;
|
||||
}
|
||||
LtlTituloFormula.Text = $"Actualizar Formula {tipo}";
|
||||
RegistraScript("$('#ModalDivFormula').modal()");
|
||||
@@ -442,6 +462,50 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
|
||||
protected void BtnUpFormula_Click(object sender, EventArgs e)
|
||||
{
|
||||
int TipoFormula = 0;
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
TipoFormula = 0;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
TipoFormula = 1;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
TipoFormula = 2;
|
||||
}
|
||||
string formula = TxtFormula.Text;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (TipoFormula == 0 && !ValidaFormula(formula).Equals(""))
|
||||
{
|
||||
Alert("Fórmula no válida. Favor de ingresar una correcta.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (objnom.UpdateConceptoFormula(CveConcepto, formula, TipoFormula))
|
||||
{
|
||||
|
||||
if (TabsFormulas.ActiveTab == tabFormulaImporte)
|
||||
{
|
||||
TxtFormulaImporte.Text = formula;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaTotal)
|
||||
{
|
||||
TxtFormulaTotal.Text = formula;
|
||||
}
|
||||
if (TabsFormulas.ActiveTab == tabFormulaGravada)
|
||||
{
|
||||
TxtFormulaGravada.Text = formula;
|
||||
}
|
||||
UpFormulas.Update();
|
||||
Alert("La formula se ha actualizado Correctamente");
|
||||
RegistraScript("$('#ModalDivFormula').modal('hide')");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,9 +236,12 @@ Partial Class Nomina_Nomina
|
||||
CargaFolios()
|
||||
LnkCorreos.Visible = False
|
||||
TxtFechaPago.Text = Now.ToShortDateString
|
||||
|
||||
DdlEjercicios.Items.Add(New ListItem(UsuarioActual.Empresa.EjercicioActual.ToString, UsuarioActual.Empresa.EjercicioActual.ToString))
|
||||
DdlEjercicios.Items.Add(New ListItem((UsuarioActual.Empresa.EjercicioActual - 1).ToString, (UsuarioActual.Empresa.EjercicioActual - 1).ToString))
|
||||
Dim EjercicioActual As Integer = UsuarioActual.Empresa.EjercicioActual
|
||||
If EjercicioActual = 0 Then
|
||||
EjercicioActual = DateTime.Now.Year
|
||||
End If
|
||||
DdlEjercicios.Items.Add(New ListItem(EjercicioActual.ToString(), EjercicioActual.ToString()))
|
||||
DdlEjercicios.Items.Add(New ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString()))
|
||||
|
||||
'Verifica Permisos de Autorizar
|
||||
If UsuarioActual.TienePermisoProceso(82) Then PermisoAutorizar = True Else PermisoAutorizar = False
|
||||
|
||||
@@ -134,25 +134,326 @@
|
||||
</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"
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Turno,SubProyecto" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None"
|
||||
data-rows="2">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField>
|
||||
<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>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="350px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -116,6 +116,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
private void cargaEjercicios()
|
||||
{
|
||||
int EjercicioActual = UsuarioActual.Empresa.EjercicioActual;
|
||||
if (EjercicioActual == 0)
|
||||
{
|
||||
EjercicioActual = DateTime.Now.Year;
|
||||
}
|
||||
DataTable dtejercicio = null;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
@@ -232,34 +236,241 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
string ctipo = "P";
|
||||
/*
|
||||
while (GvNominas.Columns.Count > 3)
|
||||
{
|
||||
GvNominas.Columns.RemoveAt(2);
|
||||
}
|
||||
//GvNominas.Columns.sa();
|
||||
}*/
|
||||
|
||||
int CurrentColumn = GvNominas.Columns.Count - 1;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows)
|
||||
int CurrentColumn = 2;
|
||||
BoundField bf;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Tipo = row["Tipo"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
CurrentColumn++;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
|
||||
if (Tipo != ctipo)
|
||||
field.HeaderText = "Percepciones";
|
||||
field.DataField = "SumaPercepciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
bf.HeaderText = Concepto;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
|
||||
field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Total";
|
||||
field.DataField = "Total";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ").Rows)
|
||||
{
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
GvNominas.Columns[CurrentColumn].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
bf = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
bf.DataField = string.Format("V_{0}", CveConcepto);
|
||||
CurrentColumn++;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
|
||||
field.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns[CurrentColumn].Visible = true;
|
||||
CurrentColumn++;
|
||||
}
|
||||
for (int i = CurrentColumn; i < 102; i++)
|
||||
{
|
||||
bf = (BoundField)GvNominas.Columns[i];
|
||||
bf.DataField = "";
|
||||
bf.HeaderText = "";
|
||||
GvNominas.Columns[i].ItemStyle.BackColor = System.Drawing.Color.Transparent;
|
||||
GvNominas.Columns[i].Visible = false;
|
||||
|
||||
}
|
||||
if (false)
|
||||
{
|
||||
bool sumaPercepciones = false;
|
||||
bool sumaDeducciones = false;
|
||||
if (GvNominas.Columns.Count > 3)
|
||||
{
|
||||
if (ctipo == "P")
|
||||
|
||||
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")
|
||||
{
|
||||
CurrentColumn++;
|
||||
if (Tipo != "D")
|
||||
{
|
||||
CurrentColumn++;
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
CurrentColumn++;
|
||||
CurrentColumn++;
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
CurrentColumn++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
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);
|
||||
sumaPercepciones = true;
|
||||
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);
|
||||
sumaDeducciones = true;
|
||||
}
|
||||
}
|
||||
else if (ctipo == "D")
|
||||
{
|
||||
|
||||
BoundField field = new BoundField();
|
||||
if (!sumaPercepciones)
|
||||
{
|
||||
|
||||
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);
|
||||
field = new BoundField();
|
||||
sumaPercepciones = true;
|
||||
}
|
||||
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);
|
||||
sumaDeducciones = true;
|
||||
}
|
||||
ctipo = Tipo;
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
BoundField field = new BoundField();
|
||||
field.Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
field.HeaderText = Concepto;
|
||||
field.DataField = string.Format("V_{0}", CveConcepto);
|
||||
field.DataFormatString = "{0:N2}";
|
||||
field.ItemStyle.Width = Unit.Pixel(80);
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
|
||||
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")
|
||||
if (!sumaPercepciones)
|
||||
{
|
||||
|
||||
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);
|
||||
field = new BoundField();
|
||||
sumaPercepciones = true;
|
||||
}
|
||||
if (!sumaDeducciones)
|
||||
{
|
||||
field.HeaderText = "Deducciones";
|
||||
field.DataField = "SumaDeducciones";
|
||||
field.DataFormatString = "{0:N2}";
|
||||
@@ -267,6 +478,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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";
|
||||
@@ -275,52 +487,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
field.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
||||
field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
|
||||
GvNominas.Columns.Insert(CurrentColumn++, field);
|
||||
sumaDeducciones = true;
|
||||
field = new BoundField();
|
||||
}
|
||||
}
|
||||
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.HeaderText = "Obligaciones";
|
||||
field.DataField = "SumaObligaciones";
|
||||
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();
|
||||
}
|
||||
@@ -345,10 +526,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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();
|
||||
string SeTimbro = e.Row.DataKey("SeTimbro").ToString();
|
||||
string Nombre = e.Row.DataKey("Nombre").ToString();
|
||||
string Turno = e.Row.DataKey("Turno").ToString();
|
||||
string SubProyecto = e.Row.DataKey("SubProyecto").ToString();
|
||||
LnkTimbrar.Visible = false;
|
||||
if (cvePersonal > 0)
|
||||
{
|
||||
@@ -384,7 +565,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
//e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -504,7 +685,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
{
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
foreach (DataRow row in DTEXcel.Rows)
|
||||
@@ -561,11 +742,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Importe = row[CveConcepto.ToString()].ToString().ToDecimal();
|
||||
try
|
||||
{
|
||||
ImporteExento = row[string.Format("E{0}",CveConcepto)].ToString().ToDecimal();
|
||||
ImporteExento = row[string.Format("E{0}", CveConcepto)].ToString().ToDecimal();
|
||||
}
|
||||
catch (Exception) { }
|
||||
catch (Exception) { }
|
||||
ImporteGravado = Importe - ImporteExento;
|
||||
objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento,UsuarioActual.CveUsuario);
|
||||
objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user