Reporte Asistencias Checador 2024.04.17
This commit is contained in:
@@ -6284,7 +6284,7 @@ Partial Class Compras_Compras
|
|||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.Empresa.UsaInventarios
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.Empresa.UsaInventarios
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then AgregaMercanciaInventario = False
|
If UsuarioActual.CveEmpresa.Contiene(13, 83, 7, 11, 12, 122) Then AgregaMercanciaInventario = False
|
||||||
|
|
||||||
Dim RegistraConcepto225 As Boolean = AgregaMercanciaInventario AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV")
|
Dim RegistraConcepto225 As Boolean = AgregaMercanciaInventario AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV")
|
||||||
|
|
||||||
@@ -6813,7 +6813,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim tTipoMovimiento As Boolean = TipoMovimiento
|
Dim tTipoMovimiento As Boolean = TipoMovimiento
|
||||||
If DTDistinct.Rows.Count > 0 AndAlso Not UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
|
If DTDistinct.Rows.Count > 0 Then
|
||||||
For Each Row2 As DataRow In DTDistinct.Rows
|
For Each Row2 As DataRow In DTDistinct.Rows
|
||||||
tTipoMovimiento = TipoMovimiento
|
tTipoMovimiento = TipoMovimiento
|
||||||
'DETERMINA IMPORTE
|
'DETERMINA IMPORTE
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
}
|
}
|
||||||
using (ClsRH objRH = new ClsRH())
|
using (ClsRH objRH = new ClsRH())
|
||||||
{
|
{
|
||||||
if (objRH.PreAsistenciaRegistrosGet(fechai, fechaf, -1, UsuarioActual.Empresa.CveEmpresa))
|
if (objRH.PreAsistenciaRegistrosGet(fechai, fechaf, -1, UsuarioActual.Empresa.CveEmpresa,false))
|
||||||
{
|
{
|
||||||
GvDetalleDias.DataSource = objRH.DtResultados.FiltraParametros(string.Format("FechaRegistro >='{0:yyyy/MM/dd HH:mm}' AND FechaRegistro <='{1:yyyy/MM/dd HH:mm}' AND CvePersonal = {2}", fechai.AddHours(6), fechaf.AddHours(6), CvePersonal), "FechaRegistro");
|
GvDetalleDias.DataSource = objRH.DtResultados.FiltraParametros(string.Format("FechaRegistro >='{0:yyyy/MM/dd HH:mm}' AND FechaRegistro <='{1:yyyy/MM/dd HH:mm}' AND CvePersonal = {2}", fechai.AddHours(6), fechaf.AddHours(6), CvePersonal), "FechaRegistro");
|
||||||
GvDetalleDias.DataBind();
|
GvDetalleDias.DataBind();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepChecadorPreAsistencia.aspx.vb" Inherits="RH_RepChecadorPreAsistencia" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepChecadorPreAsistencia.aspx.vb" Inherits="RH_RepChecadorPreAsistencia" EnableEventValidation="false" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -22,14 +22,21 @@
|
|||||||
<asp:LinkButton runat="server" ID="BtnAgregar" Visible="false" data-toggle="tooltip" data-placement="left" title="Procesar" Text="<i class='fa fa-plus'></i> Procesar"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="BtnAgregar" Visible="false" data-toggle="tooltip" data-placement="left" title="Procesar" Text="<i class='fa fa-plus'></i> Procesar"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkEnviarAsistencia" Visible="false" data-toggle="tooltip" data-placement="left" title="Enviar Asistencia" Text="<i class='fa fa-arrow-right'></i> Enviar Asistencia"
|
<asp:LinkButton runat="server" ID="LnkDescargaExcel" Visible="false" data-toggle="tooltip" data-placement="left" title="Excel" Text="<i class='fa fa-file-excel-o'></i> Excel"
|
||||||
OnClick="LnkEnviarAsistencia_Click"></asp:LinkButton>
|
OnClick="LnkDescargaExcel_Click"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkCargaMasiva" Visible="false" data-toggle="tooltip" data-placement="left" title="Carga Masiva" Text="<i class='fa fa-calendar-plus-o'></i> Carga Masiva"
|
<asp:LinkButton runat="server" ID="LnkCargaMasiva" Visible="false" data-toggle="tooltip" data-placement="left" title="Carga Masiva" Text="<i class='fa fa-calendar-plus-o'></i> Carga Masiva"
|
||||||
OnClick="LnkCargaMasiva_Click"></asp:LinkButton>
|
OnClick="LnkCargaMasiva_Click"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkEnviarAsistencia" Visible="false" data-toggle="tooltip" data-placement="left" title="Enviar Asistencia" Text="<i class='fa fa-arrow-right'></i> Enviar Asistencia"
|
||||||
|
OnClick="LnkEnviarAsistencia_Click"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkDescargaExcel"/>
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
@@ -217,12 +224,22 @@
|
|||||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||||
|
<HeaderTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2" style="margin-top:-3px!important">
|
||||||
|
<asp:CheckBox runat="server" ID="Chk" Visible="false" ClientIDMode="Static" onclick="FnSeleccion(this)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8" style="margin-top:-5px!important">
|
||||||
|
Código
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" style="margin-top:-5px!important">
|
<div class="col-md-2" style="margin-top:-3px!important">
|
||||||
<asp:CheckBox runat="server" ID="Chk" Visible="false" />
|
<asp:CheckBox runat="server" ID="Chk" Visible="false" CssClass="CssChkSel" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6" style="margin-top:-5px!important">
|
<div class="col-md-8" >
|
||||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -245,157 +262,157 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha1" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Fecha1" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha1" runat="server" Width="50" Text='<%# Eval("Fecha1") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha1" runat="server" Width="50" Text='<%# Eval("Fecha1") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha2" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha2" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha2" runat="server" Width="50" Text='<%# Eval("Fecha2") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha2" runat="server" Width="50" Text='<%# Eval("Fecha2") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha3" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha3" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha3" runat="server" Width="50" Text='<%# Eval("Fecha3") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha3" runat="server" Width="50" Text='<%# Eval("Fecha3") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha4" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha4" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha4" runat="server" Width="50" Text='<%# Eval("Fecha4") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha4" runat="server" Width="50" Text='<%# Eval("Fecha4") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha5" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha5" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha5" runat="server" Width="50" Text='<%# Eval("Fecha5") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha5" runat="server" Width="50" Text='<%# Eval("Fecha5") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha6" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha6" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha6" runat="server" Width="50" Text='<%# Eval("Fecha6") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha6" runat="server" Width="50" Text='<%# Eval("Fecha6") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha7" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha7" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha7" runat="server" Width="50" Text='<%# Eval("Fecha7") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha7" runat="server" Width="50" Text='<%# Eval("Fecha7") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha8" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha8" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha8" runat="server" Width="50" Text='<%# Eval("Fecha8") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha8" runat="server" Width="50" Text='<%# Eval("Fecha8") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha9" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha9" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha9" runat="server" Width="50" Text='<%# Eval("Fecha9") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha9" runat="server" Width="50" Text='<%# Eval("Fecha9") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha10" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha10" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha10" runat="server" Width="50" Text='<%# Eval("Fecha10") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha10" runat="server" Width="50" Text='<%# Eval("Fecha10") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha11" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha11" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha11" runat="server" Width="50" Text='<%# Eval("Fecha11") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha11" runat="server" Width="50" Text='<%# Eval("Fecha11") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha12" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha12" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha12" runat="server" Width="50" Text='<%# Eval("Fecha12") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha12" runat="server" Width="50" Text='<%# Eval("Fecha12") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha13" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha13" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha13" runat="server" Width="50" Text='<%# Eval("Fecha13") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha13" runat="server" Width="50" Text='<%# Eval("Fecha13") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha14" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha14" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha14" runat="server" Width="50" Text='<%# Eval("Fecha14") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha14" runat="server" Width="50" Text='<%# Eval("Fecha14") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha15" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha15" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha15" runat="server" Width="50" Text='<%# Eval("Fecha15") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha15" runat="server" Width="50" Text='<%# Eval("Fecha15") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha16" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha16" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha16" runat="server" Width="50" Text='<%# Eval("Fecha16") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha16" runat="server" Width="50" Text='<%# Eval("Fecha16") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha17" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha17" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha17" runat="server" Width="50" Text='<%# Eval("Fecha17") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha17" runat="server" Width="50" Text='<%# Eval("Fecha17") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha18" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha18" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha18" runat="server" Width="50" Text='<%# Eval("Fecha18") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha18" runat="server" Width="50" Text='<%# Eval("Fecha18") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha19" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha19" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha19" runat="server" Width="50" Text='<%# Eval("Fecha19") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha19" runat="server" Width="50" Text='<%# Eval("Fecha19") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha20" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha20" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha20" runat="server" Width="50" Text='<%# Eval("Fecha20") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha20" runat="server" Width="50" Text='<%# Eval("Fecha20") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha21" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha21" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha21" runat="server" Width="50" Text='<%# Eval("Fecha21") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha21" runat="server" Width="50" Text='<%# Eval("Fecha21") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha22" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha22" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha22" runat="server" Width="50" Text='<%# Eval("Fecha22") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha22" runat="server" Width="50" Text='<%# Eval("Fecha22") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha23" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha23" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha23" runat="server" Width="50" Text='<%# Eval("Fecha23") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha23" runat="server" Width="50" Text='<%# Eval("Fecha23") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha24" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha24" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha24" runat="server" Width="50" Text='<%# Eval("Fecha24") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha24" runat="server" Width="50" Text='<%# Eval("Fecha24") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha25" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha25" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha25" runat="server" Width="50" Text='<%# Eval("Fecha25") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha25" runat="server" Width="50" Text='<%# Eval("Fecha25") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha26" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha26" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha26" runat="server" Width="50" Text='<%# Eval("Fecha26") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha26" runat="server" Width="50" Text='<%# Eval("Fecha26") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha27" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha27" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha27" runat="server" Width="50" Text='<%# Eval("Fecha27") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha27" runat="server" Width="50" Text='<%# Eval("Fecha27") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha28" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha28" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha28" runat="server" Width="50" Text='<%# Eval("Fecha28") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha28" runat="server" Width="50" Text='<%# Eval("Fecha28") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha29" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha29" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha29" runat="server" Width="50" Text='<%# Eval("Fecha29") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha29" runat="server" Width="50" Text='<%# Eval("Fecha29") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha30" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha30" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha30" runat="server" Width="50" Text='<%# Eval("Fecha30") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha30" runat="server" Width="50" Text='<%# Eval("Fecha30") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha31" ItemStyle-HorizontalAlign="Center" Visible="false">
|
<asp:TemplateField HeaderText="Fecha31" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkFecha31" runat="server" Width="50" Text='<%# Eval("Fecha31") %>'></asp:LinkButton>
|
<asp:LinkButton ID="LnkFecha31" runat="server" Width="50" Text='<%# Eval("Fecha31") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -564,5 +581,21 @@
|
|||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
function FnSeleccion(chk) {
|
||||||
|
|
||||||
|
var checkedStatus = chk.checked;
|
||||||
|
|
||||||
|
$('.CssChkSel input[type="checkbox"]').each(function () {
|
||||||
|
$(this).prop('checked', checkedStatus);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
|
|
||||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Runtime.Remoting
|
|
||||||
Imports System.ServiceModel.Security
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -196,7 +191,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
CargaCombos()
|
CargaCombos()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvBind()
|
' GvBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -540,12 +535,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||||
|
|
||||||
'Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto).AsEnumerable()
|
|
||||||
' Let Inicio = fila.Field(Of Date)("FechaInicio")
|
|
||||||
' Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
|
||||||
' Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
|
||||||
' Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
|
||||||
' Select fila
|
|
||||||
|
|
||||||
Dim FilCveDepartamento As Integer = DdlDepartamento.SelectedValue.ToEntero
|
Dim FilCveDepartamento As Integer = DdlDepartamento.SelectedValue.ToEntero
|
||||||
|
|
||||||
@@ -600,10 +590,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
DtVacaciones = objRH.DtResultados
|
DtVacaciones = objRH.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
|
||||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||||
DTPreAsistenciasInasistencias = objRH.DtResultados
|
DTPreAsistenciasInasistencias = objRH.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -611,16 +597,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||||
|
|
||||||
'If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
|
||||||
' 'BtnAgregar.Visible = False
|
|
||||||
' 'BtnEstusAsistenciaModal.Visible = False
|
|
||||||
' 'DdlAsistenciaInacistencia.Enabled = False
|
|
||||||
'Else
|
|
||||||
' 'BtnAgregar.Visible = True
|
|
||||||
' 'BtnEstusAsistenciaModal.Visible = True
|
|
||||||
' 'DdlAsistenciaInacistencia.Enabled = True
|
|
||||||
'End If
|
|
||||||
'UpAcciones.Update()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objRH.Dispose()
|
objRH.Dispose()
|
||||||
@@ -1278,10 +1255,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
LnkEnviarAsistencia.Visible = False
|
LnkEnviarAsistencia.Visible = False
|
||||||
LnkCargaMasiva.Visible = False
|
LnkCargaMasiva.Visible = False
|
||||||
|
LnkDescargaExcel.Visible = False
|
||||||
|
|
||||||
If DtDatosTabla.Rows.Count > 0 Then
|
If DtDatosTabla.Rows.Count > 0 Then
|
||||||
GVRegDatos.DataSource = DtDatosTabla
|
GVRegDatos.DataSource = DtDatosTabla
|
||||||
LnkEnviarAsistencia.Visible = True
|
LnkEnviarAsistencia.Visible = True
|
||||||
|
LnkDescargaExcel.Visible = True
|
||||||
|
|
||||||
If Not Enviado Then
|
If Not Enviado Then
|
||||||
LnkCargaMasiva.Visible = True
|
LnkCargaMasiva.Visible = True
|
||||||
@@ -1629,6 +1608,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||||
|
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnModalFecha_Click(sender As Object, e As EventArgs) Handles BtnModalFecha.Click
|
Private Sub BtnModalFecha_Click(sender As Object, e As EventArgs) Handles BtnModalFecha.Click
|
||||||
@@ -1940,9 +1922,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
lnkLink.Font.Bold = True
|
lnkLink.Font.Bold = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Filtro.Length > 0 Then
|
'If Filtro.Length > 0 Then
|
||||||
AddHandler lnkLink.Click, AddressOf Me.DetalleDia_Click
|
' AddHandler lnkLink.Click, AddressOf Me.DetalleDia_Click
|
||||||
End If
|
'End If
|
||||||
CountFecha = CountFecha + 1
|
CountFecha = CountFecha + 1
|
||||||
Fecha = Fecha.AddDays(1)
|
Fecha = Fecha.AddDays(1)
|
||||||
Next
|
Next
|
||||||
@@ -1958,9 +1940,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
e.Row.FCCheckBox("Chk").Visible = True
|
e.Row.FCCheckBox("Chk").Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.Header Then
|
||||||
|
If VerChkSeleccionPersonal Then
|
||||||
|
e.Row.FCCheckBox("Chk").Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
||||||
|
BtnGuardar.Visible = True
|
||||||
|
|
||||||
|
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||||
|
BtnGuardar.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
CvePersonalSeleccionado = -1
|
CvePersonalSeleccionado = -1
|
||||||
|
|
||||||
@@ -2125,7 +2119,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
TxtHorasDoblesModal.Text = arrayComands(2)
|
TxtHorasDoblesModal.Text = arrayComands(2)
|
||||||
TxtHorasTriplesModal.Text = arrayComands(3)
|
TxtHorasTriplesModal.Text = arrayComands(3)
|
||||||
DdlMotivoHoraExtraModal.SelectedValueExist(TxtHorasTriplesModal.Text = arrayComands(4))
|
DdlMotivoHoraExtraModal.SelectedValueExist(arrayComands(4))
|
||||||
TxtObsModal.Text = arrayComands(5)
|
TxtObsModal.Text = arrayComands(5)
|
||||||
TxtPorcentajePagoModal.Text = arrayComands(6).ToDecimal.ToString("###.00")
|
TxtPorcentajePagoModal.Text = arrayComands(6).ToDecimal.ToString("###.00")
|
||||||
|
|
||||||
@@ -2158,40 +2152,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Private Sub BtnEstusAsistenciaModal_Click(sender As Object, e As EventArgs) Handles BtnEstusAsistenciaModal.Click
|
|
||||||
|
|
||||||
' Dim myRow As DataRow() ' = DtResultados.NewRow
|
|
||||||
' Dim temtDt As New DataTable
|
|
||||||
' temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
|
||||||
|
|
||||||
' Dim fecha As String = temtDt(0)("Fecha").ToString()
|
|
||||||
' Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
|
|
||||||
' Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
|
||||||
|
|
||||||
' Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
|
||||||
|
|
||||||
|
|
||||||
' myRow = DtResultados.Select(filtro)
|
|
||||||
|
|
||||||
' If AplicaFalta = "Aplica" Then
|
|
||||||
' myRow(0)("Asistio") = "False"
|
|
||||||
' myRow(0)("SalarioDiario") = "0"
|
|
||||||
' Else
|
|
||||||
' myRow(0)("Asistio") = "True"
|
|
||||||
' myRow(0)("SalarioDiario") = "100"
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
|
||||||
|
|
||||||
' myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
|
||||||
|
|
||||||
' RegistraScript("$('#divDetallesDia').modal('hide');")
|
|
||||||
' Alert("Actualizado correctamente.")
|
|
||||||
' ReprocesarTabla()
|
|
||||||
' GvBind()
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) Handles BtnAgregar.Click
|
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) Handles BtnAgregar.Click
|
||||||
|
|
||||||
Dim objRh As New ClsRH()
|
Dim objRh As New ClsRH()
|
||||||
@@ -2241,89 +2201,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
objRh.Dispose()
|
objRh.Dispose()
|
||||||
|
|
||||||
''verificar
|
|
||||||
'Dim Pendientes As Boolean = False
|
|
||||||
'Dim separador() As Char = {"|"c}
|
|
||||||
'Dim TipoCorto = ""
|
|
||||||
'Dim TempDatos As New DataTable
|
|
||||||
'Dim CveAsisteciaInasistencia As Integer
|
|
||||||
'Dim DTChecadorRegistros As New DataTable
|
|
||||||
'Dim DTAsistenciasInasistencias As New DataTable
|
|
||||||
|
|
||||||
'Dim objRH As New ClsRH
|
|
||||||
|
|
||||||
'If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa) Then
|
|
||||||
' DTChecadorRegistros = objRH.DtResultados
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
|
||||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'objRH.Dispose()
|
|
||||||
|
|
||||||
'For Each Drow As DataRow In DtResultados.Rows
|
|
||||||
|
|
||||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
|
||||||
|
|
||||||
|
|
||||||
' If Drow(x).ToString().Trim = "" Then
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
|
||||||
|
|
||||||
' If arrayData.Length < 2 Then
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' TipoCorto = arrayData(0).ToString()
|
|
||||||
' If TipoCorto = "FR" Then
|
|
||||||
' TipoCorto = "F"
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' TempDatos = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}'", TipoCorto))
|
|
||||||
|
|
||||||
' If TempDatos.Rows.Count = 1 Then
|
|
||||||
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
|
||||||
' Else
|
|
||||||
' CveAsisteciaInasistencia = -1
|
|
||||||
' Pendientes = True
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
|
|
||||||
'Next
|
|
||||||
|
|
||||||
'If Pendientes = False Then
|
|
||||||
' For Each Drow As DataRow In DtResultados.Rows
|
|
||||||
|
|
||||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
|
||||||
' If Drow(x).ToString().Trim = "" Then
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
|
||||||
|
|
||||||
' If arrayData.Length < 2 Then
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' TipoCorto = arrayData(0).ToString()
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' Next
|
|
||||||
'Else
|
|
||||||
' Alert("Existen Fechas pendientes de tratar, revisar las fechas que aparecen con simbolo de advertencia en color amarillo.", TipoMensaje.MsgAdvertencia)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
''procesar
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
@@ -2346,7 +2227,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkEnviarAsistencia_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEnviarAsistencia_Click(sender As Object, e As EventArgs)
|
||||||
|
EnviarPreAsistencia()
|
||||||
'ValidaEnvioAsistencia
|
'ValidaEnvioAsistencia
|
||||||
'EnviarAsistencia
|
'EnviarAsistencia
|
||||||
|
|
||||||
@@ -2417,78 +2298,73 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub EnviarAsistencia()
|
Private Sub EnviarAsistencia()
|
||||||
'Dim DTChecadorRegistros As New DataTable
|
|
||||||
|
|
||||||
Dim ObjPersonal As New ClsRH
|
'Dim ObjPersonal As New ClsRH
|
||||||
|
|
||||||
'If ObjPersonal.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
'ObjPersonal.IniciaTransacSQL()
|
||||||
' DTChecadorRegistros = ObjPersonal.DtResultados
|
'Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
'Dim separador() As Char = {"|"c}
|
||||||
|
|
||||||
|
'Try
|
||||||
|
' For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||||
|
|
||||||
|
' Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||||
|
' Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
||||||
|
|
||||||
|
' Dim Fecha As Date = FechaInicioPeriodo
|
||||||
|
' For x = 3 To GVRegDatos.Columns.Count - 1
|
||||||
|
|
||||||
|
' If GVRegDatos.Columns(x).Visible Then
|
||||||
|
|
||||||
|
' Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
||||||
|
|
||||||
|
' If lnkLinkSender IsNot Nothing Then
|
||||||
|
' Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
||||||
|
' Dim TipoCorto = arrayComands(0)
|
||||||
|
' Dim Filtro = arrayComands(1)
|
||||||
|
|
||||||
|
' If TipoCorto.Contiene("_ND", "") Then
|
||||||
|
' TieneError = True
|
||||||
|
' Exit For
|
||||||
|
' Else
|
||||||
|
' Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & TipoCorto & "' ")
|
||||||
|
|
||||||
|
' Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||||
|
' Dim PorcentajePago As Integer = If(DTTipoAsistenciaInasistencia(0)("AplicaPago").ToString = "Aplica", 100, 0)
|
||||||
|
|
||||||
|
' If CveAsistenciasInasistencias > 0 Then
|
||||||
|
' If Not ObjPersonal.AddAsistencia(CvePersonal, -1, DdlSubProyecto.SelectedValue.ToEntero, Fecha, CveAsistenciasInasistencias, PorcentajePago, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||||
|
' TieneError = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' TieneError = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Fecha = Fecha.AddDays(1)
|
||||||
|
' Next
|
||||||
|
' If TieneError Then
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
'Catch ex As Exception
|
||||||
|
' TieneError = True
|
||||||
|
'End Try
|
||||||
|
|
||||||
|
|
||||||
|
'If TieneError Then
|
||||||
|
' ObjPersonal.RollBack()
|
||||||
|
' Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||||
|
'Else
|
||||||
|
' ObjPersonal.Commit()
|
||||||
|
' Alert("Asistencia enviada correctamente.")
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
ObjPersonal.IniciaTransacSQL()
|
'ObjPersonal.Dispose()
|
||||||
Dim TieneError As Boolean = False
|
|
||||||
|
|
||||||
Dim separador() As Char = {"|"c}
|
|
||||||
|
|
||||||
Try
|
|
||||||
For Each GvRow As GridViewRow In GVRegDatos.Rows
|
|
||||||
|
|
||||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
|
||||||
Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
|
||||||
|
|
||||||
Dim Fecha As Date = FechaInicioPeriodo
|
|
||||||
For x = 3 To GVRegDatos.Columns.Count - 1
|
|
||||||
|
|
||||||
If GVRegDatos.Columns(x).Visible Then
|
|
||||||
|
|
||||||
Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
|
||||||
|
|
||||||
If lnkLinkSender IsNot Nothing Then
|
|
||||||
Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
|
||||||
Dim TipoCorto = arrayComands(0)
|
|
||||||
Dim Filtro = arrayComands(1)
|
|
||||||
|
|
||||||
If TipoCorto.Contiene("_ND", "") Then
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
Else
|
|
||||||
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & TipoCorto & "' ")
|
|
||||||
|
|
||||||
Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
|
||||||
Dim PorcentajePago As Integer = If(DTTipoAsistenciaInasistencia(0)("AplicaPago").ToString = "Aplica", 100, 0)
|
|
||||||
|
|
||||||
'If CveAsistenciasInasistencias > 0 Then
|
|
||||||
' If Not ObjPersonal.AddAsistencia(CvePersonal, -1, DdlSubProyecto.SelectedValue.ToEntero, Fecha, CveAsistenciasInasistencias, PorcentajePago, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
|
||||||
' TieneError = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' TieneError = True
|
|
||||||
' Exit For
|
|
||||||
'End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Fecha = Fecha.AddDays(1)
|
|
||||||
Next
|
|
||||||
If TieneError Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Catch ex As Exception
|
|
||||||
TieneError = True
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
If TieneError Then
|
|
||||||
ObjPersonal.RollBack()
|
|
||||||
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Else
|
|
||||||
ObjPersonal.Commit()
|
|
||||||
Alert("Asistencia enviada correctamente.")
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjPersonal.Dispose()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||||
@@ -2497,7 +2373,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||||
|
|
||||||
If Enviado Then
|
If Enviado Then
|
||||||
Alert("El periodo ya ha sido enviado.", TipoMensaje.MsgAdvertencia)
|
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||||
Else
|
Else
|
||||||
DVEnvioMasivo.Visible = True
|
DVEnvioMasivo.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -2505,9 +2381,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
VerChkSeleccionPersonal = True
|
VerChkSeleccionPersonal = True
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GvBind()
|
GvBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2555,7 +2428,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||||
|
|
||||||
If Enviado Then
|
If Enviado Then
|
||||||
Alert($"El periodo {DdlPeriodo.SelectedItem.Text} ya fue enviado.", TipoMensaje.MsgAdvertencia)
|
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2597,7 +2470,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
'ProcesoOK =
|
'ProcesoOK =
|
||||||
adasd
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
@@ -2612,6 +2485,173 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Private Sub EnviarPreAsistencia()
|
Private Sub EnviarPreAsistencia()
|
||||||
|
|
||||||
|
If Not DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||||
|
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim objRH As New ClsRH
|
||||||
|
Dim objGrales As New ClsGenerales
|
||||||
|
Dim DTDatos As New DataTable
|
||||||
|
Dim DtPersonal As New DataTable
|
||||||
|
Dim DTHorarioPersonal As DataTable
|
||||||
|
Dim DtVacaciones As New DataTable
|
||||||
|
|
||||||
|
Dim RetrasosMaximos As Integer = 3
|
||||||
|
Dim dt As New DataTable
|
||||||
|
|
||||||
|
Dim Retardos As Integer = 0
|
||||||
|
Dim DTPreAsistenciasInasistencias As New DataTable
|
||||||
|
Dim DTChecadorRegistros As New DataTable
|
||||||
|
Dim DTHorarios As New DataTable
|
||||||
|
Dim DTDiasInhabiles As New DataTable
|
||||||
|
Dim DTTipoPeriodo As New DataTable
|
||||||
|
Dim DTAsistenciasInasistenciasReg As New DataTable
|
||||||
|
|
||||||
|
Dim CveChecadorHorario As Integer = -1
|
||||||
|
Dim TolRetAcumulados As Integer = 0
|
||||||
|
Dim TolRetEntradaMin As Integer = 0
|
||||||
|
Dim TolFalEntradaMin As Integer = 0
|
||||||
|
Dim RetSalidaAntes As Boolean = True
|
||||||
|
Dim TolSalidaAntesMin As Integer = 0
|
||||||
|
|
||||||
|
Dim CveASistenciaInasistenciaAsistio As Integer = -1
|
||||||
|
Dim CveAsistenciaInasistenciaFalta As Integer = -1
|
||||||
|
Dim CveAsistenciaInasistenciaRetardo As Integer = -1
|
||||||
|
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
|
||||||
|
|
||||||
|
Try
|
||||||
|
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'A'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
|
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'F'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
|
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'R' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
|
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'D' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
GeneraFechasInicioFinPerdiodo()
|
||||||
|
|
||||||
|
DiasPeriodo = (FechaFinPeriodo - FechaInicioPeriodo).TotalDays.ToEntero + 1
|
||||||
|
Dim objNom As New ClsNominas
|
||||||
|
|
||||||
|
If objNom.GetTiposPeriodos() Then
|
||||||
|
DdlTipoPeriodo.DataSource = objNom.DtResultados
|
||||||
|
DTTipoPeriodo = objNom.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
objNom.Dispose()
|
||||||
|
|
||||||
|
If objGrales.DiasInhabiles_Get(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DTDiasInhabiles = objGrales.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
objGrales.Dispose()
|
||||||
|
|
||||||
|
Dim Resultados As New DataTable
|
||||||
|
|
||||||
|
Resultados.Columns.Add("CvePersonal")
|
||||||
|
Resultados.Columns.Add("NombreCompleto")
|
||||||
|
Resultados.Columns.Add("Codigo")
|
||||||
|
Resultados.Columns.Add("CveSubProyecto")
|
||||||
|
Resultados.Columns.Add("SalarioDiario")
|
||||||
|
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||||
|
Resultados.Columns.Add("PorcentajePago")
|
||||||
|
Resultados.Columns.Add("Fecha")
|
||||||
|
Resultados.Columns.Add("Asistio")
|
||||||
|
Resultados.Columns.Add("Retraso")
|
||||||
|
Resultados.Columns.Add("Inconsistencia")
|
||||||
|
Resultados.Columns.Add("Descanso")
|
||||||
|
Resultados.Columns.Add("Entrada")
|
||||||
|
Resultados.Columns.Add("Salida")
|
||||||
|
Resultados.Columns.Add("FaltaRetraso")
|
||||||
|
Resultados.Columns.Add("DiaInhabil")
|
||||||
|
Resultados.Columns.Add("FaltaPorRetrasos")
|
||||||
|
Resultados.Columns.Add("Mensaje")
|
||||||
|
Resultados.Columns.Add("FaltaRetardosAcumulados")
|
||||||
|
Resultados.Columns.Add("DiaInhabilStr")
|
||||||
|
Resultados.Columns.Add("DiaVacacion")
|
||||||
|
Resultados.Columns.Add("TipoCorto")
|
||||||
|
Resultados.Columns.Add("Sancion")
|
||||||
|
|
||||||
|
Resultados.Columns.Add("HorasDobles", GetType(Decimal))
|
||||||
|
Resultados.Columns.Add("HorasTriples", GetType(Decimal))
|
||||||
|
Resultados.Columns.Add("CveMotivoHoraExtra", GetType(Integer))
|
||||||
|
Resultados.Columns.Add("Observacion")
|
||||||
|
|
||||||
|
|
||||||
|
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||||
|
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||||
|
|
||||||
|
Dim FilCveDepartamento As Integer = DdlDepartamento.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).AsEnumerable()
|
||||||
|
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||||
|
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||||
|
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||||
|
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||||
|
Select fila
|
||||||
|
|
||||||
|
DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
|
DTHorarios = objRH.DtResultados
|
||||||
|
|
||||||
|
If DdlTurno.SelectedIndex > 0 Then
|
||||||
|
Dim DTTemp As DataTable = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltraParametros("CveTurno = " & DdlTurno.SelectedValue)
|
||||||
|
Dim TMCveChecadorHorario As Integer = -1
|
||||||
|
|
||||||
|
If DTTemp.Rows.Count > 0 Then
|
||||||
|
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString().ToEntero
|
||||||
|
Dim DtHorarioTemp = DTHorarios.FiltraParametros("CveChecadorHorario = " & TMCveChecadorHorario)
|
||||||
|
|
||||||
|
If DtHorarioTemp.Rows.Count > 0 Then
|
||||||
|
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString().ToEntero
|
||||||
|
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString().ToEntero
|
||||||
|
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString().ToEntero
|
||||||
|
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString())
|
||||||
|
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If DTHorarios.Rows.Count > 0 Then
|
||||||
|
TolRetAcumulados = DTHorarios(0)("TolRetAcumulados").ToString().ToEntero
|
||||||
|
TolRetEntradaMin = DTHorarios(0)("TolRetEntradaMin").ToString().ToEntero
|
||||||
|
TolFalEntradaMin = DTHorarios(0)("TolFalEntradaMin").ToString().ToEntero
|
||||||
|
RetSalidaAntes = Boolean.Parse(DTHorarios(0)("RetSalidaAntes").ToString())
|
||||||
|
TolSalidaAntesMin = DTHorarios(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, False) Then
|
||||||
|
DTChecadorRegistros = objRH.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
If objRH.VacacionesGet(-1, UsuarioActual.Empresa.CveEmpresa, FechaInicioPeriodo, FechaFinPeriodo) Then
|
||||||
|
DtVacaciones = objRH.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||||
|
DTPreAsistenciasInasistencias = objRH.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
|
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
objRH.Dispose()
|
||||||
|
|
||||||
|
|
||||||
For Each dRow As DataRow In DtPersonal.Rows
|
For Each dRow As DataRow In DtPersonal.Rows
|
||||||
|
|
||||||
@@ -2710,10 +2750,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("Observacion") = DTPreasistencia.Rows(0)("Observacion").ToString
|
ReRow("Observacion") = DTPreasistencia.Rows(0)("Observacion").ToString
|
||||||
ReRow("PorcentajePago") = DTPreasistencia.Rows(0)("PorcentajePago").ToString.ToDecimal
|
ReRow("PorcentajePago") = DTPreasistencia.Rows(0)("PorcentajePago").ToString.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
If ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
||||||
|
|
||||||
Dim drowAsistenciaInasistencia As DataRow = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAsistenciasInasistencias={ReRow("CveAsistenciasInasistencias").ToString.ToEntero}")
|
Dim drowAsistenciaInasistencia As DataRow = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAsistenciasInasistencias={ReRow("CveAsistenciasInasistencias").ToString.ToEntero}")
|
||||||
@@ -2862,15 +2900,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'adasdasd
|
|
||||||
|
|
||||||
|
|
||||||
Resultados.Rows.Add(ReRow)
|
Resultados.Rows.Add(ReRow)
|
||||||
Fecha = Fecha.AddDays(1)
|
Fecha = Fecha.AddDays(1)
|
||||||
|
|
||||||
@@ -2971,5 +3002,303 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'DtResultados = Resultados
|
||||||
|
|
||||||
|
dt.Columns.Add("CvePersonal")
|
||||||
|
dt.Columns.Add("Codigo")
|
||||||
|
dt.Columns.Add("NombreCompleto")
|
||||||
|
dt.Columns.Add("Fecha1")
|
||||||
|
dt.Columns.Add("Fecha2")
|
||||||
|
dt.Columns.Add("Fecha3")
|
||||||
|
dt.Columns.Add("Fecha4")
|
||||||
|
dt.Columns.Add("Fecha5")
|
||||||
|
dt.Columns.Add("Fecha6")
|
||||||
|
dt.Columns.Add("Fecha7")
|
||||||
|
dt.Columns.Add("Fecha8")
|
||||||
|
dt.Columns.Add("Fecha9")
|
||||||
|
dt.Columns.Add("Fecha10")
|
||||||
|
dt.Columns.Add("Fecha11")
|
||||||
|
dt.Columns.Add("Fecha12")
|
||||||
|
dt.Columns.Add("Fecha13")
|
||||||
|
dt.Columns.Add("Fecha14")
|
||||||
|
dt.Columns.Add("Fecha15")
|
||||||
|
dt.Columns.Add("Fecha16")
|
||||||
|
dt.Columns.Add("Fecha17")
|
||||||
|
dt.Columns.Add("Fecha18")
|
||||||
|
dt.Columns.Add("Fecha19")
|
||||||
|
dt.Columns.Add("Fecha20")
|
||||||
|
dt.Columns.Add("Fecha21")
|
||||||
|
dt.Columns.Add("Fecha22")
|
||||||
|
dt.Columns.Add("Fecha23")
|
||||||
|
dt.Columns.Add("Fecha24")
|
||||||
|
dt.Columns.Add("Fecha25")
|
||||||
|
dt.Columns.Add("Fecha26")
|
||||||
|
dt.Columns.Add("Fecha27")
|
||||||
|
dt.Columns.Add("Fecha28")
|
||||||
|
dt.Columns.Add("Fecha29")
|
||||||
|
dt.Columns.Add("Fecha30")
|
||||||
|
dt.Columns.Add("Fecha31")
|
||||||
|
|
||||||
|
|
||||||
|
Dim DTFechas As DataTable
|
||||||
|
Dim DTUPersonal As DataTable
|
||||||
|
|
||||||
|
Dim DTVFechas As New DataView(Resultados)
|
||||||
|
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||||
|
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||||
|
|
||||||
|
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||||
|
|
||||||
|
For x As Integer = 3 To dt.Columns.Count - 1
|
||||||
|
GVRegDatos.Columns(x).HeaderText = ""
|
||||||
|
GVRegDatos.Columns(x).Visible = False
|
||||||
|
Next
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
ColumN = 3
|
||||||
|
|
||||||
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||||
|
GVRegDatos.Columns(ColumN).Visible = True
|
||||||
|
ColumN = ColumN + 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim medida As DateTime = NowADS()
|
||||||
|
|
||||||
|
Dim sbErrores As New StringBuilder
|
||||||
|
Dim TieneInconsistencias As Boolean = False
|
||||||
|
|
||||||
|
For Each pRow As DataRow In DtPersonal.Rows
|
||||||
|
|
||||||
|
Dim RRow As DataRow = dt.NewRow
|
||||||
|
RRow("CvePersonal") = pRow("CvePersonal")
|
||||||
|
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||||
|
RRow("Codigo") = pRow("Codigo")
|
||||||
|
|
||||||
|
ColumN = 3
|
||||||
|
|
||||||
|
Dim ResumenDia As New DataTable
|
||||||
|
Dim DTTempAsistencias As New DataTable
|
||||||
|
Dim filtro As String
|
||||||
|
Dim TipoCorto As String = ""
|
||||||
|
|
||||||
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
|
||||||
|
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & $"'"
|
||||||
|
ResumenDia = Resultados.FiltraParametros(filtro)
|
||||||
|
filtro = filtro & $"|{ResumenDia(0)("HorasDobles").ToString}|{ResumenDia(0)("HorasTriples").ToString}|{ResumenDia(0)("CveMotivoHoraExtra").ToString}|{ResumenDia(0)("Observacion").ToString}|{ResumenDia(0)("PorcentajePago").ToString}"
|
||||||
|
|
||||||
|
TipoCorto = ""
|
||||||
|
|
||||||
|
'If RdbChecador.Checked Then
|
||||||
|
|
||||||
|
RRow(ColumN) = "-"
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString().Contiene("_ND") Then
|
||||||
|
sbErrores.Append($"{pRow("Codigo")} Fecha: {drow(0).ToString().ToDate.ToString("dd/MM/yyyy")} Incidencia no definida <br/>")
|
||||||
|
TieneInconsistencias = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString().Length > 0 Then
|
||||||
|
|
||||||
|
RRow(ColumN) = $"{ResumenDia(0)("TipoCorto").ToString()}|" & filtro
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
|
||||||
|
If ResumenDia(0)("Asistio").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||||
|
RRow(ColumN) = "A|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("DiaVacacion").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||||
|
RRow(ColumN) = "V|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("Asistio").ToString() = "False" Or ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||||
|
RRow(ColumN) = "F|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("Retraso").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||||
|
RRow(ColumN) = "R|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Or TipoCorto = "FR" Then
|
||||||
|
RRow(ColumN) = "FR|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("Descanso").ToString() = "True" Or ResumenDia(0)("DiaInhabil").ToString() = "True" Then
|
||||||
|
RRow(ColumN) = "D|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||||
|
RRow(ColumN) = "IN|" & filtro
|
||||||
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
|
RRow(ColumN) = "IND|" & filtro
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'Else
|
||||||
|
|
||||||
|
' DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
||||||
|
' If DTTempAsistencias.Rows.Count > 0 Then
|
||||||
|
' TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||||
|
' Else
|
||||||
|
' TipoCorto = "F"
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' RRow(ColumN) = "" & TipoCorto & "|" & filtro
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
ColumN = ColumN + 1
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
ResumenDia.Dispose()
|
||||||
|
DTTempAsistencias.Dispose()
|
||||||
|
|
||||||
|
dt.Rows.Add(RRow)
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
Dim SalidaTiempo As Integer = (NowADS() - medida).TotalSeconds.ToString().ToEntero
|
||||||
|
SalidaTiempo = SalidaTiempo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'DtDatosTabla = dt
|
||||||
|
|
||||||
|
If TieneInconsistencias Then
|
||||||
|
Alert(sbErrores.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
|
||||||
|
Dim ProcesoOK As Boolean = True
|
||||||
|
Dim separador() As Char = {"|"c}
|
||||||
|
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
ObjPersonal.IniciaTransacSQL()
|
||||||
|
|
||||||
|
For Each dRowPersonal As DataRow In dt.Rows
|
||||||
|
|
||||||
|
Dim CvePersonal As Integer = dRowPersonal(0).ToString.ToEntero
|
||||||
|
ColumN = 3
|
||||||
|
|
||||||
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
Try
|
||||||
|
Dim Fecha As Date = drow(0).ToString.ToDate
|
||||||
|
Dim dato As String() = dRowPersonal(ColumN).ToString.Split(separador)
|
||||||
|
|
||||||
|
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & dato(0) & "' ")
|
||||||
|
Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim HorasDobles As Decimal = dato(2).ToDecimal
|
||||||
|
Dim HorasTriples As Decimal = dato(3).ToDecimal
|
||||||
|
Dim CveMotivoHoraExtra As Integer = dato(4).ToEntero
|
||||||
|
Dim Observaciones As String = dato(5)
|
||||||
|
Dim PorcentajePago As Decimal = dato(6).ToDecimal
|
||||||
|
|
||||||
|
If CveAsistenciasInasistencias > 0 Then
|
||||||
|
If Not ObjPersonal.AddAsistencia(CvePersonal, -1, -1, Fecha, CveAsistenciasInasistencias, PorcentajePago, HorasDobles, HorasTriples, CveMotivoHoraExtra, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||||
|
ProcesoOK = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ProcesoOK = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ProcesoOK = False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
ColumN = ColumN + 1
|
||||||
|
Next
|
||||||
|
If Not ProcesoOK Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If ProcesoOK Then
|
||||||
|
Dim ObjNomEnvio As New ClsNominas(ObjPersonal.IniciaTransacSQL)
|
||||||
|
If Not ObjNomEnvio.UpdatePeriodoEnvioPrenomina(DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, True) Then
|
||||||
|
ProcesoOK = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ProcesoOK Then
|
||||||
|
ObjPersonal.Commit()
|
||||||
|
Alert("Asistencia enviada correctamente.")
|
||||||
|
Else
|
||||||
|
ObjPersonal.RollBack()
|
||||||
|
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkDescargaExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim SubProyecto As String = ""
|
||||||
|
|
||||||
|
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||||
|
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat("Periodo: {0}, Sub Proyecto: {1}, Departamento: {2}", DdlPeriodo.SelectedItem.Text, SubProyecto, DdlDepartamento.SelectedItem.Text)
|
||||||
|
|
||||||
|
Dim Gv As New GridView
|
||||||
|
Gv = GVRegDatos
|
||||||
|
|
||||||
|
For Each gvRow As GridViewRow In Gv.Rows
|
||||||
|
|
||||||
|
Dim x As Integer = 3
|
||||||
|
For x = 3 To Gv.Columns.Count - 1
|
||||||
|
If Gv.Columns(x).Visible = True Then
|
||||||
|
|
||||||
|
Dim Lnk As LinkButton = gvRow.FCLinkButton($"LnkFecha{(x - 2)}")
|
||||||
|
Dim separador() As Char = {"|"c}
|
||||||
|
Dim dato As String() = Lnk.CommandArgument.Split(separador)
|
||||||
|
|
||||||
|
If dato(0) = "_ND" Then
|
||||||
|
gvRow.Cells(x).Text = "Inconsistencia"
|
||||||
|
Else
|
||||||
|
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & dato(0) & "' ")
|
||||||
|
|
||||||
|
If DTTipoAsistenciaInasistencia IsNot Nothing AndAlso DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||||
|
Dim Tipo As String = DTTipoAsistenciaInasistencia(0)("Tipo").ToString
|
||||||
|
gvRow.Cells(x).Text = Tipo
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Gv.ExportToExcelGembox("PreAsistencia", UsuarioActual, $"Pre Asistencia {DdlPeriodo.SelectedItem.Text}", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user