This commit is contained in:
2021-06-09 15:08:59 -07:00
31 changed files with 9942 additions and 428 deletions

View File

@@ -265,7 +265,7 @@ Public Class ClsClientes
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,
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
DataAdapter("PA_ClientesGet")
@@ -285,6 +285,7 @@ Public Class ClsClientes
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With

View File

@@ -171,6 +171,47 @@ Public Class ClsNominas
#End Region
#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
Dim retorno As Boolean = False
DTSet = New DataSet()
@@ -542,8 +583,13 @@ Public Class ClsNominas
Try
SqlAdapter.Fill(Data)
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
Return Retorno
@@ -786,6 +832,14 @@ Public Class ClsNominas
Try
SqlAdapter.Fill(Data)
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
Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
@@ -1930,12 +1984,13 @@ Public Class ClsNominas
End Function
#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
DataAdapter("PA_Nom_FiniquitosGET")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@diasindemnizacion", SqlDbType.Int).Value = diasindemnizacion
'.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
End With
Try

View File

@@ -293,28 +293,19 @@ Public Class ClsPaginas
Application("Directorio") = value
End Set
End Property
Public Shared ReadOnly Property GlobalDTPSATPS(SATClaveProductoServicio As String) As DataTable
Property GlobalDTPSATPS() As DataTable
Get
'If Application("GlobalDTPSATPS") Is Nothing Then
' Dim ObjGrales As New ClsGenerales
' If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
' ObjGrales.Dispose()
'End If
'GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATProductosServicios(SATClaveProductoServicio) Then
GlobalDTPSATPS = ObjGrales.DtResultados
Else
GlobalDTPSATPS = Nothing
If Application("GlobalDTPSATPS") Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
ObjGrales.Dispose()
End If
ObjGrales.Dispose()
GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End Get
'Set(value As DataTable)
' Application("GlobalDTPSATPS") = value
'End Set
Set(value As DataTable)
Application("GlobalDTPSATPS") = value
End Set
End Property
#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
@@ -647,7 +638,7 @@ Public Class ClsPaginas
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
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -662,7 +653,6 @@ Public Class ClsPaginas
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
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)
GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose()
@@ -3076,6 +3066,8 @@ Public Class ClsPaginas
End Set
End Property
Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
Get
If CvePlantillaPoliza <> -1 Then
@@ -3848,6 +3840,7 @@ Public Class ClsPaginas
If Application("GlobalSIGAppPaginas") Is Nothing Then
PaginaDict = New System.Collections.Hashtable
PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918)
PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916)
PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915)
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
@@ -4617,7 +4610,6 @@ Public Class ClsPaginas
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1)
PaginaDict.Add("/GPS/RepUnidades.aspx".ToUpper(), 780)
#End Region
'INVENTARIOS
#Region "Inventarios"
@@ -5951,19 +5943,6 @@ Public Class ClsPaginas
Dim TipoDocumentoRef As String = ""
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 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)
@@ -6093,7 +6072,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists Then
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
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 +6087,7 @@ Public Class ClsPaginas
'CLIENTE
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("ClienteLugar", ClienteLugar))
@@ -6140,7 +6119,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
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("Moneda", Vta.Moneda))
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
@@ -6475,18 +6454,7 @@ Public Class ClsPaginas
Dim NombreArchivoDescarga As String = ""
Dim TipoDocumento 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 ImagenCBB As New System.IO.FileInfo(RutaCBB)
@@ -6641,7 +6609,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
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
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 +6630,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("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If
If Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If
'TOTALES

View File

@@ -5654,7 +5654,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Return Retorno
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
DataAdapter("PA_RH_SolicitudVacacionesAdd")
@@ -5670,6 +5670,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@diasinabiles", SqlDbType.Int).Value = diasinabiles
.Add("@PorcentajePrimaVac", SqlDbType.Money).Value = PorcentajePrimaVac
.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
End With

View File

@@ -137,6 +137,7 @@ Public Class LogicNominas
Dim SDI As Double = 0
Dim SalarioDiarioSS As Double = 0
Dim ClaveEstado As String = ""
Dim MetodoPagoFijo As Boolean
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
'Conexiones a la Base de Datos
@@ -152,6 +153,12 @@ Public Class LogicNominas
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
Serie = objNomina.Serie
Folio = objNomina.Folio.ToString()
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
ClaveBanco = drow("ClaveBanco").ToString()
BancoNumCuenta = drow("BancoNumCuenta").ToString()
If TimbreIndemnizacion Then
cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
cfdi.IStimbreFiniquito = True
@@ -180,8 +187,11 @@ Public Class LogicNominas
Puesto = objPersonal.Puesto
CveSATRiesgoPuesto = objPersonal.CveSATRiesgoPuesto.ToString()
TipoPeriodoPago = objPersonal.TipoPeriodoPago
ClaveBanco = objPersonal.ClaveBanco
BancoNumCuenta = objPersonal.BancoNumCuenta
If Not MetodoPagoFijo Then
ClaveBanco = objPersonal.ClaveBanco
BancoNumCuenta = objPersonal.BancoNumCuenta
End If
SDI = objPersonal.SDI
SalarioDiarioSS = objPersonal.SalarioDiarioSS
ClaveEstado = objPersonal.ClaveEstado
@@ -332,7 +342,7 @@ Public Class LogicNominas
'subsidio al empleo
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
.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
Next
End If
@@ -362,7 +372,7 @@ Public Class LogicNominas
'subsidio al empleo
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
.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
Next
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
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
otrp.ejercicio = DateTime.Now.Year - 1
otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs()

View File

@@ -5,8 +5,8 @@ Imports System.Data
Imports Extensiones
Partial Class Bancos_PopIEVentas
Inherits ClsPaginas
Inherits ClsPaginas
#Region "Propiedades"
Private Property DtDeudores As DataTable
Get
@@ -520,9 +520,9 @@ Partial Class Bancos_PopIEVentas
Set(value As Date)
ViewState("Fecha") = value
End Set
End Property
End Property
#End Region
Private Sub Bancos_PopIEVentas_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -618,8 +618,8 @@ Partial Class Bancos_PopIEVentas
TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4)
End If
End If
End Sub
End Sub
#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
Select Case RBLContado.SelectedValue
@@ -670,9 +670,9 @@ Partial Class Bancos_PopIEVentas
End Select
UpGuardar.Update()
End Sub
End Sub
#End Region
#Region "C A R G A R I N F O R M A C I O N"
Private Sub CargaVenta(pCveVenta As Integer)
Dim ObjVenta As New ClsVentas()
@@ -1005,9 +1005,9 @@ Partial Class Bancos_PopIEVentas
End If
UpDeudores.Update()
End Sub
End Sub
#End Region
#Region "DDL'S CHANGED"
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
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
CambieDeudor()
End Sub
End Sub
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
@@ -1166,10 +1166,10 @@ Partial Class Bancos_PopIEVentas
End If
Dep.Dispose()
UpCuentaDeposito.Update()
End Sub
End Sub
#End Region
#End Region
#Region "GV ROW DATA BOUND"
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
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)
End If
End Sub
End Sub
#End Region
#Region "CHK TIPO CAMBIO"
#Region "PAGAR CON PESOS"
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then
@@ -1284,9 +1284,9 @@ Partial Class Bancos_PopIEVentas
Else
args.IsValid = False
End If
End Sub
End Sub
#End Region
#Region "PAGAR CON DOLARES"
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarDolares.Checked Then
@@ -1345,9 +1345,9 @@ Partial Class Bancos_PopIEVentas
Else
args.IsValid = False
End If
End Sub
End Sub
#End Region
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
CambiaTipoMoneda()
End Sub
@@ -1377,6 +1377,9 @@ Partial Class Bancos_PopIEVentas
#Region "G U A R D A R"
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim FechaFactura As Date = FechaVenta
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
@@ -3588,9 +3591,9 @@ Partial Class Bancos_PopIEVentas
UpDatos.Update()
UpGuardar.Update()
End Sub
End Sub
#End Region
#Region " COMPLEMENTOS PAGO "
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
If Not ChkComplementoPago.Checked Then
@@ -3601,6 +3604,16 @@ Partial Class Bancos_PopIEVentas
'For i = 0 To CveVentas.Count - 1
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()
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente) Then

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@@ -165,13 +165,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If LbAgregar.Text = "Agregar" Then
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.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"
End If
ElseIf LbAgregar.Text = "Actualizar" Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.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"
End If
End If

