This commit is contained in:
2021-06-09 12:10:20 -07:00
32 changed files with 15519 additions and 5867 deletions

View File

@@ -265,7 +265,7 @@ Public Class ClsClientes
End Sub End Sub
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer, Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1, CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_ClientesGet") DataAdapter("PA_ClientesGet")
@@ -285,6 +285,7 @@ Public Class ClsClientes
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro .Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With End With

View File

@@ -171,6 +171,47 @@ Public Class ClsNominas
#End Region #End Region
#Region "ClsNominas_Nominas" #Region "ClsNominas_Nominas"
Public Function NominaUpMetododepago(cveEmpresa As Integer, CvePersonal As Integer, CvePeriodo As Integer, MetodoPagoFijo As Boolean,
CveMetodoPago As Integer, CveSATBanco As Integer, BancoNumCuenta As String, CLABE As String) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("PA_Nom_NominaUpMetododepago", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@MetodoPagoFijo", SqlDbType.Bit).Value = MetodoPagoFijo
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
.Add("@BancoNumCuenta", SqlDbType.VarChar).Value = BancoNumCuenta
.Add("@CLABE", SqlDbType.VarChar).Value = CLABE
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
End With
Try
SqlAdapter.Fill(DTSetResultados)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar forma de pago.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function PersonalISRAnual(CvePersonal As Integer, cveEmpresa As Integer, Ejercicio As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("PA_Nom_PersonalISRAnual", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
End With
Try
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function RemoveFiniquito(CvePersonal As Integer, cveEmpresa As Integer, CvePersonalAltas As Integer) As Boolean Public Function RemoveFiniquito(CvePersonal As Integer, cveEmpresa As Integer, CvePersonalAltas As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DTSet = New DataSet() DTSet = New DataSet()
@@ -542,8 +583,13 @@ Public Class ClsNominas
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch Ex1 As SqlException '
Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch sqlex As SqlException
If sqlex.Message.Contains("x5010") Then
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
End Try End Try
Return Retorno Return Retorno
@@ -786,6 +832,14 @@ Public Class ClsNominas
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch sqlex As SqlException
If sqlex.Message.Contains("Número: 50001x") Then
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
@@ -1930,12 +1984,13 @@ Public Class ClsNominas
End Function End Function
#End Region #End Region
Public Function GetFiniquitosPersonal(CvePersonal As Integer, CveEmpresa As Integer, Optional Limpiar As Integer = 0) As Boolean Public Function GetFiniquitosPersonal(CvePersonal As Integer, CveEmpresa As Integer, Optional Limpiar As Integer = 0, Optional diasindemnizacion As Integer = 90) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_FiniquitosGET") DataAdapter("PA_Nom_FiniquitosGET")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@diasindemnizacion", SqlDbType.Int).Value = diasindemnizacion
'.Add("@Limpiar", SqlDbType.Int).Value = Limpiar '.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
End With End With
Try Try

View File

@@ -309,12 +309,12 @@ Public Class ClsPaginas
Else Else
GlobalDTPSATPS = Nothing GlobalDTPSATPS = Nothing
End If End If
ObjGrales.Dispose()
GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End Get End Get
'Set(value As DataTable) Set(value As DataTable)
' Application("GlobalDTPSATPS") = value Application("GlobalDTPSATPS") = value
'End Set End Set
End Property End Property
#Region "GLOBALES DE SAT COMERCIO EXTERIOR" #Region "GLOBALES DE SAT COMERCIO EXTERIOR"
@@ -647,7 +647,7 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1, Optional Estatus As Integer = 1) As DataTable Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
'sino existe, recarga los datos 'sino existe, recarga los datos
@@ -662,7 +662,6 @@ Public Class ClsPaginas
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
If Estatus <> -1 Then Str.AppendFormat(" AND Estatus = '{0}'", If(Estatus = 1, "Activo", "Inactivo"))
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones = Dv.ToTable GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose() Dv.Dispose()
@@ -3076,6 +3075,8 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
Get Get
If CvePlantillaPoliza <> -1 Then If CvePlantillaPoliza <> -1 Then
@@ -3848,6 +3849,7 @@ Public Class ClsPaginas
If Application("GlobalSIGAppPaginas") Is Nothing Then If Application("GlobalSIGAppPaginas") Is Nothing Then
PaginaDict = New System.Collections.Hashtable PaginaDict = New System.Collections.Hashtable
PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918)
PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916) PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916)
PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915) PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915)
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
@@ -4617,7 +4619,6 @@ Public Class ClsPaginas
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685) PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692) PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1) PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1)
PaginaDict.Add("/GPS/RepUnidades.aspx".ToUpper(), 780)
#End Region #End Region
'INVENTARIOS 'INVENTARIOS
#Region "Inventarios" #Region "Inventarios"
@@ -5951,19 +5952,6 @@ Public Class ClsPaginas
Dim TipoDocumentoRef As String = "" Dim TipoDocumentoRef As String = ""
Dim AplicaPagare As String = "1" Dim AplicaPagare As String = "1"
Dim RFCReceptor As String = ""
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
RFCReceptor = Vta.Cliente.RFC
If Vta.FacturarSucursal Then
If Vta.ClienteSucursal IsNot Nothing Then
RFCReceptor = Vta.ClienteSucursal.RFC
End If
End If
Else
RFCReceptor = Vta.RFCReceptor
End If
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6093,7 +6081,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA 'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists Then If Not ImagenCBB.Exists Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB) CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
End If End If
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6108,7 +6096,7 @@ Public Class ClsPaginas
'CLIENTE 'CLIENTE
params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion)) params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
params.Add(New CrystalParametro("ClienteLugar", ClienteLugar)) params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
@@ -6140,7 +6128,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT)) params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
params.Add(New CrystalParametro("QR", ImgCBB)) params.Add(New CrystalParametro("QR", ImgCBB))
params.Add(New CrystalParametro("ClienteRFC", RFCReceptor)) params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC))
params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText)) params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
params.Add(New CrystalParametro("Moneda", Vta.Moneda)) params.Add(New CrystalParametro("Moneda", Vta.Moneda))
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString)) params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
@@ -6475,18 +6463,7 @@ Public Class ClsPaginas
Dim NombreArchivoDescarga As String = "" Dim NombreArchivoDescarga As String = ""
Dim TipoDocumento As String = "" Dim TipoDocumento As String = ""
Dim TipoDocumentoRef As String = "" Dim TipoDocumentoRef As String = ""
Dim RFCReceptor As String = ""
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
RFCReceptor = Vta.Cliente.RFC
If Vta.FacturarSucursal Then
If Vta.ClienteSucursal IsNot Nothing Then
RFCReceptor = Vta.ClienteSucursal.RFC
End If
End If
Else
RFCReceptor = Vta.RFCReceptor
End If
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
@@ -6641,7 +6618,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA 'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB) CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
End If End If
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
@@ -6662,14 +6639,14 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", RFCReceptor)) params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If End If
If Vta.CveEmpresaCRM.ToEntero > 0 Then If Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre)) params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", RFCReceptor)) params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If End If
'TOTALES 'TOTALES

