Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -153,11 +153,11 @@ Public Class ClsOIEventos
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing, Optional UsuarioActual As Usuario = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ClsPaginas.UsuarioActualRutaDB
|
||||
SqlConexion.ConnectionString = If(UsuarioActual IsNot Nothing, UsuarioActual.RutaDB, ClsPaginas.UsuarioActualRutaDB)
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -80,12 +80,7 @@ Public Class ClsVentas
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
SqlConexion.ConnectionString = UsuarioActual.RutaDB
|
||||
Else
|
||||
SqlConexion.ConnectionString = ClsPaginas.UsuarioActualRutaDB
|
||||
End If
|
||||
SqlConexion.ConnectionString = If(UsuarioActual IsNot Nothing, UsuarioActual.RutaDB, ClsPaginas.UsuarioActualRutaDB)
|
||||
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
|
||||
@@ -2999,9 +2999,10 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
|
||||
|
||||
Try
|
||||
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
Hilo.Start()
|
||||
'Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
'Hilo.Start()
|
||||
|
||||
EnviarCorreoNotificacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)
|
||||
|
||||
If MostarAlert Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
@@ -3017,7 +3018,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
|
||||
Private Sub EnviarCorreoNotificacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
|
||||
|
||||
Try
|
||||
Dim ObjBancos As New ClsBancos()
|
||||
|
||||
@@ -6284,7 +6284,7 @@ Partial Class Compras_Compras
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.Empresa.UsaInventarios
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then AgregaMercanciaInventario = False
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83, 7, 11, 12, 122) Then AgregaMercanciaInventario = False
|
||||
|
||||
Dim RegistraConcepto225 As Boolean = AgregaMercanciaInventario AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV")
|
||||
|
||||
@@ -6813,7 +6813,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Dim tTipoMovimiento As Boolean = TipoMovimiento
|
||||
If DTDistinct.Rows.Count > 0 AndAlso Not UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
|
||||
If DTDistinct.Rows.Count > 0 Then
|
||||
For Each Row2 As DataRow In DTDistinct.Rows
|
||||
tTipoMovimiento = TipoMovimiento
|
||||
'DETERMINA IMPORTE
|
||||
|
||||
@@ -1795,21 +1795,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Try
|
||||
|
||||
'Para Campos Nuevos AF y OC
|
||||
Dim SubProyecto As Integer = -1
|
||||
Dim ActivoFijo As Integer = -1
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 AndAlso (DdlConcepto.SelectedValue.ToEntero = 3 Or DdlConcepto.SelectedValue.ToEntero = 11) Then
|
||||
SubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
ActivoFijo = -1 'HdnCveActivoFijo.Value.ToEntero
|
||||
ElseIf UsuarioActual.CveEmpresa = 66 AndAlso Not CveMovimiento > 0 Then
|
||||
SubProyecto = -2
|
||||
ActivoFijo = -2
|
||||
End If
|
||||
|
||||
'Esto es parte de consumo interno
|
||||
If DdlActivoFijo.SelectedValue.ToEntero > 0 Then
|
||||
ActivoFijo = DdlActivoFijo.SelectedValue.ToEntero
|
||||
End If
|
||||
Dim tCveSubProyecto As Integer = -1
|
||||
If DdlSubProyecto.Visible = True AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 Then tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
|
||||
Dim FechaMovimiento As DateTime = TxtFecha.Text.Replace(",", "").ToDateTime
|
||||
Dim FechaMovtoStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm:ss")}"
|
||||
@@ -1819,16 +1811,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim Mensaje As String = ""
|
||||
|
||||
'Actualiza Movimiento
|
||||
|
||||
|
||||
|
||||
If Not ObjInventario.UpdateMovimiento(CveMovimiento, DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, FechaMovimiento,
|
||||
TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text) Then
|
||||
TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, tCveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text) Then
|
||||
Mensaje = "Error al Actualizar el Movimiento"
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
' Actualizo los movimientos
|
||||
@@ -1951,15 +1939,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert(Mensaje, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
'GUARDAR
|
||||
Else
|
||||
Dim Fecha As DateTime = FechaMovimiento
|
||||
Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero))
|
||||
Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero))
|
||||
|
||||
|
||||
'cuando es APH
|
||||
Dim tFolio As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 48 And EsConsumoInterno = False Then tFolio = TxtFolio.Text.ToEntero
|
||||
@@ -1983,7 +1967,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.Replace(",", "").ToDate, obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="ES/1", CveEntregaAlmacen:=CveEntregaAlmacen)
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, tCveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="ES/1", CveEntregaAlmacen:=CveEntregaAlmacen)
|
||||
|
||||
If CveMovimiento <= 0 OrElse CvePrePoliza <= 0 Then
|
||||
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
|
||||
@@ -2069,7 +2053,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim TipoMovtoAlmacen As Boolean = False
|
||||
Dim TipoMovtoOtro As Boolean = True
|
||||
Dim tCveSubProyecto As Integer = -1
|
||||
|
||||
|
||||
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacen.SelectedValue))
|
||||
If drA2 IsNot Nothing Then
|
||||
|
||||
@@ -144,29 +144,27 @@
|
||||
<label for="<%= DdlUnidadCamion.ClientID.ToString()%>"> Unidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" runat="server" id="DvRemolque1" visible="false">
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
<label for="<%= DdlRemolque1.ClientID.ToString()%>">Remolque 1:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" runat="server" id="DvRemolque2" visible="false">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
<label for="<%= DdlRemolque2.ClientID.ToString()%>">Remolque 1:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="DivDistancia" visible="false">
|
||||
<label class="col-md-3">Distancia:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox runat="server" ID="TxtDistancia" Width="75px" Text="1" ></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" runat="server" id="DivDistancia" visible="false">
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtDistancia" Width="60px" Text="1" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtDistancia.ClientID.ToString()%>">Distancia:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="DVDatosEntrega6" visible="false">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 135px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="85px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
@@ -178,7 +176,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="DvCartaPorte2" visible="false">
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" runat="server" id="DvCartaPorte2" visible="false">
|
||||
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" Text="Carta Porte" Checked="true" />
|
||||
<label for="<%= ChkEmitirCartaPorte.ClientID.ToString()%>"></label>
|
||||
<i></i>
|
||||
|
||||
@@ -569,8 +569,12 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DVDatosEntrega4.Visible = mostrar;
|
||||
//DVDatosEntrega5.Visible = mostrar;
|
||||
DVDatosEntrega6.Visible = mostrar;
|
||||
DvRemolque1.Visible = mostrar;
|
||||
DvRemolque2.Visible = mostrar;
|
||||
if (!mostrar) //solo ocultarlos
|
||||
{
|
||||
DvRemolque1.Visible = mostrar;
|
||||
DvRemolque2.Visible = mostrar;
|
||||
}
|
||||
|
||||
DivDistancia.Visible = mostrar;
|
||||
|
||||
//if (mostrar)
|
||||
@@ -1093,11 +1097,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
//MostrarRemolques = true;
|
||||
}
|
||||
|
||||
//if (Remolque == "0")
|
||||
//{
|
||||
// RequiereRemolque = false;
|
||||
// MostrarRemolques = false;
|
||||
//}
|
||||
if (Remolque == "0")
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
||||
}
|
||||
using (ClsRH objRH = new ClsRH())
|
||||
{
|
||||
if (objRH.PreAsistenciaRegistrosGet(fechai, fechaf, -1, UsuarioActual.Empresa.CveEmpresa))
|
||||
if (objRH.PreAsistenciaRegistrosGet(fechai, fechaf, -1, UsuarioActual.Empresa.CveEmpresa,false))
|
||||
{
|
||||
GvDetalleDias.DataSource = objRH.DtResultados.FiltraParametros(string.Format("FechaRegistro >='{0:yyyy/MM/dd HH:mm}' AND FechaRegistro <='{1:yyyy/MM/dd HH:mm}' AND CvePersonal = {2}", fechai.AddHours(6), fechaf.AddHours(6), CvePersonal), "FechaRegistro");
|
||||
GvDetalleDias.DataBind();
|
||||
|
||||
@@ -981,7 +981,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim Total As Decimal = 0
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing AndAlso DrPS("IVA").ToString.ToEntero = -1 Then
|
||||
Total += Dr("Total").ToString.ToDecimal
|
||||
End If
|
||||
@@ -990,7 +990,7 @@ Partial Class OC_OC
|
||||
Dim Porcentaje As Decimal = TxtIVA.Text.ToDecimal / Total
|
||||
Dim LastDr As DataRow = Nothing
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresaActual, CvePS:=Dr("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing AndAlso DrPS("IVA").ToString.ToEntero = -1 Then
|
||||
Dr("IVA") = Math.Round(Dr("Total").ToString.ToDecimal * Porcentaje, 6)
|
||||
Dr("IVAPorcentaje") = If(Math.Round(Porcentaje, 2) > 0.14, 0.16, Math.Round(Porcentaje, 2))
|
||||
@@ -5013,13 +5013,30 @@ Partial Class OC_OC
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, CveEmpresaActual, LblCodigo.Text, "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAF.DtResultados.Rows.Count = 1 Then
|
||||
HdnCodigoAF.Value = ObjAF.DtResultados.Rows(0)("Codigo").ToString
|
||||
HdnCveActivoFijo.Value = ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
Dim drr As DataRow = ObjAF.DtResultados.Rows(0)
|
||||
HdnCodigoAF.Value = drr("Codigo").ToString
|
||||
HdnCveActivoFijo.Value = drr("CveActivoFijo").ToString
|
||||
Alert(drr("Codigo").ToString & " - " & drr("Descripcion").ToString, TipoMensaje.ToastInformacion)
|
||||
Else
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
LblCodigo.Text = ""
|
||||
Alert("No se encontró un Activo Fijo con el código proporcionado.", TipoMensaje.MsgAdvertencia)
|
||||
If ObjAF.DtResultados.Rows.Count > 1 Then
|
||||
Dim drr As DataRow = ObjAF.DtResultados.FiltroPrimero($"Codigo ='{LblCodigo.Text.Trim}'")
|
||||
If drr IsNot Nothing Then
|
||||
HdnCodigoAF.Value = drr("Codigo").ToString
|
||||
HdnCveActivoFijo.Value = drr("CveActivoFijo").ToString
|
||||
Alert(drr("Codigo").ToString & " - " & drr("Descripcion").ToString, TipoMensaje.ToastInformacion)
|
||||
Else
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
LblCodigo.Text = ""
|
||||
Alert("No se encontró un Activo Fijo con el código proporcionado.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
LblCodigo.Text = ""
|
||||
Alert("No se encontró un Activo Fijo con el código proporcionado.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -1344,7 +1344,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="AnexoManerialUtilizado" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="AnexoManerialUtilizado" CssClass="ADSdropzone hidden" data-maxFile="5" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3095,7 +3095,8 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
If DdlTipoVenta.SelectedValue = "5" Then 'Consignación - Uso Material
|
||||
'genera una salida de almacen.
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtilConsig")
|
||||
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtilConsig")
|
||||
Dim Folio As Integer = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida > 0 Then
|
||||
@@ -3126,6 +3127,23 @@ Partial Class OS_OrdenesServicios
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
Dim Contabilizable As Boolean = False
|
||||
Dim Concepto As String = "Material utilizado Consigna"
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OS-MatUtil5", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim ImporteAlmacen As Decimal = 0
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
ImporteAlmacen = ObjInventario.DtResultados.SUM("Total")
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAlmacen, ImporteAlmacen, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAlmacen, ImporteAlmacen, 95, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepChecadorPreAsistencia.aspx.vb" Inherits="RH_RepChecadorPreAsistencia" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepChecadorPreAsistencia.aspx.vb" Inherits="RH_RepChecadorPreAsistencia" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -22,14 +22,21 @@
|
||||
<asp:LinkButton runat="server" ID="BtnAgregar" Visible="false" data-toggle="tooltip" data-placement="left" title="Procesar" Text="<i class='fa fa-plus'></i> Procesar"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkEnviarAsistencia" Visible="false" data-toggle="tooltip" data-placement="left" title="Enviar Asistencia" Text="<i class='fa fa-arrow-right'></i> Enviar Asistencia"
|
||||
OnClick="LnkEnviarAsistencia_Click"></asp:LinkButton>
|
||||
</li>
|
||||
<asp:LinkButton runat="server" ID="LnkDescargaExcel" Visible="false" data-toggle="tooltip" data-placement="left" title="Excel" Text="<i class='fa fa-file-excel-o'></i> Excel"
|
||||
OnClick="LnkDescargaExcel_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>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkEnviarAsistencia" Visible="false" data-toggle="tooltip" data-placement="left" title="Enviar Asistencia" Text="<i class='fa fa-arrow-right'></i> Enviar Asistencia"
|
||||
OnClick="LnkEnviarAsistencia_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaExcel"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
@@ -217,12 +224,22 @@
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<HeaderTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="margin-top:-3px!important">
|
||||
<asp:CheckBox runat="server" ID="Chk" Visible="false" ClientIDMode="Static" onclick="FnSeleccion(this)" />
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:-5px!important">
|
||||
Código
|
||||
</div>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="margin-top:-5px!important">
|
||||
<asp:CheckBox runat="server" ID="Chk" Visible="false" />
|
||||
<div class="col-md-2" style="margin-top:-3px!important">
|
||||
<asp:CheckBox runat="server" ID="Chk" Visible="false" CssClass="CssChkSel" />
|
||||
</div>
|
||||
<div class="col-md-6" style="margin-top:-5px!important">
|
||||
<div class="col-md-8" >
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,157 +262,157 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha1" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha1" runat="server" Width="50" Text='<%# Eval("Fecha1") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha1" runat="server" Width="50" Text='<%# Eval("Fecha1") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha2" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha2" runat="server" Width="50" Text='<%# Eval("Fecha2") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha2" runat="server" Width="50" Text='<%# Eval("Fecha2") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha3" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha3" runat="server" Width="50" Text='<%# Eval("Fecha3") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha3" runat="server" Width="50" Text='<%# Eval("Fecha3") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha4" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha4" runat="server" Width="50" Text='<%# Eval("Fecha4") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha4" runat="server" Width="50" Text='<%# Eval("Fecha4") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha5" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha5" runat="server" Width="50" Text='<%# Eval("Fecha5") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha5" runat="server" Width="50" Text='<%# Eval("Fecha5") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha6" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha6" runat="server" Width="50" Text='<%# Eval("Fecha6") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha6" runat="server" Width="50" Text='<%# Eval("Fecha6") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha7" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha7" runat="server" Width="50" Text='<%# Eval("Fecha7") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha7" runat="server" Width="50" Text='<%# Eval("Fecha7") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha8" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha8" runat="server" Width="50" Text='<%# Eval("Fecha8") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha8" runat="server" Width="50" Text='<%# Eval("Fecha8") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha9" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha9" runat="server" Width="50" Text='<%# Eval("Fecha9") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha9" runat="server" Width="50" Text='<%# Eval("Fecha9") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha10" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha10" runat="server" Width="50" Text='<%# Eval("Fecha10") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha10" runat="server" Width="50" Text='<%# Eval("Fecha10") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha11" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha11" runat="server" Width="50" Text='<%# Eval("Fecha11") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha11" runat="server" Width="50" Text='<%# Eval("Fecha11") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha12" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha12" runat="server" Width="50" Text='<%# Eval("Fecha12") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha12" runat="server" Width="50" Text='<%# Eval("Fecha12") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha13" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha13" runat="server" Width="50" Text='<%# Eval("Fecha13") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha13" runat="server" Width="50" Text='<%# Eval("Fecha13") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha14" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha14" runat="server" Width="50" Text='<%# Eval("Fecha14") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha14" runat="server" Width="50" Text='<%# Eval("Fecha14") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha15" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha15" runat="server" Width="50" Text='<%# Eval("Fecha15") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha15" runat="server" Width="50" Text='<%# Eval("Fecha15") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha16" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha16" runat="server" Width="50" Text='<%# Eval("Fecha16") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha16" runat="server" Width="50" Text='<%# Eval("Fecha16") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha17" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha17" runat="server" Width="50" Text='<%# Eval("Fecha17") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha17" runat="server" Width="50" Text='<%# Eval("Fecha17") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha18" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha18" runat="server" Width="50" Text='<%# Eval("Fecha18") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha18" runat="server" Width="50" Text='<%# Eval("Fecha18") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha19" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha19" runat="server" Width="50" Text='<%# Eval("Fecha19") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha19" runat="server" Width="50" Text='<%# Eval("Fecha19") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha20" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha20" runat="server" Width="50" Text='<%# Eval("Fecha20") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha20" runat="server" Width="50" Text='<%# Eval("Fecha20") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha21" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha21" runat="server" Width="50" Text='<%# Eval("Fecha21") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha21" runat="server" Width="50" Text='<%# Eval("Fecha21") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha22" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha22" runat="server" Width="50" Text='<%# Eval("Fecha22") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha22" runat="server" Width="50" Text='<%# Eval("Fecha22") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha23" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha23" runat="server" Width="50" Text='<%# Eval("Fecha23") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha23" runat="server" Width="50" Text='<%# Eval("Fecha23") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha24" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha24" runat="server" Width="50" Text='<%# Eval("Fecha24") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha24" runat="server" Width="50" Text='<%# Eval("Fecha24") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha25" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha25" runat="server" Width="50" Text='<%# Eval("Fecha25") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha25" runat="server" Width="50" Text='<%# Eval("Fecha25") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha26" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha26" runat="server" Width="50" Text='<%# Eval("Fecha26") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha26" runat="server" Width="50" Text='<%# Eval("Fecha26") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha27" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha27" runat="server" Width="50" Text='<%# Eval("Fecha27") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha27" runat="server" Width="50" Text='<%# Eval("Fecha27") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha28" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha28" runat="server" Width="50" Text='<%# Eval("Fecha28") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha28" runat="server" Width="50" Text='<%# Eval("Fecha28") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha29" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha29" runat="server" Width="50" Text='<%# Eval("Fecha29") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha29" runat="server" Width="50" Text='<%# Eval("Fecha29") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha30" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha30" runat="server" Width="50" Text='<%# Eval("Fecha30") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha30" runat="server" Width="50" Text='<%# Eval("Fecha30") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha31" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkFecha31" runat="server" Width="50" Text='<%# Eval("Fecha31") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFecha31" runat="server" Width="50" Text='<%# Eval("Fecha31") %>' OnClick="DetalleDia_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -564,5 +581,21 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function FnSeleccion(chk) {
|
||||
|
||||
var checkedStatus = chk.checked;
|
||||
|
||||
$('.CssChkSel input[type="checkbox"]').each(function () {
|
||||
$(this).prop('checked', checkedStatus);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
Option Strict On
|
||||
|
||||
|
||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
Imports Extensiones
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Runtime.Remoting
|
||||
Imports System.ServiceModel.Security
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -196,7 +191,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
CargaCombos()
|
||||
End If
|
||||
|
||||
GvBind()
|
||||
' GvBind()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -540,12 +535,7 @@ 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
|
||||
|
||||
@@ -600,10 +590,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DtVacaciones = objRH.DtResultados
|
||||
End If
|
||||
|
||||
'If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
||||
'End If
|
||||
|
||||
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTPreAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
@@ -611,16 +597,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
|
||||
'If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
' 'BtnAgregar.Visible = False
|
||||
' 'BtnEstusAsistenciaModal.Visible = False
|
||||
' 'DdlAsistenciaInacistencia.Enabled = False
|
||||
'Else
|
||||
' 'BtnAgregar.Visible = True
|
||||
' 'BtnEstusAsistenciaModal.Visible = True
|
||||
' 'DdlAsistenciaInacistencia.Enabled = True
|
||||
'End If
|
||||
'UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
@@ -1278,10 +1255,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
LnkEnviarAsistencia.Visible = False
|
||||
LnkCargaMasiva.Visible = False
|
||||
LnkDescargaExcel.Visible = False
|
||||
|
||||
If DtDatosTabla.Rows.Count > 0 Then
|
||||
GVRegDatos.DataSource = DtDatosTabla
|
||||
LnkEnviarAsistencia.Visible = True
|
||||
LnkDescargaExcel.Visible = True
|
||||
|
||||
If Not Enviado Then
|
||||
LnkCargaMasiva.Visible = True
|
||||
@@ -1629,6 +1608,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtnModalFecha_Click(sender As Object, e As EventArgs) Handles BtnModalFecha.Click
|
||||
@@ -1940,9 +1922,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
lnkLink.Font.Bold = True
|
||||
End If
|
||||
|
||||
If Filtro.Length > 0 Then
|
||||
AddHandler lnkLink.Click, AddressOf Me.DetalleDia_Click
|
||||
End If
|
||||
'If Filtro.Length > 0 Then
|
||||
' AddHandler lnkLink.Click, AddressOf Me.DetalleDia_Click
|
||||
'End If
|
||||
CountFecha = CountFecha + 1
|
||||
Fecha = Fecha.AddDays(1)
|
||||
Next
|
||||
@@ -1958,9 +1940,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If VerChkSeleccionPersonal Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
CvePersonalSeleccionado = -1
|
||||
|
||||
@@ -2125,7 +2119,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
TxtHorasDoblesModal.Text = arrayComands(2)
|
||||
TxtHorasTriplesModal.Text = arrayComands(3)
|
||||
DdlMotivoHoraExtraModal.SelectedValueExist(TxtHorasTriplesModal.Text = arrayComands(4))
|
||||
DdlMotivoHoraExtraModal.SelectedValueExist(arrayComands(4))
|
||||
TxtObsModal.Text = arrayComands(5)
|
||||
TxtPorcentajePagoModal.Text = arrayComands(6).ToDecimal.ToString("###.00")
|
||||
|
||||
@@ -2158,40 +2152,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End Function
|
||||
|
||||
'Private Sub BtnEstusAsistenciaModal_Click(sender As Object, e As EventArgs) Handles BtnEstusAsistenciaModal.Click
|
||||
|
||||
' Dim myRow As DataRow() ' = DtResultados.NewRow
|
||||
' Dim temtDt As New DataTable
|
||||
' temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
||||
|
||||
' Dim fecha As String = temtDt(0)("Fecha").ToString()
|
||||
' Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
|
||||
' Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
||||
|
||||
' Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
||||
|
||||
|
||||
' myRow = DtResultados.Select(filtro)
|
||||
|
||||
' If AplicaFalta = "Aplica" Then
|
||||
' myRow(0)("Asistio") = "False"
|
||||
' myRow(0)("SalarioDiario") = "0"
|
||||
' Else
|
||||
' myRow(0)("Asistio") = "True"
|
||||
' myRow(0)("SalarioDiario") = "100"
|
||||
' End If
|
||||
|
||||
' myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
||||
|
||||
' myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
||||
|
||||
' RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
' Alert("Actualizado correctamente.")
|
||||
' ReprocesarTabla()
|
||||
' GvBind()
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) Handles BtnAgregar.Click
|
||||
|
||||
Dim objRh As New ClsRH()
|
||||
@@ -2241,89 +2201,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
objRh.Dispose()
|
||||
|
||||
''verificar
|
||||
'Dim Pendientes As Boolean = False
|
||||
'Dim separador() As Char = {"|"c}
|
||||
'Dim TipoCorto = ""
|
||||
'Dim TempDatos As New DataTable
|
||||
'Dim CveAsisteciaInasistencia As Integer
|
||||
'Dim DTChecadorRegistros As New DataTable
|
||||
'Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
'Dim objRH As New ClsRH
|
||||
|
||||
'If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' DTChecadorRegistros = objRH.DtResultados
|
||||
'End If
|
||||
|
||||
'If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
||||
'End If
|
||||
|
||||
'objRH.Dispose()
|
||||
|
||||
'For Each Drow As DataRow In DtResultados.Rows
|
||||
|
||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||
|
||||
|
||||
' If Drow(x).ToString().Trim = "" Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||
|
||||
' If arrayData.Length < 2 Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' TipoCorto = arrayData(0).ToString()
|
||||
' If TipoCorto = "FR" Then
|
||||
' TipoCorto = "F"
|
||||
' End If
|
||||
|
||||
' TempDatos = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}'", TipoCorto))
|
||||
|
||||
' If TempDatos.Rows.Count = 1 Then
|
||||
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
' Else
|
||||
' CveAsisteciaInasistencia = -1
|
||||
' Pendientes = True
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
'Next
|
||||
|
||||
'If Pendientes = False Then
|
||||
' For Each Drow As DataRow In DtResultados.Rows
|
||||
|
||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||
' If Drow(x).ToString().Trim = "" Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||
|
||||
' If arrayData.Length < 2 Then
|
||||
' Exit For
|
||||
' End If
|
||||
' TipoCorto = arrayData(0).ToString()
|
||||
' Next
|
||||
|
||||
' Next
|
||||
'Else
|
||||
' Alert("Existen Fechas pendientes de tratar, revisar las fechas que aparecen con simbolo de advertencia en color amarillo.", TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
|
||||
''procesar
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
@@ -2346,7 +2227,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEnviarAsistencia_Click(sender As Object, e As EventArgs)
|
||||
|
||||
EnviarPreAsistencia()
|
||||
'ValidaEnvioAsistencia
|
||||
'EnviarAsistencia
|
||||
|
||||
@@ -2417,78 +2298,73 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End Sub
|
||||
Private Sub EnviarAsistencia()
|
||||
'Dim DTChecadorRegistros As New DataTable
|
||||
|
||||
Dim ObjPersonal As New ClsRH
|
||||
'Dim ObjPersonal As New ClsRH
|
||||
|
||||
'If ObjPersonal.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' DTChecadorRegistros = ObjPersonal.DtResultados
|
||||
'ObjPersonal.IniciaTransacSQL()
|
||||
'Dim TieneError As Boolean = False
|
||||
|
||||
'Dim separador() As Char = {"|"c}
|
||||
|
||||
'Try
|
||||
' For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||
|
||||
' Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
' Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
||||
|
||||
' Dim Fecha As Date = FechaInicioPeriodo
|
||||
' For x = 3 To GVRegDatos.Columns.Count - 1
|
||||
|
||||
' If GVRegDatos.Columns(x).Visible Then
|
||||
|
||||
' Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
||||
|
||||
' If lnkLinkSender IsNot Nothing Then
|
||||
' Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
||||
' Dim TipoCorto = arrayComands(0)
|
||||
' Dim Filtro = arrayComands(1)
|
||||
|
||||
' If TipoCorto.Contiene("_ND", "") Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' Else
|
||||
' Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & TipoCorto & "' ")
|
||||
|
||||
' Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
' Dim PorcentajePago As Integer = If(DTTipoAsistenciaInasistencia(0)("AplicaPago").ToString = "Aplica", 100, 0)
|
||||
|
||||
' If CveAsistenciasInasistencias > 0 Then
|
||||
' If Not ObjPersonal.AddAsistencia(CvePersonal, -1, DdlSubProyecto.SelectedValue.ToEntero, Fecha, CveAsistenciasInasistencias, PorcentajePago, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Else
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Fecha = Fecha.AddDays(1)
|
||||
' Next
|
||||
' If TieneError Then
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
'Catch ex As Exception
|
||||
' TieneError = True
|
||||
'End Try
|
||||
|
||||
|
||||
'If TieneError Then
|
||||
' ObjPersonal.RollBack()
|
||||
' Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||
'Else
|
||||
' ObjPersonal.Commit()
|
||||
' Alert("Asistencia enviada correctamente.")
|
||||
'End If
|
||||
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim separador() As Char = {"|"c}
|
||||
|
||||
Try
|
||||
For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
For x = 3 To GVRegDatos.Columns.Count - 1
|
||||
|
||||
If GVRegDatos.Columns(x).Visible Then
|
||||
|
||||
Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
||||
|
||||
If lnkLinkSender IsNot Nothing Then
|
||||
Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
||||
Dim TipoCorto = arrayComands(0)
|
||||
Dim Filtro = arrayComands(1)
|
||||
|
||||
If TipoCorto.Contiene("_ND", "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
Else
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & TipoCorto & "' ")
|
||||
|
||||
Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
Dim PorcentajePago As Integer = If(DTTipoAsistenciaInasistencia(0)("AplicaPago").ToString = "Aplica", 100, 0)
|
||||
|
||||
'If CveAsistenciasInasistencias > 0 Then
|
||||
' If Not ObjPersonal.AddAsistencia(CvePersonal, -1, DdlSubProyecto.SelectedValue.ToEntero, Fecha, CveAsistenciasInasistencias, PorcentajePago, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Else
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Fecha = Fecha.AddDays(1)
|
||||
Next
|
||||
If TieneError Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
|
||||
If TieneError Then
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
ObjPersonal.Commit()
|
||||
Alert("Asistencia enviada correctamente.")
|
||||
End If
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
'ObjPersonal.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||
@@ -2497,7 +2373,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
If Enviado Then
|
||||
Alert("El periodo ya ha sido enviado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||
Else
|
||||
DVEnvioMasivo.Visible = True
|
||||
End If
|
||||
@@ -2505,9 +2381,6 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
VerChkSeleccionPersonal = True
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
|
||||
GvBind()
|
||||
|
||||
End Sub
|
||||
@@ -2555,7 +2428,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim Enviado As Boolean = PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero)
|
||||
|
||||
If Enviado Then
|
||||
Alert($"El periodo {DdlPeriodo.SelectedItem.Text} ya fue enviado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -2597,7 +2470,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
If ProcesoOK Then
|
||||
'ProcesoOK =
|
||||
adasd
|
||||
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
@@ -2612,6 +2485,173 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Private Sub EnviarPreAsistencia()
|
||||
|
||||
If Not DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If PeriodoBloqueado(DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
Alert($"La información del periodo {DdlPeriodo.SelectedItem.Text} ya fue enviada a la pre nómina, esta información ya está bloqueda y si hay ajustes estos se deberán de hacer en pre nóminas")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
Dim objGrales As New ClsGenerales
|
||||
Dim DTDatos As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTHorarioPersonal As DataTable
|
||||
Dim DtVacaciones As New DataTable
|
||||
|
||||
Dim RetrasosMaximos As Integer = 3
|
||||
Dim dt As New DataTable
|
||||
|
||||
Dim Retardos As Integer = 0
|
||||
Dim DTPreAsistenciasInasistencias As New DataTable
|
||||
Dim DTChecadorRegistros As New DataTable
|
||||
Dim DTHorarios As New DataTable
|
||||
Dim DTDiasInhabiles As New DataTable
|
||||
Dim DTTipoPeriodo As New DataTable
|
||||
Dim DTAsistenciasInasistenciasReg As New DataTable
|
||||
|
||||
Dim CveChecadorHorario As Integer = -1
|
||||
Dim TolRetAcumulados As Integer = 0
|
||||
Dim TolRetEntradaMin As Integer = 0
|
||||
Dim TolFalEntradaMin As Integer = 0
|
||||
Dim RetSalidaAntes As Boolean = True
|
||||
Dim TolSalidaAntesMin As Integer = 0
|
||||
|
||||
Dim CveASistenciaInasistenciaAsistio As Integer = -1
|
||||
Dim CveAsistenciaInasistenciaFalta As Integer = -1
|
||||
Dim CveAsistenciaInasistenciaRetardo As Integer = -1
|
||||
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
|
||||
|
||||
Try
|
||||
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'A'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'F'")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'R' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" TipoCorto = 'D' ")(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
GeneraFechasInicioFinPerdiodo()
|
||||
|
||||
DiasPeriodo = (FechaFinPeriodo - FechaInicioPeriodo).TotalDays.ToEntero + 1
|
||||
Dim objNom As New ClsNominas
|
||||
|
||||
If objNom.GetTiposPeriodos() Then
|
||||
DdlTipoPeriodo.DataSource = objNom.DtResultados
|
||||
DTTipoPeriodo = objNom.DtResultados
|
||||
End If
|
||||
|
||||
objNom.Dispose()
|
||||
|
||||
If objGrales.DiasInhabiles_Get(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||
DTDiasInhabiles = objGrales.DtResultados
|
||||
End If
|
||||
|
||||
objGrales.Dispose()
|
||||
|
||||
Dim Resultados As New DataTable
|
||||
|
||||
Resultados.Columns.Add("CvePersonal")
|
||||
Resultados.Columns.Add("NombreCompleto")
|
||||
Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("CveSubProyecto")
|
||||
Resultados.Columns.Add("SalarioDiario")
|
||||
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||
Resultados.Columns.Add("PorcentajePago")
|
||||
Resultados.Columns.Add("Fecha")
|
||||
Resultados.Columns.Add("Asistio")
|
||||
Resultados.Columns.Add("Retraso")
|
||||
Resultados.Columns.Add("Inconsistencia")
|
||||
Resultados.Columns.Add("Descanso")
|
||||
Resultados.Columns.Add("Entrada")
|
||||
Resultados.Columns.Add("Salida")
|
||||
Resultados.Columns.Add("FaltaRetraso")
|
||||
Resultados.Columns.Add("DiaInhabil")
|
||||
Resultados.Columns.Add("FaltaPorRetrasos")
|
||||
Resultados.Columns.Add("Mensaje")
|
||||
Resultados.Columns.Add("FaltaRetardosAcumulados")
|
||||
Resultados.Columns.Add("DiaInhabilStr")
|
||||
Resultados.Columns.Add("DiaVacacion")
|
||||
Resultados.Columns.Add("TipoCorto")
|
||||
Resultados.Columns.Add("Sancion")
|
||||
|
||||
Resultados.Columns.Add("HorasDobles", GetType(Decimal))
|
||||
Resultados.Columns.Add("HorasTriples", GetType(Decimal))
|
||||
Resultados.Columns.Add("CveMotivoHoraExtra", GetType(Integer))
|
||||
Resultados.Columns.Add("Observacion")
|
||||
|
||||
|
||||
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
Dim FilCveDepartamento As Integer = DdlDepartamento.SelectedValue.ToEntero
|
||||
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).AsEnumerable()
|
||||
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||
Select fila
|
||||
|
||||
DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
|
||||
|
||||
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTHorarios = objRH.DtResultados
|
||||
|
||||
If DdlTurno.SelectedIndex > 0 Then
|
||||
Dim DTTemp As DataTable = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltraParametros("CveTurno = " & DdlTurno.SelectedValue)
|
||||
Dim TMCveChecadorHorario As Integer = -1
|
||||
|
||||
If DTTemp.Rows.Count > 0 Then
|
||||
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString().ToEntero
|
||||
Dim DtHorarioTemp = DTHorarios.FiltraParametros("CveChecadorHorario = " & TMCveChecadorHorario)
|
||||
|
||||
If DtHorarioTemp.Rows.Count > 0 Then
|
||||
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString().ToEntero
|
||||
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString().ToEntero
|
||||
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString().ToEntero
|
||||
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString())
|
||||
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If DTHorarios.Rows.Count > 0 Then
|
||||
TolRetAcumulados = DTHorarios(0)("TolRetAcumulados").ToString().ToEntero
|
||||
TolRetEntradaMin = DTHorarios(0)("TolRetEntradaMin").ToString().ToEntero
|
||||
TolFalEntradaMin = DTHorarios(0)("TolFalEntradaMin").ToString().ToEntero
|
||||
RetSalidaAntes = Boolean.Parse(DTHorarios(0)("RetSalidaAntes").ToString())
|
||||
TolSalidaAntesMin = DTHorarios(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If objRH.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, False) Then
|
||||
DTChecadorRegistros = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.VacacionesGet(-1, UsuarioActual.Empresa.CveEmpresa, FechaInicioPeriodo, FechaFinPeriodo) Then
|
||||
DtVacaciones = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTPreAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
|
||||
For Each dRow As DataRow In DtPersonal.Rows
|
||||
|
||||
@@ -2710,10 +2750,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("Observacion") = DTPreasistencia.Rows(0)("Observacion").ToString
|
||||
ReRow("PorcentajePago") = DTPreasistencia.Rows(0)("PorcentajePago").ToString.ToDecimal
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
||||
|
||||
Dim drowAsistenciaInasistencia As DataRow = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAsistenciasInasistencias={ReRow("CveAsistenciasInasistencias").ToString.ToEntero}")
|
||||
@@ -2862,15 +2900,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'adasdasd
|
||||
|
||||
|
||||
Resultados.Rows.Add(ReRow)
|
||||
Fecha = Fecha.AddDays(1)
|
||||
|
||||
@@ -2971,5 +3002,303 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
'DtResultados = Resultados
|
||||
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
dt.Columns.Add("Fecha4")
|
||||
dt.Columns.Add("Fecha5")
|
||||
dt.Columns.Add("Fecha6")
|
||||
dt.Columns.Add("Fecha7")
|
||||
dt.Columns.Add("Fecha8")
|
||||
dt.Columns.Add("Fecha9")
|
||||
dt.Columns.Add("Fecha10")
|
||||
dt.Columns.Add("Fecha11")
|
||||
dt.Columns.Add("Fecha12")
|
||||
dt.Columns.Add("Fecha13")
|
||||
dt.Columns.Add("Fecha14")
|
||||
dt.Columns.Add("Fecha15")
|
||||
dt.Columns.Add("Fecha16")
|
||||
dt.Columns.Add("Fecha17")
|
||||
dt.Columns.Add("Fecha18")
|
||||
dt.Columns.Add("Fecha19")
|
||||
dt.Columns.Add("Fecha20")
|
||||
dt.Columns.Add("Fecha21")
|
||||
dt.Columns.Add("Fecha22")
|
||||
dt.Columns.Add("Fecha23")
|
||||
dt.Columns.Add("Fecha24")
|
||||
dt.Columns.Add("Fecha25")
|
||||
dt.Columns.Add("Fecha26")
|
||||
dt.Columns.Add("Fecha27")
|
||||
dt.Columns.Add("Fecha28")
|
||||
dt.Columns.Add("Fecha29")
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
|
||||
Dim DTVFechas As New DataView(Resultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To dt.Columns.Count - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
UpDatos.Update()
|
||||
|
||||
ColumN = 3
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
|
||||
Dim medida As DateTime = NowADS()
|
||||
|
||||
Dim sbErrores As New StringBuilder
|
||||
Dim TieneInconsistencias As Boolean = False
|
||||
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
ColumN = 3
|
||||
|
||||
Dim ResumenDia As New DataTable
|
||||
Dim DTTempAsistencias As New DataTable
|
||||
Dim filtro As String
|
||||
Dim TipoCorto As String = ""
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & $"'"
|
||||
ResumenDia = Resultados.FiltraParametros(filtro)
|
||||
filtro = filtro & $"|{ResumenDia(0)("HorasDobles").ToString}|{ResumenDia(0)("HorasTriples").ToString}|{ResumenDia(0)("CveMotivoHoraExtra").ToString}|{ResumenDia(0)("Observacion").ToString}|{ResumenDia(0)("PorcentajePago").ToString}"
|
||||
|
||||
TipoCorto = ""
|
||||
|
||||
'If RdbChecador.Checked Then
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString().Contiene("_ND") Then
|
||||
sbErrores.Append($"{pRow("Codigo")} Fecha: {drow(0).ToString().ToDate.ToString("dd/MM/yyyy")} Incidencia no definida <br/>")
|
||||
TieneInconsistencias = True
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString().Length > 0 Then
|
||||
|
||||
RRow(ColumN) = $"{ResumenDia(0)("TipoCorto").ToString()}|" & filtro
|
||||
|
||||
Else
|
||||
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Or ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Or TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Or ResumenDia(0)("DiaInhabil").ToString() = "True" Then
|
||||
RRow(ColumN) = "D|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND|" & filtro
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Else
|
||||
|
||||
' DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
||||
' If DTTempAsistencias.Rows.Count > 0 Then
|
||||
' TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
' Else
|
||||
' TipoCorto = "F"
|
||||
' End If
|
||||
|
||||
' RRow(ColumN) = "" & TipoCorto & "|" & filtro
|
||||
|
||||
'End If
|
||||
|
||||
ColumN = ColumN + 1
|
||||
|
||||
Next
|
||||
|
||||
ResumenDia.Dispose()
|
||||
DTTempAsistencias.Dispose()
|
||||
|
||||
dt.Rows.Add(RRow)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim SalidaTiempo As Integer = (NowADS() - medida).TotalSeconds.ToString().ToEntero
|
||||
SalidaTiempo = SalidaTiempo
|
||||
|
||||
|
||||
|
||||
'DtDatosTabla = dt
|
||||
|
||||
If TieneInconsistencias Then
|
||||
Alert(sbErrores.ToString, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
|
||||
Dim ProcesoOK As Boolean = True
|
||||
Dim separador() As Char = {"|"c}
|
||||
|
||||
Dim ObjPersonal As New ClsRH
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
|
||||
For Each dRowPersonal As DataRow In dt.Rows
|
||||
|
||||
Dim CvePersonal As Integer = dRowPersonal(0).ToString.ToEntero
|
||||
ColumN = 3
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
Try
|
||||
Dim Fecha As Date = drow(0).ToString.ToDate
|
||||
Dim dato As String() = dRowPersonal(ColumN).ToString.Split(separador)
|
||||
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & dato(0) & "' ")
|
||||
Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
|
||||
Dim HorasDobles As Decimal = dato(2).ToDecimal
|
||||
Dim HorasTriples As Decimal = dato(3).ToDecimal
|
||||
Dim CveMotivoHoraExtra As Integer = dato(4).ToEntero
|
||||
Dim Observaciones As String = dato(5)
|
||||
Dim PorcentajePago As Decimal = dato(6).ToDecimal
|
||||
|
||||
If CveAsistenciasInasistencias > 0 Then
|
||||
If Not ObjPersonal.AddAsistencia(CvePersonal, -1, -1, Fecha, CveAsistenciasInasistencias, PorcentajePago, HorasDobles, HorasTriples, CveMotivoHoraExtra, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ProcesoOK = False
|
||||
End Try
|
||||
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
If Not ProcesoOK Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
Dim ObjNomEnvio As New ClsNominas(ObjPersonal.IniciaTransacSQL)
|
||||
If Not ObjNomEnvio.UpdatePeriodoEnvioPrenomina(DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, True) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjPersonal.Commit()
|
||||
Alert("Asistencia enviada correctamente.")
|
||||
Else
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescargaExcel_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Periodo: {0}, Sub Proyecto: {1}, Departamento: {2}", DdlPeriodo.SelectedItem.Text, SubProyecto, DdlDepartamento.SelectedItem.Text)
|
||||
|
||||
Dim Gv As New GridView
|
||||
Gv = GVRegDatos
|
||||
|
||||
For Each gvRow As GridViewRow In Gv.Rows
|
||||
|
||||
Dim x As Integer = 3
|
||||
For x = 3 To Gv.Columns.Count - 1
|
||||
If Gv.Columns(x).Visible = True Then
|
||||
|
||||
Dim Lnk As LinkButton = gvRow.FCLinkButton($"LnkFecha{(x - 2)}")
|
||||
Dim separador() As Char = {"|"c}
|
||||
Dim dato As String() = Lnk.CommandArgument.Split(separador)
|
||||
|
||||
If dato(0) = "_ND" Then
|
||||
gvRow.Cells(x).Text = "Inconsistencia"
|
||||
Else
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & dato(0) & "' ")
|
||||
|
||||
If DTTipoAsistenciaInasistencia IsNot Nothing AndAlso DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||
Dim Tipo As String = DTTipoAsistenciaInasistencia(0)("Tipo").ToString
|
||||
gvRow.Cells(x).Text = Tipo
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
Gv.ExportToExcelGembox("PreAsistencia", UsuarioActual, $"Pre Asistencia {DdlPeriodo.SelectedItem.Text}", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -46,7 +46,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Visor solicitudes Ingreso
|
||||
Visor facturas de ingreso
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -286,12 +286,12 @@ Partial Class Ventas_PVCobranza
|
||||
'e.Row.CssClass = "blue-madison"
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveCondicionEntrega").ToEntero() = 9 OrElse e.Row.DBCampo("AplicaImpresionPorAnt").ToEntero() = 1 Then
|
||||
If e.Row.DBCampo("TipoEntrega") = "2" OrElse e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
|
||||
e.Row.FCLinkButton("LnkImprimir").Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("AplicaImpresionPorAnt").ToEntero() = 1 Then
|
||||
If e.Row.DBCampo("AplicaImpresionPorAnt") = "1" Then
|
||||
'SI TIENE SALDO, QUE APLIQUE EL PAGO
|
||||
If e.Row.DBCampo("Saldo").ToDecimal() > 0 Then
|
||||
e.Row.FCLinkButton("BtnPagar").Visible = True
|
||||
|
||||
Reference in New Issue
Block a user