View File

@@ -203,7 +203,7 @@
<div class="col-md-6">
<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: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 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.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"]);
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"]);
}
ObjNomina.Dispose();

View File

@@ -242,6 +242,13 @@
Indemnización
<br />
<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 class="col-md-4 text-center">
Separación unica

View File

@@ -1062,16 +1062,15 @@ public partial class Nomina_Finiquito : ClsPaginas
using (ClsRH ObjPersonal = new ClsRH())
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];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
}
if (continuar)
{
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa,diasindemnizacion:Txtdiasindemnizacion.Text.ToEntero());
}
if (continuar)
{
@@ -1311,16 +1310,15 @@ public partial class Nomina_Finiquito : ClsPaginas
using (ClsRH ObjPersonal = new ClsRH())
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];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
}
if (continuar)
{
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
}
if (continuar)
{ 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)
{
Fila++;
oldcveSupProyecto = cveSupProyecto; newsubproyecto = true;
Fila += 4;
oldcveSupProyecto = cveSupProyecto; newsubproyecto = true;
column = 1;
column++;
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 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
End If

View File

@@ -241,7 +241,7 @@ public partial class RH_CalculoSBC : ClsPaginas
{
string titulo = HttpUtility.HtmlDecode(Extensiones.ModExtensiones.TextoCelda(cell)).Trim();
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))
titulo = titulo + i;