View File

@@ -5654,7 +5654,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Return Retorno Return Retorno
End Function End Function
Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer, CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "", Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1) As Boolean Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer, CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "", Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1, Optional CveTipoPago As Integer = 0, Optional diasExtras As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_SolicitudVacacionesAdd") DataAdapter("PA_RH_SolicitudVacacionesAdd")
@@ -5670,6 +5670,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@diasinabiles", SqlDbType.Int).Value = diasinabiles .Add("@diasinabiles", SqlDbType.Int).Value = diasinabiles
.Add("@PorcentajePrimaVac", SqlDbType.Money).Value = PorcentajePrimaVac .Add("@PorcentajePrimaVac", SqlDbType.Money).Value = PorcentajePrimaVac
.Add("@FechaPago", SqlDbType.VarChar).Value = FechaPago .Add("@FechaPago", SqlDbType.VarChar).Value = FechaPago
.Add("@CveTipoPago", SqlDbType.Int).Value = CveTipoPago
.Add("@diasExtras", SqlDbType.Int).Value = diasExtras
'.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles '.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles
End With End With

View File

@@ -137,6 +137,7 @@ Public Class LogicNominas
Dim SDI As Double = 0 Dim SDI As Double = 0
Dim SalarioDiarioSS As Double = 0 Dim SalarioDiarioSS As Double = 0
Dim ClaveEstado As String = "" Dim ClaveEstado As String = ""
Dim MetodoPagoFijo As Boolean
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades) Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
'Conexiones a la Base de Datos 'Conexiones a la Base de Datos
@@ -152,6 +153,12 @@ Public Class LogicNominas
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal() cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
Serie = objNomina.Serie Serie = objNomina.Serie
Folio = objNomina.Folio.ToString() Folio = objNomina.Folio.ToString()
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
ClaveBanco = drow("ClaveBanco").ToString()
BancoNumCuenta = drow("BancoNumCuenta").ToString()
If TimbreIndemnizacion Then If TimbreIndemnizacion Then
cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1 cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
cfdi.IStimbreFiniquito = True cfdi.IStimbreFiniquito = True
@@ -180,8 +187,11 @@ Public Class LogicNominas
Puesto = objPersonal.Puesto Puesto = objPersonal.Puesto
CveSATRiesgoPuesto = objPersonal.CveSATRiesgoPuesto.ToString() CveSATRiesgoPuesto = objPersonal.CveSATRiesgoPuesto.ToString()
TipoPeriodoPago = objPersonal.TipoPeriodoPago TipoPeriodoPago = objPersonal.TipoPeriodoPago
ClaveBanco = objPersonal.ClaveBanco If Not MetodoPagoFijo Then
BancoNumCuenta = objPersonal.BancoNumCuenta ClaveBanco = objPersonal.ClaveBanco
BancoNumCuenta = objPersonal.BancoNumCuenta
End If
SDI = objPersonal.SDI SDI = objPersonal.SDI
SalarioDiarioSS = objPersonal.SalarioDiarioSS SalarioDiarioSS = objPersonal.SalarioDiarioSS
ClaveEstado = objPersonal.ClaveEstado ClaveEstado = objPersonal.ClaveEstado
@@ -332,7 +342,7 @@ Public Class LogicNominas
'subsidio al empleo 'subsidio al empleo
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
.Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal, .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()}) .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal, .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()})
End If End If
Next Next
End If End If
@@ -362,7 +372,7 @@ Public Class LogicNominas
'subsidio al empleo 'subsidio al empleo
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
.Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()}) .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()})
End If End If
Next Next
End If End If
@@ -376,7 +386,7 @@ Public Class LogicNominas
If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For
Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
.Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()} .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()}
If Row("SATCveConcepto").ToString().ToEntero() = 4 Then If Row("SATCveConcepto").ToString().ToEntero() = 4 Then
otrp.ejercicio = DateTime.Now.Year - 1 otrp.ejercicio = DateTime.Now.Year - 1
otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs() otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs()

View File

@@ -6011,6 +6011,16 @@ Partial Class Bancos_IE
Dim Str As New StringBuilder Dim Str As New StringBuilder
Dim Banco As New ClsBancos Dim Banco As New ClsBancos
If Banco.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 2, UsuarioActual.CveEmpresa, -1) Then
If Not Banco.DtResultados.Rows.Count > 0 Then
Banco.Dispose()
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Banco.IniciaTransacSQL() Banco.IniciaTransacSQL()

View File

