+
<%-- --%>
@@ -4074,6 +4275,7 @@
setTimeout(function () { startTimer(request); }, 30000); // callback
}
+
@@ -4088,6 +4290,9 @@
.cbp-popup-lightbox-figure {
background-color: #FFF;
}
+ .orange {
+ background-color: orangered;
+ }
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index 03cc2db05..32714e22c 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -7,8 +7,7 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports ZXing
Imports Newtonsoft.Json.Linq
-
-Partial Class AF_AF
+Partial Class AF_AF
Inherits ClsPaginas
'Configuración
@@ -388,6 +387,9 @@ Partial Class AF_AF
CargaPlagaEnfermedad()
ModalidadesPaginaAF()
+ CargaDocumentacion()
+
+
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta del Activo Fijo:"
@@ -940,7 +942,7 @@ Partial Class AF_AF
TxtValorCompra.Text = ObjActivoFijo.ValorCompra.ToString.FormatoNumero
TxtFechaCompra.Text = ObjActivoFijo.FechaCompra.ToShortDateString
TxtValorCompraMN.Text = ObjActivoFijo.ValorCompraMN.ToString.FormatoNumero
- If ObjActivoFijo.ValorCompra <> ObjActivoFijo.ValorCompraMN Then DivValorCompraMN.visible = True
+ If ObjActivoFijo.ValorCompra <> ObjActivoFijo.ValorCompraMN Then DivValorCompraMN.Visible = True
TxtFechaBaja.Text = If(ObjActivoFijo.FechaBaja = New Date(1900, 1, 1), "", ObjActivoFijo.FechaBaja.ToString("dd/MM/yyyy"))
@@ -4947,4 +4949,531 @@ Partial Class AF_AF
RegistraScript("$('#ModalContaCuenta').modal('show');")
End Sub
+#Region "D O C U M E N T O S"
+
+ Private Property DTDocumentacion As DataTable
+ Get
+ If ViewState("DTDocumentacion") Is Nothing Then
+ ViewState("DTDocumentacion") = New DataTable
+ End If
+ Return DirectCast(ViewState("DTDocumentacion"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DTDocumentacion") = value
+ End Set
+ End Property
+
+ Private Property DocumentoParametros As String
+ Get
+ If ViewState("DocumentoParametros") Is Nothing Then
+ Return ""
+ Else
+ Return ViewState("DocumentoParametros").ToString
+ End If
+ End Get
+ Set(value As String)
+ ViewState("DocumentoParametros") = value
+ End Set
+ End Property
+
+
+ Property CveDocumentacion As Integer
+ Get
+ If ViewState("CveDocumentacion") Is Nothing Then
+ Return -1
+ Else
+ Return DirectCast(ViewState("CveDocumentacion"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveDocumentacion") = value
+ End Set
+ End Property
+ Property CveDocumentacionElectronica As Integer
+ Get
+ If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
+ Return -1
+ Else
+ Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CvePersonalClienteDocumentacion") = value
+ End Set
+ End Property
+ Property ActualizarDocumentacion As Boolean
+ Get
+ If ViewState("ActualizarDocumentacion") Is Nothing Then
+ Return True
+ Else
+ Return DirectCast(ViewState("ActualizarDocumentacion"), Boolean)
+ End If
+ End Get
+ Set(value As Boolean)
+ ViewState("ActualizarDocumentacion") = value
+ End Set
+ End Property
+
+ Property Documentacion As String
+ Get
+ If ViewState("Documentacion") Is Nothing Then
+ Return "-1"
+ Else
+ Return ViewState("Documentacion").ToString()
+ End If
+ End Get
+ Set(value As String)
+ ViewState("Documentacion") = value
+ End Set
+ End Property
+ Property AdjuntoDocumentacion As String
+ Get
+ If ViewState("AdjuntoDocumentacion") Is Nothing Then
+ Return ""
+ Else
+ Return ViewState("AdjuntoDocumentacion").ToString()
+ End If
+ End Get
+ Set(value As String)
+ ViewState("AdjuntoDocumentacion") = value
+ End Set
+ End Property
+
+ Private Property FechaLimite As Date
+ Get
+ If ViewState("FechaLimite") Is Nothing Then
+ Return NowADS().AddDays(15)
+ Else
+ Return ViewState("FechaLimite").ToString().ToDate
+ End If
+ End Get
+ Set(value As Date)
+ ViewState("FechaLimite") = value
+ End Set
+
+ End Property
+
+ Property ObservacionDocumentacion As String
+ Get
+ If ViewState("ObservacionDocumentacion") Is Nothing Then
+ Return ""
+ Else
+ Return ViewState("ObservacionDocumentacion").ToString()
+ End If
+ End Get
+ Set(value As String)
+ ViewState("ObservacionDocumentacion") = value
+ End Set
+ End Property
+
+ Private Sub CargaDocumentacion()
+
+ If CveActivoFijo > 0 Then
+ Dim objRH As New ClsEdocumentacion()
+
+ If objRH.DocumentacionElectronicaGet(-1, -1, -1, UsuarioActual.Empresa.CveEmpresa, -1, CveActivoFijo:=CveActivoFijo, Modulo:=9) Then
+ DTDocumentacion = objRH.DtResultados
+ End If
+
+ If DTDocumentacion.Rows.Count > 0 Then
+ GvDocumentos.DataSource = DTDocumentacion
+ Else
+ GvDocumentos.DataSource = Nothing
+ End If
+
+ objRH.Dispose()
+
+ GvDocumentos.DataBind()
+
+ UpGvDocumentos.Update()
+
+ End If
+
+ End Sub
+
+ Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
+
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
+ Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
+
+ Dim ImgDownLoad As LinkButton = e.Row.FCLinkButton("ImgDownLoad")
+ Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
+ Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
+ Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
+ 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 separado As Char() = ".".ToString().ToCharArray
+ Dim array() As String = Adjunto.Split(separado)
+ Dim extencion As String = ""
+ Dim existeAdjunto As Boolean = False
+ Dim TxtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
+ ' FechaVigencia
+
+ 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)
+
+ txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
+ TxtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
+
+
+
+ Dim scripMascara As String = " $('#" & TxtFechaVigencia.ClientID & "').mask('00/00/0000');"
+ RegistraScript(scripMascara)
+ If array.Length > 0 Then
+ extencion = array(array.Length - 1)
+ End If
+
+ If e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 Then
+ chkEstatus.Checked = True
+ Else
+ chkEstatus.Checked = False
+ End If
+
+ If documentacionFormato = "" Then
+ ImgDownLoadFormato.Visible = False
+ Else
+ Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
+ ImgDownLoadFormato.Visible = True
+ ScriptManager.GetCurrent(Me.Page).RegisterPostBackControl(ImgDownLoadFormato)
+ End If
+
+ txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate.ToString("dd/MM/yyyy")
+
+ If Adjunto.Trim.Length > 0 Then
+
+ Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/AF/" & CveActivoFijo & "/" & Adjunto
+ Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "AF/" & CveActivoFijo & "/" & Adjunto
+
+ If File.Exists(linkDescargaArchivo) Then
+
+ ImgDownLoad.Visible = True
+ ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoad)
+
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ If requerido Then
+ ImgRequired.Text = " "
+ Else
+ ' ImgRequired.Text = " "
+ End If
+
+ End If
+
+ End Sub
+
+
+
+
+ Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
+
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+
+ Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
+ Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
+
+
+ DescarFormato(DocumentacionFormato)
+
+ 'Dim ObjEdoc As New ClsEdocumentacion
+
+ 'If ObjEdoc.GetDocumentacionParametros(-1, CveDocumentacion, UsuarioActual.CveEmpresa) Then
+ ' If ObjEdoc.DtResultados.Rows.Count > 0 Then
+
+ ' GvParametros.DataSource = ObjEdoc.DtResultados
+ ' ObjEdoc.Dispose()
+
+ ' GvParametros.DataBind()
+ ' UpGvParametros.Update()
+
+ ' DocumentoParametros = DocumentacionFormato
+ ' RegistraScript("$('#DVDescargaDocumentoParametrosModal').modal('show')")
+
+ ' Else
+ ' ObjEdoc.Dispose()
+ ' DescarFormato(DocumentacionFormato)
+ ' End If
+ 'Else
+ ' ObjEdoc.Dispose()
+ 'End If
+
+ End Sub
+
+ Public Sub DescarFormato(documento As String)
+
+ Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
+ Dim PathSource As String
+ Dim pathDesti As String
+
+ PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
+ pathDesti = PathRoot & "Temp\" & CveActivoFijo & documento
+
+ If File.Exists(pathDesti) Then
+ File.Delete(pathDesti)
+ End If
+
+ File.Copy(PathSource, pathDesti)
+
+ 'Dim objDoc As New clsGemBoxDocument(pathDesti)
+ 'Dim objRH As New ClsRH
+ 'objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
+ 'objRH.Dispose()
+
+ 'objDoc.Guardar(pathDesti)
+
+ Dim fileinfo As New FileInfo(pathDesti)
+
+ Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
+ DescargarArchivo(fileinfo.FullName)
+ 'baseUrl = baseUrl & "/temp/" & fileinfo.Name
+ 'RegistraScript("Download('" & baseUrl & "')")
+
+ End Sub
+
+ Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs)
+ 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()
+ Documentacion = GvRow.DataKey("Documentacion")
+ AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString()
+
+ chkEstatus = GvRow.FCCheckBox("chkEstatus")
+
+
+
+ ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
+ FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
+
+ AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
+
+ LtlTitulofirmaContrato.Text = "Subir " & Documentacion
+
+ UpTituloFirma.Update()
+
+ RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal({ backdrop: 'static', keyboard: false});")
+ End Sub
+ Protected Sub ImgDownLoad_Click(sender As Object, e As EventArgs)
+
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+
+ Dim Adjunto As String = GvRow.DataKey("Adjunto").ToString()
+ Dim ArchivoPath As String = UsuarioActual.Empresa.Ruta & "AF/" & CveActivoFijo & "/" & Adjunto
+
+ DescargarArchivo(ArchivoPath)
+
+ End Sub
+
+ Protected Sub DescargarArchivo(rutaArchivo As String)
+
+ If System.IO.File.Exists(rutaArchivo) Then
+
+ Dim nombreArchivo As String = System.IO.Path.GetFileName(rutaArchivo)
+ Response.Clear()
+ Response.ContentType = "application/octet-stream"
+ Response.AddHeader("Content-Disposition", "attachment; filename=" & nombreArchivo)
+ Response.AddHeader("Content-Length", New System.IO.FileInfo(rutaArchivo).Length.ToString())
+ Response.WriteFile(rutaArchivo)
+ Response.End()
+
+ Else
+
+ End If
+ End Sub
+
+ Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
+
+ 'Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
+ 'Dim ObjRH As New ClsRH
+ 'ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
+ 'ObjRH.Dispose()
+
+ 'For Each GvRow As GridViewRow In GvParametros.Rows
+
+ ' If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
+ ' ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
+ ' End If
+ 'Next
+ 'Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
+ 'Dim PathSource As String
+ 'Dim pathDesti As String
+
+ 'PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & DocumentoParametros
+ 'pathDesti = PathRoot & "Temp\" & CveActivoFijo & DocumentoParametros
+
+ 'If File.Exists(pathDesti) Then
+ ' File.Delete(pathDesti)
+ 'End If
+
+ 'File.Copy(PathSource, pathDesti)
+
+ 'Dim objDoc As New clsGemBoxDocument(pathDesti)
+ 'objDoc.SustituirTags(ListaTagsDocumentost)
+ 'objDoc.Guardar(pathDesti)
+
+ 'Dim fileinfo As New FileInfo(pathDesti)
+
+ 'Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
+ 'baseUrl = baseUrl & "/temp/" & fileinfo.Name
+
+ 'RegistraScript("$('#DVDescargaDocumentoParametrosModal').modal('hide')", "500")
+ 'RegistraScript("Download('" & baseUrl & "')")
+
+
+ End Sub
+
+
+ Protected Sub BtnModalFirmaContratoDocumentoUpload_Click(sender As Object, e As EventArgs) Handles BtnModalFirmaContratoDocumentoUpload.Click
+
+ Dim FileExtension As String = "-1"
+ Dim Filesgral As List(Of Archivo) = TxtFileFirmaContrato.getfiles().Archivos
+ Dim Filename As String = ""
+
+
+ For Each fileItem As Archivo In Filesgral
+ Try
+
+ FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
+ Dim tempArray() As String
+ tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
+
+ Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "AF\" & CveActivoFijo & "\" & Documentacion & "." & FileExtension
+ Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "AF\" & CveActivoFijo & "\" & AdjuntoDocumentacion
+
+ If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "AF\" & CveActivoFijo & "\") Then
+ System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "AF\" & CveActivoFijo & "\")
+ End If
+
+ If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
+ File.Delete(rutaAdjuntoAnterior)
+ End If
+
+ If System.IO.File.Exists(rutaDestino) Then
+ System.IO.File.Delete(rutaDestino)
+ End If
+
+ System.IO.File.Move(fileItem.FileUrl, rutaDestino)
+
+ Dim objRH As New ClsEdocumentacion
+
+
+ If CveDocumentacionElectronica = -1 Then
+ If objRH.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, -1, 1, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, CveActivoFijo:=CveActivoFijo) > 0 Then
+
+ End If
+ Else
+ If objRH.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, -1, 1, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, CveActivoFijo:=CveActivoFijo) Then
+
+ End If
+ End If
+
+ objRH.Dispose()
+
+ GuardarDocumentosFirmaContrato(CveDocumentacion)
+ 'CargaDocumentacion()
+
+
+ TxtFileFirmaContrato.Text = ""
+ UpModalFirmaContratoDocumento.Update()
+
+ Catch ex As Exception
+ OnError("Error al cargar archivo", ex)
+ End Try
+
+ Next
+ RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal('hide')", "hidemodal7")
+
+ End Sub
+
+ Private Sub GuardarDocumentosFirmaContrato(Optional _CveDocumentacionExcluir As Integer = -1)
+
+ Dim hasError As Boolean = True
+ Dim objDocumentos As New ClsEdocumentacion
+
+ For Each dRow As GridViewRow In GvDocumentos.Rows
+
+
+ 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 _txtObservaciones As TextBox = dRow.FCTextBox("TxtObservaciones")
+ Dim _TxtFechaLimite As TextBox = dRow.FCTextBox("TxtFechaLimite")
+ Dim _TxtFechaVigencia As TextBox = dRow.FCTextBox("TxtFechaVigencia")
+ Dim chkEstatus As CheckBox = dRow.FCCheckBox("chkEstatus")
+ Dim _estatus As Integer
+
+ _estatus = If(dRow.DataKey("Estatus").ToString().ToUpper = "TRUE", 1, 0)
+
+ Dim _FechaVigencia As Date
+ Dim _FechaLimite As Date
+
+ 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)
+
+ If _TxtFechaVigencia.Text.Length = 10 Then
+ _FechaVigencia = _TxtFechaVigencia.Text.ToDate
+ Else
+ _FechaVigencia = Nothing
+ End If
+
+ If Not AplicaDiasLimite Then
+ _FechaLimite = MinFecha
+ Else
+ _FechaLimite = _TxtFechaLimite.Text.ToDate
+ End If
+
+ If Not AplicaFechaVencimiento Then
+ _FechaVigencia = MinFecha
+ End If
+
+
+ If Not _CveDocumentacionExcluir = _CveDocumentacion Then
+ Try
+ If _CveDocumentacionElectronica = -1 Then
+
+ If objDocumentos.DocumentacionElectronicaAdd(_CveDocumentacion, -1, -1, -1, _estatus, _txtObservaciones.Text.Trim, _Adjunto, UsuarioActual.CveUsuario, _FechaLimite, _FechaVigencia, CveActivoFijo:=CveActivoFijo) > 0 Then
+ Else
+ hasError = True
+ Exit For
+ End If
+
+ Else
+ If objDocumentos.DocumentacionElectronicaUpdate(_CveDocumentacionElectronica, _CveDocumentacion, -1, -1, -1, _estatus, _txtObservaciones.Text.Trim, _Adjunto, UsuarioActual.CveUsuario, _FechaLimite, _FechaVigencia, CveActivoFijo:=CveActivoFijo) Then
+ Else
+ hasError = True
+ Exit For
+ End If
+ End If
+
+
+ hasError = False
+ Catch ex As Exception
+ hasError = True
+ Exit For
+ End Try
+ End If
+ Next
+
+ 'refrescar grid datos investigacion
+ CargaDocumentacion()
+ End Sub
+#End Region
+
+
+
+
End Class
\ No newline at end of file
diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx
index a957b310d..5feeabdb5 100644
--- a/AF/CatAF.aspx
+++ b/AF/CatAF.aspx
@@ -203,6 +203,16 @@
+
+
Tipo Grupo:
+
+
+
+
+
+
+
+
diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb
index e348643a4..594d4b956 100644
--- a/AF/CatAF.aspx.vb
+++ b/AF/CatAF.aspx.vb
@@ -71,6 +71,9 @@ Partial Class AF_CatAF
CargaPersonalizacion()
+ If UsuarioActual.CveEmpresa = 13 Then
+ DVTipoGrupo.Visible = True
+ End If
End If
@@ -291,7 +294,8 @@ Partial Class AF_CatAF
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero,
- DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=Cvecliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, BuscaPorAFPadre:=DdlAFPadres.SelectedValue.ToEntero) Then
+ DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=Cvecliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, BuscaPorAFPadre:=DdlAFPadres.SelectedValue.ToEntero,
+ CveTipoAFGrupo:=DdlAFTipoGrupo.SelectedValue.ToEntero) Then
If ObjAF.DtResultados.Rows.Count > 0 Then
DtActivosFijos = ObjAF.DtResultados
'GvDatos.DataSource = ObjAF.DtResultados
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index 45ba33114..e0edd96b6 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -296,7 +296,9 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function GetActivosFijos(CveActivoFijo As Integer, CveEmpresa As Integer, Codigo As String, Descripcion As String, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, NoSerie As String, Año As Integer, CvePersonaResponsable As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEstadoActivoFijo As Integer, CaracteristicaValor As String, CveCliente As Integer, Optional BuscaGrupoEmpresa As Integer = -1, Optional BuscaPorAFPadre As Integer = -1, Optional CveGrupo As Integer = -1) As Boolean
+ Public Function GetActivosFijos(CveActivoFijo As Integer, CveEmpresa As Integer, Codigo As String, Descripcion As String, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, NoSerie As String, Año As Integer, CvePersonaResponsable As Integer,
+ CveProyecto As Integer, CveSubProyecto As Integer, CveEstadoActivoFijo As Integer, CaracteristicaValor As String, CveCliente As Integer, Optional BuscaGrupoEmpresa As Integer = -1, Optional BuscaPorAFPadre As Integer = -1,
+ Optional CveGrupo As Integer = -1, Optional CveTipoAFGrupo As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_ActivosFijosGet")
With SqlAdapter.SelectCommand.Parameters
@@ -317,6 +319,7 @@ Public Class ClsAF
.Add("@BuscaGrupoEmpresa", SqlDbType.Int).Value = BuscaGrupoEmpresa
.Add("@CveAFPadre", SqlDbType.Int).Value = BuscaPorAFPadre
.Add("@CveGrupo", SqlDbType.Int).Value = CveGrupo
+ .Add("@CveTipoAFGrupo", SqlDbType.Int).Value = CveTipoAFGrupo
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsEdocumentacion.vb b/App_Code/ClsEdocumentacion.vb
index d2f56e68f..2786b035e 100644
--- a/App_Code/ClsEdocumentacion.vb
+++ b/App_Code/ClsEdocumentacion.vb
@@ -252,7 +252,8 @@ Public Class ClsEdocumentacion
#Region "D O C U M E N T A C I O N - E L E C T R O N I C A"
- Public Function DocumentacionElectronicaGet(CvePersonal As Integer, CveCliente As Integer, CveProveedor As Integer, CveEmpresa As Integer, CveDocumentacionTipo As Integer, Optional CveVenta As Integer = -1, Optional Modulo As Integer = 1, Optional Periodo As Integer = -1) As Boolean
+ Public Function DocumentacionElectronicaGet(CvePersonal As Integer, CveCliente As Integer, CveProveedor As Integer, CveEmpresa As Integer, CveDocumentacionTipo As Integer, Optional CveVenta As Integer = -1, Optional Modulo As Integer = 1,
+ Optional Periodo As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Edoc_DocumentacionElectronicaGet")
@@ -266,6 +267,7 @@ Public Class ClsEdocumentacion
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@Modulo", SqlDbType.Int).Value = Modulo
+ .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
End With
Try
@@ -279,7 +281,8 @@ Public Class ClsEdocumentacion
End Function
Public Function DocumentacionElectronicaAdd(CveDocumentacion As Integer, CvePersonal As Integer, CveCliente As Integer, CveProveedor As Integer, Estatus As Integer, Observacion As String, Adjunto As String,
- CveUsuario As Integer, FechaLimite As Date, Optional FechaVigencia As Date = Nothing, Optional CveVenta As Integer = -1, Optional Observacion2 As String = "-1", Optional Periodo As Integer = 190001) As Integer
+ CveUsuario As Integer, FechaLimite As Date, Optional FechaVigencia As Date = Nothing, Optional CveVenta As Integer = -1, Optional Observacion2 As String = "-1",
+ Optional Periodo As Integer = 190001, Optional CveActivoFijo As Integer = -1) As Integer
Dim Retorno As Integer = 0
@@ -299,6 +302,7 @@ Public Class ClsEdocumentacion
.Add("@FechaLimite", SqlDbType.Date).Value = FechaLimite
.Add("@FechaVigencia", SqlDbType.Date).Value = FechaVigencia
.Add("@Periodo", SqlDbType.Int).Value = Periodo
+ .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@CveDocumentacionElectronica", SqlDbType.Int).Direction = ParameterDirection.Output
'FechaVigencia
End With
@@ -315,7 +319,8 @@ Public Class ClsEdocumentacion
Public Function DocumentacionElectronicaUpdate(CveDocumentacionElectronica As Integer, CveDocumentacion As Integer, CvePersonal As Integer, CveCliente As Integer, CveProveedor As Integer, Estatus As Integer,
- Observacion As String, Adjunto As String, CveUsuario As Integer, FechaLimite As Date, Optional FechaVigencia As Date = Nothing, Optional Observacion2 As String = "-1") As Boolean
+ Observacion As String, Adjunto As String, CveUsuario As Integer, FechaLimite As Date, Optional FechaVigencia As Date = Nothing, Optional Observacion2 As String = "-1",
+ Optional CveActivoFijo As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Edoc_DocumentacionElectronicaUpdate")
@@ -333,6 +338,7 @@ Public Class ClsEdocumentacion
.Add("@CveUsuario", SqlDbType.VarChar).Value = CveUsuario
.Add("@FechaLimite", SqlDbType.Date).Value = FechaLimite
.Add("@FechaVigencia", SqlDbType.Date).Value = FechaVigencia
+ .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
'
End With
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 0b28c1fba..8e050193b 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -6433,6 +6433,24 @@ Public Class ClsInventarios
Return Retorno
End Function
+ Public Function GetMovmientoDetalleReplicado(CveMovimientoDetalle As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_MovmientoDetalleReplicadoGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al replicar el movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function GetVentasRemisionesInventario(Ventas As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 833a4b715..ab193393f 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -4071,6 +4071,44 @@ Public Class ClsNominas
Return retorno
End Function
+#Region "CRUD_PersonalRefs"
+ Public Function PersonalCamposValoresGet(cveReferencia As Int32, cvePersonal As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_PersonalCamposValoresGet", CommandType.StoredProcedure)
+ addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
+ addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
+ retorno = RunQuery("Ocurrió un error al obtener el PersonalRefs.")
+ Return retorno
+ End Function
+ Public Function PersonalCamposValoresAddUp(cveReferencia As Int32, cvePersonal As Int32, valor As Decimal) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_PersonalCamposValoresAddUp", CommandType.StoredProcedure)
+ addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
+ addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
+ addParameters("@Valor", SqlDbType.Money, valor)
+ retorno = RunQuery("Ocurrió un error al actualizar el PersonalRefs.")
+ Return retorno
+ End Function
+ Public Function PersonalCamposValoresRemove(cveReferencia As Int32, cvePersonal As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_PersonalCamposValoresRemove", CommandType.StoredProcedure)
+ addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
+ addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
+ retorno = RunQuery("Ocurrió un error al eliminar el PersonalRefs.")
+ Return retorno
+ End Function
+
+ Public Function PersonalCamposGET() As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_PersonalCamposGET", CommandType.StoredProcedure)
+ retorno = RunQuery("Ocurrió un error al obtener el PersonalRefs.")
+ Return retorno
+ End Function
+#End Region
+
+
+
+
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
End Sub
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index cd2840b87..b8bfbcca1 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -7599,6 +7599,31 @@ Public Class ClsRH
End Function
#End Region
+ Public Function ValidaFechaIngresoVSNominas(CvePersonal As Integer, CvePersonalAltas As Integer, CveEmpresa As Integer, FechaIngreso As String, FechaFin As String) As Boolean
+ Dim Retorno As Boolean = False
+ Data = New DataTable
+ SqlDataAdapter("[PA_ValidaFechaIngresoVSNominas]")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaIngreso", SqlDbType.VarChar).Value = FechaIngreso
+ .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin
+ .Add("@CvePersonalAltas", SqlDbType.Int).Value = CvePersonalAltas
+ .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ If Data.Rows.Count > 0 Then
+ Retorno = False
+ Else
+ Retorno = True
+ End If
+ Catch Ex1 As SqlException
+ Me.OnError("Ocurrió un error al guardar correos nominas", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ OnError("Ocurrió un error al guardar correos nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
Public Function NomBitacoraCorreoGet(CvePeriodo As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean
diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb
index ce0870a00..83eec7caa 100644
--- a/Bancos/CuentasBancariasDetalle.aspx.vb
+++ b/Bancos/CuentasBancariasDetalle.aspx.vb
@@ -164,11 +164,10 @@ Partial Class Bancos_CuentasBancariasDetalle
If DdlTipoCuenta.SelectedValue.ToEntero = 1 Then 'Caja Chica
IdPadre = UsuarioActual.Empresa.Funcionalidad(218).ToEntero
Else
- Dim tesstr = UsuarioActual.Empresa.Funcionalidad(209)
IdPadre = UsuarioActual.Empresa.Funcionalidad(209).ToEntero
End If
- If IdPadre = 0 Then IdPadre = -1
+ If IdPadre = 0 Then IdPadre = 1
If Conta.GetCuentasRecursiva(IdPadre, 1) Then
dt = Conta.DtResultados
diff --git a/Bancos/RepProveedoresPagos.aspx b/Bancos/RepProveedoresPagos.aspx
index 3708e6830..0b4b52bbb 100644
--- a/Bancos/RepProveedoresPagos.aspx
+++ b/Bancos/RepProveedoresPagos.aspx
@@ -139,7 +139,7 @@
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 6f0088ed6..a3e2ddbda 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -641,7 +641,7 @@ Partial Class Compras_Proveedores
End If
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
- DVPorcentajeProntoPago.Visible = True
+ DVAplicaProntoPago.Visible = True
End If
End If
@@ -968,9 +968,16 @@ Partial Class Compras_Proveedores
TxtPorcentajeProntoPago.Text = (100 * ObjProveedor.PorcentajeProntoPago).ToString("###.00")
chkAplicaProntoPago.Checked = ObjProveedor.AplicaProntoPago
+
+ If ObjProveedor.PorcentajeProntoPago > 0 Or chkAplicaProntoPago.Checked Then
+ chkAplicaProntoPago.Checked = True
+ DVPorcentajeProntoPago.Visible = True
+ End If
' enviaractivacion()
CargaEventoBitacora()
+
+
Else
Alert("El Proveedor Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
@@ -5897,6 +5904,17 @@ Partial Class Compras_Proveedores
DdlDIOTTipoOperacion.DataBind()
End Sub
+
+ Protected Sub chkAplicaProntoPago_CheckedChanged(sender As Object, e As EventArgs)
+
+ If chkAplicaProntoPago.Checked Then
+ DVPorcentajeProntoPago.Visible = True
+ Else
+ DVPorcentajeProntoPago.Visible = False
+ TxtPorcentajeProntoPago.Text = ""
+ End If
+ UpDatos.Update()
+ End Sub
End Class
diff --git a/Compras/RepCxP.aspx b/Compras/RepCxP.aspx
index c9371d679..61c22d71f 100644
--- a/Compras/RepCxP.aspx
+++ b/Compras/RepCxP.aspx
@@ -307,6 +307,15 @@
diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb
index f7927f7b0..49d7a1537 100644
--- a/Compras/RepCxPDetalle.aspx.vb
+++ b/Compras/RepCxPDetalle.aspx.vb
@@ -297,6 +297,7 @@ Partial Class RepCxPDetalle
DdlUsuarioRegistro.DataBind()
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro)
+ DdlProntoPago.SelectedValueExist(IfNull(Request("AplicaProntoPago"), -1).ToString)
Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
@@ -411,7 +412,8 @@ Partial Class RepCxPDetalle
DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, Ddlmoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero(), DdlEstatusCompra.SelectedValue.ToEntero,
Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero,
TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(CveTipoProveedor = 3, -1, CveTipoProveedor),
- Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero(), TipoDocto:=TipoDocto, CveProyecto:=DdlProyecto.SelectedValue.ToEntero()) Then
+ Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero(), TipoDocto:=TipoDocto, CveProyecto:=DdlProyecto.SelectedValue.ToEntero(),
+ AplicaProntoPago:=DdlProntoPago.SelectedValue.ToEntero) Then
Dim TMP_DTDatos As New DataTable
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index fcb3d3044..7176a8e4e 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1612,7 +1612,7 @@ Partial Class Compras_eFacturas
End Sub
- Private Sub SubirFacturas(ByRef ListComprimidos As List(Of String), ByRef ListXML As List(Of String), ByRef ListPDF As List(Of String), Optional Validada As Integer = 0)
+ Private Sub SubirFacturas(ByRef ListComprimidos As List(Of String), ByRef ListXML As List(Of String), ByRef ListPDF As List(Of String), Optional Validada As Integer = 0, Optional SobreEscribirPDFSiExiste As Boolean = True)
Dim DTLOG As New DataTable
DTLOG.Columns.Add("Serie", GetType(String))
DTLOG.Columns.Add("Folio", GetType(String))
@@ -1753,11 +1753,27 @@ Partial Class Compras_eFacturas
If FF IsNot Nothing AndAlso FF.CveFactura > 0 Then
+ Dim PDfDestino As String = $"{UsuarioActual.Empresa.Ruta}\Compras\{FF.EmisorRFC}\{FF.CveFactura}.PDF"
+
+
If RutaPDF = "" Then
- Dim Hilo As New System.Threading.Thread(Sub() ProcesarPDF(UsuarioActual, a, FF))
- Hilo.Start()
+
+
+
+ 'no valida nada solo lo crea y lo pone en la carpeta, no importa si ya existe
+ If SobreEscribirPDFSiExiste Then
+ Dim Hilo As New System.Threading.Thread(Sub() ProcesarPDF(UsuarioActual, a, FF))
+ Hilo.Start()
+ Else
+ 'si no existe el pdf, lo procesa
+ If Not File.Exists(PDfDestino) Then
+ Dim Hilo As New System.Threading.Thread(Sub() ProcesarPDF(UsuarioActual, a, FF))
+ Hilo.Start()
+ End If
+ End If
+
Else
- Dim PDfDestino As String = $"{UsuarioActual.Empresa.Ruta}\Compras\{FF.EmisorRFC}\{FF.CveFactura}.PDF"
+
If File.Exists(RutaPDF) Then
If File.Exists(PDfDestino) Then
File.Delete(PDfDestino)
@@ -3036,7 +3052,7 @@ Partial Class Compras_eFacturas
End If
If SeVerifico Then
- SubirFacturas(ListComprimidos, ListXML, ListPDF, Validada:=1)
+ SubirFacturas(ListComprimidos, ListXML, ListPDF, Validada:=1,SobreEscribirPDFSiExiste:=False)
End If
'If UsuarioActual.CveRol = 1 Then
diff --git a/Empresas/7/Formatos/26_CompromisoAsistenciaISSPE.docx b/Empresas/7/Formatos/26_CompromisoAsistenciaISSPE.docx
deleted file mode 100644
index e4f718eb8..000000000
Binary files a/Empresas/7/Formatos/26_CompromisoAsistenciaISSPE.docx and /dev/null differ
diff --git a/General/CatDocumentacionTipo.aspx b/General/CatDocumentacionTipo.aspx
index c08e6c5b1..0409ab3c5 100644
--- a/General/CatDocumentacionTipo.aspx
+++ b/General/CatDocumentacionTipo.aspx
@@ -103,6 +103,7 @@ Catalogo Documentacion Tipo
ClientesProveedor <%-- Nota: EL tipo Tres es tipo Auditoria de documentos de proveedor usadon el portal prveedor y --%>
Inicio
+ Activos Fijos
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 383615019..3ad751fca 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -1914,6 +1914,7 @@ Partial Class Inventarios_EntradasSalidas
ElseIf Dr("Estatus").ToString = "U" Then
If Not ObjInventario.UpdateMovimientoDetalle(Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("Serie").ToString, Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+
Mensaje = "Error al Actualizar los movimientos"
ErrorMovInv = True : Exit For
End If
@@ -5506,21 +5507,59 @@ Partial Class Inventarios_EntradasSalidas
If CveMovimientoDetalleEdit > 0 Then
+ Dim ErrorMovInv As Boolean = False
+
Dim ObjInventario As New ClsInventarios
- If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit,
+ ObjInventario.IniciaTransacSQL()
+
+ If ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDecimal, CveAFEdit,
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero,
Lote:=TxtnLote.Text.Trim, FechaCaducidad:=TxtnFechaCaducidad.Text.ToDate) Then
- Alert("Error al Actualizar los movimientos")
+
+
+ If UsuarioActual.CveEmpresa = 199 Then
+ If ObjInventario.GetMovmientoDetalleReplicado(CveMovimientoDetalleEdit) Then
+
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+
+ Dim CveMovimientoDetalleReplicado As Integer = ObjInventario.DtResultados.Rows(0)("CveMovimientoDetalle").ToString.ToEntero
+
+ If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDecimal, -1, -1, txtPrecio.Text.ToDecimal, -1,
+ CveMovimientoDetalleReplicado, -1, TxtnSerie.Text, TxtObservacionesdetalle.Text,
+ CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=-1,
+ Lote:=TxtnLote.Text.Trim, FechaCaducidad:=TxtnFechaCaducidad.Text.ToDate) Then
+ Alert("Error al Actualizar los movimientos replicados relacionados.", TipoMensaje.MsgAdvertencia)
+ ErrorMovInv = True
+ End If
+
+ End If
+
+ Else
+ Alert("Error al obtener los datos de los movimientos replicados relacionados.", TipoMensaje.MsgAdvertencia)
+ ErrorMovInv = True
+ End If
+ End If
+
+
+
+
Else
- GvM.EditIndex = -1
- 'cargar también los movimentos detalle
+ Alert("Error al Actualizar los movimientos", TipoMensaje.MsgAdvertencia)
+ ErrorMovInv = True
+ End If
+
+ If Not ErrorMovInv Then
+ ObjInventario.Commit()
+ 'GvM.EditIndex = -1
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtMovimientos = ObjInventario.DtResultados
CargaGVM(DtMovimientos)
End If
Alert("Movimiento actualizado correctamente")
RegistraScript("$('#ModalAgregar').modal('hide')")
+ Else
+ ObjInventario.RollBack()
End If
ObjInventario.Dispose()
diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx
index 16ea51b0a..020044693 100644
--- a/Nomina/RepMovtosPermanentes.aspx
+++ b/Nomina/RepMovtosPermanentes.aspx
@@ -4,7 +4,7 @@
@@ -63,15 +65,15 @@
-
+
+
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 89e45b992..bd787ed99 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -971,7 +971,7 @@ Partial Class RH_Personal
CargaPaises()
CargaRegistroPatronal()
CargaOutSourcing()
-
+ CargaDDlPersonalRefsReference()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
@@ -1007,6 +1007,7 @@ Partial Class RH_Personal
CargaGvBitacora()
CarcaConceptosNomina()
CargaFonacot()
+ CargaPersonalRefs()
End If
ValidaDeudorAcreedor()
@@ -2193,41 +2194,41 @@ Partial Class RH_Personal
Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo,
AreaGeografica:=DdlAreageografica.SelectedValue, CodigoDispersionVale:=TxtCodigoDispersionVale.Text.Trim) Then
- 'Funcion usa RH Familiares
- If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
- ProcesaDTFamiliares(ObjPersonal)
- End If
-
- ObjPersonal.AgroDepartamentoPersonalUp(UsuarioActual.CveEmpresa, DDlAgroDepartamento.SelectedValue.ToEntero(), CvePersonal, If(ChkCharolaForanea.Checked, 1, 0))
-
- If Archivo.Exists Then
-
- If Not Directory.Exists(String.Format("{0}\RH\Personal", UsuarioActual.Empresa.Ruta)) Then Directory.CreateDirectory(String.Format("{0}\RH\Personal", UsuarioActual.Empresa.Ruta))
-
- If File.Exists(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL)) Then
- File.Delete(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL))
+ 'Funcion usa RH Familiares
+ If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
+ ProcesaDTFamiliares(ObjPersonal)
End If
- System.IO.File.Move(String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, URL), String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL))
- End If
+ ObjPersonal.AgroDepartamentoPersonalUp(UsuarioActual.CveEmpresa, DDlAgroDepartamento.SelectedValue.ToEntero(), CvePersonal, If(ChkCharolaForanea.Checked, 1, 0))
- Mensaje = "Los cambios se guardaron correctamente."
- 'If ViewState("CveEstatusOriginal").ToString() <> DdlEstatusPersonal.SelectedValue Then
- ' 'Manda Mail con bajas
- 'End If
- Else
- TieneError = True
- End If
- 'GUARDA ORGANIGRAMA
- If Not TieneError Then
- If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero() = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero())) Then
+ If Archivo.Exists Then
+
+ If Not Directory.Exists(String.Format("{0}\RH\Personal", UsuarioActual.Empresa.Ruta)) Then Directory.CreateDirectory(String.Format("{0}\RH\Personal", UsuarioActual.Empresa.Ruta))
+
+ If File.Exists(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL)) Then
+ File.Delete(String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL))
+ End If
+ System.IO.File.Move(String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, URL), String.Format("{0}RH\Personal\{1}", UsuarioActual.Empresa.Ruta, URL))
+
+ End If
+
+ Mensaje = "Los cambios se guardaron correctamente."
+ 'If ViewState("CveEstatusOriginal").ToString() <> DdlEstatusPersonal.SelectedValue Then
+ ' 'Manda Mail con bajas
+ 'End If
+ Else
TieneError = True
End If
+ 'GUARDA ORGANIGRAMA
+ If Not TieneError Then
+ If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero() = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero())) Then
+ TieneError = True
+ End If
+ End If
+
End If
- End If
-
- If TieneError Then
+ If TieneError Then
ObjPersonal.RollBack()
Alert("Ocurrio un error guardar el Personal. Por favor vuelva a intentar.", TipoMensaje.ToastAdventencia)
Else
@@ -7320,8 +7321,14 @@ Partial Class RH_Personal
strfin = String.Format(",[FechaFin]='{0:yyyy-MM-dd}'", fechafin)
End If
+ Dim finicio As String = TxtFechaInicioUA.Text.ToDateTime().ToString("yyyy-MM-dd")
+ Dim ffin As String = TxtFechaFinUA.Text.ToDateTime().ToString("yyyy-MM-dd")
Using objrh As New ClsRH()
- If (objrh.PersonalAltasUpFechas(CvePersonalAltas, TxtFechaInicioUA.Text.ToDateTime().ToString("yyyy-MM-dd"), TxtFechaFinUA.Text.ToDateTime().ToString("yyyy-MM-dd"), CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
+ If Not (objrh.ValidaFechaIngresoVSNominas(CvePersonal, CvePersonalAltas, 0, finicio, ffin)) Then
+ Alert("La fecha de ingreso o de fin no puede ser modificada, ya que existen registros de nómina autorizados que se encuentran dentro del periodo definido.", TipoMensaje.MsgAdvertencia)
+
+ End If
+ If (objrh.PersonalAltasUpFechas(CvePersonalAltas, finicio, ffin, CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
If objrh.GetPersonalAltas(CvePersonal) Then
GvPersonalAltas.DataSource = objrh.DtResultados
GvPersonalAltas.DataBind()
@@ -8307,7 +8314,70 @@ Partial Class RH_Personal
End Sub
+ Protected Sub CargaPersonalRefs()
+ Dim ObjPers As New ClsNominas()
+ ObjPers.PersonalCamposValoresGet(-1, CvePersonal)
+ GVPersonalRefs.DataSource = ObjPers.DtResultados
+ ObjPers.Dispose()
+ GVPersonalRefs.DataBind()
+ UPModalPers.Update()
+ End Sub
+ Protected Sub CargaDDlPersonalRefsReference()
+ Dim ObjPers As New ClsNominas()
+ ObjPers.PersonalCamposGET()
+ DdlPersreferencia.DataSource = ObjPers.DtResultados
+ ObjPers.Dispose()
+ DdlPersreferencia.DataBind()
+ UPModalPers.Update()
+ End Sub
+ Protected Sub LimpiaPersonalRefs()
+ DdlPersreferencia.SelectedIndex = 0
+ TxtPersvalor.Text = ""
+ UPModalPers.Update()
+ End Sub
+ Protected Sub LnkMostrarCamposValor_Click(sender As Object, e As EventArgs)
+ ltlPerstitulo.Text = "Campos valores"
+ LimpiaPersonalRefs()
+ RegistraScript("$('#DModalPersonalRefs').modal()")
+ BtnPersADD.Visible = False
+ PanelMostrarpersonalcampos.Visible = True
+ PanelADDpersonalcampos.Visible = False
+ UPModalPers.Update()
+ End Sub
+ Protected Sub LnkAgregarPers_Click(sender As Object, e As EventArgs)
+ 'RegistraScript("$('#DModalPersonalRefs').modal()")
+ ltlPerstitulo.Text = "Agregar Campos Valores"
+ LimpiaPersonalRefs()
+ BtnPersADD.Visible = True
+ PanelADDpersonalcampos.Visible = True
+ PanelMostrarpersonalcampos.Visible = False
+ UPModalPers.Update()
+ End Sub
+ Protected Sub BtnPersADD_Click(sender As Object, e As EventArgs)
+
+ Dim cveReferencia As Int32 = DdlPersreferencia.SelectedValue.ToEntero()
+ Dim valor As Decimal = TxtPersvalor.Text.ToDecimal()
+ Dim ObjPers As New ClsNominas()
+ Dim Continuar As Boolean = ObjPers.PersonalCamposValoresAddUp(cveReferencia, CvePersonal, valor)
+ ObjPers.Dispose()
+ If (Continuar) Then
+ LimpiaPersonalRefs()
+ UPModalPers.Update()
+ Alert("El campo valor se ha agregado")
+ End If
+ End Sub
+ Protected Sub LnkEliminarPers_Click(sender As Object, e As EventArgs)
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ Dim CcveReferencia As Integer = gvRow.DataKey("CveReferencia").ToEntero()
+ Dim ObjPers As New ClsNominas()
+ Dim Continuar As Boolean = ObjPers.PersonalCamposValoresRemove(CcveReferencia, CvePersonal)
+ ObjPers.Dispose()
+ If (Continuar) Then
+ CargaPersonalRefs()
+ Alert("El campo valor se ha eliminado")
+ End If
+ End Sub
'Protected Sub ChkPagoElectronicoGrupos_CheckedChanged(sender As Object, e As EventArgs)
' If ChkPagoElectronicoGrupos.Checked Then
diff --git a/Ventas/ActualizarPrecios.aspx b/Ventas/ActualizarPrecios.aspx
index 5e02a093d..6e96c7a44 100644
--- a/Ventas/ActualizarPrecios.aspx
+++ b/Ventas/ActualizarPrecios.aspx
@@ -222,7 +222,7 @@
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 76f76bf2b..9fea22034 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -695,9 +695,38 @@ Partial Class Ventas_ClientesAbonar
End If
End Sub
+
+
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
+ 'VERIFICA SI HAY CORTE ANTES DE HACER EL PAGO
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then
+ Dim ObjPVenta As New ClsPuntoVenta
+ If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then
+ DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}")
+ DdlCorteCaja.DataBind()
+ End If
+ ObjPVenta.Dispose()
+ DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ UpModalCorte.Update()
+ RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')")
+ Else
+ GenerarPago()
+ End If
+ End Sub
+ Protected Sub BtnGenerarPago_Click(sender As Object, e As EventArgs) Handles BtnGenerarPago.Click
+ CveCorte = DdlCorteCaja.SelectedValue.ToEntero()
+ If CveCorte <= 0 Then
+ Alert("Debe seleccionar un corte", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ GenerarPago()
+
+ End Sub
+
+ Private Sub GenerarPago()
Dim FechaEmision As Date = MinFecha
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
@@ -1549,7 +1578,6 @@ Partial Class Ventas_ClientesAbonar
If MsgError = "" Then
LimpiaCampos()
End If
-
End Sub
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef SeTimbro As Boolean) As String