View File

@@ -2394,6 +2394,25 @@
</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>
</asp:UpdatePanel>
</div>

View File

@@ -4514,7 +4514,7 @@ Partial Class RH_Personal
VacFolioActual = VacFolioActual + 1
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, 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
Dim ShowError As String = objRH.DtResultados.Rows(0)("ShowError").ToString()
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
Dim objRH As New ClsRH()
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = TxtFileFormatoVacaciones.getfiles().Archivos
Dim Filename As String = ""
@@ -4784,36 +4779,27 @@ Partial Class RH_Personal
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}"
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
Dim rutaDestino As String = $"{UsuarioActual.Empresa.Ruta}Personal\{CvePersonal}\Vacaciones\{Documento}"
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\") Then
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Personal\" & CvePersonal & "\Vacaciones\")
End If
If System.IO.File.Exists(rutaDestino) Then
System.IO.File.Delete(rutaDestino)
End If
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
TxtFileFormatoVacaciones.Text = ""
Catch ex As Exception
OnError("Error al cargar Formato vacaciones", ex)
End Try
Next
If Documento.Length > 0 Then
Dim objRH As New ClsRH()
If objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, CvePersonal, UsuarioActual.CveUsuario, Documento) Then
Alert("La fecha se actualizo correctamente")
End If
UpModalEditarDiaVacacion.Update()
objRH.Dispose()
CargaVacaciones()
CargaVacacionesResumenPeriodoActual()
RegistraScript("$('#divEditarDiaVacacion').modal('hide');")
@@ -5304,38 +5290,14 @@ Partial Class RH_Personal
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
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)
If CveResultadoSalida > 0 Then
If CveSeccionAlmacenUniforme = 0 Then CveSeccionAlmacenUniforme = -3 'que lo tome por default
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
If ResultadoDetalleSalida Then
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
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 ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
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 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
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
ObjInventario.Commit()
Alert("El resguardo se liberó correctamente")
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)
ObjInventario.RollBack()
End If
ObjInventario.Dispose()
End Sub

View File

@@ -53,29 +53,30 @@ Partial Class Sistemas_PopUpCambiaUsuario
End If
If splitedtext.Length > 0 Then
Select Case splitedtext(0).ToUpper()
Case "VSH" : CveEmpresa = "7"
Case "JAM" : CveEmpresa = "119"
Case "COMPUPROVEEDORES" : CveEmpresa = "72"
Case "DNDIFUSA" : CveEmpresa = "80"
Case "SOGO" : CveEmpresa = "8"
Case "BDH" : CveEmpresa = "140"
Case "ECONOLLANTAS" : CveEmpresa = "141"
End Select
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.
Select Case splitedtext(0).ToUpper()
Case "VSH" : CveEmpresa = "7"
Case "JAM" : CveEmpresa = "119"
Case "COMPUPROVEEDORES" : CveEmpresa = "72"
Case "DNDIFUSA" : CveEmpresa = "80"
Case "SOGO" : CveEmpresa = "8"
Case "BDH" : CveEmpresa = "140"
Case "ECONOLLANTAS" : CveEmpresa = "141"
Case "SERVEC" : CveEmpresa = "153"
End Select
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

View File

@@ -397,12 +397,12 @@ public class TareasJam : IHttpHandler
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
CargaProductos = CargarArchivos(FInfoProductos, $"{FTPServer}/Productos", TFPUsr, FTPPass);
CargaProductos = CargarArchivos(FInfoProductos, $"{FTPServer}/productos", TFPUsr, FTPPass);
if (CargaProductos)
{
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, $"{FTPServer}/Productos", TFPUsr, FTPPass);
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, $"{FTPServer}/productos", TFPUsr, FTPPass);
}
if (CargaProductos)
@@ -417,11 +417,11 @@ public class TareasJam : IHttpHandler
if (CargaProductos)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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
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,
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
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjClientes.DtResultados

View File

@@ -332,7 +332,7 @@
<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="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="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" />