@@ -5,8 +5,8 @@ Imports System.Data
Imports Extensiones Imports Extensiones
Partial Class Bancos_PopIEVentas Partial Class Bancos_PopIEVentas
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
Private Property DtDeudores As DataTable Private Property DtDeudores As DataTable
Get Get
@@ -520,9 +520,9 @@ Partial Class Bancos_PopIEVentas
Set(value As Date) Set(value As Date)
ViewState("Fecha") = value ViewState("Fecha") = value
End Set End Set
End Property End Property
#End Region #End Region
Private Sub Bancos_PopIEVentas_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Bancos_PopIEVentas_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
@@ -618,8 +618,8 @@ Partial Class Bancos_PopIEVentas
TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4)
End If End If
End If End If
End Sub End Sub
#Region "C A M B I A R P A N E L" #Region "C A M B I A R P A N E L"
Private Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged Private Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged
Select Case RBLContado.SelectedValue Select Case RBLContado.SelectedValue
@@ -670,9 +670,9 @@ Partial Class Bancos_PopIEVentas
End Select End Select
UpGuardar.Update() UpGuardar.Update()
End Sub End Sub
#End Region #End Region
#Region "C A R G A R I N F O R M A C I O N" #Region "C A R G A R I N F O R M A C I O N"
Private Sub CargaVenta(pCveVenta As Integer) Private Sub CargaVenta(pCveVenta As Integer)
Dim ObjVenta As New ClsVentas() Dim ObjVenta As New ClsVentas()
@@ -1005,9 +1005,9 @@ Partial Class Bancos_PopIEVentas
End If End If
UpDeudores.Update() UpDeudores.Update()
End Sub End Sub
#End Region #End Region
#Region "DDL'S CHANGED" #Region "DDL'S CHANGED"
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
@@ -1097,8 +1097,8 @@ Partial Class Bancos_PopIEVentas
Private Sub DdlDeudor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDeudor.SelectedIndexChanged Private Sub DdlDeudor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDeudor.SelectedIndexChanged
CambieDeudor() CambieDeudor()
End Sub End Sub
#Region " CUENTAS DEPOSITOS" #Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos() Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear() DdlCuentaDeposito.Items.Clear()
@@ -1166,10 +1166,10 @@ Partial Class Bancos_PopIEVentas
End If End If
Dep.Dispose() Dep.Dispose()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region "GV ROW DATA BOUND" #Region "GV ROW DATA BOUND"
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -1218,12 +1218,12 @@ Partial Class Bancos_PopIEVentas
Dim rv As RangeValidator = CType(e.Row.FindControl("RVSaldoDeudor"), RangeValidator) Dim rv As RangeValidator = CType(e.Row.FindControl("RVSaldoDeudor"), RangeValidator)
End If End If
End Sub End Sub
#End Region #End Region
#Region "CHK TIPO CAMBIO" #Region "CHK TIPO CAMBIO"
#Region "PAGAR CON PESOS" #Region "PAGAR CON PESOS"
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then If ChkPagarPesos.Checked Then
@@ -1284,9 +1284,9 @@ Partial Class Bancos_PopIEVentas
Else Else
args.IsValid = False args.IsValid = False
End If End If
End Sub End Sub
#End Region #End Region
#Region "PAGAR CON DOLARES" #Region "PAGAR CON DOLARES"
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarDolares.Checked Then If ChkPagarDolares.Checked Then
@@ -1345,9 +1345,9 @@ Partial Class Bancos_PopIEVentas
Else Else
args.IsValid = False args.IsValid = False
End If End If
End Sub End Sub
#End Region #End Region
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs) Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
CambiaTipoMoneda() CambiaTipoMoneda()
End Sub End Sub
@@ -1377,6 +1377,9 @@ Partial Class Bancos_PopIEVentas
#Region "G U A R D A R" #Region "G U A R D A R"
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim FechaFactura As Date = FechaVenta Dim FechaFactura As Date = FechaVenta
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
@@ -3588,9 +3591,9 @@ Partial Class Bancos_PopIEVentas
UpDatos.Update() UpDatos.Update()
UpGuardar.Update() UpGuardar.Update()
End Sub End Sub
#End Region #End Region
#Region " COMPLEMENTOS PAGO " #Region " COMPLEMENTOS PAGO "
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
If Not ChkComplementoPago.Checked Then If Not ChkComplementoPago.Checked Then
@@ -3601,6 +3604,16 @@ Partial Class Bancos_PopIEVentas
'For i = 0 To CveVentas.Count - 1 'For i = 0 To CveVentas.Count - 1
Dim ObjBancos As New ClsBancos Dim ObjBancos As New ClsBancos
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 2, UsuarioActual.CveEmpresa, -1) Then
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
ObjBancos.Dispose()
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
Return ""
End If
End If
ObjBancos.IniciaTransacSQL() ObjBancos.IniciaTransacSQL()
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente) Then If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente) Then

Binary file not shown.

Binary file not shown.

View File

@@ -1139,17 +1139,12 @@
<asp:UpdatePanel runat="server" ID="UpConsignaciones" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpConsignaciones" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="" id="DivConsignaciones" runat="server">
<div class="portlet solid grey-cascade portlet-filter" style="display:none" id="DivConsignaciones" runat="server">
<div class="portlet-title portlet-filterT" style=""> <div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 14px;"> <ul class="list-inline" style="font-size: 14px;">
<li>Aplica consignación: <li>Aplica consignación:
<asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" /> <asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" />
</li> </li>
@@ -1160,27 +1155,16 @@
<asp:ListItem Value="2" Text="Recepción a Almacén"></asp:ListItem> <asp:ListItem Value="2" Text="Recepción a Almacén"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </li>
<li runat="server" id="LiConsignacion" visible="false">Consignación: <li runat="server" id="LiConsignacion" visible="false">Consignación:
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
</li> </li>
<%--<li>Folio Consignación:
<asp:TextBox ID="TxtConsignacion" Width="70px" runat="server" ValidationGroup="GrpGetConsignacion" />
<asp:RequiredFieldValidator ID="RFVConsignacion" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio Consignación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGetConsignacion"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEConsignacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsignacion" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:HiddenField runat="server" ID="HdnCveConsignacion" />
</li>--%>
</ul> </ul>
</div> </div>
<div class="tools"> <div class="tools">
<asp:Button ID="BtnVinculaConsignacion" OnClick="BtnVinculaConsignacion_Click1" Visible="false" CssClass="btn btn-primary" runat="server" Text="Vincular Consignación" /> <asp:Button ID="BtnVinculaConsignacion" OnClick="BtnVinculaConsignacion_Click1" Visible="false" CssClass="btn btn-primary" runat="server" Text="Vincular Consignación" />
<%--<asp:Button ID="BtnVinculaConsignacion" runat="server" Text="Asignar" OnClick="BtnVinculaConsignacion_Click" class="btn btn-primary" ValidationGroup="GrpGetConsignacion" />--%>
</div> </div>
</div> </div>
</div> </div>
@@ -2417,12 +2401,17 @@
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaPago" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaPago" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator> <asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFechaPago" Display="None" ErrorMessage="El campo <b>''Fecha de Pago''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:CompareValidator ID="CVFechaPago" runat="server" ControlToCompare="TxtFecha" ControlToValidate="TxtFechaPago" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpGuardar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Pago''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator> <asp:CompareValidator ID="CVFechaPago" runat="server" ControlToCompare="TxtFecha" ControlToValidate="TxtFechaPago" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpGuardar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Pago''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator runat="server" id="CBTxtFechaPago" ControlToValidate="TxtFechaPago" ClientValidationFunction="ValidaRangoDeFechas" ValidationGroup="GrpGuardar" ErrorMessage="La fecha de pago no debe de exeder de 5 años en relaciión a la fecha de la compra." Display="None" />
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="CBTxtFechaPago" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</td> </td>
<td align="left"> <td align="left">
@@ -6660,6 +6649,28 @@
} }
function ValidaRangoDeFechas(sender, args) {
if ($("#TxtFecha").val().length == 10 && $("#TxtFechaPago").val().length == 10) {
let Finicio = parseInt($("#TxtFecha").val().substring(6,10));
let FFin = parseInt($("#TxtFechaPago").val().substring(6, 10));
if ((FFin - Finicio) > 5) {
args.IsValid = false;
} else {
args.IsValid = true;
}
} else {
args.IsValid = true;
}
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -3955,6 +3955,10 @@ Partial Class Compras_Compras
'End If 'End If
'------------------ INICIA VALIDACIONES ------------------ '------------------ INICIA VALIDACIONES ------------------
Dim EstatusCredito As Integer = 0 Dim EstatusCredito As Integer = 0
Dim CveSubProyecto As Integer = 0 Dim CveSubProyecto As Integer = 0
'Credito Multiple 'Credito Multiple
@@ -18684,17 +18688,15 @@ Partial Class Compras_Compras
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE 'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
If UsuarioActual.CveEmpresa <> 141 Then For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0") drt("CvePS") = CvePS
drt("CvePS") = CvePS drt("PS") = tPS
drt("PS") = tPS drt("CveUM") = DdlUnidadAlias.SelectedValue.ToEntero
drt("CveUM") = DdlUnidadAlias.SelectedValue.ToEntero drt("UM") = DdlUnidadAlias.SelectedItem.Text
drt("UM") = DdlUnidadAlias.SelectedItem.Text drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero drt("Clasificacion") = HdnPSAliasClasificacion.Value
drt("Clasificacion") = HdnPSAliasClasificacion.Value drt("Obs") = TxtPSAlias.Text.Trim
drt("Obs") = TxtPSAlias.Text.Trim Next
Next
End If
TmpDT.AcceptChanges() TmpDT.AcceptChanges()

View File

@@ -512,7 +512,10 @@ Partial Class Contabilidad2_CatCuentas
ObjConta2.RollBack() ObjConta2.RollBack()
ObjConta.RollBack() ObjConta.RollBack()
Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError) Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError)
Else
ObjConta2.Commit()
End If End If
Else Else
TieneError = True TieneError = True
ObjConta2.RollBack() ObjConta2.RollBack()

