+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
new file mode 100644
index 000000000..8e8489b85
--- /dev/null
+++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
@@ -0,0 +1,66 @@
+Imports System.Data
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+
+Partial Class Acumuladores_RepEntradasUsados
+ Inherits ClsPaginas
+
+ Private DiasSemana(7) As String
+ Private Meses(12) As String
+
+ Private Property DatosEntradasUsados() As DataTable
+ Get
+ Return CType(ViewState("DatosEntradasUsados"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DatosEntradasUsados") = value
+ End Set
+ End Property
+
+ Protected Sub Page_Load() Handles Me.Load
+ If Not IsPostBack Then
+ txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
+ txtFechaF.Text = Today
+ CargarDatos()
+ End If
+ End Sub
+
+ Protected Sub CargarDatos()
+ DdlAlmacenes.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
+ DdlAlmacenes.DataBind()
+ End Sub
+
+ Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
+ Dim ObjAcum As New ClsAcumuladores
+
+ If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text, txtFechaF.Text) Then
+ GvAcum.DataSource = ObjAcum.DtResultados
+ DatosEntradasUsados = ObjAcum.DtResultados
+
+ End If
+ ObjAcum.Dispose()
+ GvAcum.DataBind()
+
+ End Sub
+
+ Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
+
+
+ Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
+ Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
+
+ Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
+
+ Dim params As New List(Of ReportParameter)
+
+ params.Add(New ReportParameter("Direccion", "asdfasdfasdf"))
+ params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
+ params.Add(New ReportParameter("FechaInicial", txtFechaI.Text))
+ params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
+
+ Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados}
+
+ ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados2.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "prueba", "PDF")
+
+ End Sub
+End Class
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 5b63a3ab7..870e809fa 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -243,12 +243,38 @@ Public Class ClsAcumuladores
End Try
Return Retorno
- End Function
-
+ End Function
+
+ Public Function EntradasUsadosGet(CveEmpresa As Integer, CveAlmacen As Integer, FechaInicial As Date, FechaFinal As Date) As Boolean
+ Dim retorno As Boolean = False
+
+ SqlDataAdapter("PA_Acum_EntradasUsadosResumenRep")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
+ .Add("@FechaInicial", SqlDbType.Date).Value = FechaInicial
+ .Add("@FechaFinal", SqlDbType.Date).Value = FechaFinal
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+
+ OnError("Ocurrió un error al traerse el reporte de usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+
+ End Try
+
+ Return retorno
+
+ End Function
+
+
#End Region
-
+
#Region " TIPOS DEFECTO "
-
+
Public Function TiposDefectoGet(CveTipoDefecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
diff --git a/App_Code/ClsModulos.vb b/App_Code/ClsModulos.vb
index a26983a44..3c47376f4 100644
--- a/App_Code/ClsModulos.vb
+++ b/App_Code/ClsModulos.vb
@@ -429,7 +429,7 @@ Public Class ClsModulos
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose ( que se dispone como Boolean).
- ConexionClose()
+ 'ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index a98a423b0..5dbc2169f 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -172,6 +172,25 @@ Public Class ClsNominas
#Region "ClsNominas_Nominas"
+ Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
+ .Add("@Ejercicio", SqlDbType.Int).Value = ejercicio
+ .Add("@Importe", SqlDbType.Float).Value = importe
+ .Add("@CveTipoPeriodo", SqlDbType.Float).Value = CveTipoPeriodo
+ .Add("@CvePeriodo", SqlDbType.Float).Value = CvePeriodo
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al Realizar el calculo del Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
@@ -1890,6 +1909,102 @@ Public Class ClsNominas
End Try
Return retorno
End Function
+#Region "MovtosPermanentes"
+
+ Public Function GetMovtoPermanente(CveEmpresa As Int32, CvePersonal As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_GetMovtoPermanente", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
+ .Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
+ .Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
+ .Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
+ .Add("@valor", SqlDbType.Float).Value = (valor)
+ .Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
+ .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
+ .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
+ .Add("@estatus", SqlDbType.Bit).Value = (estatus)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_UpMovtoPermanente", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
+ .Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
+ .Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
+ .Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
+ .Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
+ .Add("@valor", SqlDbType.Float).Value = (valor)
+ .Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
+ .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
+ .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
+ .Add("@estatus", SqlDbType.Bit).Value = (estatus)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function RemoveMovtoPermanente(cveMovtoPermanente As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_RemoveMovtoPermanente", CommandType.StoredProcedure)
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+#End Region
+
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 0521e7c0e..0550ccc34 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4581,7 +4581,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
- PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
+ 'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
+ PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
'Antes de aquí.
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index 022ef5ff0..b072d702b 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -131,7 +131,8 @@ Public Class ClsRH
Return Retorno
End Function
- Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
+ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
@@ -143,6 +144,12 @@ Public Class ClsRH
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
+ .Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
+ .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
+ .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
+ .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
+
End With
Try
@@ -161,7 +168,8 @@ Public Class ClsRH
Return Retorno
End Function
- Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer) As Boolean
+ Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
+chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
@@ -172,6 +180,12 @@ Public Class ClsRH
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAI
+
+ .Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
+ .Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
+ .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
+ .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
+ .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
End With
Try
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx
index 3b705d02a..df303871d 100644
--- a/Inventarios/KardexAlmacenHorizontal.aspx
+++ b/Inventarios/KardexAlmacenHorizontal.aspx
@@ -113,7 +113,6 @@