-
This commit is contained in:
@@ -5660,7 +5660,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
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,
|
||||
Optional Ejercicio As Integer = 0, Optional PrimaVacacional As Integer = 1, Optional CobrarImss As Integer = 0) As Boolean
|
||||
Optional Ejercicio As Integer = 0, Optional PrimaVacacional As Integer = 1, Optional CobrarImss As Integer = 0, Optional diasPago As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_SolicitudVacacionesAdd")
|
||||
@@ -5681,6 +5681,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@PrimaVacacional", SqlDbType.Int).Value = PrimaVacacional
|
||||
.Add("@CobrarImss", SqlDbType.Int).Value = CobrarImss
|
||||
.Add("@diasPago", SqlDbType.Int).Value = diasPago
|
||||
'.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles
|
||||
End With
|
||||
|
||||
|
||||
@@ -559,6 +559,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
ColumnaNombre = "Nombre"
|
||||
End If
|
||||
|
||||
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
If IsNothing(usuario) Then
|
||||
@@ -584,6 +586,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
If EsDistribuidor <> -1 Then
|
||||
dt = dt.FiltraParametros(String.Format("EsDistribuidor = {0} ", CBool(EsDistribuidor)))
|
||||
End If
|
||||
|
||||
DtRetorno = dt.FiltraParametros(String.Format("NombreComercial like '%{0}%' OR Nombre like '%{0}%' ", Name))
|
||||
End If
|
||||
dt.Dispose()
|
||||
|
||||
@@ -11383,6 +11383,7 @@ Partial Class Compras_Compras
|
||||
|
||||
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
||||
|
||||
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||
|
||||
@@ -12380,6 +12381,10 @@ Partial Class Compras_Compras
|
||||
Protected Sub DivirInsumo(sender As Object, e As EventArgs)
|
||||
Dim index2 As Integer = 0
|
||||
|
||||
If Not TmpDT.Columns.Contains("Importe") Then
|
||||
TmpDT.Columns.Add("Importe", GetType(Decimal))
|
||||
End If
|
||||
|
||||
'LLena el AF vinculado para no perderlo
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If GvAFInsumos.Rows(index2).FCHiddenField("HdnCveAF").Value.ToEntero > 0 Then
|
||||
|
||||
@@ -907,213 +907,240 @@ Partial Class PopUpVerFactura
|
||||
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, Parametros("EXT").ToString, Parametros("TIPODOCTO").ToString, Parametros("FOLIO").ToString, Exten)
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
|
||||
If Archivo.Exists Then
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(Path)
|
||||
'HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
If Archivo.Exists Then
|
||||
DescargarArchivoPDFTraslado(Archivo, Path)
|
||||
Else
|
||||
|
||||
If Exten = "pdf" Then
|
||||
GeneraPDFFactura(Parametros("CVEMOVIMIENTO").ToString.ToEntero)
|
||||
Archivo = New System.IO.FileInfo(Path)
|
||||
If Archivo.Exists Then
|
||||
DescargarArchivoPDFTraslado(Archivo, Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
Private Sub DescargarArchivoPDFTraslado(Archivo As System.IO.FileInfo, path As String)
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(path)
|
||||
'HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkGenerarPDF_Click(sender As Object, e As EventArgs)
|
||||
' GeneraPDFFactura()
|
||||
'End Sub
|
||||
'Private Sub GeneraPDFFactura()
|
||||
' Try
|
||||
' Dim objFactura = CreaObjetosVenta()
|
||||
' PdfFactura(objFactura)
|
||||
' objFactura.Dispose()
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al generar el PDF", ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
Private Sub GeneraPDFFactura(CveMovimiento As Integer)
|
||||
Try
|
||||
Dim objFactura = CreaObjetosTraslado(CveMovimiento)
|
||||
If objFactura IsNot Nothing Then
|
||||
PdfFactura(objFactura)
|
||||
objFactura.Dispose()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar el PDF", ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Private Function CreaObjetosTraslado() As Modelos.Factura
|
||||
' Dim ObjFactura = New Modelos.Factura
|
||||
' ObjFactura.Version = "3.3"
|
||||
' ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
' ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
' ObjFactura.TipoCambio = 0
|
||||
' ObjFactura.ConvertirPesos = False
|
||||
' ObjFactura.TipoCambio = 0
|
||||
' ObjFactura.CveMoneda = 1
|
||||
' ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
' ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
' ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
' ObjFactura.TipoDocto = "Tra"
|
||||
' ObjFactura.RefDocto = ""
|
||||
' ObjFactura.Folio = Folio.ToEntero
|
||||
' ObjFactura.Serie = "Tra"
|
||||
' ObjFactura.CveMesa = -1
|
||||
' ObjFactura.Fecha = Now
|
||||
' ObjFactura.CvePrePoliza = -1
|
||||
' ObjFactura.FechaPago = Now
|
||||
' ObjFactura.MotivoDescuento = ""
|
||||
' ObjFactura.Observaciones = ""
|
||||
' ObjFactura.FechaEjecucion = Now
|
||||
' ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
' ObjFactura.CveCondicionEntrega = -1
|
||||
' ObjFactura.CondicionEntrega = ""
|
||||
' ObjFactura.NumeroCuenta = ""
|
||||
' ObjFactura.CondicionesPago = 0
|
||||
' ObjFactura.FormaPago = 0
|
||||
' ObjFactura.PedidoContrato = ""
|
||||
' ObjFactura.OrdenCompra = ""
|
||||
' ObjFactura.NumeroContrato = ""
|
||||
' ObjFactura.NumeroDescripcionContrato = ""
|
||||
' ObjFactura.DescripcionContrato = ""
|
||||
' ObjFactura.CveCorte = -1
|
||||
' ObjFactura.TipoDocumento = "Traspaso"
|
||||
' ObjFactura.Alfa1 = ""
|
||||
' ObjFactura.Alfa2 = ""
|
||||
' ObjFactura.Alfa3 = ""
|
||||
' ObjFactura.Descuento = 0
|
||||
' ObjFactura.Amortizacion = 0
|
||||
' ObjFactura.CveContrato = 0
|
||||
' ObjFactura.CveVendedor = 0
|
||||
' ObjFactura.FechaVencimiento = Now
|
||||
' ObjFactura.TipoEstatus = 0
|
||||
' ObjFactura.Det_OrdenCompra = ""
|
||||
' ObjFactura.Inv_CveEstatusEntrega = 0
|
||||
' ObjFactura.FormaPago33 = ""
|
||||
' ObjFactura.MetodoPago33 = ""
|
||||
' ObjFactura.UsoCFDI = ""
|
||||
' ObjFactura.CveClienteSucursal = 0
|
||||
' Dim CveSubProyecto As Integer = -1
|
||||
' If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
||||
' CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
' End If
|
||||
' ObjFactura.CveSubProyecto = CveSubProyecto
|
||||
' ObjFactura.CveSubProyectoCobranza = CveSubProyecto
|
||||
' ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
|
||||
Private Function CreaObjetosTraslado(CveMovimiento As Integer) As Modelos.Factura
|
||||
Dim Folio As Integer = -1
|
||||
Dim CveAlmacen As Integer = 0
|
||||
Dim DtDetalle As DataTable = Nothing
|
||||
|
||||
' ObjFactura.SubTotal = 0
|
||||
' ObjFactura.Descuento = 0
|
||||
' ObjFactura.Amortizacion = 0
|
||||
' ObjFactura.IVA = 0
|
||||
' ObjFactura.RetIVA = 0
|
||||
' ObjFactura.RetISR = 0
|
||||
' ObjFactura.IEPS = 0
|
||||
' ObjFactura.Total = 0
|
||||
' ObjFactura.RFCReceptor = "XAXX010101000"
|
||||
Using ObjMovimientos As New ClsInventarios
|
||||
If ObjMovimientos.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjMovimientos.DtResultados.Rows.Count = 1 Then
|
||||
Folio = ObjMovimientos.Folio
|
||||
CveAlmacen = ObjMovimientos.CveAlmacen
|
||||
End If
|
||||
|
||||
' Dim dt As DataTable = DtMovimientos.Copy
|
||||
If ObjMovimientos.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtDetalle = ObjMovimientos.DtResultados.Copy
|
||||
End If
|
||||
End Using
|
||||
|
||||
' dt.Columns.Add("TotalImporte", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("Descuento", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("UM")
|
||||
' dt.Columns.Add("SATClaveUM")
|
||||
' dt.Columns.Add("SATClaveProdServ")
|
||||
' dt.Columns.Add("Noidentificacion")
|
||||
' dt.Columns.Add("CuentaPredial")
|
||||
' dt.Columns.Add("Obs")
|
||||
' dt.Columns.Add("ImporteIVA", Type.GetType("System.Double"))
|
||||
' dt.Columns.Add("PorcentajeIVA", Type.GetType("System.Double"))
|
||||
If Folio > 0 AndAlso DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
|
||||
Dim ObjFactura = New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFactura.TipoCambio = 0
|
||||
ObjFactura.ConvertirPesos = False
|
||||
ObjFactura.TipoCambio = 0
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.TipoDocto = "Tra"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio
|
||||
ObjFactura.Serie = "Tra"
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
ObjFactura.MotivoDescuento = ""
|
||||
ObjFactura.Observaciones = ""
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
ObjFactura.CveCondicionEntrega = -1
|
||||
ObjFactura.CondicionEntrega = ""
|
||||
ObjFactura.NumeroCuenta = ""
|
||||
ObjFactura.CondicionesPago = 0
|
||||
ObjFactura.FormaPago = 0
|
||||
ObjFactura.PedidoContrato = ""
|
||||
ObjFactura.OrdenCompra = ""
|
||||
ObjFactura.NumeroContrato = ""
|
||||
ObjFactura.NumeroDescripcionContrato = ""
|
||||
ObjFactura.DescripcionContrato = ""
|
||||
ObjFactura.CveCorte = -1
|
||||
ObjFactura.TipoDocumento = "Traspaso"
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.CveContrato = 0
|
||||
ObjFactura.CveVendedor = 0
|
||||
ObjFactura.FechaVencimiento = Now
|
||||
ObjFactura.TipoEstatus = 0
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
ObjFactura.Inv_CveEstatusEntrega = 0
|
||||
ObjFactura.FormaPago33 = ""
|
||||
ObjFactura.MetodoPago33 = ""
|
||||
ObjFactura.UsoCFDI = ""
|
||||
ObjFactura.CveClienteSucursal = 0
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {CveAlmacen}").Rows.Count > 0 Then
|
||||
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {CveAlmacen}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
End If
|
||||
ObjFactura.CveSubProyecto = CveSubProyecto
|
||||
ObjFactura.CveSubProyectoCobranza = CveSubProyecto
|
||||
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
|
||||
|
||||
ObjFactura.SubTotal = 0
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.IVA = 0
|
||||
ObjFactura.RetIVA = 0
|
||||
ObjFactura.RetISR = 0
|
||||
ObjFactura.IEPS = 0
|
||||
ObjFactura.Total = 0
|
||||
ObjFactura.RFCReceptor = "XAXX010101000"
|
||||
|
||||
|
||||
' For Each Row As DataRow In dt.Rows
|
||||
' Row("TotalImporte") = Row("Total")
|
||||
' Row("Descuento") = 0
|
||||
' Row("UM") = Row("UnidadMedida")
|
||||
' Row("SATClaveUM") = Row("SATClaveUnidadMedida")
|
||||
' Row("SATClaveProdServ") = Row("SATClavePS")
|
||||
' Row("Noidentificacion") = Row("Codigo")
|
||||
' Row("CuentaPredial") = ""
|
||||
' Row("Obs") = Row("Observaciones")
|
||||
' Row("ImporteIVA") = 0
|
||||
' Row("PorcentajeIVA") = 0
|
||||
' Next
|
||||
|
||||
' 'DETALLES
|
||||
' ObjFactura.DtDetalle = dt
|
||||
DtDetalle.Columns.Add("TotalImporte", Type.GetType("System.Double"))
|
||||
DtDetalle.Columns.Add("Descuento", Type.GetType("System.Double"))
|
||||
DtDetalle.Columns.Add("UM")
|
||||
DtDetalle.Columns.Add("SATClaveUM")
|
||||
DtDetalle.Columns.Add("SATClaveProdServ")
|
||||
DtDetalle.Columns.Add("Noidentificacion")
|
||||
DtDetalle.Columns.Add("CuentaPredial")
|
||||
DtDetalle.Columns.Add("Obs")
|
||||
DtDetalle.Columns.Add("ImporteIVA", Type.GetType("System.Double"))
|
||||
DtDetalle.Columns.Add("PorcentajeIVA", Type.GetType("System.Double"))
|
||||
|
||||
' 'SUBPROYECTO
|
||||
' ObjFactura.SetSubProyectoMatriz(Me)
|
||||
' ObjFactura.SetSubProyecto(Me)
|
||||
|
||||
' ObjFactura.Inv_CveMovimiento = Me.CveMovimiento
|
||||
For Each Row As DataRow In DtDetalle.Rows
|
||||
Row("TotalImporte") = Row("Total")
|
||||
Row("Descuento") = 0
|
||||
Row("UM") = Row("UnidadMedida")
|
||||
Row("SATClaveUM") = Row("SATClaveUnidadMedida")
|
||||
Row("SATClaveProdServ") = Row("SATClavePS")
|
||||
Row("Noidentificacion") = Row("Codigo")
|
||||
Row("CuentaPredial") = ""
|
||||
Row("Obs") = Row("Observaciones")
|
||||
Row("ImporteIVA") = 0
|
||||
Row("PorcentajeIVA") = 0
|
||||
Next
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbreTraslado(ObjFactura)
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = DtDetalle
|
||||
|
||||
' Return ObjFactura
|
||||
'End Function
|
||||
'Private Function PreParaTimbreTraslado(Obj As Modelos.Factura) As CFDITimbre
|
||||
' Dim Timbre As New CFDITimbre
|
||||
' Timbre.Comprobante.TipoComprobante = "T"
|
||||
' Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
' Timbre.Comprobante.Serie = Obj.Serie
|
||||
' Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
' Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
' Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
' Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
' Timbre.Comprobante.Total = Obj.Total
|
||||
'SUBPROYECTO
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
|
||||
' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
' Timbre.Comprobante.Confirmacion = ""
|
||||
ObjFactura.Inv_CveMovimiento = CveMovimiento
|
||||
|
||||
' Timbre.Receptor.RFC = "XAXX010101000"
|
||||
' Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
' Timbre.Receptor.UsoCFDI = "P01"
|
||||
ObjFactura.Timbre = PreParaTimbreTraslado(ObjFactura)
|
||||
Return ObjFactura
|
||||
End If
|
||||
|
||||
' Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
' Dim totIVA As Decimal = Obj.IVA
|
||||
' Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
' Dim totRetISR As Decimal = Obj.RetISR
|
||||
' Dim i As Integer = 1
|
||||
Return Nothing
|
||||
|
||||
' 'DETALLES
|
||||
' Dim tPS As String = ""
|
||||
End Function
|
||||
Private Function PreParaTimbreTraslado(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = "T"
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
' For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
' If drr("PS").ToString.Length = 1 Then
|
||||
' tPS = drr("Obs").ToString
|
||||
' Else
|
||||
' If drr("PS").ToString.Length = 0 Then
|
||||
' tPS = ""
|
||||
' Else
|
||||
' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
' End If
|
||||
' End If
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
' 'CONDICIONANTE, ESPECIAL
|
||||
' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||
Timbre.Receptor.RFC = "XAXX010101000"
|
||||
Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
Timbre.Receptor.UsoCFDI = "P01"
|
||||
|
||||
' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
' .Descripcion = tPS,
|
||||
' .ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
' .Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
' .Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
' .Unidad = drr("UM").ToString,
|
||||
' .ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
' .ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
' .Noidentificacion = drr("Noidentificacion").ToString,
|
||||
' .CuentaPredial = drr("CuentaPredial").ToString}
|
||||
' 'VERIFICA SUMA SUBTOTALES
|
||||
' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||
' concepto.Importe = totSubTotalW
|
||||
' End If
|
||||
' totSubTotal = totSubTotal - concepto.Importe
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
' 'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||
' 'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
'DETALLES
|
||||
Dim tPS As String = ""
|
||||
|
||||
' Timbre.Conceptos.Add(concepto)
|
||||
' i += 1
|
||||
' Next
|
||||
' Return Timbre
|
||||
'End Function
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
|
||||
'CONDICIONANTE, ESPECIAL
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'VERIFICA SUMA SUBTOTALES
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -125,9 +125,6 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<span class="bold">Área geográfica
|
||||
|
||||
|
||||
Corregido con https://www.corrector.co/es/:</span>
|
||||
<br />
|
||||
<asp:Literal ID="LtlAreaGeografica" runat="server">--</asp:Literal>
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
content: "\f1c1";
|
||||
}
|
||||
|
||||
table.gvasistencia tr:hover {
|
||||
background-color: #dddddd;
|
||||
}
|
||||
|
||||
label.compoonenlabel {
|
||||
padding-top: 5px;
|
||||
}
|
||||
@@ -388,7 +392,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SeTimbroFiniquito,EsRenuncia,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SeTimbroFiniquito,EsRenuncia,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,CveSubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
|
||||
<Columns>
|
||||
|
||||
@@ -553,7 +557,8 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Asistencia</span>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Asistencia
|
||||
<asp:Literal ID="LtlPeriodoseleccionadoASis" runat="server"></asp:Literal></span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
@@ -594,9 +599,19 @@
|
||||
<asp:TextBox ID="TxtasiscvePersonal" CssClass="hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtasisFecha" CssClass="hidden" runat="server"></asp:TextBox>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPersonal" Enabled="false" runat="server" Text=""></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtPersonal" Enabled="false" Text="Empleado"></asp:Label>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPersonal" Enabled="false" runat="server" Text=""></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtPersonal" Enabled="false" Text="Empleado"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtfechaMostrar" Enabled="false" runat="server" Text=""></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtfechaMostrar" Enabled="false" Text="Fecha"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
@@ -1315,101 +1330,106 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacDiasFeriados" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacDiasFeriados">Días feriados</asp:Label>
|
||||
<asp:RequiredFieldValidator ID="rfvvacDiasFeriados" runat="server" ControlToValidate="TxtvacDiasFeriados" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días feriados''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacDiasFeriados"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaPago">Fecha pago</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaPago" runat="server" TargetControlID="TxtvacFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaPago" TargetControlID="TxtvacFechaPago" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaPago" runat="server" ControlToValidate="TxtvacFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaPago"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaInicio">Fecha Inicio</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaInicio" runat="server" TargetControlID="TxtvacFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaInicio" TargetControlID="TxtvacFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaInicio" runat="server" ControlToValidate="TxtvacFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaFin">Fecha Fin</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaFin" TargetControlID="TxtvacFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaFin" runat="server" ControlToValidate="TxtvacFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" style="padding-top: 0px;">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" Style="padding-bottom: 0px; margin-bottom: 0px;">Forma de pago</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" Style="margin-top: -4px;" 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>
|
||||
<asp:RequiredFieldValidator ID="RfvFormapagovacaciones" runat="server" ControlToValidate="DdlFormapagovacaciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cve Ramo Seguro''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones">
|
||||
|
||||
</asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFormapagovacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvFormapagovacaciones"></ajax:ValidatorCalloutExtender>
|
||||
</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>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px;">
|
||||
¿Prima Vacacional?
|
||||
</div>
|
||||
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:Panel runat="server" ID="PnlVacacionesAdd">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="" style="padding-top: 0px;">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" Style="padding-bottom: 0px; margin-bottom: 0px; font-size: 12px; color: #888; font-weight: 400;">Forma de pago</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server" OnSelectedIndexChanged="DdlFormapagovacaciones_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Text="Pagar en fecha" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Pagar en periodo disfrutadas" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Vacaciones trabajadas" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo pagar" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo disfrutar" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo prima" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvFormapagovacaciones" runat="server" ControlToValidate="DdlFormapagovacaciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma pago vacaciones''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFormapagovacaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvFormapagovacaciones"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="PnlVacfechas" CssClass="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaInicio">Fecha Inicio</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaInicio" runat="server" TargetControlID="TxtvacFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaInicio" TargetControlID="TxtvacFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaInicio" runat="server" ControlToValidate="TxtvacFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaFin">Fecha Fin</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaFin" TargetControlID="TxtvacFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaFin" runat="server" ControlToValidate="TxtvacFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PnlVacDias" CssClass="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacDiasFeriados" CssClass="form-control input-sm " type="number" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacDiasFeriados">Días feriados</asp:Label>
|
||||
</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 " type="number" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PnlVacFechapago" CssClass="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtvacFechaPago">Fecha pago</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaPago" runat="server" TargetControlID="TxtvacFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeeVacFechaPago" TargetControlID="TxtvacFechaPago" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvvacFechaPago" runat="server" ControlToValidate="TxtvacFechaPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VG_Vacaciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoVacFechaPago" runat="server" HighlightCssClass="vco" TargetControlID="rfvvacFechaPago"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="PnlVacDiasPago" CssClass="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacDiasPago" CssClass="form-control input-sm " type="number" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtVacDiasPago">Días pago</asp:Label>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px;">
|
||||
<div class="col-md-6" >
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px; font-size: 12px; color: #888; font-weight: 400; white-space: nowrap;">
|
||||
¿Prima Vacacional?
|
||||
</div>
|
||||
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-6" >
|
||||
|
||||
<div style="padding-top: 0px; padding-bottom: 0px; font-size: 12px; color: #888; font-weight: 400; white-space: nowrap;">
|
||||
¿Cobrar IMSS?
|
||||
</div>
|
||||
<asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSRVacacionesADD" OnClick="LnkSRVacacionesADD_Click" Visible="true" CssClass="btn btn-primary" ValidationGroup="VG_Vacaciones" runat="server">Guardar</asp:LinkButton>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1695,37 +1715,37 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<asp:CheckBox ID="ChkCalAutomaticoV" OnCheckedChanged="ChkCalAutomaticoV_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
<asp:CheckBox ID="ChkCalAutomaticoV" OnCheckedChanged="ChkCalAutomaticoV_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<asp:CheckBox ID="ChkCalAutomatico" OnCheckedChanged="ChkCalAutomatico_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
<asp:CheckBox ID="ChkCalAutomatico" OnCheckedChanged="ChkCalAutomatico_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<asp:CheckBox ID="ChkCalAutomaticoG" OnCheckedChanged="ChkCalAutomaticoG_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
<asp:CheckBox ID="ChkCalAutomaticoG" OnCheckedChanged="ChkCalAutomaticoG_CheckedChanged" AutoPostBack="true" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1949,7 +1969,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtValorUma" CssClass="form-control input-sm " runat="server" type="number" step=".01"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtValorUma" CssClass="form-control input-sm " runat="server" type="number" step=".01"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvValorUma" runat="server" ControlToValidate="TxtValorUma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGAddUma"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoValorUma" runat="server" HighlightCssClass="vco" TargetControlID="RfvValorUma"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -378,8 +378,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
LnkConsultar.Visible = (CvePeriodo > 0);
|
||||
UPFiltros.Update();
|
||||
UpDatos.Update();
|
||||
UPFiltros.Update();
|
||||
}
|
||||
#endregion
|
||||
#region Datos
|
||||
@@ -390,10 +389,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
FiltCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero();
|
||||
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
|
||||
FiltCvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
|
||||
LtlPeriodoseleccionado.Text = DdlPeriodo.SelectedItem.Text;
|
||||
FiltAgrupador = 1;
|
||||
HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo));
|
||||
cargaDatos();
|
||||
LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, GvNominas.Rows.Count);
|
||||
LtlPeriodoseleccionadoASis.Text = LtlPeriodoseleccionado.Text;
|
||||
|
||||
}
|
||||
public void cargaDatos(bool cargaasistencia = true)
|
||||
@@ -1027,7 +1027,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
e.Row.FindControl("LnkTimbrar").Visible = false;
|
||||
if (Turno.Length == 0 && SubProyecto.Length > 0)
|
||||
{
|
||||
LtlNombre.Text = String.Format("<b>Centro de costos: {0}<b>", SubProyecto);
|
||||
LtlNombre.Text = String.Format("<b>Centro de costos: {0}({1})<b>", SubProyecto, e.Row.DataKey("CveSubProyecto").ToString());
|
||||
}
|
||||
else if (Turno.Length > 0)
|
||||
{
|
||||
@@ -1092,7 +1092,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (msggral.Length > 0)
|
||||
{
|
||||
|
||||
Alert(string.Format("Ocurrieron los siguientes errores <table class=\"table table-striped table-hover mysmallbtn\" ><tbody><tr><th>Código</th><th>Nombre</th><th>Error</th></tr>{0}</tbody></table>", msggral), TipoMensaje.MsgAdvertencia);
|
||||
Alert(string.Format("Los siguientes empleados no se timbraron por las siguiente situaciones: <table class=\"table table-striped table-hover mysmallbtn\" ><tbody><tr><th>Código</th><th>Nombre</th><th>Mensaje SAT</th></tr>{0}</tbody></table>", msggral), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
@@ -1126,16 +1126,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
Usuario UsuarioActual = null;
|
||||
using(ClsSisUsuarios ObjUsuario= new ClsSisUsuarios())
|
||||
{
|
||||
UsuarioActual =ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
}
|
||||
CreaObjetoEmpresa(ref UsuarioActual);
|
||||
UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
//Usuario UsuarioActual = null;
|
||||
//using(ClsSisUsuarios ObjUsuario= new ClsSisUsuarios())
|
||||
//{
|
||||
// UsuarioActual =ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
//}
|
||||
//CreaObjetoEmpresa(ref UsuarioActual);
|
||||
//UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(Msg, TipoMensaje.MsgAdvertencia); }
|
||||
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
|
||||
else
|
||||
{
|
||||
ClsNominas ObjPeriodo = new ClsNominas();
|
||||
@@ -1562,6 +1562,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
#region SobreRecibo
|
||||
|
||||
#region SobreRecibo propiedades
|
||||
|
||||
protected int SRCvePersonal
|
||||
@@ -1680,6 +1681,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
|
||||
#region Vacaciones
|
||||
protected int CvePersonalVacaciones
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CvePersonalVacaciones"] == null) { return 0; }
|
||||
else { return ViewState["CvePersonalVacaciones"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CvePersonalVacaciones"] = value; }
|
||||
}
|
||||
private void CargaVacaciones()
|
||||
{
|
||||
ClsRH objRH = new ClsRH();
|
||||
@@ -1692,10 +1704,322 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
else { GvVacaciones.DataSource = null; }
|
||||
|
||||
objRH.Dispose();
|
||||
LnkSRVacacionesADD.Visible = false;
|
||||
PnlVacacionesAdd.Visible = false;
|
||||
GvVacaciones.DataBind();
|
||||
UpGvVacaciones.Update();
|
||||
}
|
||||
|
||||
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
LnkSRVacacionesADD.Visible = true;
|
||||
PnlVacacionesAdd.Visible = true;
|
||||
DdlFormapagovacaciones_SelectedIndexChanged(null, null);
|
||||
ChkVacPrimaVacacional.Checked = true;
|
||||
ChkVacCobrarIMSS.Checked = true;
|
||||
}
|
||||
|
||||
protected void DdlFormapagovacaciones_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
PnlVacfechas.Visible = false;
|
||||
PnlVacDias.Visible = false;
|
||||
PnlVacFechapago.Visible = false;
|
||||
PnlVacDiasPago.Visible = false;
|
||||
PnlVacChecks.Visible = false;
|
||||
switch (DdlFormapagovacaciones.SelectedValue.ToEntero())
|
||||
{
|
||||
case 1://Pagar en fecha
|
||||
PnlVacfechas.Visible = true;
|
||||
PnlVacDias.Visible = true;
|
||||
PnlVacFechapago.Visible = true;
|
||||
PnlVacDiasPago.Visible = true;
|
||||
PnlVacChecks.Visible = true;
|
||||
break;
|
||||
case 2://Pagar en periodo disfrutadas
|
||||
PnlVacfechas.Visible = true;
|
||||
PnlVacDias.Visible = true;
|
||||
PnlVacChecks.Visible = true;
|
||||
break;
|
||||
case 3://Vacaciones trabajadas
|
||||
PnlVacfechas.Visible = true;
|
||||
PnlVacDias.Visible = true;
|
||||
PnlVacDiasPago.Visible = false;
|
||||
PnlVacFechapago.Visible = true;
|
||||
//PnlVacChecks.Visible = true;
|
||||
break;
|
||||
case 4://Solo pagar
|
||||
PnlVacFechapago.Visible = true;
|
||||
PnlVacDiasPago.Visible = true;
|
||||
PnlVacChecks.Visible = true;
|
||||
break;
|
||||
case 5://Solo disfrutar
|
||||
PnlVacFechapago.Visible = true;
|
||||
PnlVacDiasPago.Visible = true;
|
||||
break;
|
||||
case 6://Solo prima
|
||||
PnlVacFechapago.Visible = true;
|
||||
PnlVacDiasPago.Visible = true;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
protected void LnkSRVacacionesUP_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkSRVacacionesADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fInicio = TxtvacFechaInicio.Text.ToDate();
|
||||
DateTime fFin = TxtvacFechaFin.Text.ToDate();
|
||||
string fechapago = TxtvacFechaPago.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
int diasinhabil = TxtvacDiasFeriados.Text.ToEntero();
|
||||
// Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
|
||||
int VacCveSupervisor = 0;
|
||||
int VacFolioActual = 0;
|
||||
if (fInicio <= fFin)
|
||||
{
|
||||
using (ClsRH objRHx = new ClsRH())
|
||||
{
|
||||
|
||||
if (objRHx.VacacionesResumenGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
|
||||
{
|
||||
if (objRHx.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VacCveSupervisor = objRHx.DtResultados.Rows[0]["SupervisorCorreo"].ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
|
||||
if (objRHx.VacacionesGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
|
||||
{
|
||||
if (objRHx.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VacFolioActual = objRHx.DtResultados.Compute("Max(Folio)", string.Empty).ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VacFolioActual = VacFolioActual + 1;
|
||||
ClsRH objRH = new ClsRH();
|
||||
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
|
||||
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago,
|
||||
diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero(),
|
||||
Ejercicio: TxtVacEjercicio.Text.ToEntero(), PrimaVacacional:(ChkVacPrimaVacacional.Checked?1:0),CobrarImss: (ChkVacCobrarIMSS.Checked ? 1 : 0), diasPago: TxtVacDiasPago.Text.ToEntero()
|
||||
);
|
||||
if (objRH.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString();
|
||||
if (ShowError.Length > 0)
|
||||
{
|
||||
Alert(ShowError, TipoMensaje.MsgAdvertencia);
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
objRH.Dispose();
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
|
||||
TxtvacFechaInicio.Text = "";
|
||||
TxtvacFechaFin.Text = "";
|
||||
TxtvacFechaPago.Text = "";
|
||||
TxtvacDiasFeriados.Text = "";
|
||||
CargaVacaciones();
|
||||
//CargaVacacionesResumenPeriodoActual();
|
||||
//VacacionesMandaCorreoSupervisor("Solicitud Vacaciones " + NombreCompleto, VacSupervisorCorreo, VacSupervisorNombre, NombreCompleto, fInicio, fFin);
|
||||
Alert("Las vacaciones se han solicitado");
|
||||
}
|
||||
}
|
||||
else { Alert("La fecha Inicial debe ser inferior a la fecha final.", TipoMensaje.MsgAdvertencia); }
|
||||
}
|
||||
protected void GvVacaciones_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
bool _Estatus = bool.Parse(e.Row.DBCampo("Estatus").ToString());
|
||||
string _Documento = e.Row.DataKey("Documento");
|
||||
int _CveAutoriza = e.Row.DataKey("CveAutoriza").ToEntero();
|
||||
string RutaDocuemntoAutorizacion = string.Format(@"{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, SRCvePersonal, _Documento);
|
||||
LinkButton lnkDescargaFormato = e.Row.FCLinkButton("ImgDescargaFormato");
|
||||
LinkButton lnkDescargaAutorizacion = e.Row.FCLinkButton("ImgDescargaAutorizacion");
|
||||
LinkButton lnkEditar = e.Row.FCLinkButton("ImgEditar");
|
||||
lnkEditar.Visible = true;
|
||||
lnkDescargaFormato.Visible = true;
|
||||
if (_CveAutoriza > 0 | !_Estatus)
|
||||
{
|
||||
lnkEditar.Visible = false;
|
||||
lnkDescargaFormato.Visible = false;
|
||||
|
||||
}
|
||||
// ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lnkDescargaFormato)
|
||||
if (File.Exists(RutaDocuemntoAutorizacion) & _Estatus) { lnkDescargaAutorizacion.Visible = true; }
|
||||
else { lnkDescargaAutorizacion.Visible = false; }
|
||||
|
||||
if (lnkDescargaAutorizacion != null && lnkDescargaAutorizacion.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaAutorizacion); }
|
||||
if (lnkDescargaFormato != null && lnkDescargaFormato.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaFormato); }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
protected void LnkEliminarSolicitud_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
int CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
|
||||
|
||||
ClsRH objRH = new ClsRH();
|
||||
if (objRH.RemoverSolicitudVacaciones(CvePersonalVacaciones))
|
||||
{
|
||||
CargaVacaciones();
|
||||
Alert("Las vacaciones se ha eliminado");
|
||||
}
|
||||
objRH.Dispose();
|
||||
}
|
||||
|
||||
public void Edit_ClickVacacionDia(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
|
||||
//VacFolio = GvRow.DataKey("Folio").ToString().ToEntero;
|
||||
|
||||
|
||||
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||
|
||||
RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});");
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
}
|
||||
protected void BtnEditarDiaVacacionModal_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsRH objRH = new ClsRH())
|
||||
{
|
||||
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> Filesgral = TxtFileFormatoVacaciones.getfiles().Archivos;
|
||||
string Documento = "";
|
||||
|
||||
foreach (Archivo fileItem in Filesgral)
|
||||
{
|
||||
try
|
||||
{
|
||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}";
|
||||
string[] tempArray;
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray());
|
||||
|
||||
string rutaDestino = $@"{UsuarioActual.Empresa.Ruta}Personal\{SRCvePersonal}\Vacaciones\{Documento}";
|
||||
|
||||
if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\"))
|
||||
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\");
|
||||
|
||||
|
||||
if (System.IO.File.Exists(rutaDestino))
|
||||
System.IO.File.Delete(rutaDestino);
|
||||
|
||||
System.IO.File.Move(fileItem.FileUrl, rutaDestino);
|
||||
|
||||
TxtFileFormatoVacaciones.Text = "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Error al cargar Formato vacaciones", ex);
|
||||
}
|
||||
}
|
||||
if (Documento.Length > 0)
|
||||
{
|
||||
if (objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, SRCvePersonal, UsuarioActual.CveUsuario, Documento))
|
||||
Alert("Las vacaciones se han autorizado.");
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
|
||||
|
||||
CargaVacaciones();
|
||||
// CargaVacacionesResumenPeriodoActual();
|
||||
RegistraScript("$('#divEditarDiaVacacion').modal('hide');");
|
||||
}
|
||||
else { Alert("debe ingresar un documento para poder autorizar la solicitud", TipoMensaje.MsgAdvertencia); }
|
||||
}
|
||||
}
|
||||
public void DownLoad_ClickSolicitudVacaciones(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
GridViewRow GvRow = (GridViewRow)(LinkButton)sender.NamingContainer;
|
||||
|
||||
// Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
|
||||
// DescarSolicitudVacaciones(Folio)
|
||||
string RutaFormato = string.Format(@"{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta);
|
||||
|
||||
string NombreEmpleado = string.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text);
|
||||
string Codigo = TxtCodigo.Text;
|
||||
string Departamento = DdlDepartamento.SelectedItem.Text;
|
||||
string JefeInmediato = DdlSupervisorOrganigrama.SelectedItem.Text;
|
||||
DateTime fechaIngreso = TxtFechaIngreso.Text.ToDate();
|
||||
int Periodoingreso = fechaIngreso.ToString("MMdd").ToEntero();
|
||||
int PeriodoInicio = GvRow.DataKey("FechaInicio").ToDate().ToString("MMdd").ToEntero();
|
||||
string FechaInicio = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy");
|
||||
string FechaFin = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy");
|
||||
string diasPermiso = GvRow.DataKey("Dias");
|
||||
string MotivoPermiso = GvRow.DataKey("Motivo");
|
||||
string Puesto = DdlPuesto.SelectedItem.Value;
|
||||
string Fecha = DateTime.Now.ToString("dd/MM/yyyy");
|
||||
string Solicitante = UsuarioActual.Nombre;
|
||||
int anio = GvRow.DataKey("FechaInicio").ToDate().Year;
|
||||
string FechaPeriodo = GvRow.DataKey("Periodo");
|
||||
|
||||
|
||||
|
||||
|
||||
if (Periodoingreso > PeriodoInicio)
|
||||
anio = anio - 1;
|
||||
|
||||
|
||||
|
||||
if (File.Exists(RutaFormato))
|
||||
{
|
||||
clsGemBoxDocument objGemDocument = new clsGemBoxDocument(RutaFormato);
|
||||
List<TagsDocumentos> ListaTags = new List<TagsDocumentos>();
|
||||
|
||||
ListaTags = GetDatosTagsDocumentos();
|
||||
|
||||
ListaTags.Add(new TagsDocumentos("{Solicitante}", Solicitante));
|
||||
ListaTags.Add(new TagsDocumentos("{Fecha}", Fecha));
|
||||
ListaTags.Add(new TagsDocumentos("{NombreEmpleado}", NombreEmpleado));
|
||||
ListaTags.Add(new TagsDocumentos("{Codigo}", Codigo));
|
||||
ListaTags.Add(new TagsDocumentos("{Departamento}", Departamento));
|
||||
ListaTags.Add(new TagsDocumentos("{JefeInmediato}", JefeInmediato));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaInicio}", FechaInicio));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaFin}", FechaFin));
|
||||
ListaTags.Add(new TagsDocumentos("{diasPermiso}", diasPermiso));
|
||||
ListaTags.Add(new TagsDocumentos("{MotivoPermiso}", MotivoPermiso));
|
||||
ListaTags.Add(new TagsDocumentos("{Puesto}", Puesto));
|
||||
ListaTags.Add(new TagsDocumentos("{anio}", anio.ToString()));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaPeriodo}", FechaPeriodo));
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags);
|
||||
|
||||
// objGemDocument.GuardarStream()
|
||||
objGemDocument.GuardarStreamPDF();
|
||||
|
||||
byte[] bytesInStream = objGemDocument.GetBytesDocumento();
|
||||
// Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
|
||||
|
||||
objGemDocument.Dispose();
|
||||
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/force-download";
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + CvePersonal + "_Solicitud_Vacaciones_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".pdf");
|
||||
Response.BinaryWrite(bytesInStream);
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia);*/
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LnkImportexCalculo_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -5003,9 +5327,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (objpersonal.AddAsistencia(CvePersonal, -1, DdlAsisSubProyecto.SelectedValue.ToEntero(), fecha, DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim().ToDouble(), TxtHorasDobles.Text.Trim().ToDouble(),
|
||||
TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert(string.Format("se ha guardado la asistencia satisfactoriamente <br/>{0}<br/>{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()),TipoMensaje.ToastInformacion);
|
||||
RegistraScript("$('#DModalModAsistencia').modal('hide');");
|
||||
|
||||
}
|
||||
Alert("se ha guardado la asistencia satisfactoriamente");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5013,6 +5338,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
int CvePersonal = TxtasiscvePersonal.Text.ToEntero();
|
||||
DateTime fecha = TxtasisFecha.Text.ToDate();
|
||||
TxtfechaMostrar.Text = string.Format("{0:dd/MM/yyyy}", fecha);
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal={0}", CvePersonal));
|
||||
TxtPersonal.Text = drow["nombre"].ToString();
|
||||
DdlAsisSubProyecto.SelectedValueExist("-1");
|
||||
@@ -5739,266 +6065,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
#endregion
|
||||
|
||||
|
||||
protected void LnkSRVacacionesUP_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LnkSRVacacionesADD_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DateTime fInicio = TxtvacFechaInicio.Text.ToDate();
|
||||
DateTime fFin = TxtvacFechaFin.Text.ToDate();
|
||||
string fechapago = TxtvacFechaPago.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
int diasinhabil = TxtvacDiasFeriados.Text.ToEntero();
|
||||
// Dim motivoVacaciones As String = TxtMotivoVacaciones.Text
|
||||
int VacCveSupervisor = 0;
|
||||
int VacFolioActual = 0;
|
||||
if (fInicio <= fFin)
|
||||
{
|
||||
using (ClsRH objRHx = new ClsRH())
|
||||
{
|
||||
|
||||
if (objRHx.VacacionesResumenGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
|
||||
{
|
||||
if (objRHx.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VacCveSupervisor = objRHx.DtResultados.Rows[0]["SupervisorCorreo"].ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
|
||||
if (objRHx.VacacionesGet(SRCvePersonal, UsuarioActual.Empresa.CveEmpresa))
|
||||
{
|
||||
if (objRHx.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VacFolioActual = objRHx.DtResultados.Compute("Max(Folio)", string.Empty).ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VacFolioActual = VacFolioActual + 1;
|
||||
ClsRH objRH = new ClsRH();
|
||||
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
|
||||
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, 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)
|
||||
{
|
||||
string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString();
|
||||
if (ShowError.Length > 0)
|
||||
{
|
||||
Alert(ShowError, TipoMensaje.MsgAdvertencia);
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
objRH.Dispose();
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
|
||||
TxtvacFechaInicio.Text = "";
|
||||
TxtvacFechaFin.Text = "";
|
||||
TxtvacFechaPago.Text = "";
|
||||
TxtvacDiasFeriados.Text = "";
|
||||
CargaVacaciones();
|
||||
//CargaVacacionesResumenPeriodoActual();
|
||||
//VacacionesMandaCorreoSupervisor("Solicitud Vacaciones " + NombreCompleto, VacSupervisorCorreo, VacSupervisorNombre, NombreCompleto, fInicio, fFin);
|
||||
Alert("Las vacaciones se han solicitado");
|
||||
}
|
||||
}
|
||||
else { Alert("La fecha Inicial debe ser inferior a la fecha final.", TipoMensaje.MsgAdvertencia); }
|
||||
}
|
||||
protected void GvVacaciones_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
bool _Estatus = bool.Parse(e.Row.DBCampo("Estatus").ToString());
|
||||
string _Documento = e.Row.DataKey("Documento");
|
||||
int _CveAutoriza = e.Row.DataKey("CveAutoriza").ToEntero();
|
||||
string RutaDocuemntoAutorizacion = string.Format(@"{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, SRCvePersonal, _Documento);
|
||||
LinkButton lnkDescargaFormato = e.Row.FCLinkButton("ImgDescargaFormato");
|
||||
LinkButton lnkDescargaAutorizacion = e.Row.FCLinkButton("ImgDescargaAutorizacion");
|
||||
LinkButton lnkEditar = e.Row.FCLinkButton("ImgEditar");
|
||||
lnkEditar.Visible = true;
|
||||
lnkDescargaFormato.Visible = true;
|
||||
if (_CveAutoriza > 0 | !_Estatus)
|
||||
{
|
||||
lnkEditar.Visible = false;
|
||||
lnkDescargaFormato.Visible = false;
|
||||
|
||||
}
|
||||
// ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lnkDescargaFormato)
|
||||
if (File.Exists(RutaDocuemntoAutorizacion) & _Estatus) { lnkDescargaAutorizacion.Visible = true; }
|
||||
else { lnkDescargaAutorizacion.Visible = false; }
|
||||
|
||||
if (lnkDescargaAutorizacion != null && lnkDescargaAutorizacion.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaAutorizacion); }
|
||||
if (lnkDescargaFormato != null && lnkDescargaFormato.Visible) { ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkDescargaFormato); }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
protected void LnkEliminarSolicitud_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
int CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
|
||||
|
||||
ClsRH objRH = new ClsRH();
|
||||
if (objRH.RemoverSolicitudVacaciones(CvePersonalVacaciones))
|
||||
{
|
||||
CargaVacaciones();
|
||||
Alert("Las vacaciones se ha eliminado");
|
||||
}
|
||||
objRH.Dispose();
|
||||
}
|
||||
|
||||
protected int CvePersonalVacaciones
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CvePersonalVacaciones"] == null) { return 0; }
|
||||
else { return ViewState["CvePersonalVacaciones"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CvePersonalVacaciones"] = value; }
|
||||
}
|
||||
public void Edit_ClickVacacionDia(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero();
|
||||
//VacFolio = GvRow.DataKey("Folio").ToString().ToEntero;
|
||||
|
||||
|
||||
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate().ToString("dd/MM/yyyy");
|
||||
|
||||
RegistraScript("$('#divEditarDiaVacacion').modal({ backdrop: 'static', keyboard: false});");
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
}
|
||||
protected void BtnEditarDiaVacacionModal_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsRH objRH = new ClsRH())
|
||||
{
|
||||
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> Filesgral = TxtFileFormatoVacaciones.getfiles().Archivos;
|
||||
string Documento = "";
|
||||
|
||||
foreach (Archivo fileItem in Filesgral)
|
||||
{
|
||||
try
|
||||
{
|
||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||
Documento = $"Vacaciones_{CvePersonalVacaciones}.{FileExtension}";
|
||||
string[] tempArray;
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray());
|
||||
|
||||
string rutaDestino = $@"{UsuarioActual.Empresa.Ruta}Personal\{SRCvePersonal}\Vacaciones\{Documento}";
|
||||
|
||||
if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\"))
|
||||
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta + @"Personal\" + SRCvePersonal + @"\Vacaciones\");
|
||||
|
||||
|
||||
if (System.IO.File.Exists(rutaDestino))
|
||||
System.IO.File.Delete(rutaDestino);
|
||||
|
||||
System.IO.File.Move(fileItem.FileUrl, rutaDestino);
|
||||
|
||||
TxtFileFormatoVacaciones.Text = "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Error al cargar Formato vacaciones", ex);
|
||||
}
|
||||
}
|
||||
if (Documento.Length > 0)
|
||||
{
|
||||
if (objRH.SolicitudVacacionesAddUpdate(CvePersonalVacaciones, SRCvePersonal, UsuarioActual.CveUsuario, Documento))
|
||||
Alert("Las vacaciones se han autorizado.");
|
||||
UpModalEditarDiaVacacion.Update();
|
||||
|
||||
|
||||
CargaVacaciones();
|
||||
// CargaVacacionesResumenPeriodoActual();
|
||||
RegistraScript("$('#divEditarDiaVacacion').modal('hide');");
|
||||
}
|
||||
else { Alert("debe ingresar un documento para poder autorizar la solicitud", TipoMensaje.MsgAdvertencia); }
|
||||
}
|
||||
}
|
||||
public void DownLoad_ClickSolicitudVacaciones(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
GridViewRow GvRow = (GridViewRow)(LinkButton)sender.NamingContainer;
|
||||
|
||||
// Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
|
||||
// DescarSolicitudVacaciones(Folio)
|
||||
string RutaFormato = string.Format(@"{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta);
|
||||
|
||||
string NombreEmpleado = string.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text);
|
||||
string Codigo = TxtCodigo.Text;
|
||||
string Departamento = DdlDepartamento.SelectedItem.Text;
|
||||
string JefeInmediato = DdlSupervisorOrganigrama.SelectedItem.Text;
|
||||
DateTime fechaIngreso = TxtFechaIngreso.Text.ToDate();
|
||||
int Periodoingreso = fechaIngreso.ToString("MMdd").ToEntero();
|
||||
int PeriodoInicio = GvRow.DataKey("FechaInicio").ToDate().ToString("MMdd").ToEntero();
|
||||
string FechaInicio = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy");
|
||||
string FechaFin = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy");
|
||||
string diasPermiso = GvRow.DataKey("Dias");
|
||||
string MotivoPermiso = GvRow.DataKey("Motivo");
|
||||
string Puesto = DdlPuesto.SelectedItem.Value;
|
||||
string Fecha = DateTime.Now.ToString("dd/MM/yyyy");
|
||||
string Solicitante = UsuarioActual.Nombre;
|
||||
int anio = GvRow.DataKey("FechaInicio").ToDate().Year;
|
||||
string FechaPeriodo = GvRow.DataKey("Periodo");
|
||||
|
||||
|
||||
|
||||
|
||||
if (Periodoingreso > PeriodoInicio)
|
||||
anio = anio - 1;
|
||||
|
||||
|
||||
|
||||
if (File.Exists(RutaFormato))
|
||||
{
|
||||
clsGemBoxDocument objGemDocument = new clsGemBoxDocument(RutaFormato);
|
||||
List<TagsDocumentos> ListaTags = new List<TagsDocumentos>();
|
||||
|
||||
ListaTags = GetDatosTagsDocumentos();
|
||||
|
||||
ListaTags.Add(new TagsDocumentos("{Solicitante}", Solicitante));
|
||||
ListaTags.Add(new TagsDocumentos("{Fecha}", Fecha));
|
||||
ListaTags.Add(new TagsDocumentos("{NombreEmpleado}", NombreEmpleado));
|
||||
ListaTags.Add(new TagsDocumentos("{Codigo}", Codigo));
|
||||
ListaTags.Add(new TagsDocumentos("{Departamento}", Departamento));
|
||||
ListaTags.Add(new TagsDocumentos("{JefeInmediato}", JefeInmediato));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaInicio}", FechaInicio));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaFin}", FechaFin));
|
||||
ListaTags.Add(new TagsDocumentos("{diasPermiso}", diasPermiso));
|
||||
ListaTags.Add(new TagsDocumentos("{MotivoPermiso}", MotivoPermiso));
|
||||
ListaTags.Add(new TagsDocumentos("{Puesto}", Puesto));
|
||||
ListaTags.Add(new TagsDocumentos("{anio}", anio.ToString()));
|
||||
ListaTags.Add(new TagsDocumentos("{FechaPeriodo}", FechaPeriodo));
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags);
|
||||
|
||||
// objGemDocument.GuardarStream()
|
||||
objGemDocument.GuardarStreamPDF();
|
||||
|
||||
byte[] bytesInStream = objGemDocument.GetBytesDocumento();
|
||||
// Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
|
||||
|
||||
objGemDocument.Dispose();
|
||||
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/force-download";
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + CvePersonal + "_Solicitud_Vacaciones_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".pdf");
|
||||
Response.BinaryWrite(bytesInStream);
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia);*/
|
||||
}
|
||||
private List<TagsDocumentos> GetDatosTagsDocumentos()
|
||||
{
|
||||
var ListaTagsDocumentost = new List<TagsDocumentos>();
|
||||
@@ -6780,10 +6846,4 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Response.End();
|
||||
}
|
||||
|
||||
protected void LnkShowAddVacaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
LnkSRVacacionesADD.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3816,7 +3816,7 @@ Partial Class OC
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then 'empresa agricola
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero} AND Estatus =1")
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero()} AND Estatus =1")
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataBind()
|
||||
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
@@ -6958,7 +6958,7 @@ Partial Class OC
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
||||
|
||||
DdlCultivosCuadro.Items.Clear()
|
||||
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($" CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus =1")
|
||||
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($" CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus =1")
|
||||
DdlCultivosCuadro.DataBind()
|
||||
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
@@ -8534,7 +8534,7 @@ Partial Class OC
|
||||
Dim CveCultivoCuadroDetalle As Integer = GvRow.DataKey("CveCultivoCuadroDetalle").ToString.ToEntero
|
||||
|
||||
DdlCultivosCuadroEdit.Items.Clear()
|
||||
DdlCultivosCuadroEdit.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoEdit.SelectedValue} AND Estatus =1")
|
||||
DdlCultivosCuadroEdit.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoEdit.SelectedValue} AND Estatus =1")
|
||||
DdlCultivosCuadroEdit.DataBind()
|
||||
DdlCultivosCuadroEdit.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlCultivosCuadroEdit.SelectedValueExist(CveCultivoCuadroDetalle)
|
||||
|
||||
@@ -894,7 +894,6 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNumeroSS" runat="server" MaxLength="11"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtNumeroSS" Text="Número de Seguridad Social:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNumeroSS" runat="server" ControlToValidate="TxtNumeroSS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Género''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
@@ -913,6 +912,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtCURP" runat="server" MaxLength="18"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtCURP" Text="CURP:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCURP" runat="server" ControlToValidate="TxtCURP" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CURP''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
@@ -645,20 +645,20 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlEstatusPersonal" Enabled="false" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList Width="100%" ID="DdlEstatusPersonal" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlEstatusPersonal.ClientID.ToString()%>">Estatus: </label>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusPersonal" runat="server" ControlToValidate="DdlEstatusPersonal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''EstatusPersonal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivMotivoBaja">
|
||||
<asp:DropDownList Width="100%" ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlMotivoBaja.ClientID.ToString()%>">Motivo de Baja: </label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<%-- <div runat="server" id="DivFechaActivo" visible="true" class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -679,7 +679,7 @@
|
||||
|
||||
</div>--%>
|
||||
|
||||
<%-- <div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright">
|
||||
<div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
|
||||
@@ -696,7 +696,7 @@
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<%-- <div runat="server" id="DivFechaReingreso" visible="true" class="form-group form-md-line-input input-iconright">
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ Partial Class RH_Personal
|
||||
If ViewState("CvePersonal") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePersonal").ToString().ToEntero
|
||||
Return ViewState("CvePersonal").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
@@ -218,7 +218,7 @@ Partial Class RH_Personal
|
||||
If ViewState("CveUniforme") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveUniforme").ToString().ToEntero
|
||||
Return ViewState("CveUniforme").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
@@ -260,7 +260,7 @@ Partial Class RH_Personal
|
||||
If ViewState("CvePersonalEstatusInicial") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePersonalEstatusInicial").ToString().ToEntero
|
||||
Return ViewState("CvePersonalEstatusInicial").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
@@ -475,7 +475,7 @@ Partial Class RH_Personal
|
||||
If ViewState("VacCveSupervisor") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("VacCveSupervisor").ToString().ToEntero
|
||||
Return ViewState("VacCveSupervisor").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
@@ -545,7 +545,7 @@ Partial Class RH_Personal
|
||||
If ViewState("CvePermiso") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePermiso").ToString().ToEntero
|
||||
Return ViewState("CvePermiso").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
@@ -827,7 +827,7 @@ Partial Class RH_Personal
|
||||
CargaJornadas()
|
||||
CargaProyecto()
|
||||
CargaTiposAsistencia()
|
||||
'CargaMotivoHoraExtra()
|
||||
CargaMotivoHoraExtra()
|
||||
CargaMotivosHorasExtras()
|
||||
CargaSupervisores()
|
||||
CargaMetodosPago()
|
||||
@@ -845,9 +845,9 @@ Partial Class RH_Personal
|
||||
CargaPermisosReemplazos()
|
||||
CargaPaises()
|
||||
|
||||
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
|
||||
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
|
||||
ViewState("CvePersonal") = Request("CvePersonal")
|
||||
'CvePersonal = ViewState("CvePersonal").ToString().ToEntero
|
||||
'CvePersonal = ViewState("CvePersonal").ToString().ToEntero()
|
||||
CargaDatos()
|
||||
CargaDocumentacionFirmaDecontratos()
|
||||
'LnkAddLicencias.Visible = True
|
||||
@@ -861,7 +861,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1
|
||||
|
||||
'Inicia Permisos
|
||||
If UsuarioActual.TienePermisoProceso(228) Then
|
||||
@@ -876,6 +876,7 @@ Partial Class RH_Personal
|
||||
divBitacora.Visible = True
|
||||
CargaGvBitacora()
|
||||
Else
|
||||
MostrarOcultarFechasEstatus()
|
||||
LoadDefaultValues()
|
||||
'Configuración de Modalidad Insert
|
||||
|
||||
@@ -995,7 +996,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
Dim DTSub As DataTable = GlobalDTSubProyectos(-1, Request("CveSubProyecto").ToEntero) 'Cambiame
|
||||
Dim DTSub As DataTable = GlobalDTSubProyectos(-1, Request("CveSubProyecto").ToEntero()) 'Cambiame
|
||||
If DTSub.Rows.Count > 0 Then
|
||||
Dim DTProy As DataTable = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("CveProyecto = " & DTSub.Rows(0)("CveProyecto").ToString())
|
||||
If DTProy.Rows.Count > 0 Then
|
||||
@@ -1054,10 +1055,10 @@ Partial Class RH_Personal
|
||||
DdlJornada.DataBind()
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaMotivoHoraExtra()
|
||||
' DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' DdlMotivoHoraExtra.DataBind()
|
||||
'End Sub
|
||||
Private Sub CargaMotivoHoraExtra()
|
||||
DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlMotivoHoraExtra.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDepartamento()
|
||||
DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
@@ -1075,8 +1076,8 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMotivoBaja()
|
||||
'DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'DdlMotivoBaja.DataBind()
|
||||
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlMotivoBaja.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstatusPersonal()
|
||||
@@ -1141,7 +1142,7 @@ Partial Class RH_Personal
|
||||
DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'old
|
||||
'DdlSubProyectoAsignado.Items.Clear()
|
||||
'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero)
|
||||
'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero())
|
||||
'DdlSubProyectoAsignado.DataBind()
|
||||
|
||||
'DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1"))
|
||||
@@ -1150,7 +1151,7 @@ Partial Class RH_Personal
|
||||
|
||||
Private Sub CargaSubProyectoAsistenciaC()
|
||||
DdlSubProyectoAsistenciasC.Items.Clear()
|
||||
DdlSubProyectoAsistenciasC.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaC.SelectedValue.ToEntero)
|
||||
DdlSubProyectoAsistenciasC.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaC.SelectedValue.ToEntero())
|
||||
DdlSubProyectoAsistenciasC.DataBind()
|
||||
|
||||
DdlSubProyectoAsistenciasC.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -1158,7 +1159,7 @@ Partial Class RH_Personal
|
||||
|
||||
Private Sub CargaSubProyectoAsistenciaA()
|
||||
DdlSubProyectoAsistenciasA.Items.Clear()
|
||||
DdlSubProyectoAsistenciasA.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaA.SelectedValue.ToEntero)
|
||||
DdlSubProyectoAsistenciasA.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaA.SelectedValue.ToEntero())
|
||||
DdlSubProyectoAsistenciasA.DataBind()
|
||||
|
||||
DdlSubProyectoAsistenciasA.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -1299,7 +1300,7 @@ Partial Class RH_Personal
|
||||
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim ObjRH As New ClsRH
|
||||
If ObjRH.RemovePersonalAsistencias(GvRow.DataKey("CveAsistencia").ToEntero) Then
|
||||
If ObjRH.RemovePersonalAsistencias(GvRow.DataKey("CveAsistencia").ToEntero()) Then
|
||||
Alert("La asistencia ha sido eliminada correctamente.")
|
||||
CargaGvAsistencias()
|
||||
End If
|
||||
@@ -1317,7 +1318,7 @@ Partial Class RH_Personal
|
||||
If CveCliente <= 0 Then
|
||||
CveCliente = -1
|
||||
End If
|
||||
If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), DdlTurno.SelectedValue.ToEntero(), -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL")
|
||||
Else
|
||||
GVAsistencia.DataSource = Nothing
|
||||
@@ -1328,9 +1329,9 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
Protected Sub LbGuardarAsistencia_Click(sender As Object, e As System.EventArgs) Handles LbGuardarAsistencia.Click
|
||||
Dim ObjPersonal As New ClsRH()
|
||||
If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero, DdlSubProyectoAsistenciasA.SelectedValue.ToEntero, TxtFechaAsistencia.Text.Trim.ToDate,
|
||||
DdlTipoAsistencias.SelectedValue.ToEntero, TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble,
|
||||
TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero, TxtObservaciones.Text.Trim,
|
||||
If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasA.SelectedValue.ToEntero(), TxtFechaAsistencia.Text.Trim.ToDate,
|
||||
DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble,
|
||||
TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -1387,9 +1388,9 @@ Partial Class RH_Personal
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
For Each Row As GridViewRow In GVAsistencia.Rows
|
||||
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, DdlClienteAsistenciaC.SelectedValue.ToEntero, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
|
||||
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero, Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
|
||||
Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero, Row.FCTextBox("TxtObservaciones").Text.Trim,
|
||||
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), DdlClienteAsistenciaC.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
|
||||
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(), Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
|
||||
Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
@@ -1524,7 +1525,9 @@ Partial Class RH_Personal
|
||||
|
||||
DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString()
|
||||
DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString()
|
||||
'DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
|
||||
DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
|
||||
|
||||
TxtFechaBaja.Text = If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)
|
||||
|
||||
|
||||
'If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
@@ -1716,11 +1719,11 @@ Partial Class RH_Personal
|
||||
'Dim FechaActivo As Date = MinFecha
|
||||
'Dim FechaReingreso As Date = MinFecha
|
||||
|
||||
'If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then
|
||||
' If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then
|
||||
'If DdlEstatusPersonal.SelectedValue.ToEntero() <> CvePersonalEstatusInicial Then
|
||||
' If DdlEstatusPersonal.SelectedValue.ToEntero() = 1 Then
|
||||
' FechaActivo = TxtFechaActivo.Text.ToDate
|
||||
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then
|
||||
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then
|
||||
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero() = 2 Then
|
||||
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero() = 5 Then
|
||||
' FechaReingreso = TxtFechaReingreso.Text.ToDate
|
||||
' End If
|
||||
'End If
|
||||
@@ -1733,25 +1736,25 @@ Partial Class RH_Personal
|
||||
URL = ""
|
||||
|
||||
If ObjPersonal.AddPersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
|
||||
DdlTipoPeriodo.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
|
||||
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero,
|
||||
TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero, TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
|
||||
DdlTipoContrato.SelectedValue.ToEntero, TxtUbicacion.Text.Trim,
|
||||
DdlTurno.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero,
|
||||
DdlDepartamento.SelectedValue.ToEntero,
|
||||
DdlRuta.SelectedValue.ToEntero,
|
||||
DdlEscolaridad.SelectedValue.ToEntero,
|
||||
DdlEstadoCivil.SelectedValue.ToEntero,
|
||||
DdlGenero.SelectedValue.ToEntero,
|
||||
DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
|
||||
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(),
|
||||
TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
|
||||
DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim,
|
||||
DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(),
|
||||
DdlDepartamento.SelectedValue.ToEntero(),
|
||||
DdlRuta.SelectedValue.ToEntero(),
|
||||
DdlEscolaridad.SelectedValue.ToEntero(),
|
||||
DdlEstadoCivil.SelectedValue.ToEntero(),
|
||||
DdlGenero.SelectedValue.ToEntero(),
|
||||
-1, "-1",
|
||||
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
|
||||
DdlEstatusPersonal.SelectedValue.ToEntero(), TxtFechaNacimiento.Text.ToDate,
|
||||
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
|
||||
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
|
||||
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero, DdlRiesgoPuesto.SelectedValue.ToEntero, DdlRegimenContratacion.SelectedValue.ToEntero,
|
||||
DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, URL,
|
||||
DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
||||
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero) Then
|
||||
DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
|
||||
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
|
||||
DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), URL,
|
||||
DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
|
||||
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
|
||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero()) Then
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
@@ -1772,7 +1775,7 @@ Partial Class RH_Personal
|
||||
|
||||
If TempDTCuentasBancos.Rows.Count > 0 Then
|
||||
For Each row As DataRow In TempDTCuentasBancos.Rows
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1804,27 +1807,27 @@ Partial Class RH_Personal
|
||||
Else
|
||||
'If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
|
||||
If ObjPersonal.UpdatePersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
|
||||
DdlTipoPeriodo.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
|
||||
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero,
|
||||
TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero, TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
|
||||
DdlTipoContrato.SelectedValue.ToEntero, TxtUbicacion.Text.Trim,
|
||||
DdlTurno.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero,
|
||||
DdlDepartamento.SelectedValue.ToEntero,
|
||||
DdlRuta.SelectedValue.ToEntero,
|
||||
DdlEscolaridad.SelectedValue.ToEntero,
|
||||
DdlEstadoCivil.SelectedValue.ToEntero,
|
||||
DdlGenero.SelectedValue.ToEntero,
|
||||
-1, "-1",
|
||||
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
|
||||
DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
|
||||
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(),
|
||||
TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
|
||||
DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim,
|
||||
DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(),
|
||||
DdlDepartamento.SelectedValue.ToEntero(),
|
||||
DdlRuta.SelectedValue.ToEntero(),
|
||||
DdlEscolaridad.SelectedValue.ToEntero(),
|
||||
DdlEstadoCivil.SelectedValue.ToEntero(),
|
||||
DdlGenero.SelectedValue.ToEntero(),
|
||||
DdlMotivoBaja.SelectedValue.ToEntero(), If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"),
|
||||
DdlEstatusPersonal.SelectedValue.ToEntero(), TxtFechaNacimiento.Text.ToDate,
|
||||
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
|
||||
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
|
||||
DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
|
||||
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim,
|
||||
DdlBanco.SelectedValue.ToEntero, DdlRiesgoPuesto.SelectedValue.ToEntero, DdlRegimenContratacion.SelectedValue.ToEntero,
|
||||
DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, CvePersonal,
|
||||
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
|
||||
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
|
||||
DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
|
||||
DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), CvePersonal,
|
||||
URL, DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
|
||||
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
|
||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then
|
||||
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero()) Then
|
||||
|
||||
'Funsion usa RH Familiares
|
||||
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
|
||||
@@ -1856,7 +1859,7 @@ Partial Class RH_Personal
|
||||
|
||||
'GUARDA ORGANIGRAMA
|
||||
If Not TieneError Then
|
||||
If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero)) Then
|
||||
If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero() = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero())) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
@@ -2133,12 +2136,12 @@ Partial Class RH_Personal
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CvePersonalBuzon = GvRow.DataKey("CvePersonalBuzon").ToEntero
|
||||
CvePersonalBuzon = GvRow.DataKey("CvePersonalBuzon").ToEntero()
|
||||
CargaBuzonCalidadSeguimiento()
|
||||
DdlClienteBuzon.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
' DdlClienteBuzon.Enabled = False
|
||||
|
||||
If GvRow.DataKey("CveClienteSucursal").ToEntero > 0 Then
|
||||
If GvRow.DataKey("CveClienteSucursal").ToEntero() > 0 Then
|
||||
CargaClienteSucursal()
|
||||
DdlSucursalClienteBuzon.SelectedValueExist(GvRow.DataKey("CveClienteSucursal"))
|
||||
Else
|
||||
@@ -2151,7 +2154,7 @@ Partial Class RH_Personal
|
||||
DdlTipoBuzonCalidad.SelectedValueExist(GvRow.DataKey("CveTipoBuzon"))
|
||||
ChkSeAtendio.Visible = True
|
||||
|
||||
ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString().ToEntero = 1, True, False)
|
||||
ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString().ToEntero() = 1, True, False)
|
||||
|
||||
TxtFechaBuzonCalidad.Text = GvRow.DataKey("FechaQueja").ToDate.ToString("dd/MM/yyyy")
|
||||
TxtBuzonDescriptcion.Text = GvRow.DataKey("Descripcion")
|
||||
@@ -2187,7 +2190,7 @@ Partial Class RH_Personal
|
||||
If ViewState("CvePersonalBuzon") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePersonalBuzon").ToString().ToEntero
|
||||
Return ViewState("CvePersonalBuzon").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
@@ -2200,11 +2203,11 @@ Partial Class RH_Personal
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If CvePersonalBuzon = -1 Then
|
||||
objRH.AddBuzonCalidad(CvePersonal, DdlClienteBuzon.SelectedValue.ToEntero, DdlSucursalClienteBuzon.SelectedValue.ToEntero, DdlTipoBuzonCalidad.SelectedValue.ToEntero, TxtFechaBuzonCalidad.Text.ToDate, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.Empresa.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
objRH.AddBuzonCalidad(CvePersonal, DdlClienteBuzon.SelectedValue.ToEntero(), DdlSucursalClienteBuzon.SelectedValue.ToEntero(), DdlTipoBuzonCalidad.SelectedValue.ToEntero(), TxtFechaBuzonCalidad.Text.ToDate, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.Empresa.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
|
||||
RegistraScript(" $('#ModalBuzonCalidad').modal('hide')", "HideModalCalidadAgregar")
|
||||
Else
|
||||
objRH.UpdateBuzonCalidad(CvePersonalBuzon, If(ChkSeAtendio.Checked, 1, 0), DdlClienteBuzon.SelectedValue.ToEntero, DdlSucursalClienteBuzon.SelectedValue.ToEntero, DdlTipoBuzonCalidad.SelectedValue.ToEntero, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.CveUsuario)
|
||||
objRH.UpdateBuzonCalidad(CvePersonalBuzon, If(ChkSeAtendio.Checked, 1, 0), DdlClienteBuzon.SelectedValue.ToEntero(), DdlSucursalClienteBuzon.SelectedValue.ToEntero(), DdlTipoBuzonCalidad.SelectedValue.ToEntero(), TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.CveUsuario)
|
||||
RegistraScript(" $('#ModalBuzonCalidad').modal('hide')", "HideModalCalidadAgregar")
|
||||
End If
|
||||
CargaBuzonCalidad()
|
||||
@@ -2316,7 +2319,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim ObjCliente As New ClsClientes()
|
||||
|
||||
If ObjCliente.GetSucursales(DdlClienteBuzon.SelectedValue.ToEntero) Then
|
||||
If ObjCliente.GetSucursales(DdlClienteBuzon.SelectedValue.ToEntero()) Then
|
||||
DdlSucursalClienteBuzon.DataSource = ObjCliente.DtResultados
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
Divsucursalciente.Visible = True
|
||||
@@ -2354,7 +2357,7 @@ Partial Class RH_Personal
|
||||
|
||||
' Dim Observaciones As String = DirectCast(GvBuzonCalidad.Rows(e.RowIndex).FindControl("TxtObs"), TextBox).Text.Trim
|
||||
' Dim SeAtendio As Boolean = GvBuzonCalidad.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
|
||||
' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString().ToEntero
|
||||
' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString().ToEntero()
|
||||
|
||||
' If ObjBuzonCalidad.UpdateBuzonCalidad(SeAtendio, Observaciones, CveBuzonCalidad, UsuarioActual.CveUsuario) Then
|
||||
' GvBuzonCalidad.EditIndex = -1
|
||||
@@ -2436,7 +2439,7 @@ Partial Class RH_Personal
|
||||
TxtInfoValor.Text = String.Format("{0:###,###.##}", frow("Importe"))
|
||||
DdlInfoTipoAplicacion.SelectedValueExist(frow("TipoAplicacion").ToString())
|
||||
|
||||
Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero
|
||||
Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero()
|
||||
TxtInfoDescripcion.Text = String.Format("{0}", frow("Descripcion02"))
|
||||
TxtInfoNumCredito.Text = String.Format("{0}", frow("Descripcion01"))
|
||||
TxtInfoFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow("FInicioAplicacion"))
|
||||
@@ -2483,7 +2486,7 @@ Partial Class RH_Personal
|
||||
e.Row.Cells(5).Width = Unit.Pixel(160)
|
||||
|
||||
|
||||
If e.Row.DBCampo("Aplica").ToEntero = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
|
||||
If e.Row.DBCampo("Aplica").ToEntero() = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
|
||||
|
||||
If e.Row.DBCampo("Formula") = "S" Then
|
||||
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado"
|
||||
@@ -2508,7 +2511,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
|
||||
If e.Row.DBCampo("TipoAplicacion").ToEntero() > 5 Then
|
||||
TipoAplicacion = "2600"
|
||||
End If
|
||||
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
|
||||
@@ -2518,7 +2521,7 @@ Partial Class RH_Personal
|
||||
' e.Row.FCTextBox("TxtImporte").Visible = False
|
||||
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
|
||||
'Else
|
||||
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
|
||||
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero()
|
||||
' Case 1
|
||||
' 'Saldo
|
||||
' e.Row.FCLiteral("LtlSaldo").Visible = True
|
||||
@@ -2537,7 +2540,7 @@ Partial Class RH_Personal
|
||||
|
||||
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
|
||||
Dim importe As Decimal = TxtInfoValor.Text.ToDecimal()
|
||||
Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero
|
||||
Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero()
|
||||
Dim NoPagos As Integer = 0
|
||||
Dim SaldoIni As Decimal = 0
|
||||
Dim descripcion02 As String = TxtInfoDescripcion.Text
|
||||
@@ -2569,10 +2572,10 @@ Partial Class RH_Personal
|
||||
Dim OcurrioError As Boolean = False
|
||||
For Each Row As GridViewRow In GVConceptos.Rows
|
||||
If Row.FCCheckBox("ChkAplica").Checked = True Then
|
||||
Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero
|
||||
Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero()
|
||||
Dim Importe As Double = Row.FCTextBox("TxtImporte").Text.ToDouble
|
||||
Dim TipoAplicacion As Integer = Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero
|
||||
Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero)
|
||||
Dim TipoAplicacion As Integer = Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero()
|
||||
Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero() = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero())
|
||||
Dim SaldoIni As Double = If(Row.FCTextBox("TxtSaldoIni").Text.ToDouble = 0, -1, Row.FCTextBox("TxtSaldoIni").Text.ToDouble)
|
||||
|
||||
Select Case TipoAplicacion
|
||||
@@ -2597,7 +2600,7 @@ Partial Class RH_Personal
|
||||
Else
|
||||
'Borrarlo
|
||||
If Row.DataKey("CvePersonalConcepto") <> "" Then
|
||||
If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero) Then
|
||||
If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero()) Then
|
||||
OcurrioError = True
|
||||
ObjPersonal.RollBack()
|
||||
Exit For
|
||||
@@ -2623,7 +2626,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim gvr As GridViewRow = DirectCast(Ddl.NamingContainer, GridViewRow)
|
||||
|
||||
Select Case Ddl.SelectedValue.ToEntero
|
||||
Select Case Ddl.SelectedValue.ToEntero()
|
||||
Case 1
|
||||
'Descontar hasta pagar el saldo prestado
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = True
|
||||
@@ -2653,16 +2656,16 @@ Partial Class RH_Personal
|
||||
'DivFechaReingreso.Visible = False
|
||||
'DivFechaActivo.Visible = False
|
||||
|
||||
'If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then
|
||||
' DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False)
|
||||
' 'DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False)
|
||||
' 'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False)
|
||||
'Else
|
||||
' DivFechaActivo.Visible = False
|
||||
' 'DivFechaBaja.Visible = False
|
||||
' DivFechaReingreso.Visible = False
|
||||
'End If
|
||||
|
||||
If DdlEstatusPersonal.SelectedValue.ToEntero().Contiene(1, 2, 5) Then
|
||||
'DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 1, True, False)
|
||||
DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 2, True, False)
|
||||
'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 5, True, False)
|
||||
Else
|
||||
'DivFechaActivo.Visible = False
|
||||
DivFechaBaja.Visible = False
|
||||
'DivFechaReingreso.Visible = False
|
||||
End If
|
||||
DivMotivoBaja.Visible = DivFechaBaja.Visible
|
||||
End Sub
|
||||
|
||||
Protected Sub GvNominas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvNominas.RowDataBound
|
||||
@@ -2890,12 +2893,12 @@ Partial Class RH_Personal
|
||||
|
||||
If e.Row.DBCampo("FechaDocumento") = "" Then e.Row.BackColor = Drawing.Color.LightGray
|
||||
|
||||
If e.Row.DBCampo("CveIE").ToEntero > 0 Then
|
||||
If e.Row.DBCampo("CveIE").ToEntero() > 0 Then
|
||||
e.Row.FCHyperLink("HplRef").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
e.Row.FCLabel("LtlC").CssClass = "label label-sm label-success"
|
||||
e.Row.FCLabel("LtlC").ForeColor = Drawing.Color.White
|
||||
End If
|
||||
If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
|
||||
If e.Row.DBCampo("CveCompra").ToEntero() > 0 Then
|
||||
e.Row.FCHyperLink("HplRef").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
|
||||
e.Row.FCLabel("LtlC").CssClass = "label label-sm label-warning"
|
||||
e.Row.FCLabel("LtlC").ForeColor = Drawing.Color.White
|
||||
@@ -2945,7 +2948,7 @@ Partial Class RH_Personal
|
||||
Protected Sub LbActualizarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||
Using ObjCuentasBancos As New ClsGenerales
|
||||
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
||||
If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then
|
||||
If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then
|
||||
'UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean
|
||||
Alert("Cuenta actualizada")
|
||||
End If
|
||||
@@ -2974,9 +2977,9 @@ Partial Class RH_Personal
|
||||
|
||||
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
|
||||
If TxtCLABECB.Text.Trim.Length <> 18 AndAlso TxtCLABECB.Text.Trim.Length = 0 AndAlso Not EsBancomer Then
|
||||
Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
|
||||
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
|
||||
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2998,7 +3001,7 @@ Partial Class RH_Personal
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked)
|
||||
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero(), DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked)
|
||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||
End Sub
|
||||
Private Sub CargaGridCuentasBancos(Orden As String)
|
||||
@@ -3157,7 +3160,7 @@ Partial Class RH_Personal
|
||||
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero
|
||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
||||
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
||||
|
||||
@@ -3215,14 +3218,14 @@ Partial Class RH_Personal
|
||||
End If
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If CvePersonal > 0 Then
|
||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
|
||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
Else
|
||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1
|
||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
||||
Row("BancoNombre") = NombreBanco
|
||||
Row("Sucursal") = NumeroSucursal
|
||||
@@ -3246,14 +3249,14 @@ Partial Class RH_Personal
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
Else
|
||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1
|
||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||
End If
|
||||
|
||||
@@ -3276,7 +3279,7 @@ Partial Class RH_Personal
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString().Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
gvi = Arg(1).ToEntero()
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
Campo = Campo.Substring(0, Campo.Length - 1)
|
||||
|
||||
@@ -3317,8 +3320,8 @@ Partial Class RH_Personal
|
||||
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim LB = CType(sender, LinkButton)
|
||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -3553,7 +3556,7 @@ Partial Class RH_Personal
|
||||
|
||||
params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
|
||||
params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
|
||||
params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero > 0, DdlPuesto.SelectedItem.Text, "")))
|
||||
params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
|
||||
params.Add(New ReportParameter("CURP", TxtCURP.Text))
|
||||
params.Add(New ReportParameter("NoRegistro", ""))
|
||||
params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
|
||||
@@ -3683,8 +3686,8 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim chkEstatus As CheckBox
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Documentacion = GvRow.DataKey("Documentacion")
|
||||
AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString()
|
||||
|
||||
@@ -3711,10 +3714,10 @@ Partial Class RH_Personal
|
||||
For Each dRow As GridViewRow In GvDocumentosFirma.Rows
|
||||
|
||||
|
||||
Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero
|
||||
Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Dim _Adjunto As String = dRow.DataKey("Adjunto")
|
||||
'Dim _Documentacion As String = dRow.DataKey("Documentacion")
|
||||
Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
|
||||
Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
||||
Dim _txtObservaciones As TextBox = dRow.FCTextBox("TxtObservaciones")
|
||||
Dim _TxtFechaLimite As TextBox = dRow.FCTextBox("TxtFechaLimite")
|
||||
Dim _TxtFechaVigencia As TextBox = dRow.FCTextBox("TxtFechaVigencia")
|
||||
@@ -3726,7 +3729,7 @@ Partial Class RH_Personal
|
||||
Dim _FechaVigencia As Date
|
||||
Dim _FechaLimite As Date
|
||||
|
||||
Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero
|
||||
Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero()
|
||||
Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString() = "1", True, False)
|
||||
Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False)
|
||||
|
||||
@@ -3844,8 +3847,8 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = False
|
||||
|
||||
Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
|
||||
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
|
||||
Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
||||
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString()
|
||||
Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
|
||||
|
||||
@@ -3889,7 +3892,7 @@ Partial Class RH_Personal
|
||||
Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString()
|
||||
Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString()
|
||||
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero
|
||||
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero()
|
||||
Dim separado As Char() = ".".ToString().ToCharArray
|
||||
Dim array() As String = Adjunto.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
@@ -3897,7 +3900,7 @@ Partial Class RH_Personal
|
||||
Dim TxtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
|
||||
' FechaVigencia
|
||||
|
||||
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero
|
||||
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero()
|
||||
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString() = "1", True, False)
|
||||
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False)
|
||||
|
||||
@@ -3912,7 +3915,7 @@ Partial Class RH_Personal
|
||||
extencion = array(array.Length - 1)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString().ToEntero = 1 Then
|
||||
If e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 Then
|
||||
chkEstatus.Checked = True
|
||||
Else
|
||||
chkEstatus.Checked = False
|
||||
@@ -3960,7 +3963,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
|
||||
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
||||
|
||||
|
||||
@@ -4382,7 +4385,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString()
|
||||
Dim gvr As GridViewRow = CType(CType(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString().ToEntero
|
||||
Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString().ToEntero()
|
||||
Dim Total As Decimal = gvr.DataKey("Total").ToString().ToDecimal
|
||||
Dim RFCReceptor As String = gvr.DataKey("RFC").ToString()
|
||||
|
||||
@@ -4410,7 +4413,7 @@ Partial Class RH_Personal
|
||||
GvVacaciones.DataSource = objRH.DtResultados
|
||||
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString().ToEntero
|
||||
VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString().ToEntero()
|
||||
Else
|
||||
VacFolioActual = 0
|
||||
End If
|
||||
@@ -4476,7 +4479,7 @@ Partial Class RH_Personal
|
||||
For Each GvRow As GridViewRow In GvVacaciones.Rows
|
||||
'Dim _Estatus As Boolean = Boolean.Parse(GvRow.DataKey("Estatus").ToString())
|
||||
'Dim _Documento As String = GvRow.DataKey("Documento")
|
||||
'Dim _CveAutoriza As Integer = GvRow.DataKey("CveAutoriza").ToEntero
|
||||
'Dim _CveAutoriza As Integer = GvRow.DataKey("CveAutoriza").ToEntero()
|
||||
'Dim RutaDocuemntoAutorizacion As String = String.Format("{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, CvePersonal, _Documento)
|
||||
Dim lnkDescargaFormato As LinkButton = GvRow.FCLinkButton("ImgDescargaFormato")
|
||||
Dim lnkDescargaAutorizacion As LinkButton = GvRow.FCLinkButton("ImgDescargaAutorizacion")
|
||||
@@ -4509,15 +4512,15 @@ Partial Class RH_Personal
|
||||
|
||||
VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString().ToDate
|
||||
VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString().ToDate
|
||||
VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero
|
||||
VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero
|
||||
VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero
|
||||
VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero
|
||||
VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero
|
||||
VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero()
|
||||
VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero()
|
||||
VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero()
|
||||
VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero()
|
||||
VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero()
|
||||
GvVacacionesResumen.DataSource = objRH.DtResultados
|
||||
VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString()
|
||||
VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString()
|
||||
VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero
|
||||
VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero()
|
||||
|
||||
Else
|
||||
VacInicioPeriodo = Now
|
||||
@@ -4578,7 +4581,7 @@ Partial Class RH_Personal
|
||||
' Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate
|
||||
' Dim fFin As Date = TxtFechaFinVac.Text.ToDate
|
||||
' Dim ErrorSolicitud As Boolean = True
|
||||
' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString().ToEntero
|
||||
' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString().ToEntero()
|
||||
|
||||
' If fInicio < fFin Or fInicio = fFin Then
|
||||
|
||||
@@ -4689,7 +4692,7 @@ Partial Class RH_Personal
|
||||
|
||||
' For x As Integer = 1 To 8
|
||||
|
||||
' If DdlPermisoTipo.SelectedValue.ToEntero = x Then
|
||||
' If DdlPermisoTipo.SelectedValue.ToEntero() = x Then
|
||||
' ListaTagsDocumentost.Add(New TagsDocumentos("{op" & x & "}", "X"))
|
||||
' Else
|
||||
' ListaTagsDocumentost.Add(New TagsDocumentos("{op" & x & "}", ""))
|
||||
@@ -4787,9 +4790,9 @@ Partial Class RH_Personal
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero
|
||||
CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero()
|
||||
'ChkEstatusDiaVacacion.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
VacFolio = GvRow.DataKey("Folio").ToString().ToEntero
|
||||
VacFolio = GvRow.DataKey("Folio").ToString().ToEntero()
|
||||
|
||||
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||
@@ -4846,7 +4849,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero()
|
||||
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta)
|
||||
@@ -4920,7 +4923,7 @@ Partial Class RH_Personal
|
||||
|
||||
Public Sub DownLoad_ClickSolicitudPermiso(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero()
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
@@ -5009,7 +5012,7 @@ Partial Class RH_Personal
|
||||
objRH.Dispose()
|
||||
objEdoc.Dispose()
|
||||
|
||||
_CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString().ToEntero
|
||||
_CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString().ToEntero()
|
||||
_DocumentacionFormato = DTVacaciones(0)("DocumentacionFormato").ToString()
|
||||
_PathDocumento = UsuarioActual.Empresa.Ruta & "Formatos\" & _CveDocumentacion & "_" & _DocumentacionFormato
|
||||
|
||||
@@ -5165,7 +5168,7 @@ Partial Class RH_Personal
|
||||
'RutaDocumento = Path.Combine(RutaDocumento, "Empresas\Grales\FormatoDC3.docx")
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim _CveCurso As Integer = GvRow.DataKey("CveCurso").ToEntero
|
||||
Dim _CveCurso As Integer = GvRow.DataKey("CveCurso").ToEntero()
|
||||
|
||||
|
||||
|
||||
@@ -5219,7 +5222,7 @@ Partial Class RH_Personal
|
||||
If DdlUniforme.SelectedIndex > 0 Then
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If objRH.UniformeDetallePersonalGet(CvePersonal, DdlUniforme.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then
|
||||
If objRH.UniformeDetallePersonalGet(CvePersonal, DdlUniforme.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then
|
||||
GvUniforme.DataSource = objRH.DtResultados
|
||||
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
@@ -5277,22 +5280,22 @@ Partial Class RH_Personal
|
||||
|
||||
Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
|
||||
|
||||
CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero
|
||||
CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero()
|
||||
DescripcionUniforme = row.DataKey("CodigoPS")
|
||||
PU = row.DataKey("PU").ToString().ToDecimal
|
||||
CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero
|
||||
CveUM = row.DataKey("CveUM").ToString().ToEntero
|
||||
CvePS = row.DataKey("CvePS").ToString().ToEntero
|
||||
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
|
||||
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
|
||||
Dim Cantidad As Integer = row.DataKey("Saldo").ToString().ToEntero
|
||||
CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero()
|
||||
CveUM = row.DataKey("CveUM").ToString().ToEntero()
|
||||
CvePS = row.DataKey("CvePS").ToString().ToEntero()
|
||||
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero()
|
||||
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero()
|
||||
Dim Cantidad As Integer = row.DataKey("Cantidad").ToString().ToEntero()
|
||||
TxtCantidadResguardo.Text = Cantidad.ToString
|
||||
RvTxtCantidadResguardo.MaximumValue = Cantidad.ToString
|
||||
If row.DataKey("AplicaSeccion").ToString = "True" Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS, UsuarioActual.CveEmpresa)
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS)
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa)
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePS)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
End If
|
||||
TxtLiberarSerie.Text = ""
|
||||
@@ -5325,10 +5328,10 @@ Partial Class RH_Personal
|
||||
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
|
||||
Dim Serie As String = TxtLiberarSerie.Text.Trim
|
||||
|
||||
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)
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=-3, 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 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)
|
||||
|
||||
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
||||
@@ -5395,7 +5398,7 @@ Partial Class RH_Personal
|
||||
Public Sub CargaPermisos()
|
||||
|
||||
Dim ObjRH As New ClsRH
|
||||
Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero, -1)
|
||||
Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero(), -1)
|
||||
If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, Now.AddMonths(-3), Now.AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvPermisos.DataSource = ObjRH.DtResultados
|
||||
Else
|
||||
@@ -5467,7 +5470,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CvePermiso = GvRow.DataKey("CvePermiso").ToString().ToEntero
|
||||
CvePermiso = GvRow.DataKey("CvePermiso").ToString().ToEntero()
|
||||
TxtPermisoDescripcion.Text = GvRow.DataKey("Descripcion").ToString()
|
||||
TxtFechaInicioPer.Text = GvRow.DataKey("FechaInicio").ToString()
|
||||
TxtFechaFinPer.Text = GvRow.DataKey("FechaFin").ToString()
|
||||
@@ -5509,7 +5512,7 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim ObjRH As New ClsRH
|
||||
Dim CvePermisoInterno As Integer = GvRow.DataKey("CvePermiso").ToEntero
|
||||
Dim CvePermisoInterno As Integer = GvRow.DataKey("CvePermiso").ToEntero()
|
||||
If ObjRH.ChecadorPermisosRemove(CvePermisoInterno, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
End If
|
||||
@@ -5663,7 +5666,7 @@ Partial Class RH_Personal
|
||||
Dim Personal = gvr.DataKey("Nombre").ToString()
|
||||
Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
||||
Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
||||
Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero
|
||||
Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
||||
@@ -5750,7 +5753,7 @@ Partial Class RH_Personal
|
||||
|
||||
Protected Sub LnkViaticoDetalle_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveSolicitudViatico As Integer = GvRow.DataKey("CveSolicitudViatico").ToEntero
|
||||
Dim CveSolicitudViatico As Integer = GvRow.DataKey("CveSolicitudViatico").ToEntero()
|
||||
CargaViaticosDetalle(CveSolicitudViatico)
|
||||
RegistraScript("$('#DivViaticoDetalle').modal({ backdrop: 'static', keyboard: false});")
|
||||
End Sub
|
||||
@@ -5881,14 +5884,14 @@ Partial Class RH_Personal
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.RemoveLicencia(HdnIDLicencia.Value.ToEntero) Then
|
||||
If ObjAF.RemoveLicencia(HdnIDLicencia.Value.ToEntero()) Then
|
||||
CargaLicencias()
|
||||
Alert("La licencia se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
Else
|
||||
If DTLicencias IsNot Nothing Then
|
||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero}")(0)
|
||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||
DTLicencias.Rows.Remove(Row)
|
||||
GvLicencias.DataSource = DTLicencias
|
||||
GvLicencias.DataBind()
|
||||
@@ -5924,7 +5927,7 @@ Partial Class RH_Personal
|
||||
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidadLicencia.Value = "U" Then
|
||||
If ObjAF.UpdateLicencia(HdnIDLicencia.Value.ToEntero, TxtLicencia.Text.Trim, TxtFechaExpLicencia.Text.ToDateTime, TxtFechaVencLicencia.Text.ToDateTime, Estatus:=ChkModalLicenciaEstatus.Checked) Then
|
||||
If ObjAF.UpdateLicencia(HdnIDLicencia.Value.ToEntero(), TxtLicencia.Text.Trim, TxtFechaExpLicencia.Text.ToDateTime, TxtFechaVencLicencia.Text.ToDateTime, Estatus:=ChkModalLicenciaEstatus.Checked) Then
|
||||
Alert("La licencia se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
@@ -5950,7 +5953,7 @@ Partial Class RH_Personal
|
||||
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
ElseIf HdnModalidadLicencia.Value = "U" Then
|
||||
Try
|
||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero}")(0)
|
||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||
|
||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||
@@ -6005,17 +6008,17 @@ Partial Class RH_Personal
|
||||
'End If
|
||||
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
|
||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
|
||||
|
||||
If DRSucursal IsNot Nothing Then
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||
Dim DomicilioSucursal As String = ""
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle"))
|
||||
If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero)
|
||||
If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero)
|
||||
If DRSucursal("NoExt").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero())
|
||||
If DRSucursal("NoInt").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero())
|
||||
If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString())
|
||||
If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
|
||||
If DRSucursal("CP").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
|
||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString())
|
||||
End If
|
||||
@@ -6140,10 +6143,10 @@ Partial Class RH_Personal
|
||||
'DtRowFamiliar("CveFamiliar") = -1
|
||||
DTFamiliares(IndexActual)("CvePersonal") = -1
|
||||
DTFamiliares(IndexActual)("Parentesco") = DDLParentescoFamiliar4.SelectedItem.Text
|
||||
DTFamiliares(IndexActual)("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero
|
||||
DTFamiliares(IndexActual)("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero()
|
||||
DTFamiliares(IndexActual)("Nombre") = TxtNombreFamiliar4.Text.Trim
|
||||
DTFamiliares(IndexActual)("Domicilio") = TxtDomicilioFamiliar4.Text.Trim
|
||||
DTFamiliares(IndexActual)("Edad") = TxtEdadFamiliar4.Text.ToEntero
|
||||
DTFamiliares(IndexActual)("Edad") = TxtEdadFamiliar4.Text.ToEntero()
|
||||
DTFamiliares(IndexActual)("Ocupacion") = TxtOcupacionFamiliar4.Text.Trim
|
||||
DTFamiliares(IndexActual)("Telefono") = TxtTelefonoFamiliar.Text.Trim
|
||||
DTFamiliares(IndexActual)("Observaciones") = TxtObservacionesFamiliar.Text.Trim
|
||||
@@ -6165,10 +6168,10 @@ Partial Class RH_Personal
|
||||
DtRowFamiliar("CveFamiliar") = -1
|
||||
DtRowFamiliar("CvePersonal") = -1
|
||||
DtRowFamiliar("Parentesco") = DDLParentescoFamiliar4.SelectedItem.Text
|
||||
DtRowFamiliar("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero
|
||||
DtRowFamiliar("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero()
|
||||
DtRowFamiliar("Nombre") = TxtNombreFamiliar4.Text.Trim
|
||||
DtRowFamiliar("Domicilio") = TxtDomicilioFamiliar4.Text.Trim
|
||||
DtRowFamiliar("Edad") = TxtEdadFamiliar4.Text.ToEntero
|
||||
DtRowFamiliar("Edad") = TxtEdadFamiliar4.Text.ToEntero()
|
||||
DtRowFamiliar("Ocupacion") = TxtOcupacionFamiliar4.Text.Trim
|
||||
DtRowFamiliar("Telefono") = TxtTelefonoFamiliar.Text.Trim
|
||||
DtRowFamiliar("Observaciones") = TxtObservacionesFamiliar.Text.Trim
|
||||
@@ -6200,7 +6203,7 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = True
|
||||
|
||||
CveFamiliar = GvRow.DataKey("CveFamiliar").ToString().ToEntero
|
||||
CveFamiliar = GvRow.DataKey("CveFamiliar").ToString().ToEntero()
|
||||
ActualizarFamiliar = True
|
||||
IndexActual = GvRow.RowIndex
|
||||
|
||||
@@ -6229,7 +6232,7 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
IndexActual = GvRow.RowIndex
|
||||
Dim activo As Boolean = False
|
||||
Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString().ToEntero
|
||||
Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString().ToEntero()
|
||||
|
||||
If CveFamiliar > 0 Then
|
||||
|
||||
@@ -6275,7 +6278,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
|
||||
objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString().ToEntero, CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
|
||||
objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString().ToEntero(), CvePersonal, dRow("CveParentesco").ToString().ToEntero(), dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero(), dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
|
||||
|
||||
End If
|
||||
If dRow("Accion").ToString() = "2" Then 'Inserta
|
||||
@@ -6285,20 +6288,20 @@ Partial Class RH_Personal
|
||||
|
||||
|
||||
|
||||
objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
|
||||
objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString().ToEntero(), dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero(), dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
|
||||
|
||||
End If
|
||||
|
||||
If dRow("CveParentesco").ToString().ToEntero = 1 Then
|
||||
If dRow("CveParentesco").ToString().ToEntero() = 1 Then
|
||||
ValPadre = True
|
||||
End If
|
||||
|
||||
If dRow("CveParentesco").ToString().ToEntero = 2 Then
|
||||
If dRow("CveParentesco").ToString().ToEntero() = 2 Then
|
||||
ValMadre = True
|
||||
End If
|
||||
|
||||
If dRow("Accion").ToString() = "3" Then 'Borra
|
||||
objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString().ToEntero, -1)
|
||||
objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString().ToEntero(), -1)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
@@ -1201,7 +1201,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
||||
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca')
|
||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor')
|
||||
|
||||
//Metodo: metodo
|
||||
};
|
||||
|
||||
@@ -6432,6 +6432,7 @@ Partial Class PV
|
||||
CreaDTmpDTRecepcionUsados()
|
||||
CreaDTmpDTPolizaVirtual()
|
||||
DdlDistribuidor.setEsWebService(True)
|
||||
DdlDistribuidor.ddlWS.Attributes.Add("data-esdistribuidor", "1")
|
||||
DivChkAjuste.Visible = True
|
||||
|
||||
UpAjuste.Update()
|
||||
|
||||
@@ -1834,6 +1834,15 @@ Partial Class Ventas
|
||||
ViewState("CveEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEstatusCotizacion As Integer
|
||||
Get
|
||||
Return (IfNull(ViewState("CveEstatusCotizacion"), "-1", ViewState("CveEstatusCotizacion"))).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstatusCotizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DiasCredito As Integer
|
||||
Get
|
||||
Return ViewState("DiasCredito").ToString().ToEntero()
|
||||
@@ -2939,6 +2948,18 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Request("CveCotizacion") IsNot Nothing AndAlso IfNull(Request("CveCotizacion"), 0).ToString().ToEntero() > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
||||
'VERIFICA SI NO ESTA AUTORIZADA
|
||||
If CveEstatusCotizacion <> 8 Then
|
||||
BtnEmitirImprimir.Enabled = False
|
||||
BtnEmitirImprimir.Visible = False
|
||||
Alert("La cotización no esta autorizada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
|
||||
@@ -4431,6 +4452,8 @@ Partial Class Ventas
|
||||
' BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
||||
' BtnsFacturar.Visible = True
|
||||
'End If
|
||||
ElseIf DbRowVenta("TipoDocto").ToString() = "Cot" AndAlso CveCotizacion > 0 Then
|
||||
CveEstatusCotizacion = DbRowVenta("CveEstatusFactura").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
@@ -8212,33 +8235,56 @@ Partial Class Ventas
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
||||
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCAR VENTA ANTERIOR
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
|
||||
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
End If
|
||||
|
||||
'MARCA LO PENDIENTE A NIVEL DETALLE
|
||||
Dim DtMovDetalles As DataTable = Nothing
|
||||
If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||
DtMovDetalles = ObjInventario.DtResultados.Copy()
|
||||
'MARCAR VENTA ANTERIOR
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
|
||||
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
End If
|
||||
Else
|
||||
ErrorList.Add("No se pudo verificar los movimientos de almacen de la factura")
|
||||
End If
|
||||
'MARCA LO PENDIENTE A NIVEL DETALLE
|
||||
Dim DtMovDetalles As DataTable = Nothing
|
||||
If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||
DtMovDetalles = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
ErrorList.Add("No se pudo verificar los movimientos de almacen de la factura")
|
||||
End If
|
||||
|
||||
If DtMovDetalles IsNot Nothing Then
|
||||
For Each Row As DataRow In DtMovDetalles.Rows
|
||||
Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToDecimal()
|
||||
If SaldoAlmacen < 0 Then
|
||||
If Not ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1) Then
|
||||
ErrorList.Add("No se pudo actualizar el movimiento de almacen de la factura")
|
||||
'MARCAR VENTA ANTERIOR
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
|
||||
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
End If
|
||||
|
||||
If DtMovDetalles IsNot Nothing Then
|
||||
|
||||
Dim CantidadTotal As Decimal = 0
|
||||
Dim TotalSalida As Decimal = 0
|
||||
|
||||
For Each Row As DataRow In DtMovDetalles.Rows
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||
Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToDecimal()
|
||||
Cantidad += Cantidad
|
||||
|
||||
If SaldoAlmacen < 0 AndAlso Cantidad = Math.Abs(SaldoAlmacen) Then
|
||||
TotalSalida += Math.Abs(SaldoAlmacen)
|
||||
If Not ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1) Then
|
||||
ErrorList.Add("No se pudo actualizar el movimiento de almacen de la factura")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'SI SE VERIFICA QUE TODO ESTA SURTIDO, SE MARCA TODA LA FACTURA
|
||||
If CantidadTotal = Total Then
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
||||
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
DtMovDetalles.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
DtMovDetalles.Dispose()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -11605,7 +11651,7 @@ Partial Class Ventas
|
||||
'INVENTARIOS
|
||||
If ErrorList.Count = 0 Then
|
||||
If Not EsNCAmortizacion AndAlso Not NCDescuento Then
|
||||
If GuardarVentaInventarios(ObjInventario, ObjConta, factura) Then
|
||||
If GuardarVentaInventarios(ObjInventario, ObjVentas, ObjConta, factura) Then
|
||||
ErrorList.Add("Ocurrio un error al Guardar Inventario")
|
||||
End If
|
||||
End If
|
||||
@@ -13232,7 +13278,7 @@ Partial Class Ventas
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
|
||||
Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjVentas As ClsVentas, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
|
||||
Dim OcurrioError As Boolean = False
|
||||
Try
|
||||
|
||||
@@ -13241,7 +13287,7 @@ Partial Class Ventas
|
||||
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
For Each CveRemision As Integer In RemisionesLista
|
||||
'El almacen general es el Primer Almacen de Material en la Sucursal
|
||||
If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
|
||||
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -18072,8 +18118,12 @@ Partial Class Ventas
|
||||
If Not UsuarioActual.TienePermisoProceso(60) Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
|
||||
If Not UsuarioActual.TienePermisoProceso(175) Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
|
||||
End If
|
||||
If Not UsuarioActual.TienePermisoProceso(264) Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
|
||||
End If
|
||||
End If
|
||||
|
||||
'Puede remisionar
|
||||
@@ -18667,7 +18717,7 @@ Partial Class Ventas
|
||||
gvr.FCDropDownList("DdlUnidadMedida").DataBind()
|
||||
|
||||
End Sub
|
||||
Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||
Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, ByRef ObjVentas As ClsVentas, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||
Dim OcurrioError As Boolean = False
|
||||
Try
|
||||
Dim DtMovimientos As DataTable
|
||||
@@ -18749,9 +18799,9 @@ Partial Class Ventas
|
||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||
Else
|
||||
If TieneMovimientosContrato Then
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
|
||||
MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
|
||||
Else
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
|
||||
MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -18763,26 +18813,12 @@ Partial Class Ventas
|
||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||
Dim CveConceptoSalidaAlmacen As Integer = 3
|
||||
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
|
||||
|
||||
'SALIDA DEFINITIVA DEL SISTEMA
|
||||
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
|
||||
CveConceptoSalidaAlmacen = 40
|
||||
CveAlmacenParaSalida = CveAlmacenSalida
|
||||
AplicaMovimientoDetalleEntrada = True
|
||||
''Le damos salida normal
|
||||
'If ConSalida Then
|
||||
' GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
|
||||
' If Not GeneroMovimientoAlmacen Then
|
||||
' OcurrioError = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
' If Not GeneroMovimientoAlmacen Then
|
||||
' OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
Else
|
||||
'Le damos salida de apartado por traspaso
|
||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada)
|
||||
@@ -18822,19 +18858,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
Alert("Error traspaso almacen(sin Movtos. Detalle). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
|
||||
End If
|
||||
|
||||
MovDetalle.Dispose()
|
||||
|
||||
'VERIFICA QUE SE HAYA GENERADO MOVIMIENTO DE ALMACEN
|
||||
If Not OcurrioError Then
|
||||
OcurrioError = Not GeneroMovimientoAlmacen
|
||||
End If
|
||||
|
||||
If OcurrioError Then
|
||||
Exit For
|
||||
End If
|
||||
@@ -18843,12 +18870,6 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
ElseIf ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), 3, -1, UsuarioActual.CveEmpresa) Then
|
||||
'Esquema viejo, evitamos que aparezca por surtir
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If OcurrioError Then
|
||||
@@ -18856,6 +18877,24 @@ Partial Class Ventas
|
||||
End If
|
||||
Next
|
||||
|
||||
'VERIFICA QUE SE HAYA GENERADO MOVIMIENTO DE ALMACEN
|
||||
If Not OcurrioError Then
|
||||
OcurrioError = Not GeneroMovimientoAlmacen
|
||||
End If
|
||||
|
||||
'VERIFICA SI YA SE GENERARON LAS SALIDAS DE ALMACEN NECESARIAS
|
||||
If Not OcurrioError AndAlso RemisionesLista.Count > 0 AndAlso DtRemConceptosSurtidos IsNot Nothing Then
|
||||
If DtRemConceptosSurtidos.SUMD("Surtido") <> DtRemConceptosSurtidos.SUMD("Cantidad") Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso ConSalida Then
|
||||
'Esquema viejo, evitamos que aparezca por surtir
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -18864,31 +18903,59 @@ Partial Class Ventas
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'LIMPIAR EL DT DE CONCEPTOS SURTIDOS
|
||||
If DtRemConceptosSurtidos IsNot Nothing Then
|
||||
DtRemConceptosSurtidos.Clear()
|
||||
DtRemConceptosSurtidos = Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
OnError("Ocurrió un error al realizar el traspaso", ex)
|
||||
End Try
|
||||
Return Not OcurrioError
|
||||
End Function
|
||||
Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable
|
||||
Private Function CuadrarFacturaMovimientos(ByRef ObjVentas As ClsVentas, CveRemision As Integer, MovDetalle As DataTable) As DataTable
|
||||
Dim MovDTCuadrados As New DataTable
|
||||
MovDTCuadrados = MovDetalle.Clone
|
||||
MovDTCuadrados.Clear()
|
||||
|
||||
'Llenamos el DT solo si es primera llamada
|
||||
If DtRemConceptosSurtidos Is Nothing Then
|
||||
DtRemConceptosSurtidos = New DataTable
|
||||
DtRemConceptosSurtidos.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
DtRemConceptosSurtidos.Columns.Add("Cantidad", GetType(Decimal))
|
||||
DtRemConceptosSurtidos.Columns.Add("Surtido", GetType(Decimal))
|
||||
Dim DtDetalleRemision As DataTable = Nothing
|
||||
Dim StrCveVentasDetalle As New StringBuilder()
|
||||
|
||||
For Each dr As DataRow In DtRemisionesTmpDT.Rows
|
||||
Dim dtr As DataRow = DtRemConceptosSurtidos.NewRow
|
||||
dtr("CveVentaDetalle") = dr("CveVentaDetalle")
|
||||
dtr("Cantidad") = dr("Cantidad")
|
||||
dtr("Surtido") = 0
|
||||
DtRemConceptosSurtidos.Rows.Add(dtr)
|
||||
If ObjVentas.GetVentaDetalle(CveRemision) Then
|
||||
DtDetalleRemision = ObjVentas.DtResultados.FiltraParametros("", DistinctColumns:={"CveVenta", "CveVentaDetalle"})
|
||||
End If
|
||||
|
||||
For Each RowDetalle As DataRow In DtDetalleRemision.Rows
|
||||
StrCveVentasDetalle.AppendFormat("{0},", RowDetalle("CveVentaDetalle"))
|
||||
Next
|
||||
|
||||
If StrCveVentasDetalle.Length > 0 Then
|
||||
StrCveVentasDetalle.Remove(StrCveVentasDetalle.Length - 1, 1)
|
||||
End If
|
||||
|
||||
If DtDetalleRemision IsNot Nothing Then
|
||||
|
||||
DtRemConceptosSurtidos = New DataTable
|
||||
DtRemConceptosSurtidos.Columns.Add("CveRemision", GetType(Integer))
|
||||
DtRemConceptosSurtidos.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
DtRemConceptosSurtidos.Columns.Add("Cantidad", GetType(Decimal))
|
||||
DtRemConceptosSurtidos.Columns.Add("Surtido", GetType(Decimal))
|
||||
|
||||
'VERIFICA SOLO LOS QUE SON TIPO PRODUCTOS
|
||||
For Each dr As DataRow In DtRemisionesTmpDT.FiltraParametros($"CveTipoPS = 2 AND CveVentaDetalle IN ({StrCveVentasDetalle.ToString()})").Rows
|
||||
Dim dtr As DataRow = DtRemConceptosSurtidos.NewRow
|
||||
dtr("CveRemision") = CveRemision
|
||||
dtr("CveVentaDetalle") = dr("CveVentaDetalle")
|
||||
dtr("Cantidad") = dr("Cantidad")
|
||||
dtr("Surtido") = 0
|
||||
DtRemConceptosSurtidos.Rows.Add(dtr)
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
For Each dr As DataRow In MovDetalle.Rows
|
||||
@@ -29635,6 +29702,9 @@ Partial Class Ventas
|
||||
LbAgregar.Enabled = True
|
||||
LnkAgregarPyME.Enabled = True
|
||||
|
||||
ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
ImgDescTotal.Visible = False
|
||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||
|
||||
TxtMotivoDescuento.Enabled = True
|
||||
|
||||
@@ -298,6 +298,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user