This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-11-15 14:18:13 -07:00
parent 49ab1578e1
commit 919a647455
13 changed files with 848 additions and 90 deletions

View File

@@ -4,11 +4,11 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVCalculosSBC tr th:nth-child(n+8):not(:nth-child(n+12)) {
.GVCalculosSBC tr th:nth-child(n+8):not(:nth-child(n+13)) {
background-color: #a9a9e8 !important;
}
.GVCalculosSBC tr th:nth-child(n+12):not(:nth-child(n+15)) {
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
background-color: #88d6cd !important;
}
</style>
@@ -23,7 +23,9 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkUpSuamodal" OnClick="LnkUpSuamodal_Click" runat="server"><i class="fa fa-check"></i> Cargar archivo SUA</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkDescargar" OnClick="LnkDescargar_Click" runat="server"><i class="fa fa-ad-excel"></i> Descargar</asp:LinkButton>
</li>
<li>
@@ -32,7 +34,7 @@
<li>
<asp:LinkButton ID="Lnkmostrararchivos" OnClick="Lnkmostrararchivos_Click" runat="server"><i class="fa fa-save"></i> Mostrar archivos</asp:LinkButton>
</li>
<li style="display: none">
<li>
<asp:LinkButton ID="LnkDownArchivosSua" OnClick="LnkDownArchivosSua_Click" runat="server"><i class="fa fa-download"></i> Descargar Archivos IDSE</asp:LinkButton>
</li>
</ContentTemplate>
@@ -55,7 +57,7 @@
<div class="titlefiltros caption">
<div class="row">
<asp:Label ID="Label1" runat="server" CssClass="col-md-1 ">Tipo :</asp:Label>
<div class="col-md-3" id="Div1" runat="server">
<div class="col-md-2" id="Div1" runat="server">
<asp:DropDownList ID="DdlTipo" runat="server" CssClass="form-control select2me">
<asp:ListItem Value="1" Text="Cambio en salario variable" Selected="True"></asp:ListItem>
<asp:ListItem Value="2" Text="modificación de salario"></asp:ListItem>
@@ -63,7 +65,7 @@
</div>
<asp:Label ID="LblFechaPago" runat="server" CssClass="col-md-1 ">Fecha :</asp:Label>
<div class="col-md-3" id="DivFechaPago" runat="server">
<div class="col-md-2" id="DivFechaPago" runat="server">
<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" Text="01/03/2021" CssClass="form-control" CausesValidation="true" Width="90%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
@@ -77,7 +79,14 @@
<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 class="col-md-4">
<asp:Label runat="server" AssociatedControlID="DdlRegistroPatronal" Text="Registro Patronal:" CssClass="col-md-1 "></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlRegistroPatronal" runat="server" Width="100%" DataTextField="RegistroPatronal" CssClass="form-control input-sm select2me" DataValueField="CveRegistroPatronal" AppendDataBoundItems="true">
<asp:ListItem Value="-1" Text="Todas"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-2">
<asp:LinkButton ID="LnkCalcular" OnClick="LnkCalcular_Click" runat="server" Text="Calcular" Visible="true" class="btn btn-primary" />
</div>
</div>
@@ -86,18 +95,23 @@
</div>
</div>
</div>
<div style="float: right;">
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaV2('.TxtBusqueda','.GVBuscaddor')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
<a href="javascript:;" onclick="FiltrarTablaV2('.TxtBusqueda','.GVCalculosSBC')" 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>
<ajax:TabContainer ID="Tab" runat="server" Width="100%">
<ajax:TabPanel ID="TabSBC" runat="server" HeaderText="Salario base cotización">
<ContentTemplate>
<table id="tableheader" style="display: none">
<tr>
<th colspan="7"></th>
<th colspan="4" style="background-color: #a9a9e8 !important;">Actual</th>
<th colspan="5" style="background-color: #a9a9e8 !important;">Actual</th>
<th colspan="3" style="background-color: #88d6cd !important;">Nuevo</th>
<th></th>
<%--<th></th>--%>
</tr>
</table>
<asp:GridView ID="GVCalculosSBC" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalculosSBC" AutoGenerateColumns="False" data-tableheader="#tableheader"
<asp:GridView ID="GVCalculosSBC" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalculosSBC GVBuscaddor" AutoGenerateColumns="False" data-tableheader="#tableheader"
DataKeyNames="CvePersonal,Codigo,Nombre,FechaInicio,Antiguedad,Incapacitado,NumeroSS,CveTipodeSalario,TipodeSalario,SalarioDiario,SDINuevo,SalarioVariableNuevo,SalarioDiarioSSNuevo,SDI,SalarioVariable,SalarioDiarioSS,PorPrimaVacacional,NumDiasAguinaldo,Acumulado,diasBimestre,Faltas,Incapaciadad,diaslaborados,Movtotxt,RegistroPatronal">
<Columns>
<asp:TemplateField HeaderText="Código">
@@ -112,13 +126,13 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Sucursal">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("SubProyecto")%>'> </asp:Label>
<asp:Label runat="server" Text='<%# Eval("SubProyecto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Registro Patronal">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RegistroPatronal")%>'> </asp:Label>
<asp:Label runat="server" Text='<%# Eval("RegistroPatronal")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -179,6 +193,15 @@
<asp:Label ID="lblsalarioDiarioSS" runat="server" Text='<%# Eval("SalarioDiarioSS","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Salario
<br />SUA
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblSalarioSUA" runat="server" Text='<%# Eval("SalarioSUA","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
@@ -186,7 +209,7 @@
integrado
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblsDI" runat="server" Text='<%# Eval("SDINuevo","{0:N2}")%>'> </asp:Label>
<asp:Label ID="lblsDIn" runat="server" Text='<%# Eval("SDINuevo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
@@ -196,7 +219,7 @@
variable
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblsalarioVariable" runat="server" Text='<%# Eval("SalarioVariableNuevo","{0:N2}")%>'> </asp:Label>
<asp:Label ID="lblsalarioVariablev" runat="server" Text='<%# Eval("SalarioVariableNuevo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
@@ -206,7 +229,7 @@
cotización
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblsalarioDiarioSS" runat="server" Text='<%# Eval("SalarioDiarioSSNuevo","{0:N2}")%>'> </asp:Label>
<asp:Label ID="lblsalarioDiarioSSs" runat="server" Text='<%# Eval("SalarioDiarioSSNuevo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="center">
@@ -214,7 +237,15 @@
Modificación
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblsalarioDiarioSS" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>
<asp:Label ID="lblsalarioDiarioSSf" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="center" Visible="false">
<ItemTemplate>
<div style="width: 50px;">
<asp:CheckBox runat="server" ID="chkCon" />
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -224,7 +255,7 @@
<ajax:TabPanel ID="TabParteFija" runat="server" HeaderText="Parte fija">
<ContentTemplate>
<asp:GridView ID="GVCFija" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
<asp:GridView ID="GVCFija" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor" AutoGenerateColumns="False" HeaderStyle-CssClass="ADtr"
DataKeyNames="CvePersonal,Codigo,Nombre,FechaInicio,Antiguedad,Incapacitado,NumeroSS,CveTipodeSalario,TipodeSalario,SalarioDiario,SDI,SalarioVariable,SalarioDiarioSS,PorPrimaVacacional,NumDiasAguinaldo,Acumulado,diasBimestre,Faltas,Incapaciadad,diaslaborados">
<Columns>
<asp:TemplateField HeaderText="Código">
@@ -331,7 +362,7 @@
<ajax:TabPanel ID="TabParteVariable" runat="server" HeaderText="Parte variable">
<ContentTemplate>
<asp:GridView ID="GVPV" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
<asp:GridView ID="GVPV" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor" AutoGenerateColumns="False" HeaderStyle-CssClass="ADtr"
DataKeyNames="CvePersonal,Codigo,Nombre,FechaInicio,Antiguedad,Incapacitado,NumeroSS,CveTipodeSalario,TipodeSalario,SalarioDiario,SDI,SalarioVariable,SalarioDiarioSS,PorPrimaVacacional,NumDiasAguinaldo,Acumulado,diasBimestre,Faltas,Incapaciadad,diaslaborados">
<Columns>
<asp:TemplateField HeaderText="Código">
@@ -344,9 +375,10 @@
<asp:Label ID="lblnombre" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
<asp:TemplateField>
<HeaderTemplate>
Fecha alta <br />
Fecha alta
<br />
o reingreso
</HeaderTemplate>
<ItemTemplate>
@@ -373,18 +405,20 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Percepciones <br />
Percepciones
<br />
variables
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblacumulado" runat="server" Text='<%# Eval("Acumulado","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
<asp:TemplateField>
<HeaderTemplate>
Días <br />
Días
<br />
incapacidad
</HeaderTemplate>
<ItemTemplate>
@@ -417,7 +451,7 @@
</ajax:TabPanel>
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
<ContentTemplate>
<asp:GridView ID="GVDetalleParteVariable" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall"></asp:GridView>
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
@@ -580,7 +614,223 @@
</div>
</div>
<div id="DmodalCompareSua" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpArchivoSua" 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">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Procesar Archivo SUA</h4>
</div>
<div class="modal-body">
<div class="portlet light smmallpadding bordered" id="cargaarchivoprocesasua">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-download font-green"></i>
<span class="caption-subject bold uppercase">Cargar Archivo</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body rowpadding">
<asp:TextBox ID="TxtArchivoSua" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
<div class="text-center">
</div>
</div>
</div>
<div class="portlet light smmallpadding bordered" id="resultadoprocesasua" style="display: none">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-download font-green"></i>
<span class="caption-subject bold uppercase">Paso 2:Resultado (Periodo :
<asp:Literal ID="LtlPeriodo" runat="server"></asp:Literal>)</span>
</div>
<div class="tools">
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkDownExcelSua" OnClick="LnkDownExcelSua_Click" CssClass="btn btn-default" runat="server"><i class="fa fa-ad-excel"></i>Descargar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body rowpadding " style="display: none;">
<div style="width: 1200px; min-height: 340px;">
<table id="headerProcesaSUAxd" style="display: none">
<tr>
<th colspan="5"></th>
<th colspan="10">Obrera</th>
<th colspan="10">Patronal</th>
</tr>
<tr>
<th></th>
<th colspan="2">Salario</th>
<th colspan="2">Días</th>
<th colspan="2">Cuota Excedente</th>
<th colspan="2">Prestaciones en Dinero</th>
<th colspan="2">Gastos Medicos</th>
<th colspan="2">Invalidez y Vida</th>
<th colspan="2">Cesantia y Vejez</th>
<th colspan="2">Cuota Fija</th>
<th colspan="2">Riesgos de Trabajo</th>
<th colspan="2">Guarderia</th>
<th colspan="2">Retiro</th>
<th colspan="2">Cesantia y Vejez</th>
</tr>
</table>
<asp:GridView ID="GVProcesarSUA" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD" AutoGenerateColumns="False"
OnRowDataBound="GVProcesarSUA_RowDataBound" data-height="300" data-tableheader="#headerProcesaSUAxd"
DataKeyNames="CvePersonal,CodigoNombreCompleto,CuotaFijaSUA,CuotaFijaSIG,CuotaExcedenteSUA,CuotaExcedenteSIG,PrestacionesDineroSUA,PrestacionesSIG,GastosMedPenSUA,GastosMedicosSIG,RiesgosdeTrabajoSUA,RiesgoTrabajoSIG,InvalidezyVidaSUA,InvalidezyVidaSIG,GuarderiaSUA,GuarderiaSIG,RetiroSUA,RetiroSIG,SalarioSUA,SalarioSIG,CesantiayVejezObreraSUA,CesantiayVejezObreraSIG,CesantiayVejezPatronalSUA,CesantiayVejezPatronalSIG">
<Columns>
<asp:TemplateField HeaderText="Nombre">
<ItemTemplate>
<asp:Label ID="lblcodigoNombreCompleto" runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("SalarioSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("SalarioSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("DiasMes","{0:N0}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("DiasAsistio","{0:N0}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CuotaExcedenteSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CuotaExcedenteSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("PrestacionesDineroSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("PrestacionesSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("GastosMedPenSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("GastosMedicosSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("InvalidezyVidaSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("InvalidezyVidaSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezObreraSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezObreraSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CuotaFijaSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CuotaFijaSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RiesgosdeTrabajoSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RiesgoTrabajoSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("GuarderiaSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("GuarderiaSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RetiroSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RetiroSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SUA">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezPatronalSUA","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("CesantiayVejezPatronalSIG","{0:N2}")%>'> </asp:Label></td>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkUpSuaFile" OnClick="LnkUpSuaFile_Click" CssClass="btn btn-primary" runat="server"> Procesar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDownExcelSua" />
</Triggers>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
@@ -600,6 +850,32 @@
document.body.removeChild(elem);
}
}
function showResult() {
/*
setTimeout(function () {
let collapse = $('#cargaarchivoprocesasua .expand');
let body = $('#cargaarchivoprocesasua .portlet-body');
if (collapse && collapse.length > 0) {
collapse.removeClass('collapse');
collapse.addClass('expand');
}
if (body && body.length > 0) {
body.css('display', 'none');
}
collapse = $('#resultadoprocesasua .collapse');
body = $('#resultadoprocesasua .portlet-body');
if (collapse && collapse.length > 0) {
collapse.addClass('collapse');
collapse.removeClass('expand');
}
if (body && body.length > 0) {
body.css('display', '');
}
setTimeout(function () { loadadscroll(); }, 50);
}, 400);*/
}
</script>
</asp:Content>

View File

@@ -2,6 +2,7 @@
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;
@@ -23,6 +24,17 @@ public partial class RH_CalculoSBC : ClsPaginas
if (!IsPostBack)
{
TxtFechaPago.Text = String.Format("{0:01/MM/yyyy}", DateTime.Now);
ClsRH ObjRH = new ClsRH();
if (ObjRH.GetRegistrosPatronales(-1, UsuarioActual.CveEmpresa, 1))
DdlRegistroPatronal.DataSource = ObjRH.DtResultados;
else
DdlRegistroPatronal.DataSource = null;
DdlRegistroPatronal.DataBind();
ObjRH.Dispose();
//string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos);
//Alert(rutarchivos);
//ADSNetLibrary.SIGAPI.Services.Agropecuaria.IAgropecuariaService servicioAgro = new ADSNetLibrary.SIGAPI.Services.Agropecuaria.AgropecuariaService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
@@ -34,11 +46,157 @@ public partial class RH_CalculoSBC : ClsPaginas
}
}
protected void LnkDownExcelSua_Click(object sender, EventArgs e)
{
}
protected void LnkUpSuamodal_Click(object sender, EventArgs e)
{
TxtArchivoSua.Text = "";
GVProcesarSUA.DataSource = null;
GVProcesarSUA.DataBind();
RegistraScript("$('#DmodalCompareSua').modal();shownew();");
UpArchivoSua.Update();
}
protected void LnkUpSuaFile_Click(object sender, EventArgs e)
{
string fileurl = "";
GVProcesarSUA.DataSource = null;
Files archivos = TxtArchivoSua.getfiles();
if (archivos.Archivos.Count > 0)
{
fileurl = archivos.Archivos[0].FileUrl;
string SuaFiletext = System.IO.File.ReadAllText(fileurl, Encoding.GetEncoding("iso-8859-1"));
using (ClsNominas ObjPersonal = new ClsNominas())
{
if (ObjPersonal.ProcesarSUA(SuaFiletext, UsuarioActual.CveEmpresa))
{
if (ObjPersonal.DTSetResultados.Tables.Count > 4)
{
DateTime dateperiodo;
DateTime.TryParseExact(string.Format("{0}01", ObjPersonal.DTSetResultados.Tables[1].Rows[0]["Periodo"]), "yyyyMMdd", new System.Globalization.CultureInfo("es-MX"), System.Globalization.DateTimeStyles.None, out dateperiodo);
LtlPeriodo.Text = dateperiodo.Date.ToString("MMMM yyyy", new System.Globalization.CultureInfo("es-MX"));
//DtSuaProcesado = ObjPersonal.DTSetResultados.Tables[3];
GVProcesarSUA.DataSource = ObjPersonal.DTSetResultados.Tables[3];
}
}
}
}
GVProcesarSUA.DataBind();
TxtArchivoSua.Text = "";
//RegistraScript("showResult();");
RegistraScript("$('#DmodalCompareSua').modal('hide');shownew();");
Alert("El archivo se a procesado Correctamente");
LnkCalcular_Click(null,null);
UpArchivoSua.Update();
}
protected void GVProcesarSUA_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
e.Row.CssClass = "Totales";
}
string SalarioSUA = string.Format("{0:N2}", e.Row.DataKey("SalarioSUA").ToDecimal());
string SalarioSIG = string.Format("{0:N2}", e.Row.DataKey("SalarioSIG").ToDecimal());
int celda = 1;
if (Math.Abs(SalarioSUA.ToDecimal() - SalarioSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 4;
string CuotaExcedenteSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaExcedenteSUA").ToDecimal());
string CuotaExcedenteSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaExcedenteSIG").ToDecimal());
if (Math.Abs(CuotaExcedenteSUA.ToDecimal() - CuotaExcedenteSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string PrestacionesDineroSUA = string.Format("{0:N2}", e.Row.DataKey("PrestacionesDineroSUA").ToDecimal());
string PrestacionesSIG = string.Format("{0:N2}", e.Row.DataKey("PrestacionesSIG").ToDecimal());
if (Math.Abs(PrestacionesDineroSUA.ToDecimal() - PrestacionesSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string GastosMedPenSUA = string.Format("{0:N2}", e.Row.DataKey("GastosMedPenSUA").ToDecimal());
string GastosMedicosSIG = string.Format("{0:N2}", e.Row.DataKey("GastosMedicosSIG").ToDecimal());
if (Math.Abs(GastosMedPenSUA.ToDecimal() - GastosMedicosSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string InvalidezyVidaSUA = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSUA").ToDecimal());
string InvalidezyVidaSIG = string.Format("{0:N2}", e.Row.DataKey("InvalidezyVidaSIG").ToDecimal());
if (Math.Abs(InvalidezyVidaSUA.ToDecimal() - InvalidezyVidaSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string CesantiayVejezObreraSUA = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezObreraSUA").ToDecimal());
string CesantiayVejezObreraSIG = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezObreraSIG").ToDecimal());
if (Math.Abs(CesantiayVejezObreraSUA.ToDecimal() - CesantiayVejezObreraSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string CuotaFijaSUA = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSUA").ToDecimal());
string CuotaFijaSIG = string.Format("{0:N2}", e.Row.DataKey("CuotaFijaSIG").ToDecimal());
if (Math.Abs(CuotaFijaSUA.ToDecimal() - CuotaFijaSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string RiesgosdeTrabajoSUA = string.Format("{0:N2}", e.Row.DataKey("RiesgosdeTrabajoSUA").ToDecimal());
string RiesgoTrabajoSIG = string.Format("{0:N2}", e.Row.DataKey("RiesgoTrabajoSIG").ToDecimal());
if (Math.Abs(RiesgosdeTrabajoSUA.ToDecimal() - RiesgoTrabajoSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string GuarderiaSUA = string.Format("{0:N2}", e.Row.DataKey("GuarderiaSUA").ToDecimal());
string GuarderiaSIG = string.Format("{0:N2}", e.Row.DataKey("GuarderiaSIG").ToDecimal());
if (Math.Abs(GuarderiaSUA.ToDecimal() - GuarderiaSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string RetiroSUA = string.Format("{0:N2}", e.Row.DataKey("RetiroSUA").ToDecimal());
string RetiroSIG = string.Format("{0:N2}", e.Row.DataKey("RetiroSIG").ToDecimal());
if (Math.Abs(RetiroSUA.ToDecimal() - RetiroSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
celda = celda + 2;
string CesantiayVejezPatronalSUA = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezPatronalSUA").ToDecimal());
string CesantiayVejezPatronalSIG = string.Format("{0:N2}", e.Row.DataKey("CesantiayVejezPatronalSIG").ToDecimal());
if (Math.Abs(CesantiayVejezPatronalSUA.ToDecimal() - CesantiayVejezPatronalSIG.ToDecimal()) > 1)
{
e.Row.Cells[celda].CssClass = "cellFail";
e.Row.Cells[celda + 1].CssClass = "cellFail";
}
}
}
protected void LnkCalcular_Click(object sender, EventArgs e)
{
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero(), TxtFechaPago.Text))
if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero(), TxtFechaPago.Text,DdlRegistroPatronal.SelectedValue.ToEntero()))
{
GVCalculosSBC.DataSource = objnom.DTSetResultados.Tables[0];
GVCFija.DataSource = objnom.DTSetResultados.Tables[0];
@@ -92,7 +250,7 @@ public partial class RH_CalculoSBC : ClsPaginas
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(), 2);
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
string RegistroPatronal = item.DataKey("RegistroPatronal");
if(oldRegistroPatronal != "-1" && oldRegistroPatronal != RegistroPatronal)
if(oldRegistroPatronal != "-1" && oldRegistroPatronal != RegistroPatronal )
{
MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater,
$"************* 00{(contador < 1000 ? "0" : "")}{(contador < 100 ? "0" : "")}{(contador < 10 ? "0" : "")}{contador} 00001 9");
@@ -103,7 +261,7 @@ public partial class RH_CalculoSBC : ClsPaginas
concater = "";
contador = 0;
}
if (SalarioDiarioSSNuevo != SalarioDiarioSS)
if (SalarioDiarioSSNuevo != SalarioDiarioSS || item.FCCheckBox("chkCon").Checked)
{
MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item.DataKey("Movtotxt"));
concater = "\\r\\n";
@@ -249,18 +407,18 @@ public partial class RH_CalculoSBC : ClsPaginas
//libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}";
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
libro.Range(5, 8, 5, 11).Merge().Value = "Actual";
libro.Range(5, 12, 5, 14).Merge().Value = "Nuevo";
libro.Range(5, 8, 5, 12).Merge().Value = "Actual";
libro.Range(5, 13, 5, 15).Merge().Value = "Nuevo";
libro.Range(5, 1, 6, 14).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(5, 1, 6, 13).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Range(5, 1, 5, 13).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.None;
libro.Range(5, 1, 6, 16).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Range(5, 1, 5, 16).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.None;
libro.Range(5, 8, 6, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 100, 162));
libro.Range(5, 8, 6, 11).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(5, 12, 6, 14).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(136, 214, 205));
libro.Range(5, 12, 6, 14).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(5, 8, 6, 12).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(128, 100, 162));
libro.Range(5, 8, 6, 12).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(5, 13, 6, 15).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(136, 214, 205));
libro.Range(5, 13, 6, 15).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(7, 8, 7 + dt.Rows.Count, 12).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;

View File

@@ -316,10 +316,6 @@
<asp:RegularExpressionValidator ID="REVCorreo" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="help-block errorimput" ControlToValidate="TxtCorreo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo - Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMailrecibonomina" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtMailrecibonomina" Text="Mail recibo nómina:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright" style="display: none">