Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -421,6 +421,59 @@ Public Class ClsClasificaciones
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateClasificacionFranquicia(CveClasificacion As Integer, Clasificacion As String, CveEmpresaActual As Integer, CveEmpresaFranquicia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_ClasificacionFranquiciaUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
||||
.Add("@CveEmpresaActual", SqlDbType.Int).Value = CveEmpresaActual
|
||||
.Add("@CveEmpresaFranquicia", SqlDbType.Int).Value = CveEmpresaFranquicia
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("La clasificación no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al intentar actualizar los datos de la clasificación.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar Actualizar los datos de la clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveClasificacionFranquicia(CveClasificacion As Integer, CveEmpresaActual As Integer, CveEmpresaFranquicia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_ClasificacionFranquiciaRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveEmpresaActual", SqlDbType.Int).Value = CveEmpresaActual
|
||||
.Add("@CveEmpresaFranquicia", SqlDbType.Int).Value = CveEmpresaFranquicia
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("La clasificación no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al intentar actualizar los datos de la clasificación.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar Actualizar los datos de la clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function UpdateClasificacionCunetas(CveClasificacion As Integer, CveCuentaContableIngreso As Integer, CveCuentaContableGasto As Integer, CveEmpresa As Object) As Boolean
|
||||
|
||||
'End Function
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class ClsGenerales
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ClsPaginas.UsuarioActualRutaDB
|
||||
SqlConexion.ConnectionString = ClsPaginas.UsuarioActualRutaDB
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -1588,7 +1588,7 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
|
||||
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1", Optional CveAlmacenes As String = "-1", Optional CveMarca As Integer = -1, Optional CveProveedor As Integer = -1) As Boolean
|
||||
Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1", Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexGet")
|
||||
|
||||
@@ -2787,12 +2787,12 @@ Public Class ClsRH
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddPreAsistencia(CvePersonal As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddPreAsistencia(CvePersonal As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double, CveUsuario As Integer, CveEmpresa As Integer, Optional HorasDobles As Decimal = 0,
|
||||
Optional HorasTriples As Decimal = 0, Optional CveMotivoHoraExtra As Integer = -1, Optional Observacion As String = "") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
'SqlAdapter = New SqlDataAdapter("PA_RH_PersonalAsistenciasAddUpd", SqlConexion)
|
||||
'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
Data = New DataTable
|
||||
|
||||
SqlDataAdapter("PA_RH_PersonalPreAsistenciasAddUpd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
@@ -2801,6 +2801,10 @@ Public Class ClsRH
|
||||
.Add("@PorcentajePago", SqlDbType.Float).Value = PorcentajePago
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@HorasDobles", SqlDbType.Money).Value = HorasDobles
|
||||
.Add("@HorasTriples", SqlDbType.Money).Value = HorasTriples
|
||||
.Add("@CveMotivoHoraExtra", SqlDbType.Int).Value = CveMotivoHoraExtra
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
|
||||
@@ -6702,7 +6706,7 @@ Public Class ClsRH
|
||||
End Function
|
||||
|
||||
|
||||
Public Function PreAsistenciaRegistrosGet(InicioPeriodo As Date, FinPeriodo As Date, CveTurno As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function PreAsistenciaRegistrosGet(InicioPeriodo As Date, FinPeriodo As Date, CveTurno As Integer, CveEmpresa As Integer, IncluyePreAsistencia As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_ChecadorPreasistenciaRegistrosGet")
|
||||
@@ -6712,6 +6716,7 @@ Public Class ClsRH
|
||||
.Add("@FinPeriodo", SqlDbType.Date).Value = FinPeriodo
|
||||
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@IncluyePreAsistencia", SqlDbType.Bit).Value = IncluyePreAsistencia
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -6314,18 +6314,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)
|
||||
@@ -6357,7 +6361,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
|
||||
|
||||
|
||||
@@ -2581,7 +2581,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim ObjMovimientos As New ClsInventarios
|
||||
ObjMovimientos.IniciaTransacSQL()
|
||||
|
||||
Dim ProductosServiciosRef As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
Dim ProductosServiciosRef As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
Dim AlmacenRef As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
Dim contadorMovimientos As Integer = 0
|
||||
Dim listadoMovimientos As String = ""
|
||||
|
||||
@@ -353,7 +353,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
ChkAgruparAlmacen.Checked, Serie, CveAlmacenes, CveMarca:=DdlMarca.SelectedValue.ToEntero, CveProveedor:=DdlProveedores.SelectedValue.ToEntero) Then
|
||||
ChkAgruparAlmacen.Checked, Serie, CveAlmacenes) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
@@ -1095,8 +1095,10 @@
|
||||
<span class="caption-subject bold uppercase">Bitacora</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<div class="btn-group">
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green'></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink>
|
||||
<br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1131,14 +1133,14 @@
|
||||
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Archivo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
||||
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70px" >
|
||||
<HeaderTemplate>Archivo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<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>
|
||||
<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"
|
||||
OnClick="LnkCargaMasiva_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -34,13 +38,14 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="idfiltros">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Ejercicio:
|
||||
<li><asp:Label runat="server" ID="LblEjecicio" Width="85.1687px">Ejercicio:</asp:Label>
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" AutoPostBack="true"
|
||||
style="width: 120px !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
@@ -52,7 +57,7 @@
|
||||
</li>
|
||||
<li>
|
||||
Período:
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me"
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPeriodo_SelectedIndexChanged"
|
||||
DataTextField="NominaEstatus" DataValueField="CvePeriodo" style="width: 120px !important;" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -77,10 +82,23 @@
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li> <asp:Label runat="server" ID="LblDepartamento">Departamento:</asp:Label>
|
||||
<asp:DropDownList ID="DdlDepartamento" runat="server" AppendDataBoundItems="True" DataTextField="Departamento" DataValueField="CveDepartamento" style="width: 120px !important;" CssClass="select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -88,19 +106,129 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" runat="server" visible ="false" id="DVEnvioMasivo">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
<div id="DVCarga" style="margin-top: -30px!important;">
|
||||
<div class="portlet-title"" style="min-width: 650px;">
|
||||
<asp:UpdatePanel runat="server" class="portlet-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="portlet-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Carga Masiva</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaCargaMasiva.ClientID.ToString()%>" style="color: #888888;">Fecha: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtFechaCargaMasiva" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaNacimiento" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaCargaMasiva" runat="server" TargetControlID="TxtFechaCargaMasiva" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaCargaMasiva" TargetControlID="TxtFechaCargaMasiva" PopupButtonID="LnkFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVTxtFechaCargaMasiva" runat="server" ControlToValidate="TxtFechaCargaMasiva" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarCarga"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVTxtFechaCargaMasiva" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaCargaMasiva" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaCargaMasiva" runat="server" ControlToValidate="TxtFechaCargaMasiva" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> Es requierido, por favor ingreselo." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarCarga"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvTxtFechaCargaMasiva" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaCargaMasiva" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAsistenciaInacistenciaCarga" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="form-control select2me" Style="width: 100% !important;"></asp:DropDownList>
|
||||
<label for="<%= DdlAsistenciaInacistenciaCarga.ClientID.ToString()%>">Incidencia:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlAsistenciaInacistenciaCarga" runat="server" ControlToValidate="DdlAsistenciaInacistenciaCarga" InitialValue="-1" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> Es requierido, por favor ingreselo." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarCarga"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVERfvDdlAsistenciaInacistenciaCarga" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlAsistenciaInacistenciaCarga" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentajePago" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtPorcentajePago" />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPorcentajePago" runat="server" ControlToValidate="TxtPorcentajePago" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pordentaja de Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCarga"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPorcentajePago.ClientID.ToString()%>">Pordentaja de Pago:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorasDobles" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtHorasDobles" />
|
||||
<label for="<%= TxtHorasDobles.ClientID.ToString()%>">Horas Dobles:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorasTriples" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." runat="server" TargetControlID="TxtPorcentajePago" />
|
||||
<label for="<%= TxtPorcentajePago.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="DdlMotivoHoraExtra" runat="server" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="form-control select2me" Style="width: 100% !important;"></asp:DropDownList>
|
||||
<label for="<%= DdlMotivoHoraExtra.ClientID.ToString()%>">Morivo Horas Extra:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObs" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtObs.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-footer">
|
||||
<br />
|
||||
<div style="width:100%;text-align:right!important" >
|
||||
<asp:LinkButton ID="LnklEnviarCargaMasiva" OnClick="LnklEnviarCargaMasiva_Click" runat="server" class="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarCarga" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" DataKeyNames="CvePersonal,NombreCompleto"
|
||||
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>
|
||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<%--<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||
</asp:TemplateField>--%>
|
||||
<%-- <asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblIPersonal" runat="server" CssClass="truncate" Width="250" Text='<%# Eval("NombreCompleto") %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<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>
|
||||
<asp:Label ID="lblFaltas" runat="server" CssClass="truncate" Width="50"> </asp:Label>
|
||||
@@ -271,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>
|
||||
|
||||
@@ -265,7 +265,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DdlAsistenciaInacistencia.DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" CveAsistenciasInasistencias <> 6")
|
||||
DdlAsistenciaInacistencia.DataBind()
|
||||
DdlAsistenciaInacistencia.Items.Insert(0, New ListItem("Seleccionar una opción", "-1"))
|
||||
DdlAsistenciaInacistencia.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlAsistenciaInacistenciaCarga.DataSource = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa)
|
||||
DdlAsistenciaInacistenciaCarga.DataBind()
|
||||
DdlAsistenciaInacistenciaCarga.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras(UsuarioActual.CveEmpresa)
|
||||
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
|
||||
@@ -286,8 +299,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlTurno.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlTurno.SelectedValue = "-1"
|
||||
|
||||
CargaDepartamento()
|
||||
End Sub
|
||||
Private Sub CargaDepartamento()
|
||||
DdlDepartamento.DataSource = GlobalDTDepartamentos(UsuarioActual.CveEmpresa)
|
||||
DdlDepartamento.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlAsistencia()
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraFechasInicioFinPerdiodo()
|
||||
|
||||
@@ -320,53 +345,54 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
cargaPeriodos()
|
||||
|
||||
'Dim objNomina As New ClsNominas
|
||||
Dim objNomina As New ClsNominas
|
||||
|
||||
'If objNomina.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, -1, -1, -1) Then
|
||||
If objNomina.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, -1, -1, -1) Then
|
||||
|
||||
' TxtFechaModal.Text = ""
|
||||
' lblTituloPagina.Text = ""
|
||||
' UpTituloPagina.Update()
|
||||
' UpModalFechaBody.Update()
|
||||
' TxtFechaModal.Text = ""
|
||||
' lblTituloPagina.Text = ""
|
||||
' UpTituloPagina.Update()
|
||||
' UpModalFechaBody.Update()
|
||||
|
||||
' If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
' BtnConsultar.Enabled = True
|
||||
' DTPeriodos = objNomina.DtResultados
|
||||
' Dim DTPeridosView As DataView = DTPeriodos.DefaultView
|
||||
' DTPeridosView.Sort = " FechaInicio desc "
|
||||
' DTPeriodos = DTPeridosView.ToTable
|
||||
' DdlPeriodo.DataSource = objNomina.DtResultados
|
||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
' BtnConsultar.Enabled = True
|
||||
DTPeriodos = objNomina.DtResultados
|
||||
' Dim DTPeridosView As DataView = DTPeriodos.DefaultView
|
||||
' DTPeridosView.Sort = " FechaInicio desc "
|
||||
' DTPeriodos = DTPeridosView.ToTable
|
||||
' DdlPeriodo.DataSource = objNomina.DtResultados
|
||||
|
||||
' ' LblPeriodo.Visible = True
|
||||
' 'DdlRango.Visible = True
|
||||
' Else
|
||||
' ' RegistraScript("$('#ModalModalFecha').modal({ backdrop: 'static', keyboard: false});")
|
||||
' Alert("No se encontraron periodos disponibles.", TipoMensaje.MsgAdvertencia)
|
||||
' DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
' End If
|
||||
'Else
|
||||
' DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
'End If
|
||||
'objNomina.Dispose()
|
||||
' ' LblPeriodo.Visible = True
|
||||
' 'DdlRango.Visible = True
|
||||
Else
|
||||
' ' RegistraScript("$('#ModalModalFecha').modal({ backdrop: 'static', keyboard: false});")
|
||||
' Alert("No se encontraron periodos disponibles.", TipoMensaje.MsgAdvertencia)
|
||||
DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
End If
|
||||
'Else
|
||||
' DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objNomina.Dispose()
|
||||
|
||||
Dim DtTempFechaInicial As DataTable = DTPeriodos.FiltraParametros("Estatus = 1")
|
||||
|
||||
|
||||
DdlPeriodo.DataBind()
|
||||
DdlPeriodo.DataBind()
|
||||
|
||||
If DtTempFechaInicial.Rows.Count > 0 Then
|
||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString().ToEntero
|
||||
DdlPeriodo.SelectedValueExist(temCvePeriodoNomi)
|
||||
End If
|
||||
If DtTempFechaInicial.Rows.Count > 0 Then
|
||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString().ToEntero
|
||||
DdlPeriodo.SelectedValueExist(temCvePeriodoNomi)
|
||||
End If
|
||||
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UPFiltros.Update()
|
||||
' BtnConsultar.Enabled = True
|
||||
Else
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UPFiltros.Update()
|
||||
' BtnConsultar.Enabled = True
|
||||
Else
|
||||
|
||||
DTPeriodos = Nothing
|
||||
DTPeriodos = Nothing
|
||||
DdlPeriodo.DataSource = Nothing
|
||||
|
||||
'DdlRango.Visible = False
|
||||
@@ -378,6 +404,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
|
||||
GeneraFechasInicioFinPerdiodo()
|
||||
|
||||
DdlPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||
End Sub
|
||||
|
||||
Private Sub DdlRango_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPeriodo.SelectedIndexChanged
|
||||
@@ -476,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 = ""
|
||||
@@ -491,15 +525,27 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
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(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 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
|
||||
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 _
|
||||
AndAlso (FilCveDepartamento = -1 OrElse fila.Field(Of Integer)("CveDepartamento") = FilCveDepartamento)
|
||||
Select fila
|
||||
|
||||
DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
|
||||
|
||||
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTHorarios = objRH.DtResultados
|
||||
|
||||
@@ -531,7 +577,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End If
|
||||
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, False) Then
|
||||
DTChecadorRegistros = objRH.DtResultados
|
||||
End If
|
||||
|
||||
@@ -571,6 +617,13 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
|
||||
objRH = New ClsRH
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, True) Then
|
||||
DTChecadorRegistros = objRH.DtResultados
|
||||
End If
|
||||
objRH.Dispose()
|
||||
|
||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
Dim CveTurno As Integer = dRow("CveTurno").ToString.ToEntero
|
||||
@@ -610,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
|
||||
|
||||
@@ -641,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
|
||||
|
||||
@@ -659,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
|
||||
|
||||
@@ -838,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 & "")
|
||||
@@ -938,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
|
||||
|
||||
@@ -986,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)
|
||||
@@ -1079,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 = ""
|
||||
|
||||
@@ -1169,14 +1258,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
Private Sub GvBind()
|
||||
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
LnkEnviarAsistencia.Visible = False
|
||||
LnkCargaMasiva.Visible = False
|
||||
|
||||
If DtDatosTabla.Rows.Count > 0 Then
|
||||
'BtnAgregar.Visible = True
|
||||
GVRegDatos.DataSource = DtDatosTabla
|
||||
LnkEnviarAsistencia.Visible = True
|
||||
|
||||
If Not Enviado Then
|
||||
LnkCargaMasiva.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
'BtnAgregar.Visible = False
|
||||
GVRegDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -1186,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
|
||||
@@ -1861,16 +1957,16 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, False) Then
|
||||
DTChecadorRegistros = objRH.DtResultados
|
||||
End If
|
||||
|
||||
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 & "' ")
|
||||
|
||||
@@ -2007,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
|
||||
@@ -2208,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()
|
||||
@@ -2366,4 +2471,107 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ObjPersonal.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||
|
||||
DVEnvioMasivo.Visible = False
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
If Enviado Then
|
||||
Alert("El periodo ya ha sido enviado.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
DVEnvioMasivo.Visible = True
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function PeriodoBloqueado(CvePeriodo As Integer) As Boolean
|
||||
Dim respuesta As Boolean = True
|
||||
If CvePeriodo > 0 Then
|
||||
Using objPeriodos As New ClsNominas()
|
||||
If objPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodo) Then
|
||||
|
||||
If objPeriodos.DtResultados.Rows.Count > 0 Then
|
||||
respuesta = Boolean.Parse(objPeriodos.DtResultados.Rows(0)("PreAsistenciaEnviada").ToString)
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub DdlPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
If Enviado Then
|
||||
LnkEnviarAsistencia.Visible = False
|
||||
'LnkCargaMasiva.Visible = False
|
||||
Else
|
||||
LnkEnviarAsistencia.Visible = True
|
||||
'LnkCargaMasiva.Visible = True
|
||||
End If
|
||||
|
||||
UPFiltros.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnklEnviarCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
If Enviado Then
|
||||
Alert($"El periodo {DdlPeriodo.SelectedItem.Text} ya fue enviado.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim FechaCarga As Date = TxtFechaCargaMasiva.Text.ToDate
|
||||
Dim ProcesoOK As Boolean = True
|
||||
|
||||
If Not (FechaCarga >= FechaInicioPeriodo AndAlso FechaCarga <= FechaFinPeriodo) Then
|
||||
Alert("La fecha de carga masiva debe de estar en el rango de fechas del período seleccionado.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlMotivoHoraExtra.SelectedValue.ToEntero > 0 And (TxtHorasDobles.Text.ToDecimal > 0 And TxtHorasTriples.Text.ToDecimal > 0) Then
|
||||
Alert("Debe seleccionar un motivo de horas extra.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjRH As New ClsRH
|
||||
ObjRH.IniciaTransacSQL()
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
|
||||
If Not ObjRH.AddPreAsistencia(CvePersonal, FechaCarga, DdlAsistenciaInacistenciaCarga.SelectedValue.ToEntero, TxtPorcentajePago.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtHorasDobles.Text.ToDecimal, TxtHorasTriples.Text.ToDecimal, DdlMotivoHoraExtra.SelectedValue.ToEntero, TxtObs.Text) Then
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjRH.Commit()
|
||||
Alert("Carga realizada correctamente.")
|
||||
CargaDatos()
|
||||
Else
|
||||
ObjRH.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -75,10 +75,19 @@ Partial Class CatClasificaciones
|
||||
Set(value As Boolean)
|
||||
ViewState("CargaCostos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
Private Property ClasificacionOriginal As String
|
||||
Get
|
||||
Return IfNull(ViewState("ClasificacionOriginal"), "", ViewState("ClasificacionOriginal").ToString()).ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ClasificacionOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
@@ -86,6 +95,7 @@ Partial Class CatClasificaciones
|
||||
CargaCostos = True
|
||||
CargaIngresos = True
|
||||
DtCuentasContables = Nothing
|
||||
ClasificacionOriginal = ""
|
||||
|
||||
CargaDdlSATPS()
|
||||
CargaDDLs()
|
||||
@@ -149,56 +159,85 @@ Partial Class CatClasificaciones
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
Dim objConta As New ClsContabilidad(ObjClasificaciones.IniciaTransacSQL)
|
||||
Dim RequireSerieLote As Integer = If(ChkRequiereSerieLote.Checked, 1, 0)
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If HdnModalidadClasificacion.Value = "A" Then
|
||||
If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "",
|
||||
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
Try
|
||||
If HdnModalidadClasificacion.Value = "A" Then
|
||||
If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "",
|
||||
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then
|
||||
If Not objConta.AddCuentasAsignaciones(6, UsuarioActual.CveEmpresa, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then
|
||||
If Not objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then
|
||||
If Not objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TieneError = Not ActualizarClasificacionFranquicia(ObjClasificaciones, ObjClasificaciones.CveClasificacion, TxtClasificacion.Text.Trim)
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
ElseIf HdnModalidadClasificacion.Value = "U" Then
|
||||
Dim Clasificacion As String = TxtClasificacion.Text
|
||||
Dim Estatus As Boolean = ChkEstatus.Checked
|
||||
Dim CveClasificacion As Integer = HdnIDClasificacion.Value.ToEntero
|
||||
Dim DdlGasto As DropDownList = DdlCuentaGasto
|
||||
Dim DdlCosto As DropDownList = DdlCuentaCostos
|
||||
Dim DdlIngresos As DropDownList = DdlCuentaIngresos
|
||||
|
||||
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "",
|
||||
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then
|
||||
If Not objConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 6, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=CveClasificacion) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TieneError = Not ActualizarClasificacionFranquicia(ObjClasificaciones, CveClasificacion, Me.ClasificacionOriginal)
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la clasificación", ex)
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(6, UsuarioActual.CveEmpresa, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||
End If
|
||||
ObjClasificaciones.Commit()
|
||||
TxtClasificacion.Text = ""
|
||||
TxtPrecioBaseCosto.Text = ""
|
||||
DdlCuentaGasto.SelectedValueExist("0")
|
||||
DdlCuentaCostos.SelectedValueExist("0")
|
||||
DdlCuentaIngresos.SelectedValueExist("0")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||
Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
ObjClasificaciones.RollBack()
|
||||
End If
|
||||
|
||||
ElseIf HdnModalidadClasificacion.Value = "U" Then
|
||||
Dim Clasificacion As String = TxtClasificacion.Text
|
||||
Dim Estatus As Boolean = ChkEstatus.Checked
|
||||
Dim CveClasificacion As Integer = HdnIDClasificacion.Value.ToEntero
|
||||
Dim DdlGasto As DropDownList = DdlCuentaGasto
|
||||
Dim DdlCosto As DropDownList = DdlCuentaCostos
|
||||
Dim DdlIngresos As DropDownList = DdlCuentaIngresos
|
||||
|
||||
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "",
|
||||
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then objConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 6, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=CveClasificacion)
|
||||
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Commit()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
ObjClasificaciones.RollBack()
|
||||
End If
|
||||
If TieneError Then
|
||||
Alert("Ocurrió un error al guardar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
ObjClasificaciones.RollBack()
|
||||
Else
|
||||
ObjClasificaciones.Commit()
|
||||
Me.ClasificacionOriginal = ""
|
||||
TxtClasificacion.Text = ""
|
||||
TxtPrecioBaseCosto.Text = ""
|
||||
DdlCuentaGasto.SelectedValueExist("0")
|
||||
DdlCuentaCostos.SelectedValueExist("0")
|
||||
DdlCuentaIngresos.SelectedValueExist("0")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
@@ -316,16 +355,37 @@ Partial Class CatClasificaciones
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
|
||||
ObjClasificaciones.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
Try
|
||||
Dim CveClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
If Not TieneError AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TieneError = Not RemoveClasificacionFranquicia(ObjClasificaciones, CveClasificacion)
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso Not ObjClasificaciones.RemoveClasificacion(CveClasificacion) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar la clasificación", ex)
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
If TieneError Then
|
||||
ObjClasificaciones.RollBack()
|
||||
ObjClasificaciones.Dispose()
|
||||
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjClasificaciones.Commit()
|
||||
ObjClasificaciones.Dispose()
|
||||
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
GvDatos.EditIndex = -1
|
||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -433,7 +493,7 @@ Partial Class CatClasificaciones
|
||||
DdlCuentaIngresos.SelectedValueExist(CveCuentaIngresoActual)
|
||||
End If
|
||||
|
||||
|
||||
Me.ClasificacionOriginal = Clasificacion
|
||||
TxtClasificacion.Text = Clasificacion
|
||||
TxtPrecioBaseCosto.Text = PrecioBaseCosto.FormatoNumero(2)
|
||||
DdlCategoria.SelectedValueExist(CveCategoria)
|
||||
@@ -473,5 +533,39 @@ Partial Class CatClasificaciones
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Private Function ActualizarClasificacionFranquicia(ByRef ObjClas As ClsClasificaciones, CveClasificacion As Integer, NombreOriginal As String) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
|
||||
Dim Franquicias As String() = FranquiciasStr.Split(","c)
|
||||
|
||||
For Each Franquicia As String In Franquicias
|
||||
Dim CveEmpresaFranquicia As Integer = Franquicia.ToEntero
|
||||
If Not ObjClas.UpdateClasificacionFranquicia(CveClasificacion, NombreOriginal, UsuarioActual.CveEmpresa, CveEmpresaFranquicia) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
|
||||
Private Function RemoveClasificacionFranquicia(ByRef ObjClas As ClsClasificaciones, CveClasificacion As Integer) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
|
||||
Dim Franquicias As String() = FranquiciasStr.Split(","c)
|
||||
|
||||
For Each Franquicia As String In Franquicias
|
||||
Dim CveEmpresaFranquicia As Integer = Franquicia.ToEntero
|
||||
If Not ObjClas.RemoveClasificacionFranquicia(CveClasificacion, UsuarioActual.CveEmpresa, CveEmpresaFranquicia) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user