View File

@@ -165,13 +165,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If LbAgregar.Text = "Agregar" Then If LbAgregar.Text = "Agregar" Then
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero) Then DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
ErrorString = "Error al agregar" ErrorString = "Error al agregar"
End If End If
ElseIf LbAgregar.Text = "Actualizar" Then ElseIf LbAgregar.Text = "Actualizar" Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero) Then DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
ErrorString = "Error al actualizar" ErrorString = "Error al actualizar"
End If End If
End If End If

File diff suppressed because it is too large Load Diff

View File

@@ -203,7 +203,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input form-md-floating-label input-iconright"> <div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:Label runat="server" Text="Cuenta contable" AssociatedControlID="DdlCtaContable"></asp:Label> <asp:Label runat="server" Text="Cuenta contable" AssociatedControlID="DdlCtaContable"></asp:Label>
<asp:DropDownList ID="DdlCtaContable" runat="server" AppendDataBoundItems="True" DataTextField="CtaCodigo" DataValueField="Id" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList> <asp:DropDownList ID="DdlCtaContable" runat="server" AppendDataBoundItems="True" DataTextField="CtaCodigo" DataValueField="CveCuenta" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">

View File

@@ -271,6 +271,21 @@ public partial class Nomina_CatConcepto : ClsPaginas
DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlCtaContable.SelectedValueExist("-1"); DdlCtaContable.SelectedValueExist("-1");
} }
else
{
using (ClsContabilidad ObjConta = new ClsContabilidad())
{
if (ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa))
{
DdlCtaContable.DataSource = ObjConta.DtResultados;
DdlCtaContable.DataBind();
}
}
DdlCtaContable.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlCtaContable.SelectedValueExist("-1");
}
} }
@@ -453,7 +468,14 @@ public partial class Nomina_CatConcepto : ClsPaginas
DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]); DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]);
DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]); DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]);
DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]); DdlCtaContable.SelectedValueExist(drow["CveCuenta"]);
//if (UsuarioActual.Empresa.TipoContabilidad == 1)
//{
//}
//else
//{
// DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]);
//}
DdlConceptoSAT.SelectedValueExist(drow["CveSATConcepto"]); DdlConceptoSAT.SelectedValueExist(drow["CveSATConcepto"]);
} }
ObjNomina.Dispose(); ObjNomina.Dispose();

View File

@@ -242,6 +242,13 @@
Indemnización Indemnización
<br /> <br />
<asp:CheckBox ID="chkIndemnizacion" CssClass="chksino" Text=" " runat="server" /> <asp:CheckBox ID="chkIndemnizacion" CssClass="chksino" Text=" " runat="server" />
<div style="display:inline-block;width:30px;">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="Txtdiasindemnizacion" Text="90" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="días" AssociatedControlID="Txtdiasindemnizacion"></asp:Label>
</div>
</div>
</div> </div>
<div class="col-md-4 text-center"> <div class="col-md-4 text-center">
Separación unica Separación unica

View File

@@ -1062,16 +1062,15 @@ public partial class Nomina_Finiquito : ClsPaginas
using (ClsRH ObjPersonal = new ClsRH()) using (ClsRH ObjPersonal = new ClsRH())
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL())) using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
{ {
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked,chkIndemnizacion.Checked ,chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0) if (continuar =ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked,chkIndemnizacion.Checked ,chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{ {
DataRow da = ObjPersonal.DtResultados.Rows[0]; DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero(); CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero(); CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
} }
if (continuar) if (continuar)
{ {
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa); continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa,diasindemnizacion:Txtdiasindemnizacion.Text.ToEntero());
} }
if (continuar) if (continuar)
{ {
@@ -1311,16 +1310,15 @@ public partial class Nomina_Finiquito : ClsPaginas
using (ClsRH ObjPersonal = new ClsRH()) using (ClsRH ObjPersonal = new ClsRH())
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL())) using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
{ {
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0) if (continuar =ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{ {
DataRow da = ObjPersonal.DtResultados.Rows[0]; DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero(); CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero(); CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
} }
if (continuar) if (continuar)
{ {
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa); continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
} }
if (continuar) if (continuar)
{ loadsobrerecibo(onom); } { loadsobrerecibo(onom); }

128
Nomina/ISRCalculoAnual.aspx Normal file
View File

@@ -0,0 +1,128 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ISRCalculoAnual.aspx.cs" Inherits="Nomina_ISCalculoAnual" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
Calculo anual de ISR
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<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">Ejercicio: </label>
<div class="col-md-1">
<asp:DropDownList ID="DdlEjercicios" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
</div>
<div class="col-md-1">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Calcular" class="btn btn-primary" />
</div>
</div>
</div>
<div class="tools">
<%--<a href="javascript:;" class="expand" data-original-title="" title=""></a>--%>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosPers" runat ="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:GridView ID="GVPersonalISRAnual" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
datakeynames="Codigo,NombreCompleto,CodigoNombreCompleto,CveEmpresa,Estatus,FechaFin,FechaInicio,Ingresos,IngresosG,Art152,Subsidio,Impuestoanual,ImpuestoRetenido,ACargo,ACompensar,Saldo">
<Columns>
<asp:TemplateField HeaderText="Nombre ">
<ItemTemplate>
<asp:Label ID="lblcodigoNombreCompleto" runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Centro de costos">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Subproyecto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha ingreso">
<ItemTemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha fin">
<ItemTemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ingresos totales" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblingresos" runat="server" Text='<%# Eval("Ingresos","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Base gravada" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblingresosG" runat="server" Text='<%# Eval("IngresosG","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Art. 152" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblart152" runat="server" Text='<%# Eval("Art152","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Subsidio" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblsubsidio" runat="server" Text='<%# Eval("Subsidio","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Impuesto anual" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblimpuestoanual" runat="server" Text='<%# Eval("Impuestoanual","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Impuesto retenido" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblimpuestoRetenido" runat="server" Text='<%# Eval("ImpuestoRetenido","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="A cargo" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblaCargo" runat="server" Text='<%# Eval("ACargo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="A compensar" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblaCompensar" runat="server" Text='<%# Eval("ACompensar","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Saldo","{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>

View File

@@ -0,0 +1,47 @@
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_ISCalculoAnual : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
DataTable dtejercicio = new DataTable();
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
{
dtejercicio = objnom.DtResultados;
}
}
DdlEjercicios.DataSource = dtejercicio;
DdlEjercicios.DataBind();
}
protected void LnkConsultar_Click(object sender, EventArgs e)
{
CargaPersonalISRAnual();
}
protected void CargaPersonalISRAnual()
{
DataTable dtdatos = new DataTable();
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.PersonalISRAnual(-1, UsuarioActual.CveEmpresa, ejercicio))
{
dtdatos = objnom.DTSetResultados.Tables[0];
}
}
GVPersonalISRAnual.DataSource = dtdatos;
GVPersonalISRAnual.DataBind();
upDatosPers.Update();
}
}

