Reporte Asistencias Checador 2024.04.17
This commit is contained in:
@@ -5751,18 +5751,22 @@ Partial Class PopUpVerFactura
|
||||
If ObjIE.GetBancosIEFacturasPagadas(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
dtMovs = ObjIE.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312,292 )")
|
||||
CvePrePoliza = dtMovs.Rows(0)("CVePrePoliza").ToString.ToEntero
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
For Each Dr As DataRow In dtMovs.Rows
|
||||
Dr("Importe") = Dr("ImporteMN").ToString.ToDecimal
|
||||
Dr("ImporteNC") = Dr("ImporteNC").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Total") = Dr("Total").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Saldo") = Dr("Saldo").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Next
|
||||
If dtMovs IsNot Nothing AndAlso dtMovs.Rows.Count > 0 Then
|
||||
CvePrePoliza = dtMovs.Rows(0)("CVePrePoliza").ToString.ToEntero
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
For Each Dr As DataRow In dtMovs.Rows
|
||||
Dr("Importe") = Dr("ImporteMN").ToString.ToDecimal
|
||||
Dr("ImporteNC") = Dr("ImporteNC").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Total") = Dr("Total").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Saldo") = Dr("Saldo").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim rds As New ReportDataSource("DataSet1", dtMovs)
|
||||
@@ -5794,7 +5798,7 @@ Partial Class PopUpVerFactura
|
||||
End With
|
||||
dtMovs.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 And CvePrePoliza > 0 Then
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:HyperLinkField DataTextField="Codigo" HeaderText="óodigo" DataNavigateUrlFields="CvePersonal" DataNavigateUrlFormatString="Personal.aspx?CvePersonal={0}" ItemStyle-HorizontalAlign="Left" Target="_blank" />
|
||||
<asp:HyperLinkField DataTextField="Codigo" HeaderText="Código" DataNavigateUrlFields="CvePersonal" DataNavigateUrlFormatString="Personal.aspx?CvePersonal={0}" ItemStyle-HorizontalAlign="Left" Target="_blank" />
|
||||
<asp:HyperLinkField DataTextField="NombreCompleto" HeaderText="Personal" DataNavigateUrlFields="CvePersonal" DataNavigateUrlFormatString="Personal.aspx?CvePersonal={0}" ItemStyle-HorizontalAlign="Left" Target="_blank" />
|
||||
<asp:TemplateField HeaderText="Faltas" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
@@ -399,62 +399,96 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDetallesDia" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlAsistenciaHorariosModal" runat="server">Detalles</asp:Literal></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top!important">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<asp:LinkButton ID="lnkModalImg" runat="server" Text="" OnClientClick="return false;"></asp:LinkButton></td>
|
||||
<b>
|
||||
<asp:Label ID="lblModalFecha" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblModalMensaje" runat="server"></asp:Label>
|
||||
</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="form-control select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias"></asp:DropDownList>
|
||||
<label for="<%= DdlAsistenciaInacistencia.ClientID.ToString()%>">Incidencia:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentajePagoModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtPorcentajePagoModal" />
|
||||
<label for="<%= TxtPorcentajePagoModal.ClientID.ToString()%>">Porcentaje Pago:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width: 20%; text-align: right!important; vertical-align: top!important">
|
||||
<asp:LinkButton ID="lnkModalImg" runat="server" Text="" OnClientClick="return false;"></asp:LinkButton></td>
|
||||
<td style="font-weight: bold; font-size: 13px!important">
|
||||
<asp:Label ID="lblModalFecha" runat="server"></asp:Label>
|
||||
<br />
|
||||
<asp:Label ID="lblModalMensaje" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" ></asp:DropDownList></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorasDoblesModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtHorasDoblesModal" />
|
||||
<label for="<%= TxtHorasDoblesModal.ClientID.ToString()%>">Horas Dobles:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10">
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<asp:GridView ID="GvDetalleDias" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" with="150"
|
||||
CssClass=" table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Registros Checador" ItemStyle-HorizontalAlign="Left" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblFechaHora" runat="server" Width="150" Text='<%# Eval("FechaRegistro") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorasTriplesModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtHorasTriplesModal" />
|
||||
<label for="<%= TxtHorasTriplesModal.ClientID.ToString()%>">Horas Triples:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoHoraExtraModal" runat="server" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="form-control select2me" Style="width: 100% !important;"></asp:DropDownList>
|
||||
<label for="<%= DdlMotivoHoraExtraModal.ClientID.ToString()%>">Morivo Horas Extra:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObsModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtObsModal.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvDetalleDias" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" with="150"
|
||||
CssClass=" table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Registros Checador" ItemStyle-HorizontalAlign="Left" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblFechaHora" runat="server" Width="150" Text='<%# Eval("FechaRegistro") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<asp:Button ID="BtnGuardar" Visible="true" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardar_Click" />
|
||||
<%--<asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />--%>
|
||||
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -275,6 +275,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DdlMotivoHoraExtra.DataBind()
|
||||
DdlMotivoHoraExtra.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlMotivoHoraExtraModal.DataSource = GlobalDTMotivosHorasExtras(UsuarioActual.CveEmpresa)
|
||||
DdlMotivoHoraExtraModal.DataBind()
|
||||
DdlMotivoHoraExtraModal.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
Dim objNom As New ClsNominas
|
||||
|
||||
If objNom.GetTiposPeriodos() Then
|
||||
@@ -500,6 +504,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
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")
|
||||
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim FiltroSubProyecto As String = ""
|
||||
@@ -653,6 +663,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("TipoCorto") = ""
|
||||
ReRow("Sancion") = "False"
|
||||
|
||||
ReRow("HorasDobles") = 0
|
||||
ReRow("HorasTriples") = 0
|
||||
ReRow("CveMotivoHoraExtra") = -1
|
||||
ReRow("Observacion") = ""
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
@@ -684,10 +699,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND FechaRegistro >= '" & tempDatetime1.ToShortDateString & "' AND FechaRegistro <= '" & tempDatetime2.ToString() & "'")
|
||||
|
||||
|
||||
|
||||
|
||||
If DTPreAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha & "'").Rows.Count > 0 Then
|
||||
ReRow("CveAsistenciasInasistencias") = DTPreAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha & "'")(0)("CveAsistenciasInasistencias").ToString()
|
||||
|
||||
Dim DTPreasistencia As DataTable = DTPreAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha & "'")
|
||||
|
||||
If DTPreasistencia IsNot Nothing AndAlso DTPreasistencia.Rows.Count > 0 Then
|
||||
ReRow("CveAsistenciasInasistencias") = DTPreasistencia.Rows(0)("CveAsistenciasInasistencias").ToString()
|
||||
ReRow("HorasDobles") = DTPreasistencia.Rows(0)("HorasDobles").ToString.ToDecimal
|
||||
ReRow("HorasTriples") = DTPreasistencia.Rows(0)("HorasTriples").ToString.ToDecimal
|
||||
ReRow("CveMotivoHoraExtra") = DTPreasistencia.Rows(0)("CveMotivoHoraExtra").ToString.ToEntero
|
||||
ReRow("Observacion") = DTPreasistencia.Rows(0)("Observacion").ToString
|
||||
ReRow("PorcentajePago") = DTPreasistencia.Rows(0)("PorcentajePago").ToString.ToDecimal
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
||||
|
||||
@@ -702,6 +728,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("Retraso") = drowAsistenciaInasistencia("AplicaRetardo").ToString = "Aplica"
|
||||
ReRow("FaltaRetraso") = False 'Not drowAsistenciaInasistencia("AplicaAsistencia").ToString = "Aplica"
|
||||
ReRow("TipoCorto") = drowAsistenciaInasistencia("TipoCorto").ToString
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -881,6 +908,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("TipoCorto") = ""
|
||||
ReRow("Sancion") = "False"
|
||||
|
||||
ReRow("HorasDobles") = 0
|
||||
ReRow("HorasTriples") = 0
|
||||
ReRow("CveMotivoHoraExtra") = -1
|
||||
ReRow("Observacion") = ""
|
||||
|
||||
If dRow("CveChecadorHorario").ToString().ToEntero > 0 Then
|
||||
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString().ToEntero & "")
|
||||
@@ -981,6 +1013,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("TipoCorto") = ""
|
||||
ReRow("Sancion") = "False"
|
||||
|
||||
ReRow("HorasDobles") = 0
|
||||
ReRow("HorasTriples") = 0
|
||||
ReRow("CveMotivoHoraExtra") = -1
|
||||
ReRow("Observacion") = ""
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
@@ -1029,6 +1066,13 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
ReRow("TipoCorto") = ""
|
||||
|
||||
ReRow("Sancion") = "False"
|
||||
|
||||
ReRow("HorasDobles") = 0
|
||||
ReRow("HorasTriples") = 0
|
||||
ReRow("CveMotivoHoraExtra") = -1
|
||||
ReRow("Observacion") = ""
|
||||
|
||||
|
||||
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
Resultados.Rows.Add(ReRow)
|
||||
@@ -1122,8 +1166,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & $"'"
|
||||
ResumenDia = DtResultados.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 = ""
|
||||
|
||||
@@ -1236,252 +1282,252 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ReprocesarTabla()
|
||||
'Private Sub ReprocesarTabla()
|
||||
|
||||
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
' If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
' Dim dt As New DataTable
|
||||
' Dim DtPersonal As New DataTable
|
||||
' Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
' Dim objRH As New ClsRH
|
||||
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
' If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
||||
' End If
|
||||
|
||||
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
' Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
' Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).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 FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).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()
|
||||
' 'DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
' DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
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")
|
||||
' dt.Columns.Add("CvePersonal")
|
||||
' dt.Columns.Add("NombreCompleto")
|
||||
' 'dt.Columns.Add("Codigo")
|
||||
' 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(DtResultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
' Dim DTFechas As DataTable
|
||||
' Dim DTUPersonal As DataTable
|
||||
' Dim DTVFechas As New DataView(DtResultados)
|
||||
' DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
' DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
' Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To ColumN - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
' For x As Integer = 3 To ColumN - 1
|
||||
' GVRegDatos.Columns(x).HeaderText = ""
|
||||
' GVRegDatos.Columns(x).Visible = False
|
||||
' Next
|
||||
|
||||
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
|
||||
' 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
|
||||
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
' 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")
|
||||
' Dim RRow As DataRow = dt.NewRow
|
||||
' RRow("CvePersonal") = pRow("CvePersonal")
|
||||
' RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
' 'RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
ColumN = 2
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
' ColumN = 2
|
||||
' For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
' Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
' Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
' Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
' Dim TipoCorto As String = ""
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
' If DTTempAsistencias.Rows.Count > 1 Then
|
||||
' TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
' End If
|
||||
|
||||
If TipoCorto <> "" Then
|
||||
' If TipoCorto <> "" Then
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
End If
|
||||
' If TipoCorto = "F" Then
|
||||
' RRow(ColumN) = "F" & "|" & filtro
|
||||
' End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
' If TipoCorto = "R" Then
|
||||
' RRow(ColumN) = "R" & "|" & filtro
|
||||
' Else
|
||||
' If TipoCorto = "A" Then
|
||||
' RRow(ColumN) = "A" & "|" & filtro
|
||||
' Else
|
||||
' If TipoCorto = "D" Then
|
||||
' RRow(ColumN) = "D" & "|" & filtro
|
||||
' Else
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
End If
|
||||
' If TipoCorto = "V" Then
|
||||
' RRow(ColumN) = "V" & "|" & filtro
|
||||
' Else
|
||||
' If TipoCorto = "I" Then
|
||||
' RRow(ColumN) = "I" & "|" & filtro
|
||||
' Else
|
||||
' If TipoCorto = "S" Then
|
||||
' RRow(ColumN) = "S" & "|" & filtro
|
||||
' End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
' Else
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
' RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
' If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
' RRow(ColumN) = "A|" & filtro
|
||||
' End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
' If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
' RRow(ColumN) = "V" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
' RRow(ColumN) = "F" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
' RRow(ColumN) = "R" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
' RRow(ColumN) = "FR" & "|" & filtro
|
||||
' lblModalMensaje.Text = "Falta por retardo"
|
||||
' Else
|
||||
' If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
' RRow(ColumN) = "D" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
' RRow(ColumN) = "IN" & "|" & filtro
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
Else
|
||||
' If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
' RRow(ColumN) = "IND" & "|" & filtro
|
||||
' Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
' RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
' RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
' RRow(ColumN) = "A" & "|" & filtro
|
||||
' End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
' RRow(ColumN) = "V" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
' RRow(ColumN) = "F" & "|" & filtro
|
||||
' Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
' RRow(ColumN) = "R" & "|" & filtro
|
||||
' Else
|
||||
' If TipoCorto = "FR" Then
|
||||
' RRow(ColumN) = "FR" & "|" & filtro
|
||||
' lblModalMensaje.Text = "Falta por retardo"
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
' RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
' RRow(ColumN) = "I" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
' RRow(ColumN) = "C" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
' RRow(ColumN) = "S" & "|" & filtro
|
||||
' Else
|
||||
' If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
' RRow(ColumN) = "M" & "|" & filtro
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
' End If
|
||||
' ColumN = ColumN + 1
|
||||
' Next
|
||||
' dt.Rows.Add(RRow)
|
||||
' Next
|
||||
' Dim stopp As Integer = 0
|
||||
' DtDatosTabla = dt
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable, DiaDescanso As Integer) As DataTable
|
||||
Dim respuesta As New DataTable
|
||||
@@ -1918,9 +1964,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
objRH.Dispose()
|
||||
|
||||
Instruccion = arrayComands(0)
|
||||
CvePersonalSeleccionado = arrayComands(2).ToEntero
|
||||
CvePersonalSeleccionado = arrayComands(7).ToEntero
|
||||
|
||||
LtlAsistenciaHorariosModal.Text = arrayComands(3)
|
||||
LtlAsistenciaHorariosModal.Text = arrayComands(8)
|
||||
|
||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
|
||||
|
||||
@@ -2057,6 +2103,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DdlAsistenciaInacistencia.SelectedValueExist(CveEstado)
|
||||
|
||||
TxtHorasDoblesModal.Text = arrayComands(2)
|
||||
TxtHorasTriplesModal.Text = arrayComands(3)
|
||||
DdlMotivoHoraExtraModal.SelectedValueExist(TxtHorasTriplesModal.Text = arrayComands(4))
|
||||
TxtObsModal.Text = arrayComands(5)
|
||||
TxtPorcentajePagoModal.Text = arrayComands(6).ToDecimal.ToString("###.00")
|
||||
|
||||
UpDetallesDia.Update()
|
||||
|
||||
End Sub
|
||||
@@ -2258,7 +2310,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
'If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada, DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
|
||||
If ObjPersonal.AddPreAsistencia(CvePersonalSeleccionado, FechaSeleccionada, DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveMotivoHoraExtra As Integer = If(TxtHorasDobles.Text.ToDecimal = 0 And TxtHorasTriplesModal.Text.ToDecimal = 0, -1, DdlMotivoHoraExtraModal.SelectedValue.ToEntero)
|
||||
|
||||
If ObjPersonal.AddPreAsistencia(CvePersonalSeleccionado, FechaSeleccionada, DdlAsistenciaInacistencia.SelectedValue.ToEntero, TxtPorcentajePago.Text.ToDouble, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtHorasDoblesModal.Text.ToDecimal, TxtHorasTriplesModal.Text.ToDecimal, CveMotivoHoraExtra, TxtObsModal.Text.Trim) Then
|
||||
Alert("Registro Actualizado Correctamente.")
|
||||
RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
CargaDatos()
|
||||
|
||||
Reference in New Issue
Block a user