This commit is contained in:
Antonio Gonzalez
2019-12-11 18:55:50 -07:00
27 changed files with 6523 additions and 5140 deletions

View File

@@ -700,7 +700,7 @@ Public Class ClsAcumuladores
#Region "GARANTIAS DETALLES"
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
Consecutivo As String) As Boolean
@@ -708,6 +708,7 @@ Public Class ClsAcumuladores
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso
.Add("@CodigoEnsamble", SqlDbType.VarChar).Value = CodigoEnsamble
@@ -893,6 +894,33 @@ Public Class ClsAcumuladores
End Function
Public Function GetRepInicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProeycto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Acum_RepInicadorDiarioGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveSubProeycto", SqlDbType.Int).Value = CveSubProeycto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support "

View File

@@ -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)

View File

@@ -4581,6 +4581,7 @@ 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/RepIndicadorDiario.aspx".ToUpper(), 2055)
'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)

View File

@@ -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

View File

@@ -2344,13 +2344,14 @@ Public Class ClsVentas
#Region " ANTICIPOS/NOTASCREDITO - VENTAS "
Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer) As Boolean
Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer, Optional AplicaAmortizacion As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasAntNCGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC
.Add("@AplicaAmortizacion", SqlDbType.Bit).Value = AplicaAmortizacion
End With
Try

View File

@@ -491,6 +491,10 @@ Namespace Modelos
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
End If
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
End If
End If
End If
@@ -501,12 +505,6 @@ Namespace Modelos
ObjVentas.Dispose()
'Dim ObjMovtos As New ClsMovimientos()
'If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda) Then
' Me.DtAnticipos = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(TipoDocto = "Ant", "AND Tipo = 'NC'", "")}")
'End If
'ObjMovtos.Dispose()
If Me.RealizarDevolucionAlmacen Then
Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta
End If
@@ -1349,7 +1347,7 @@ Namespace Modelos
'Ajustes'
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
For Each Dr As DataRow In DtAjustes.Rows
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString) Then
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
@@ -2335,12 +2333,12 @@ Namespace Modelos
Exit Select
End If
If ObjFactura.TipoDocto = "Ing" AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAntNCVinculadas.Rows
If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
CveIEAnticipo = -1
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -2358,38 +2356,40 @@ Namespace Modelos
Next
End If
'cuando es anticipo
' cuando es amortización de nota de crédito, y es la nc
' cuando es amortización por descuento, y es el ingreso
' cuando es amortización en cero
If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 3 Then
CveIEAnticipo = row2("CveIE").ToString.ToEntero
importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString.ToEntero,
CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo,
ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
Else
ObjFactura.SeGuardoPrePoliza = True
End If
End If
End If
Next
If ValorMultiplicador = 1 Then
'cuando es anticipo
' cuando es amortización de nota de crédito, y es la nc
' cuando es amortización por descuento, y es el ingreso
' cuando es amortización en cero
If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
CveIEAnticipo = -1
importeMovimiento = row2("Importe").ToString().ToDecimal()
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo,
ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
Else
ObjFactura.SeGuardoPrePoliza = True
End If
End If
End If
Next
End If
End If
'Cuando la funcionalidad de amortizacion en PS esta activa
If Not ErrorPrepoliza Then
DT = TmpDTDetalle.FiltraParametros($"CvePS = {ObjFactura.CvePSAmortizacion}")
@@ -2667,7 +2667,7 @@ Namespace Modelos
importeMovimiento = 0
Case 150 'Descuento sobre ventas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
Dim ConceptoContableAplicar = 150
Dim CveVentaAplicar = ObjFactura.CveVenta
@@ -3859,7 +3859,7 @@ Namespace Modelos
End If
If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que esta amortizada."
Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
Return Retorno
@@ -5554,6 +5554,7 @@ Namespace Modelos
Public Property CveVentaRelacion As Integer = -1
Public Property ImporteRelacion As Decimal
Public Property EsNCAmortizacion As Boolean
#End Region
@@ -9746,6 +9747,119 @@ Namespace Modelos
Public Property RequierePersonal As Boolean
Public Property EsAcumulador As Boolean
End Class
#End Region
#Region "P O L I Z A - V I R T U A L"
Public Class MPolizaVentaLTHWSD
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MPolizaVentaWS
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property sale_total As Decimal
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MIndicador
Sub New(Optional UsaValoresPrueba As Boolean = False)
If UsaValoresPrueba Then
Dim Index As Integer = 0
For Each p As Reflection.PropertyInfo In Me.GetType().GetProperties()
Index = Index + 1
p.SetValue(Me, Convert.ChangeType(Index, p.PropertyType), Nothing)
Next
End If
End Sub
Public Property v_b_optima As Integer
Public Property v_b_fullpower As Integer
Public Property v_b_hitec As Integer
Public Property v_b_agm As Integer
Public Property v_b_suv As Integer
Public Property v_b_taxi As Integer
Public Property v_b_america As Integer
Public Property v_b_lth As Integer
Public Property v_b_cronos As Integer
Public Property v_b_diener As Integer
Public Property v_b_heavyduty As Integer
Public Property v_m_lth As Integer
Public Property v_o_filtros As Integer
Public Property v_o_lub1 As Integer
Public Property v_o_lubgalon As Integer
Public Property v_o_lub5 As Integer
Public Property v_o_aa As Integer
Public Property v_o_aaa As Integer
Public Property g_b_optima As Integer
Public Property g_b_fullpower As Integer
Public Property g_b_hitec As Integer
Public Property g_b_agm As Integer
Public Property g_b_suv As Integer
Public Property g_b_taxi As Integer
Public Property g_b_america As Integer
Public Property g_b_lth As Integer
Public Property g_b_cronos As Integer
Public Property g_b_diener As Integer
Public Property g_b_heavyduty As Integer
Public Property g_m_lth As Integer
Public Property a_b_optima As Integer
Public Property a_b_fullpower As Integer
Public Property a_b_hitec As Integer
Public Property a_b_agm As Integer
Public Property a_b_suv As Integer
Public Property a_b_taxi As Integer
Public Property a_b_america As Integer
Public Property a_b_lth As Integer
Public Property a_b_cronos As Integer
Public Property a_b_diener As Integer
Public Property a_b_heavyduty As Integer
End Class
#End Region
End Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -371,15 +371,15 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
If Not dt.Columns(12).ColumnName = "Servicio" Then
Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
'If Not dt.Columns(12).ColumnName = "Servicio" Then
' Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
' Exit Sub
'End If
If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then
Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
'If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then
' Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
' Exit Sub
'End If
ElseIf RblFormato.SelectedValue = "6" Then
If Not dt.Columns(0).ColumnName = "Código" Then
@@ -669,8 +669,8 @@ Partial Class General_SaldosIniciales
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
Dim Tamaño As String = Row("Tamaño").ToString.Trim
Dim SATClavePS As String = Row("Código SAT").ToString.Trim
Dim Clasificacion2 As String = Row("Servicio").ToString.Trim
Dim Litraje As Double = Row("Conversion Unidad").ToString.ToDouble
Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString.Trim, "")
Dim Litraje As Double = If(dt.Columns.Contains("Conversion Unidad"), Row("Conversion Unidad").ToString.ToDouble, 0)
Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "")
Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "")
Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "")