File diff suppressed because it is too large Load Diff

6570
Nomina/Nomina.aspx.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -605,8 +605,8 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
if (true) if (true)
{ {
Fila++; Fila += 4;
oldcveSupProyecto = cveSupProyecto; newsubproyecto = true; oldcveSupProyecto = cveSupProyecto; newsubproyecto = true;
column = 1; column = 1;
column++; column++;
libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold); libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold);

View File

@@ -532,7 +532,7 @@ Partial Class OC_CatEstatus
Dim CveSubProyecto = If(CboSubProyecto.SelectedValue.ToEntero = -2, -1, CboSubProyecto.SelectedValue.ToEntero) Dim CveSubProyecto = If(CboSubProyecto.SelectedValue.ToEntero = -2, -1, CboSubProyecto.SelectedValue.ToEntero)
Dim objEstatusOC As New ClsOC Dim objEstatusOC As New ClsOC
If objEstatusOC.GetEstatusUsuarios(-1, -1, CveSubProyecto, -1, UsuarioActual.CveEmpresa) Then If objEstatusOC.GetEstatusUsuarios(-1, -1, CveSubProyecto, -1, UsuarioActual.CveEmpresa, -1, 1) Then
DTEstatusUsuarios = objEstatusOC.DtResultados DTEstatusUsuarios = objEstatusOC.DtResultados
End If End If

View File

@@ -241,7 +241,7 @@ public partial class RH_CalculoSBC : ClsPaginas
{ {
string titulo = HttpUtility.HtmlDecode(Extensiones.ModExtensiones.TextoCelda(cell)).Trim(); string titulo = HttpUtility.HtmlDecode(Extensiones.ModExtensiones.TextoCelda(cell)).Trim();
titulo = limpiarcelda( titulo); titulo = limpiarcelda( titulo);
if (GridView.Columns[i].Visible && titulo.Length > 0) if (GridView.Columns.Count > i && GridView.Columns[i].Visible && titulo.Length > 0)
{ {
if (dt.Columns.Contains(titulo)) if (dt.Columns.Contains(titulo))
titulo = titulo + i; titulo = titulo + i;

View File

@@ -2394,6 +2394,25 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones">Forma de pago</asp:Label><br />
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server">
<asp:ListItem Text="Pagadas por anticipado" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Por pagar" Value="2"></asp:ListItem>
<asp:ListItem Text="Trabajadas" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
</div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>

View File

@@ -4514,7 +4514,7 @@ Partial Class RH_Personal
VacFolioActual = VacFolioActual + 1 VacFolioActual = VacFolioActual + 1
Dim objRH As New ClsRH Dim objRH As New ClsRH
'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones) 'Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil) Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago:=fechapago, diasinabiles:=diasinhabil, CveTipoPago:=DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras:=TxtVacDiasExtra.Text.ToEntero())
If objRH.DtResultados.Rows.Count > 0 Then If objRH.DtResultados.Rows.Count > 0 Then
Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString() Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString()
If ShowError.Length > 0 Then If ShowError.Length > 0 Then
@@ -4768,11 +4768,6 @@ Partial Class RH_Personal
Protected Sub BtnEditarDiaVacacionModal_Click(sender As Object, e As EventArgs) Handles BtnEditarDiaVacacionModal.Click Protected Sub BtnEditarDiaVacacionModal_Click(sender As Object, e As EventArgs) Handles BtnEditarDiaVacacionModal.Click
Dim objRH As New ClsRH()
Dim FileExtension As String = "-1" Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = TxtFileFormatoVacaciones.getfiles().Archivos Dim Filesgral As List(Of Archivo) = TxtFileFormatoVacaciones.getfiles().Archivos
Dim Filename As String = "" Dim Filename As String = ""
@@ -4784,36 +4779,27 @@ Partial Class RH_Personal
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}" Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}"
Dim tempArray() As String Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
Dim rutaDestino As String = $"{UsuarioActual.Empresa.Ruta}Personal\{CvePersonal}\Vacaciones\{Documento}" Dim rutaDestino As String = $"{UsuarioActual.Empresa.Ruta}Personal\{CvePersonal}\Vacaciones\{Documento}"
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\") Then If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\") Then
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\") System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\")
End If End If
If System.IO.File.Exists(rutaDestino) Then If System.IO.File.Exists(rutaDestino) Then
System.IO.File.Delete(rutaDestino) System.IO.File.Delete(rutaDestino)
End If End If
System.IO.File.Move(fileItem.FileUrl, rutaDestino) System.IO.File.Move(fileItem.FileUrl, rutaDestino)
TxtFileFormatoVacaciones.Text = "" TxtFileFormatoVacaciones.Text = ""
Catch ex As Exception Catch ex As Exception
OnError("Error al cargar Formato vacaciones", ex) OnError("Error al cargar Formato vacaciones", ex)
End Try End Try
Next Next
If Documento.Length > 0 Then If Documento.Length > 0 Then
Dim objRH As New ClsRH()
If objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, CvePersonal, UsuarioActual.CveUsuario, Documento) Then If objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, CvePersonal, UsuarioActual.CveUsuario, Documento) Then
Alert("La fecha se actualizo correctamente") Alert("La fecha se actualizo correctamente")
End If End If
UpModalEditarDiaVacacion.Update() UpModalEditarDiaVacacion.Update()
objRH.Dispose() objRH.Dispose()
CargaVacaciones() CargaVacaciones()
CargaVacacionesResumenPeriodoActual() CargaVacacionesResumenPeriodoActual()
RegistraScript("$('#divEditarDiaVacacion').modal('hide');") RegistraScript("$('#divEditarDiaVacacion').modal('hide');")
@@ -5304,38 +5290,14 @@ Partial Class RH_Personal
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble() Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
Dim Serie As String = TxtLiberarSerie.Text.Trim Dim Serie As String = TxtLiberarSerie.Text.Trim
Dim MsgError As String = ""
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme) Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
If CveResultadoSalida > 0 Then Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
If CveSeccionAlmacenUniforme = 0 Then CveSeccionAlmacenUniforme = -3 'que lo tome por default Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme) Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
If ResultadoDetalleSalida Then
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme) If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
If CveResultadoEntrada > 0 Then
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
MsgError = ""
Else
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
MsgError = "Error1"
End If
Else
MsgError = "Error1"
End If
Else
MsgError = "Error1"
End If
Else
MsgError = "Error"
End If
If MsgError = "" Then
ObjInventario.Commit() ObjInventario.Commit()
Alert("El resguardo se liberó correctamente") Alert("El resguardo se liberó correctamente")
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme")) RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
@@ -5344,7 +5306,6 @@ Partial Class RH_Personal
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError) Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
ObjInventario.RollBack() ObjInventario.RollBack()
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
End Sub End Sub

View File

@@ -53,29 +53,30 @@ Partial Class Sistemas_PopUpCambiaUsuario
End If End If
If splitedtext.Length > 0 Then If splitedtext.Length > 0 Then
Select Case splitedtext(0).ToUpper() Select Case splitedtext(0).ToUpper()
Case "VSH" : CveEmpresa = "7" Case "VSH" : CveEmpresa = "7"
Case "JAM" : CveEmpresa = "119" Case "JAM" : CveEmpresa = "119"
Case "COMPUPROVEEDORES" : CveEmpresa = "72" Case "COMPUPROVEEDORES" : CveEmpresa = "72"
Case "DNDIFUSA" : CveEmpresa = "80" Case "DNDIFUSA" : CveEmpresa = "80"
Case "SOGO" : CveEmpresa = "8" Case "SOGO" : CveEmpresa = "8"
Case "BDH" : CveEmpresa = "140" Case "BDH" : CveEmpresa = "140"
Case "ECONOLLANTAS" : CveEmpresa = "141" Case "ECONOLLANTAS" : CveEmpresa = "141"
End Select Case "SERVEC" : CveEmpresa = "153"
End If End Select
DdlEmpresa.DataBind()
DdlEmpresa.SelectedValue = CveEmpresa
'DdlRol.DataSource = GlobalDTRoles(DdlEmpresa.SelectedValue.ToEntero)
'DdlRol.DataBind()
'DdlRol.Items.Insert(0, New ListItem("Todos", "-1"))
TxtBusqueda.Attributes.Add("data-table", gvUsuarios.ClientID)
CargaUsuarios()
'LblUsuario.Text = usuarioactual.
End If End If
DdlEmpresa.DataBind()
DdlEmpresa.SelectedValue = CveEmpresa
'DdlRol.DataSource = GlobalDTRoles(DdlEmpresa.SelectedValue.ToEntero)
'DdlRol.DataBind()
'DdlRol.Items.Insert(0, New ListItem("Todos", "-1"))
TxtBusqueda.Attributes.Add("data-table", gvUsuarios.ClientID)
CargaUsuarios()
'LblUsuario.Text = usuarioactual.
End If
End Sub End Sub

View File

@@ -397,12 +397,12 @@ public class TareasJam : IHttpHandler
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. "); this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass); CargaProductos = CargarArchivos(FInfoProductos, $"{FTPServer}/productos", TFPUsr, FTPPass);
if (CargaProductos) if (CargaProductos)
{ {
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. "); this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass); CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, $"{FTPServer}/productos", TFPUsr, FTPPass);
} }
if (CargaProductos) if (CargaProductos)
@@ -417,11 +417,11 @@ public class TareasJam : IHttpHandler
if (CargaProductos) if (CargaProductos)
{ {
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. "); this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass); CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/ventas", TFPUsr, FTPPass);
if (CargaVentas) if (CargaVentas)
{ {
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. "); this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass); CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/ventas", TFPUsr, FTPPass);
} }
} }
@@ -437,11 +437,11 @@ public class TareasJam : IHttpHandler
if (CargaProductos & CargaVentas) if (CargaProductos & CargaVentas)
{ {
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. "); this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass); CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/clientes", TFPUsr, FTPPass);
if (CargaClientes) if (CargaClientes)
{ {
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. "); this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass); CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/clientes", TFPUsr, FTPPass);
} }
} }
@@ -457,11 +457,11 @@ public class TareasJam : IHttpHandler
if (CargaProductos & CargaVentas & CargaClientes) if (CargaProductos & CargaVentas & CargaClientes)
{ {
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. "); this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass); CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/stock", TFPUsr, FTPPass);
if (CargaClientes) if (CargaClientes)
{ {
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. "); this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass); CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/stock", TFPUsr, FTPPass);
} }
} }

View File

@@ -72,8 +72,15 @@ Partial Class PopUpBuscarClientes
If ValidarUnFiltroSeleccionado() Then If ValidarUnFiltroSeleccionado() Then
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
Dim CveUsuarioConsulta As Integer
If UsuarioActual.TienePermisoProceso(322) Then
CveUsuarioConsulta = UsuarioActual.CveVendedor
Else
CveUsuarioConsulta = -1
End If
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100) Then DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then If ObjClientes.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0) LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjClientes.DtResultados GV.DataSource = ObjClientes.DtResultados

View File