View File

@@ -336,7 +336,7 @@
<div id="DivVirtualAdvertencia" visible="false" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
<asp:Literal Text="" runat="server" ID="Literal1"></asp:Literal>
<asp:Literal Text="La mercancía sera trasladada al almacén virtual" runat="server"></asp:Literal>
</div>
</div>
</div>

View File

@@ -1,19 +1,154 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Aguinaldo.aspx.vb" Inherits="Nomina_Aguinaldo" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Aguinaldo.aspx.cs" Inherits="Nomina_Aguinaldo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
<script>$('body').removeClass('rhumanosbody').addClass('rhumanosbody')</script>
Aguinaldo
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1" style="width: 60px !important;">Ejercicio: </label>
<div class="col-md-2" style="width: 140px !important;">
<asp:DropDownList ID="DdlEjercicios" DataTextField="Ejercicio" DataValueField="Ejercicio" runat="server" width="100%" CssClass="select2me"></asp:DropDownList>
</div>
<label class="col-md-1" style="width: 120px !important;">Tipo Período: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" CssClass="select2me" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1" style="width: 60px !important;"> </label>
<div class="col-md-2">
</div>
<div class="col-md-3">
<asp:Button ID="BtnCalcular" runat="server" Text="Calcular" OnClick="BtnCalcular_Click" class="btn btn-primary" />
<asp:Button ID="LnkAutorizarModal" runat="server" Text="Autorizar" OnClick="LnkAutorizarModal_Click" Visible="false" class="btn btn-primary" />
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosPA_N" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-3 col-md-offset-1">
<div class="dashboard-stat blue">
<div class="visual"><i class="fa fa-sort-numeric-desc"></i></div>
<div class="details">
<div class="number"> <asp:Literal ID="LtlTotal" runat="server"></asp:Literal> </div>
<div class="desc">
Total Aguinaldo
</div>
</div>
</div>
</div>
<div class="col-md-3 col-md-offset-2">
<div class="dashboard-stat green">
<div class="visual"><i class="fa fa-line-chart"></i></div>
<div class="details">
<div class="number"> <asp:Literal ID="LtldiasEjercicio" runat="server"></asp:Literal></div>
<div class="desc">
Días ejercicio
</div>
</div>
</div>
</div>
</div>
<asp:GridView ID="GVCalcularAguinaldo" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalcularUtilidades" AutoGenerateColumns="False"
DataKeyNames="Nombre,CvePersonal">
<Columns>
<asp:TemplateField HeaderText="Nombre ">
<ItemTemplate>
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Días Laborados">
<ItemTemplate>
<asp:Label ID="lbldiasLaborados" runat="server" Text='<%# Eval("DiasLaborados")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Días Aguinaldo">
<ItemTemplate>
<asp:Label ID="lbldiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Salario Diario">
<ItemTemplate>
<asp:Label ID="lblsueldoDiario" runat="server" Text='<%# Eval("SalarioDiario", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Aguinaldo Completo">
<ItemTemplate>
<asp:Label ID="lblsueldoAguinaldoCompleto" runat="server" Text='<%# Eval("AguinaldoCompleto", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Aguinaldo">
<ItemTemplate>
<asp:Label ID="lblAguinaldo" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Aguinaldo Gravado">
<ItemTemplate>
<asp:Label ID="lblAguinaldoGravado" runat="server" Text='<%# Eval("AguinaldoGravado", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Impuesto">
<ItemTemplate>
<asp:Label ID="lblAguinaldo" runat="server" Text='<%# Eval("ISR", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign ="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Gravadas">
<ItemTemplate>
<asp:Label ID="lbluGravadas" runat="server" Text='<%# Eval("ISR", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ISR">
<ItemTemplate>
<asp:Label ID="lbluisr" runat="server" Text='<%# Eval("Uisr", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="UTilidades por Pagar">
<ItemTemplate>
<asp:Label ID="lbluporPagar" runat="server" Text='<%# Eval("UporPagar", "${0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

73
Nomina/Aguinaldo.aspx.cs Normal file
View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class Nomina_Aguinaldo : ClsPaginas
{
#region Propiedades
private DataTable DTAguinaldos
{
get
{
return (DataTable)ViewState["DTAguinaldos"];
}
set
{
ViewState["DTAguinaldos"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetEjercicios(UsuarioActual.CveEmpresa);
DdlEjercicios.DataSource = objnom.DtResultados;
}
DdlEjercicios.DataBind();
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
DdlTipoPeriodo.DataBind();
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
if (DdlTipoPeriodo.Items.Count > 0)
{
DdlTipoPeriodo.SelectedIndex = 0;
}
}
}
protected void BtnCalcular_Click(object sender, EventArgs e)
{
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
int CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
int CvePeriodo = -1;
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetCalculoAguinaldo(ejercicio, UsuarioActual.CveEmpresa, 0, CveTipoPeriodo, CvePeriodo);
DTAguinaldos = objnom.DtResultados;
GVCalcularAguinaldo.DataSource = DTAguinaldos;
LtlTotal.Text = string.Format("{0:N2}", DTAguinaldos.SUM("Aguinaldo"));
LtldiasEjercicio.Text = string.Format("{0}/12/31", ejercicio).ToDate().DayOfYear.ToString();
}
GVCalcularAguinaldo.DataBind();
LnkAutorizarModal.Visible = true;
upDatosPA_N.Update();
}
protected void LnkAutorizarModal_Click(object sender, EventArgs e)
{
}
}

View File

@@ -1,5 +0,0 @@

Partial Class Nomina_Aguinaldo
Inherits ClsPaginas
End Class

View File

@@ -190,7 +190,7 @@
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
</div>
</div>
<div class="modal-footer">

View File

@@ -68,15 +68,15 @@
<li>
<asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink>
</li>
<li>
<li>
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server">Tablas</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
@@ -780,9 +780,239 @@
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabFonacot" runat="server" HeaderText="Fonacot">
<ContentTemplate>
<div class="portlet light bordered xspadding" id="porletFonacot">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-home font-green"></i>
<span class="caption-subject bold uppercase">Fonacot</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkGuardarFonacot" OnClick="LnkGuardarFonacot_Click" runat="server" Text="Guardar" class="btn btn-primary" />
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtFonNumCredito" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFonNumCredito" runat="server" Text="Número de crédito"></asp:Label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtFonDescripcion" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFonDescripcion" runat="server" Text="Descripción"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="">
<asp:Label AssociatedControlID="DdlFonTipoAplicacion" CssClass="ddlInfolabel" runat="server" Text="Tipo Aplicación"></asp:Label>
<asp:DropDownList ID="DdlFonTipoAplicacion" AutoPostBack="true" runat="server" Class="form-control select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Fonacot(Importe fijo)" Value="3001"></asp:ListItem>
<asp:ListItem Text="Fonacot(Por días Labarados)" Value="3002"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtFonValor" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFonValor" runat="server" Text="Valor"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright " style="width: 120px !important; display: inline-block;">
<asp:TextBox CssClass="form-control" ID="TxtFonFechaInicio" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFonFechaInicio" runat="server" Text="Fecha Inicio"></asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvFonFechaFEstFin" ControlToValidate="TxtFonFechaInicio" ErrorMessage="Debe ingresar una fecha" ValidationGroup="vgEstFon" />
<ajax:MaskedEditExtender ID="MEEFonFechaFEstFin" runat="server" TargetControlID="TxtFonFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFonFechaFEstFin" TargetControlID="TxtFonFechaInicio" PopupButtonID="LnkFonFechaFEstFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div style="display: inline-block; vertical-align: top; padding-top: 10px;">
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFonFechaFEstFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
</div>
<div class="col-md-3">
<div class="">
<asp:Label AssociatedControlID="ChkFonacot" runat="server" Text="Estado (Activo)"></asp:Label>
</div>
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkFonacot" CssClass="chksino" runat="server" Text=" " />
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabMovtosPermanentes" runat="server" HeaderText="Movimientos Permanentes">
<ContentTemplate>
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-4">
<div class="portlet light xspadding bordered " id="pnlListMovtos">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Movimientos</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkAddMovtoPermanente" OnClick="LnkAddMovtoPermanente_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body ">
<asp:GridView ID="GVMovtoPermanente" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall " AutoGenerateColumns="False"
ShowHeader ="false" EmptyDataText="No se encontraron Movimientos"
DataKeyNames="CveMovtoPermanente,CveConcepto,CvePersonal,Descripcion,TipoDescuento,Valor,VecesAplicar,MontoLimite,FechaInicioAplicacion,Estatus,FechaRegistro">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarMovtoPermanente_Click"
CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("Descripcion")%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="col-md-8">
<asp:Panel runat="server" Visible="false" CssClass="portlet light xspadding bordered " ID="pnlAddupMovto">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">
<asp:Literal ID="LtlMovtoPermanenteaddup" runat="server"></asp:Literal></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body ">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario "
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Descripción:" AssociatedControlID="TxtDescripcion"></asp:Label>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" Text="Tipo Concepto:" AssociatedControlID=""></asp:Label>
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" OnSelectedIndexChanged="DdlTipo_SelectedIndexChanged" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="P" Text="Percepciones"></asp:ListItem>
<asp:ListItem Value="D" Selected ="True" Text="Deducciones"></asp:ListItem>
<asp:ListItem Value="O" Text="Obligaciones"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" Text="Concepto:" AssociatedControlID=""></asp:Label>
<asp:DropDownList ID="DdlConcepto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" Text="Tipo Descuento:" AssociatedControlID=""></asp:Label>
<asp:DropDownList ID="DdlTipoDescto" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDescto_SelectedIndexChanged" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
<asp:ListItem Value="2" Text="Porcentaje"></asp:ListItem>
<asp:ListItem Value="3" Text="Importe(Tope Monto)"></asp:ListItem>
<asp:ListItem Value="4" Text="Porcentaje(Tope Monto)"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtValor" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvValor" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario "
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Valor:" AssociatedControlID="TxtValor"></asp:Label>
</div>
</div>
<asp:Panel runat="server" ID="pnlVecesAplicar" CssClass="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvVecesAplicar" runat="server" ControlToValidate="TxtVecesAplicar" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Veces por Aplicar''</b> es necesario "
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Veces por Aplicar:" AssociatedControlID="TxtVecesAplicar"></asp:Label>
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlMonto" CssClass="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMontoLimite" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvMontoLimite" runat="server" ControlToValidate="TxtMontoLimite" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Monto Limite''</b> es necesario "
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Monto Limite:" AssociatedControlID="TxtMontoLimite"></asp:Label>
</div>
</asp:Panel>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtFechaAplicacion" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Fecha de Aplicación: " AssociatedControlID="TxtFechaAplicacion"></asp:Label>
<ajax:MaskedEditExtender ID="MKEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">Activo?</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkEstatus" CssClass="chksino " Text=" " runat="server" /></div>
</div>
<div class="text-right">
<asp:LinkButton ID="LnkAddMovto" OnClick="LnkAddMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-primary" runat="server">Agregar</asp:LinkButton>
<asp:LinkButton ID="LnkUpMovto" OnClick="LnkUpMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
</div>
</div>
</asp:Panel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
@@ -810,7 +1040,7 @@
<div class="modal-body">
<ajax:TabContainer ID="TabTablas" runat="server" Width="100%">
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible ="false">
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible="false">
<ContentTemplate>
<asp:GridView ID="gvAntigudad" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
@@ -820,18 +1050,18 @@
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible ="false">
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible="false">
<ContentTemplate>
<asp:GridView ID="GVFactorSDI" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible ="false">
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible="false">
<ContentTemplate>
<asp:GridView ID="GVFiniquito" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible ="false">
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible="false">
<ContentTemplate>
<asp:GridView ID="GVRepartoMonetario" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
@@ -851,7 +1081,7 @@
<asp:GridView ID="GVInfonavitSegViv" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible ="false">
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible="false">
<ContentTemplate>
<asp:GridView ID="GVVigISRAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
@@ -861,7 +1091,7 @@
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible ="false">
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible="false">
<ContentTemplate>
<asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate>
@@ -899,7 +1129,7 @@
</div>
<div class="modal-body">
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
-No se debe editar el nombre de la hoja 'Nomina'.<br />
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />

View File

@@ -93,6 +93,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["CvePeriodoSeleccionado"] = value; }
}
protected int CcveMovtoPermanente
{
get
{
if (ViewState["CcveMovtoPermanente"] == null) { return 0; }
else { return ViewState["CcveMovtoPermanente"].ToString().ToEntero(); }
}
set { ViewState["CcveMovtoPermanente"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
@@ -912,6 +923,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
LblEmpleado.Text = Nombre;
TabPersonal.ActiveTabIndex = 0;
mostrarConceptos();
pnlAddupMovto.Visible = false;
CargaMovtoPermanente();
RegistraScript("$('#ModalConceptos').modal();");
}
private void mostrarConceptos()
@@ -1036,6 +1049,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
ChkInfo.Checked = frow["estatus"].ToString().ToUpper().Contiene("1", "TRUE");
}
frow = objper.DtResultados.FiltroPrimero("CveSistema =4");
TxtFonValor.Text = "";
DdlFonTipoAplicacion.SelectedValueExist("-1");
TxtFonDescripcion.Text = "";
TxtFonNumCredito.Text = "";
TxtFonFechaInicio.Text = "";
ChkFonacot.Checked = false;
if (frow != null)
{
TxtFonValor.Text = String.Format("{0:###,###.##}", frow["Importe"]);
DdlFonTipoAplicacion.SelectedValueExist(frow["TipoAplicacion"].ToString());
TxtFonDescripcion.Text = String.Format("{0}", frow["Descripcion02"]);
TxtFonNumCredito.Text = String.Format("{0}", frow["Descripcion01"]);
TxtFonFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow["FInicioAplicacion"]);
ChkFonacot.Checked = frow["estatus"].ToString().ToUpper().Contiene("1", "TRUE");
}
}
}
#endregion
@@ -1155,7 +1190,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
string DiasIncapacidad = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
if (drow != null)
@@ -1166,6 +1201,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
}
}
//string Codigo = "";
@@ -1182,6 +1218,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
@@ -1461,7 +1498,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
string strFechaFin = "";
string strTipo = "";
string strPeriodoNum = "";
string strUbicacion = string.Format ("{0}, {1}, {2}, {3}",UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado );
string strUbicacion = string.Format("{0}, {1}, {2}, {3}", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado);
string strRegPatImss = "";
string strRFC = UsuarioActual.Empresa.RFC;
string strfecha = DateTime.Now.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
@@ -1472,11 +1509,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
DataRow rperiodo = dtPeriodos.FiltroPrimero(string.Format("CvePeriodo = {0}", CvePeriodo));
if (rperiodo != null)
{
strFechaInicio =string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
strFechaInicio = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
strFechaFin = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaFin"]);
strPeriodoNum = rperiodo["Numero"].ToString();
strTipo = DdlTipoPeriodo.SelectedItem.Text ;
strTipo = DdlTipoPeriodo.SelectedItem.Text;
}
listaTags.Add(new TagsDocumentos("[Empresa]", strEmpresa));
listaTags.Add(new TagsDocumentos("[FechaInicio]", strFechaInicio));
@@ -1526,7 +1563,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
string SalarioDiariop = "";
string FechaIngreso = "", Nombre = "", DiasLaborados = "";*/
paragraphh = new GemBox.Document.Paragraph(document,string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
paragraphh.ParagraphFormat.Style = styilostrong;
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"])); cell.Blocks.Add(paragraphh);
@@ -1625,7 +1662,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero();
importe = string.Format("${0:N2}", rowconcept["Importe"]);
valor = string.Format("{0:#,###.##}", rowconcept["Valor"]);
Concepto = "";
rowconcept = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", CveConcepto));
@@ -1668,7 +1705,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = "";valor = "";
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = ""; valor = "";
rowconcept = dtempleadosConceptos.FiltroPrimero(string.Format("CvePersonal={0} AND Tipo =2 AND Fila ={1}", CvePersonal, cindex));
@@ -2122,7 +2159,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{0:N0}", dtempleados.COUNT("CvePersonal", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
paragraphh.ParagraphFormat.Style = styilo;
}
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
@@ -2556,7 +2593,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
//basura para espacio
{
rowx = new GemBox.Document.Tables.TableRow(document);
tconeptos.Rows.Add(rowx);
tconeptos.Rows.Add(rowx);
{
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
@@ -2852,4 +2889,193 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
ImprimirReporte();
}
#region Movtos Permanentes
protected void CargaTipoConcepto()
{
//DdlTipo.Items.Insert(0, new ListItem("Percepciones", "P"));
//DdlTipo.Items.Insert(1, new ListItem("Deducciones", "D"));
//DdlTipo.Items.Insert(2, new ListItem("Obligaciones", "O"));
//DdlTipo.SelectedValueExist("-1");
CargaConcepto();
}
protected void CargaConcepto()
{
DdlConcepto.Items.Clear();
if (DdlTipo.SelectedValue == "-1")
{
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
}
else
{
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue));
}
DdlConcepto.DataBind();
DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlConcepto.SelectedValueExist("-1");
}
private void CargaMovtoPermanente()
{
using (ClsNominas ObjMovt = new ClsNominas())
{
ObjMovt.GetMovtoPermanente(UsuarioActual.CveEmpresa, SRCvePersonal);
GVMovtoPermanente.DataSource = ObjMovt.DtResultados;
}
GVMovtoPermanente.DataBind();
UpMovtosPermanentes.Update();
}
protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e)
{
CargaConcepto();
}
protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e)
{
CargaConcepto();
DdlTipoDescto_SelectedIndexChanged(null, null);
pnlAddupMovto.Visible = true;
LnkAddMovto.Visible = true;
LnkUpMovto.Visible = false;
LtlMovtoPermanenteaddup.Text = "Agregar Movimiento";
TxtDescripcion.Text = "";
TxtValor.Text = "";
TxtVecesAplicar.Text = "";
TxtMontoLimite.Text = "";
TxtFechaAplicacion.Text = "";
ChkEstatus.Visible = true;
}
protected void LnkAddMovto_Click(object sender, EventArgs e)
{
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
string descripcion = TxtDescripcion.Text;
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
double valor = TxtValor.Text.ToDouble();
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
bool estatus = ChkEstatus.Checked;
bool Continuar;
using (ClsNominas ObjMovt = new ClsNominas())
{
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
}
if (Continuar)
{
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
CargaMovtoPermanente();
UpMovtosPermanentes.Update();
this.Alert("El Movto_Permanente Se ha agregado");
}
}
protected void LnkUpMovto_Click(object sender, EventArgs e)
{
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
string descripcion = TxtDescripcion.Text;
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
double valor = TxtValor.Text.ToDouble();
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
bool estatus = ChkEstatus.Checked;
bool Continuar;
using (ClsNominas ObjMovt = new ClsNominas())
{
Continuar = ObjMovt.UpMovtoPermanente(CcveMovtoPermanente, cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
}
if (Continuar)
{
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
CargaMovtoPermanente();
UpMovtosPermanentes.Update();
this.Alert("El Movto_Permanente Se ha agregado");
}
}
protected void DdlTipoDescto_SelectedIndexChanged(object sender, EventArgs e)
{
pnlMonto.Visible = DdlTipoDescto.SelectedValue.ToEntero() > 2;
pnlVecesAplicar.Visible = DdlTipoDescto.SelectedValue.ToEntero() < 3;
}
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero();
int cveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
int cvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
string descripcion = gvRow.DataKey("Descripcion");
int tipoDescuento = gvRow.DataKey("TipoDescuento").ToEntero();
double valor = gvRow.DataKey("Valor").ToDouble();
int vecesAplicar = gvRow.DataKey("VecesAplicar").ToEntero();
decimal montoLimite = gvRow.DataKey("MontoLimite").ToDecimal();
DateTime fechaInicioAplicacion = gvRow.DataKey("FechaInicioAplicacion").ToDate();
bool estatus = gvRow.DataKey("Estatus") == "1" || gvRow.DataKey("Estatus").ToUpper() == "TRUE";
DateTime fechaRegistro = gvRow.DataKey("FechaRegistro").ToDateTime();
string tipo = "P";
DataRow drow = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("Tipo ='{0}'", cveConcepto));
if (drow != null)
{
tipo = drow["Tipo"].ToString();
DdlTipo.SelectedValueExist(tipo);
DdlTipo_SelectedIndexChanged(null, null);
}
DdlConcepto.SelectedValueExist(cveConcepto);
TxtDescripcion.Text = descripcion.ToString();
DdlTipoDescto.SelectedValueExist(tipoDescuento.ToString());
DdlTipoDescto_SelectedIndexChanged(null, null);
TxtValor.Text = valor.ToString();
TxtVecesAplicar.Text = vecesAplicar.ToString();
TxtMontoLimite.Text = montoLimite.ToString();
TxtFechaAplicacion.Text = $"{fechaInicioAplicacion:dd/MM/yyyy}";
ChkEstatus.Checked = estatus;
this.RegistraScript("$('#DModalMovtoPermanente').modal();");
pnlAddupMovto.Visible = true;
LnkAddMovto.Visible = false;
LnkUpMovto.Visible = true;
UpMovtosPermanentes.Update();
}
#endregion
protected void LnkGuardarFonacot_Click(object sender, EventArgs e)
{
double importe = TxtFonValor.Text.ToDouble();
int TipoAplicacion = DdlFonTipoAplicacion.SelectedValue.ToEntero();
int NoPagos = 0;
double SaldoIni = 0;
string descripcion02 = TxtFonDescripcion.Text;
string descripcion01 = TxtFonNumCredito.Text;
string fecha = TxtFonFechaInicio.Text.Replace("_", "");
int estatus = ChkFonacot.Checked ? 1 : 0;
if (fecha.Length > 8)
fecha = fecha.ToDateTime().ToString("yyyy/MM/dd");
else
fecha = "";
bool continuar = true;
using (ClsRH ObjPersonal = new ClsRH())
{
if (!ObjPersonal.AddConcepto(SRCvePersonal, -1, importe, TipoAplicacion, NoPagos, SaldoIni, UsuarioActual.CveUsuario, 4, descripcion01, descripcion02, fecha, "", estatus, UsuarioActual.CveEmpresa))
continuar = false;
}
if (continuar)
{
LnkConsultar_Click(null, null);
mostrarConceptos();
Alert("Se actualizo el calculo de fonacot");
}
}
}

View File

@@ -14,6 +14,7 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
<script>$('body').removeClass('rhumanosbody').addClass('rhumanosbody')</script>
Reparto de Utilidades
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">

View File

@@ -59,10 +59,10 @@ Partial Class Nomina_ReportePTU
utilimporte = TxtPA_Nimporte.Text.ToDouble()
utilimporteAnt = TxtPA_NimporteA.Text.ToDouble()
Dim objnom As New ClsNominas()
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
DTUtilidades = objnom.DtResultados
objnom.Dispose()
Using objnom As New ClsNominas()
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
DTUtilidades = objnom.DtResultados
End Using
cargaEjercicio(DTUtilidades)
LnkAutorizarModal.Visible = True
@@ -155,7 +155,7 @@ Partial Class Nomina_ReportePTU
If Not IsNothing(rowc) Then
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
Else
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0)
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0)
End If
If CveConcepto < 1 Then
continuar = False

View File

@@ -11,7 +11,7 @@
Catálogo de Tipos de Asistencias/Inasistencias
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
@@ -21,11 +21,9 @@
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
@@ -33,7 +31,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -58,9 +56,38 @@
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString = "Aplica", True, False) %>' />
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString() = "Aplica", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Vacaciones" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicaVacacion" runat="server" Text='<%# Eval("AplicaVacacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Incapacidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplica" runat="server" Text='<%# Eval("AplicaIncapacidad") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Retardo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicaRetardo" runat="server" Text='<%# Eval("AplicaRetardo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Aguinaldo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicaAguinaldo" runat="server" Text='<%# Eval("AplicaAguinaldo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Utilidades" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
@@ -80,7 +107,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<%--<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />--%>
</ItemTemplate>
@@ -121,21 +148,50 @@
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="TipoTxt">Tipo:</label>
<i></i>
</div>
<br />
<div ID="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="AplicaNoAplica">Aplica Asistencia:</label>&nbsp;
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
<div class="row">
<div class="col-md-4">
<div id="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="AplicaNoAplica">Aplica Asistencia:</label><br />
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
</div>
</div>
<div class="col-md-4" >
<label for="AplicaFalta">Aplica Falta:</label><br />
<asp:CheckBox ID="AplicaFalta" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div class="col-md-4">
<label for="AplicaVacacion">Aplica Vacaciones:</label><br />
<asp:CheckBox ID="AplicaVacacion" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div>
<br ID="saltoDeLinea" runat="server" />
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Activo:</label>&nbsp;
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
<div class="row">
<div class="col-md-4">
<label for="AplicaIncapacidad">Aplica Incapacidad:</label><br />
<asp:CheckBox ID="AplicaIncapacidad" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div class="col-md-4">
<label for="AplicaRetardo">Aplica Retardo:</label><br />
<asp:CheckBox ID="AplicaRetardo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div>
<div class="row">
<div class="col-md-4">
<label for="AplicaAguinaldo">Aplica Aguinaldo:</label><br />
<asp:CheckBox ID="AplicaAguinaldo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div class="col-md-4">
<label for="AplicaUtilidades">Aplica Utilidades:</label><br />
<asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div>
<div class="row">
</div>
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Activo:</label><br />
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div>
<br />
<div class="modal-footer">
@@ -154,7 +210,7 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script language="javascript" type="text/javascript">
<script type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el tipo de Asistencias/Inasistencias?');
}

View File

@@ -6,7 +6,7 @@ Imports System.Linq
Imports Extensiones
Partial Class RH_CatAsistenciasInasistencias
Inherits ClsPaginas
Inherits ClsPaginas
#Region " PROPIEDADES "
Public Property PuedeEditar As Boolean
@@ -63,7 +63,13 @@ Partial Class RH_CatAsistenciasInasistencias
BtnEditarTiposDModal.Visible = False
BtnAgregarTiposDModal.Visible = True
CheckActiveSection.Visible = False
saltoDeLinea.Visible = False
AplicaNoAplica.Checked = False
AplicaFalta.Checked = True
AplicaVacacion.Checked = False
AplicaIncapacidad.Checked = False
AplicaRetardo.Checked = False
AplicaAguinaldo.Checked = False
AplicaUtilidades.Checked = False
TipoTxt.Text = ""
UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
@@ -72,7 +78,17 @@ Partial Class RH_CatAsistenciasInasistencias
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
Dim ObjAsistenciasInasistencias As New ClsRH
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, Not AplicaNoAplica.Checked, AplicaNoAplica.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim chkAplicaFalta As Boolean = AplicaFalta.Checked
Dim chkAplicaNoAplica As Boolean = Not AplicaNoAplica.Checked
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
TipoTxt.Text = ""
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
@@ -100,11 +116,19 @@ Partial Class RH_CatAsistenciasInasistencias
BtnAgregarTiposDModal.Visible = False
BtnEditarTiposDModal.Visible = True
CheckActiveSection.Visible = True
saltoDeLinea.Visible = True
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
TipoTxt.Text = GvRow.DataKey("Tipo")
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
AplicaFalta.Checked = If(GvRow.DataKey("AplicaFalta") = "Aplica", True, False)
AplicaVacacion.Checked = If(GvRow.DataKey("AplicaVacacion") = "Aplica", True, False)
AplicaIncapacidad.Checked = If(GvRow.DataKey("AplicaIncapacidad") = "Aplica", True, False)
AplicaRetardo.Checked = If(GvRow.DataKey("AplicaRetardo") = "Aplica", True, False)
AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False)
AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False)
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
@@ -120,11 +144,21 @@ Partial Class RH_CatAsistenciasInasistencias
Dim ObjAsistenciasInasistencias As New ClsRH
Dim Tipo As String = TipoTxt.Text.Trim
Dim Estatus As Boolean = ChkEstatus.Checked
Dim AplicaFalta As Boolean = Not AplicaNoAplica.Checked
Dim ckAplicaFalta As Boolean = Not AplicaFalta.Checked
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, AplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias) Then
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
GvDatos.EditIndex = -1
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados

View File

@@ -99,6 +99,7 @@ Partial Class RH_CatPersonalRequerido
End Sub
Private Sub CargaDepartamento()
DdlDepartamento.Items.Clear()
DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlDepartamento.DataBind()
End Sub

View File

@@ -1727,6 +1727,7 @@
</tr>
</table>
<asp:GridView ID="GVAsistencia" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveAsistencia" ShowHeader="false"
data-heighterror="550"
EmptyDataText="No se encontraron registros de Asistencias con los filtros seleccionados" ToolTip="Listado de Asistencias" data-rows="0"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-tableheader="#GvAsistenciaHeader" GridLines="None">
<Columns>

View File

@@ -10,8 +10,8 @@ Imports Microsoft.Reporting.WebForms
Imports System.Globalization
Partial Class RH_Personal
Inherits ClsPaginas
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Private Property DTCuentasBancos As DataTable
Get
@@ -321,14 +321,14 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CveMovimientoDetalleUniforme") = value
End Set
End Property
End Property
#End Region
#Region "V A C A C I O N E S - P E R M I S O S"
Private Property VacInicioPeriodo As Date
Get
If ViewState("VacInicioPeriodo") Is Nothing Then
@@ -626,137 +626,137 @@ Partial Class RH_Personal
End If
ViewState("Orden") = ""
ViewState("Orden1") = ""
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
ViewState("Orden1") = ""
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
End If
SetValues()
'SetPermisos()
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
End If
SetValues()
'SetPermisos()
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CargaViaticosPersonal()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CrearEstructuraFamiliares()
CargaFamiliares()
CargaViaticosPersonal()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares()
CargaFamiliares()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
End If
'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' HplAbonarMasivo.Visible = True
' GvGxC.Columns(7).Visible = True
'End If
If Not CvePersonal > 0 Then
DivSuperiorInmediato.Visible = False
End If
'09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
If DTConsumos IsNot Nothing Then
If DTConsumos.Rows.Count > 0 Then
UpDescargaConsumos.Visible = True
End If
End If
CargaLicencias()
End If
AgregarEventosAsincronosGvVacaciones()
'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' HplAbonarMasivo.Visible = True
' GvGxC.Columns(7).Visible = True
'End If
If Not CvePersonal > 0 Then
DivSuperiorInmediato.Visible = False
End If
'09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
If DTConsumos IsNot Nothing Then
If DTConsumos.Rows.Count > 0 Then
UpDescargaConsumos.Visible = True
End If
End If
CargaLicencias()
End If
AgregarEventosAsincronosGvVacaciones()
End Sub
Private Sub CargaCuentasContables()
@@ -810,10 +810,10 @@ Partial Class RH_Personal
Private Sub SetPermisos()
'Permisos
End Sub
End Sub
#Region "Carga Combos"
Private Sub CargaEscolaridad()
DdlEscolaridad.DataSource = GlobalDTEscolaridad
DdlEscolaridad.DataBind()
@@ -1042,16 +1042,16 @@ Partial Class RH_Personal
Nom.Dispose()
GvNominas.DataBind()
End Sub
End Sub
#End Region
#Region "Asistencias"
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH
@@ -1159,7 +1159,7 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
BtnConsultarAsistencia_Click(sender, e)
End Sub
End Sub
#End Region
Private Sub CargaConsignacion()
@@ -1758,11 +1758,11 @@ Partial Class RH_Personal
DdlClienteAsignado.Attributes.Remove("onclick")
DdlClienteAsistenciaC.Attributes.Remove("onclick")
DdlClienteAsistenciaA.Attributes.Remove("onclick")
End Sub
End Sub
#Region "Buzón de Calidad"
Private Sub CargaBuzonCalidad()
Dim ObjPersonal As New ClsRH
@@ -2098,12 +2098,12 @@ Partial Class RH_Personal
End If
GvBuzonCalidad.DataBind()
UpDatos.Update()
End Sub
End Sub
#End Region
#Region "Resguardos"
Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2126,13 +2126,13 @@ Partial Class RH_Personal
e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & "</a>"
End If
End Sub
End Sub
#End Region
#Region "Nómina"
Private Sub CarcaConceptosNomina()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then
@@ -2185,6 +2185,10 @@ Partial Class RH_Personal
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003"))
ElseIf (e.Row.DBCampo("CveSistema").ToString() = "4") Then
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Importe fijo)", "3001"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Por días Labarados)", "3002"))
Else
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2"))
@@ -2193,30 +2197,30 @@ Partial Class RH_Personal
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
TipoAplicacion = "2600"
End If
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
TipoAplicacion = "2600"
End If
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
End If
End If
End Sub
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
@@ -2299,9 +2303,9 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End If
End Sub
End Sub
#End Region
Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Ddl As DropDownList = DirectCast(sender, DropDownList)
@@ -2383,10 +2387,10 @@ Partial Class RH_Personal
End If
End If
End Sub
End Sub
#Region "G A S T O S X C O M P R O B A R"
Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs)
If RBLTipoGastos.SelectedValue = "1" Then
@@ -2475,10 +2479,10 @@ Partial Class RH_Personal
End If
End Sub
End Sub
#End Region
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2554,9 +2558,9 @@ Partial Class RH_Personal
HttpContext.Current.Response.End()
Archivo = Nothing
End Sub
End Sub
#End Region
Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 1 Then
@@ -2609,7 +2613,7 @@ Partial Class RH_Personal
End Sub
End Sub
#Region "TAB BANCOS"
Private Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas
@@ -2757,8 +2761,8 @@ Partial Class RH_Personal
ObjCuentasBancos.Dispose()
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
End Sub
End Sub
#Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2909,11 +2913,11 @@ Partial Class RH_Personal
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
ObjCuentasBancos.Dispose()
CargaGvBitacora()
End Sub
End Sub
#End Region
#End Region
#Region "O R D E N A M I E N T O"
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim Orden As String = ""
@@ -2949,10 +2953,10 @@ Partial Class RH_Personal
ViewState("Orden1") = Orden
CargaGvAsistencias()
End If
End Sub
End Sub
#End Region
#Region "I M P R I M I R N O M I N A"
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
@@ -2960,11 +2964,11 @@ Partial Class RH_Personal
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo")
End Sub
End Sub
#End Region
#Region " ORGANIGRAMA "
Private Sub CargaSuperioresOrganigrama()
Dim ObjRH As New ClsRH
@@ -2985,10 +2989,10 @@ Partial Class RH_Personal
End Sub
End Sub
#End Region
#Region "I M P R I M I R "
Private Sub GenerarPDF(Optional Formato As String = "PDF")
@@ -3290,12 +3294,12 @@ Partial Class RH_Personal
End Sub
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
GenerarPDFGastosXComp("Excel")
End Sub
End Sub
#End Region
#Region "D O C U M E N T A C I O N C O N T R A T O S"
Private Sub CargaDocumentacionFirmaDecontratos()
If CvePersonal > 0 Then
@@ -3986,10 +3990,10 @@ Partial Class RH_Personal
RegistraScript("Download('" & baseUrl & "')")
End Sub
End Sub
#End Region
Protected Sub LBCancelar_Click(sender As Object, e As EventArgs)
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString
@@ -4010,10 +4014,10 @@ Partial Class RH_Personal
Obj = Nothing
End Sub
End Sub
#Region "VACACIONES"
Private Sub CargaVacaciones()
Dim objRH As New ClsRH
@@ -4703,12 +4707,12 @@ Partial Class RH_Personal
objRH.Dispose()
Return ListaTags
End Function
End Function
#End Region
#Region "CURSOS"
Private Sub CargaCursos()
Dim objRH As New ClsRH
@@ -4805,11 +4809,11 @@ Partial Class RH_Personal
End Sub
End Sub
#End Region
#Region "UNIFORMES"
Private Sub CargaComboUniformes()
@@ -4934,12 +4938,12 @@ Partial Class RH_Personal
CargaUniformesPersonal()
End If
ObjInv.Dispose()
End Sub
End Sub
#End Region
#Region "CARGAR IMAGEN"
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
@@ -4963,10 +4967,10 @@ Partial Class RH_Personal
TxtCargaImg.Text = "[]"
UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
End Sub
End Sub
#Region "PERMISOS"
Public Sub CargaPermisos()
Dim ObjRH As New ClsRH
@@ -5092,57 +5096,57 @@ Partial Class RH_Personal
ObjRH.Dispose()
CargaPermisos()
End Sub
End Sub
#End Region
#End Region
'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
' Preguntar si existe en temporales
' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) Then
' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString)
' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' File.Delete(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' Else
' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' End If
' Else
' Imagen Default
' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
' End If
' End If
' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString) Then
' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString)
' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' Session("FileUpload") = ""
' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
' End If
' End If
'End Sub
'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
' Preguntar si existe en temporales
' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) Then
' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString)
' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' File.Delete(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' Else
' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' End If
' Else
' Imagen Default
' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
' End If
' End If
' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString) Then
' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString)
' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' Session("FileUpload") = ""
' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
' End If
' End If
'End Sub
#Region "Consumos"
Private Sub Consumos()
Dim ObjCompras As New ClsCompras
@@ -5221,10 +5225,10 @@ Partial Class RH_Personal
End Sub
Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs)
GenerarPDFConsumo()
End Sub
End Sub
#End Region
#Region ""
Protected Sub LbMail_Click(sender As Object, e As EventArgs)
@@ -5308,9 +5312,9 @@ Partial Class RH_Personal
End If
End Sub
End Sub
#End Region
#Region "VIATICOS"
Protected Sub CargaViaticosPersonal()
Dim ObjBancos As ClsBancos = New ClsBancos
@@ -5345,11 +5349,11 @@ Partial Class RH_Personal
If (e.Row.RowType = DataControlRowType.Footer) Then
e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero()
End If
End Sub
End Sub
#End Region
#Region "BITACORA"
Private Sub CargaGvBitacora()
If CvePersonal > 0 Then
@@ -5362,12 +5366,12 @@ Partial Class RH_Personal
UpHistorialModificacion.Update()
End If
End Sub
End Sub
#End Region
#Region "PAGO DE FACTURAS"
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaPagoFactura()
UpnHistorial.Update()
@@ -5380,10 +5384,10 @@ Partial Class RH_Personal
End If
ObjRH.Dispose()
GVPagoFactura.DataBind()
End Sub
End Sub
#End Region
Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs)
Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble()
Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime()
@@ -5399,8 +5403,8 @@ Partial Class RH_Personal
End Sub
Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer
Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
End Function
End Function
#Region "L I C E N C I A S"
Public Sub CargaLicencias()
If CvePersonal > 0 Then
@@ -5547,7 +5551,7 @@ Partial Class RH_Personal
End If
RegistraScript("$('#DivAddLicencias').modal('hide');")
End Sub
End Sub
#End Region
Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs)
GenerarPDFResguardosAF()
@@ -5682,7 +5686,7 @@ Partial Class RH_Personal
Protected Sub BtnAgregarFamiliar_Click(sender As Object, e As EventArgs) Handles BtnAgregarFamiliar.Click
resetFormFamiliares()
ResetFormFamiliares()
RegistraScript("$('#divAgregarFamiliar').modal({ backdrop: 'static', keyboard: false});")
End Sub

View File

@@ -105,7 +105,8 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" DataKeyNames="SubProyecto"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="margin-top: -2px; text-align: center;" GridLines="None">
<Columns>
<asp:BoundField HeaderText ="Proyecto" DataField="proyecto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText ="Subproyecto" DataField="Subproyecto" ItemStyle-HorizontalAlign="Left" />

View File

@@ -108,7 +108,8 @@ Partial Class Ventas_RepIndiceRotacionPersonal
Protected Sub GVRegDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVRegDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowType = DataControlRowType.DataRow Then
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim
@@ -124,12 +125,15 @@ Partial Class Ventas_RepIndiceRotacionPersonal
e.Row.FCLabel("LblIrp").CssClass = "label label-success"
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
e.Row.FCLabel("LblIrp").CssClass = "label label-warning"
End If
End If
End If
End If
If e.Row.DataKey("SubProyecto").ToString.Trim = "" Then
e.Row.CssClass = "SubTotales"
' e.Row.Attributes.Add("class", "SubTotales")
End If
End If

View File

@@ -1071,7 +1071,7 @@ Partial Class PV
CargaSucursales()
CargaClasificaciones()
CargaPS(-1, DdlPS)
CargaPS(-1, DdlPSAjuste)
CargaPS(-1, DdlPSAjuste, AplicaAlmacen:=False)
CargaEmpresa()
CreaDTVentas()
CargaMetodosPago()
@@ -1866,7 +1866,7 @@ Partial Class PV
End If
DdlClasificacion.DataBind()
End Sub
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True)
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
Objeto.ddl.Items.Clear()
@@ -1877,7 +1877,11 @@ Partial Class PV
Else
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
If AplicaAlmacen Then
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Else
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
End If
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
End If
End Sub

View File

@@ -1003,8 +1003,8 @@
</table>
<%--</asp:Panel>--%>
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle"
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle"
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
<Columns>
<%--0--%>
@@ -1287,12 +1287,12 @@
<div class="col-md-6 ">
<div class="row">
<div class="col-md-6">
<table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false">
<table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false">
<tr align="right">
<td style="border: 1px none white"><b>Descuentos. RNC.:</b></td>
<td>
<asp:Label ID="LblDescuentosRNC" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
<td align="right">&nbsp;<asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" />
<td align="right">&nbsp;<asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" />
</td>
</tr>
<tr align="right">
@@ -5873,8 +5873,7 @@
<div class="col-md-2">
</div>
<div class="col-md-4">
<asp:Button ID = "BtnModalAplicarRemisionesNC" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC"/>
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
</div>
<div class="col-md-6">
</div>
@@ -6354,7 +6353,7 @@
</div>
</div>
<%--APLICAR REMISIONES DE NC--%>
<div id="ModalAplicarDescuentoNC" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpDescNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
@@ -7544,28 +7543,34 @@
$('#divAgregarCliente').modal('hide');
}
function CompararNC() {
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
if (TotalRem == TotalNC) {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
}
else {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
}
var ValidarRNC = false;
function AplicarValidarRNC(Valor)
{
ValidarRNC = Valor;
}
function CompararNC() {
if (ValidarRNC) {
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
function CerrarModalRemNC() {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
if (TotalRem == TotalNC) {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
} else {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
}
}
}
function CerrarModalRemNC() {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
AplicarValidarRNC(true);
CompararNC();
}
$('#ModalAplicarRemisionesNC').modal('hide');

View File

@@ -8,6 +8,7 @@ Imports System.Xml
Imports Microsoft.Reporting.WebForms
Imports System.Security.Cryptography.X509Certificates
Imports System.Globalization
Imports System.Net.Http
Partial Class Ventas
Inherits ClsPaginas
@@ -6731,6 +6732,12 @@ Partial Class Ventas
End If
End If
End If
'ENVIAR POLIZA VIRTUAL
If ErrorList.Count = 0 Then
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
GeneraPolizaVentaWS(ObjFactura)
End If
End If
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 Then
@@ -7597,7 +7604,6 @@ Partial Class Ventas
'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero
'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False)
'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero
'ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero
'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
@@ -20928,9 +20934,11 @@ Partial Class Ventas
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
Exit Sub
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
DdlTipoComprobante.SelectedValue = "Egs"
@@ -23802,6 +23810,102 @@ Partial Class Ventas
Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs)
CargaRNC()
RegistraScript("$('#ModalAplicarRemisionesNC').modal()")
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
End Sub
Protected Function GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) As Boolean
Dim obj As New Modelos.MPolizaVentaWS
'DATOS DEL CLIENTE
obj.customer_name = ObjFactura.Cliente.Nombre
obj.customer_last_name1 = ""
obj.customer_last_name2 = ""
obj.customer_birthday = Nothing
obj.customer_phone = ObjFactura.Cliente.Telefono
obj.customer_email = ObjFactura.Cliente.Mail
obj.customer_gender = "03" 'OTRO GENERO
obj.customer_advertising = False
obj.customer_car_brand = "00"
obj.customer_car_model = "00"
obj.customer_car_year = ObjFactura.Fecha.Year
'DATOS DE VENTA
obj.sale_date = Now
obj.sale_paidby = "01"
obj.sale_type = "01" 'PISO
obj.sale_type_service = "01" 'PARTICULAR
obj.sale_total = ObjFactura.Total
obj.sale_discount = ObjFactura.SubTotal
obj.sale_id = ObjFactura.CveVenta.ToString()
'DATOS DEL PRODUCTO
obj.product_code = "174925"
obj.product_unique_code = "65047187"
obj.product_sale_type = "02" 'AJUSTE
'DATOS DE USADO
obj.used_product = True
obj.used_brand = "01"
obj.used_bci = "25"
obj.used_month = 1
obj.used_year = 2015
obj.used_sale_date = ObjFactura.Fecha
Return False
'EnviarPolizaVentaWS(obj)
End Function
Protected Sub EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS)
Dim Retorno As String = "[]"
Dim User As String = "cslth.2809@jcilink.com"
Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
Try
Using wc As New HttpClient()
Dim Url = New Uri("http://polizavirtual.com.mx/webservice/api/Venta")
Dim Parametros = New List(Of KeyValuePair(Of String, String))
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", obj.sale_total.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
Dim content As New FormUrlEncodedContent(Parametros)
Dim response = wc.PostAsync(Url, content).Result
Retorno = response.Content.ReadAsStringAsync().Result
End Using
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
End Class