@@ -36,7 +36,7 @@ Partial Class Ventas_RepPS
'DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) 'DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
End If End If
If UsuarioActual.TienePermisoProceso(320) Then If UsuarioActual.TienePermisoProceso(320) OrElse UsuarioActual.CveRol = 1 Then
LnkRepDiario.Visible = True LnkRepDiario.Visible = True
End If End If
@@ -242,9 +242,11 @@ Partial Class Ventas_RepPS
Dim TC As Integer = 1 Dim TC As Integer = 1
Dim TCEspecifico As Decimal = -1 Dim TCEspecifico As Decimal = -1
Dim FechaConsulta As DateTime = Now
Dim DataSet As DataSet = New DataSet Dim DataSet As DataSet = New DataSet
Dim ObjVentas As New ClsVentas() Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepPSDiario(-1, -1, Now, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=-1, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then If ObjVentas.GetRepPSDiario(-1, -1, FechaConsulta, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=-1, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
DataSet = ObjVentas.DataSetResultados.Copy() DataSet = ObjVentas.DataSetResultados.Copy()
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
@@ -254,7 +256,7 @@ Partial Class Ventas_RepPS
Dim FileExcel As New ExcelFile() Dim FileExcel As New ExcelFile()
Dim worksheetName As String = $"{ToShortMonthName(Now).ToUpper()}{Now.Day}" Dim worksheetName As String = $"{ToShortMonthName(FechaConsulta).ToUpper()}{FechaConsulta.Day}"
Const invalidCharsRegex As String = "[/\\*'?[\]:]+" Const invalidCharsRegex As String = "[/\\*'?[\]:]+"
Const maxLength As Integer = 31 Const maxLength As Integer = 31
Dim safeName As String = Regex.Replace(worksheetName, invalidCharsRegex, " ").Replace(" ", " ").Trim() Dim safeName As String = Regex.Replace(worksheetName, invalidCharsRegex, " ").Replace(" ", " ").Trim()
@@ -269,7 +271,7 @@ Partial Class Ventas_RepPS
Dim CellRangeTitulo = worksheet.Cells.GetSubrangeAbsolute(0, 0, 0, 12) Dim CellRangeTitulo = worksheet.Cells.GetSubrangeAbsolute(0, 0, 0, 12)
CellRangeTitulo.Merged = True CellRangeTitulo.Merged = True
CellRangeTitulo.Value = $"{UsuarioActual.Empresa.Empresa}. VENTA DEL DIA {Now.Day} DE {ToMonthName(Now).ToUpper()} DEL {Now.Year}." CellRangeTitulo.Value = $"{UsuarioActual.Empresa.Empresa}. VENTA DEL DIA {FechaConsulta.Day} DE {ToMonthName(FechaConsulta).ToUpper()} DEL {FechaConsulta.Year}."
CellRangeTitulo.Style.VerticalAlignment = VerticalAlignmentStyle.Center CellRangeTitulo.Style.VerticalAlignment = VerticalAlignmentStyle.Center
CellRangeTitulo.Style.HorizontalAlignment = HorizontalAlignmentStyle.Center CellRangeTitulo.Style.HorizontalAlignment = HorizontalAlignmentStyle.Center
@@ -552,8 +554,8 @@ Partial Class Ventas_RepPS
Dim IdxRefAnioAnteriorLlantas As Integer = IdxPorcentajes + 3 Dim IdxRefAnioAnteriorLlantas As Integer = IdxPorcentajes + 3
worksheet.Cells(IdxRefAnioAnteriorLlantas, 0).Value = "Sucursal" worksheet.Cells(IdxRefAnioAnteriorLlantas, 0).Value = "Sucursal"
worksheet.Cells(IdxRefAnioAnteriorLlantas, 1).Value = (Now.Year - 1).ToString() worksheet.Cells(IdxRefAnioAnteriorLlantas, 1).Value = (FechaConsulta.Year - 1).ToString()
worksheet.Cells(IdxRefAnioAnteriorLlantas, 2).Value = Now.Year.ToString() worksheet.Cells(IdxRefAnioAnteriorLlantas, 2).Value = FechaConsulta.Year.ToString()
worksheet.Cells(IdxRefAnioAnteriorLlantas, 3).Value = "Dif" worksheet.Cells(IdxRefAnioAnteriorLlantas, 3).Value = "Dif"
Dim StyleTitleTable4 = worksheet.Cells.GetSubrangeAbsolute(IdxRefAnioAnteriorLlantas, 0, IdxRefAnioAnteriorLlantas, 3).Style Dim StyleTitleTable4 = worksheet.Cells.GetSubrangeAbsolute(IdxRefAnioAnteriorLlantas, 0, IdxRefAnioAnteriorLlantas, 3).Style
@@ -614,13 +616,117 @@ Partial Class Ventas_RepPS
DtAnioAnteriorLLantas.Dispose() DtAnioAnteriorLLantas.Dispose()
#End Region #End Region
#Region "L L A N T A S M E S A Ñ O A N T E R I O R"
Dim IdxRefMesAnioAnteriorLlantas As Integer = IdxAnioAnteriorLlantas + 3
worksheet.Cells.GetSubrangeAbsolute(IdxRefMesAnioAnteriorLlantas - 1, 1, IdxRefMesAnioAnteriorLlantas - 1, 3).Merged = True
worksheet.Cells.GetSubrangeAbsolute(IdxRefMesAnioAnteriorLlantas - 1, 4, IdxRefMesAnioAnteriorLlantas - 1, 6).Merged = True
worksheet.Cells(IdxRefMesAnioAnteriorLlantas - 1, 1).Value = "LLANTAS"
worksheet.Cells(IdxRefMesAnioAnteriorLlantas - 1, 4).Value = "%"
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 0).Value = "Sucursal"
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 1).Value = String.Format("{0} {1}", ToShortMonthName(FechaConsulta).ToUpper(), (FechaConsulta.Year - 1))
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 2).Value = String.Format("{0} {1}", ToShortMonthName(FechaConsulta).ToUpper(), (FechaConsulta.Year))
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 3).Value = "DIF %"
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 4).Value = String.Format("{0} - %", (FechaConsulta.Year - 1))
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 5).Value = String.Format("{0} - %", (FechaConsulta.Year))
worksheet.Cells(IdxRefMesAnioAnteriorLlantas, 6).Value = "DIF %"
Dim StyleTitleTable5 = worksheet.Cells.GetSubrangeAbsolute(IdxRefMesAnioAnteriorLlantas - 1, 0, IdxRefMesAnioAnteriorLlantas - 1, 6).Style
StyleTitleTable5.Font.Weight = ExcelFont.BoldWeight
StyleTitleTable5.Font.Name = "Calibri"
StyleTitleTable5.Font.Size = 8 * 20
StyleTitleTable5.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Thin)
StyleTitleTable5.VerticalAlignment = VerticalAlignmentStyle.Center
StyleTitleTable5.HorizontalAlignment = HorizontalAlignmentStyle.Center
Dim StyleSubTitleTable5 = worksheet.Cells.GetSubrangeAbsolute(IdxRefMesAnioAnteriorLlantas, 0, IdxRefMesAnioAnteriorLlantas, 6).Style
StyleSubTitleTable5.Font.Weight = ExcelFont.BoldWeight
StyleSubTitleTable5.Font.Name = "Calibri"
StyleSubTitleTable5.Font.Size = 8 * 20
StyleSubTitleTable5.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Thin)
StyleSubTitleTable5.VerticalAlignment = VerticalAlignmentStyle.Center
StyleSubTitleTable5.HorizontalAlignment = HorizontalAlignmentStyle.Center
Dim DtMesAnioAnteriorLLantas As DataTable = DataSet.Tables(4)
'INICIA DESDE LA CUARTA FILA
Dim IdxMesAnioAnteriorLlantas As Integer = IdxRefMesAnioAnteriorLlantas + 1
For Each Row As DataRow In DtMesAnioAnteriorLLantas.Rows
worksheet.Cells(IdxMesAnioAnteriorLlantas, 0).Value = Row("Sucursal")
worksheet.Cells(IdxMesAnioAnteriorLlantas, 1).Value = Row("LLantasAnioAnterior")
worksheet.Cells(IdxMesAnioAnteriorLlantas, 2).Value = Row("LLantas")
worksheet.Cells(IdxMesAnioAnteriorLlantas, 3).Formula = $"=({worksheet.Cells(IdxMesAnioAnteriorLlantas, 2).Name} - {worksheet.Cells(IdxMesAnioAnteriorLlantas, 1).Name})"
worksheet.Cells(IdxMesAnioAnteriorLlantas, 4).Formula = $"=+(({worksheet.Cells(IdxMesAnioAnteriorLlantas, 1).Name} * 1.07) - {worksheet.Cells(IdxMesAnioAnteriorLlantas, 2).Name}) /12"
worksheet.Cells(IdxMesAnioAnteriorLlantas, 5).Formula = $"=+(({worksheet.Cells(IdxMesAnioAnteriorLlantas, 1).Name} * 1) - {worksheet.Cells(IdxMesAnioAnteriorLlantas, 2).Name}) /12"
worksheet.Cells(IdxMesAnioAnteriorLlantas, 6).Formula = $"=+({worksheet.Cells(IdxMesAnioAnteriorLlantas, 2).Name} / {worksheet.Cells(IdxMesAnioAnteriorLlantas, 1).Name}) - 1"
Dim StyleData = worksheet.Cells.GetSubrangeAbsolute(IdxMesAnioAnteriorLlantas, 0, IdxMesAnioAnteriorLlantas, 6).Style
StyleData.Font.Weight = ExcelFont.NormalWeight
StyleData.Font.Name = "Calibri"
StyleData.Font.Size = 8 * 20
StyleData.VerticalAlignment = VerticalAlignmentStyle.Center
StyleData.HorizontalAlignment = HorizontalAlignmentStyle.Center
StyleData.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Thin)
StyleData.NumberFormat = "_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-"
IdxMesAnioAnteriorLlantas += 1
Next
DtMesAnioAnteriorLLantas.Dispose()
#End Region
#Region "L L A N T A S M E S A Ñ O A N T E R I O R"
Dim IdxRefMesAnioAnteriorLlantasResumen As Integer = IdxMesAnioAnteriorLlantas + 2
worksheet.Cells(IdxRefMesAnioAnteriorLlantasResumen, 0).Value = "Mes"
worksheet.Cells(IdxRefMesAnioAnteriorLlantasResumen, 1).Value = String.Format("{0}", (FechaConsulta.Year - 1))
worksheet.Cells(IdxRefMesAnioAnteriorLlantasResumen, 2).Value = String.Format("{0}", (FechaConsulta.Year))
worksheet.Cells(IdxRefMesAnioAnteriorLlantasResumen, 3).Value = "DIF UDS"
worksheet.Cells(IdxRefMesAnioAnteriorLlantasResumen, 4).Value = "DIF %"
Dim StyleTitleTable6 = worksheet.Cells.GetSubrangeAbsolute(IdxRefMesAnioAnteriorLlantasResumen, 0, IdxRefMesAnioAnteriorLlantasResumen, 4).Style
StyleTitleTable6.Font.Weight = ExcelFont.BoldWeight
StyleTitleTable6.Font.Name = "Calibri"
StyleTitleTable6.Font.Size = 8 * 20
StyleTitleTable6.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Thin)
StyleTitleTable6.VerticalAlignment = VerticalAlignmentStyle.Center
StyleTitleTable6.HorizontalAlignment = HorizontalAlignmentStyle.Center
Dim DtMesAnioAnteriorLLantasResumen As DataTable = DataSet.Tables(5)
'INICIA DESDE LA CUARTA FILA
Dim IdxMesAnioAnteriorLlantasResumen As Integer = IdxRefMesAnioAnteriorLlantasResumen + 1
For Each Row As DataRow In DtMesAnioAnteriorLLantasResumen.Rows
worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 0).Value = ToMonthName(FechaConsulta).ToUpper()
worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 1).Value = Row("LLantasAnioAnterior")
worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 2).Value = Row("LLantas")
worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 3).Formula = $"=({worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 1).Name} - {worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 2).Name})"
worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 4).Formula = $"=+({worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 2).Name} / {worksheet.Cells(IdxMesAnioAnteriorLlantasResumen, 1).Name})"
Dim StyleData = worksheet.Cells.GetSubrangeAbsolute(IdxMesAnioAnteriorLlantasResumen, 0, IdxMesAnioAnteriorLlantasResumen, 4).Style
StyleData.Font.Weight = ExcelFont.NormalWeight
StyleData.Font.Name = "Calibri"
StyleData.Font.Size = 8 * 20
StyleData.VerticalAlignment = VerticalAlignmentStyle.Center
StyleData.HorizontalAlignment = HorizontalAlignmentStyle.Center
StyleData.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Black), LineStyle.Thin)
StyleData.NumberFormat = "_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-"
IdxMesAnioAnteriorLlantasResumen += 1
Next
DtMesAnioAnteriorLLantasResumen.Dispose()
#End Region
Dim columnCount = worksheet.CalculateMaxUsedColumns() Dim columnCount = worksheet.CalculateMaxUsedColumns()
For i = 0 To columnCount For i = 0 To columnCount
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
Next Next
FileExcel.Save(Response, $"DIARIO_{Now.ToString("dd_MM_yyyy")}.xlsx", SaveOptions.XlsxDefault) FileExcel.Save(Response, $"DIARIO_{FechaConsulta.ToString("dd_MM_yyyy")}.xlsx", SaveOptions.XlsxDefault)
End If End If

View File

@@ -332,7 +332,7 @@
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" /> <asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />