This commit is contained in:
2024-07-23 09:08:00 -07:00
21 changed files with 1019 additions and 515 deletions

View File

@@ -0,0 +1,18 @@
Imports ClosedXML.Excel.XLPredefinedFormat
Imports System.Buffers
Imports Microsoft.VisualBasic
Public NotInheritable Class CLSErrorMessage
Public Shared Function GetErrorMesagge(mesage As String, ex As Exception, tipoMensaje As Extensiones.ModExtensiones.TipoMensaje) As Tuple(Of String, Extensiones.ModExtensiones.TipoMensaje)
Dim newmesage As String = mesage
Dim newtipoMensaje As Extensiones.ModExtensiones.TipoMensaje = tipoMensaje
If ex.ToString().ToLower().Contains("chk_rh_personalsalarioimss") Then
newmesage = "El salario base cotización no puede ser menor al salario diario integrado"
newtipoMensaje = Extensiones.ModExtensiones.TipoMensaje.MsgAdvertencia
End If
Return Tuple.Create(newmesage, newtipoMensaje)
End Function
End Class

View File

@@ -62,4 +62,8 @@ Public Class CalendarEvent
Public Property NumeroContrato As String Public Property NumeroContrato As String
Public Property Observaciones As String Public Property Observaciones As String
Public Property CveMoneda As Integer
Public Property Moneda As String
End Class End Class

View File

@@ -684,6 +684,48 @@ Public Class ClsContratos
Return Retorno Return Retorno
End Function End Function
Public Function GetContratosValUnidadesAgendadas(CveAF As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveEmpresa As Integer, CveContrato As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosValUnidadesAgendadasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAF", SqlDbType.Int).Value = CveAF
.Add("@FechaInicial", SqlDbType.DateTime).Value = FechaInicial
.Add("@FechaFinal", SqlDbType.DateTime).Value = FechaFinal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las unidades agendadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateContratoArchivo(CveContrato As Integer, Archivo As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosArchivoUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el archivo adjunto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region #End Region

View File

@@ -642,6 +642,22 @@ Public Class ClsNominas
retorno = RunQuery("Ocurrió un error al obtener el valor de la UMA.") retorno = RunQuery("Ocurrió un error al obtener el valor de la UMA.")
Return retorno Return retorno
End Function End Function
Public Function GetEfectivaleXLS(CvePeriodo As Int32, CveEmpresa As Int32, CvePersonal As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Nom_EfectivaleXLSGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el layout de nóminas(Efetivale).", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
'Public Function GetDispersionnominaXLS(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean 'Public Function GetDispersionnominaXLS(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
' Dim retorno As Boolean = False ' Dim retorno As Boolean = False
' DataAdapter("PA_Nom_DispersionnominaXLS", CommandType.StoredProcedure) ' DataAdapter("PA_Nom_DispersionnominaXLS", CommandType.StoredProcedure)
@@ -657,9 +673,9 @@ Public Class ClsNominas
' End Try ' End Try
' Return retorno ' Return retorno
'End Function 'End Function
Public Function GetDispersionNomina(CvePeriodo As Int32, CveEmpresa As Int32, CveSATBanco As Int32) As Boolean Public Function GetDispersionnomina(CvePeriodo As Int32, CveEmpresa As Int32, CveSATBanco As Int32) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Nom_DispersionNomina", CommandType.StoredProcedure) DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -1456,7 +1472,7 @@ Public Class ClsNominas
Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer) As Integer ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Nom_ConceptosAdd") DataAdapter("PA_Nom_ConceptosAdd")
@@ -1489,6 +1505,7 @@ Public Class ClsNominas
.Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB .Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB .Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo .Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
End With End With
@@ -1515,7 +1532,8 @@ Public Class ClsNominas
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer, AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer) As Boolean ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_ConceptosUpdate") DataAdapter("PA_Nom_ConceptosUpdate")
@@ -1547,6 +1565,7 @@ Public Class ClsNominas
.Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB .Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB .Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo .Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
End With End With
Try Try

View File

@@ -2157,7 +2157,70 @@ Public Class ClsVentas
#End Region #End Region
#Region "V E N T A S - P R E C I O L I S T A S" 'Hecho por Charlie 1/9/2016 #Region "V E N T A S - P R E C I O L I S T A S"
Public Function GetPreciosListaSPPermitidos(CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaSPPermitdosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el catálogo de listas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetPreciosListasSubProyecto(CvePrecioLista As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Catálogo de Listas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdatePreciosListasSubProyecto(CvePrecioLista As Integer, CveSubProyecto As Integer, Permitir As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaSubProyectosUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Permitir", SqlDbType.Bit).Value = Permitir
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el subproyecto del precio de lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetPrecioListas(Optional CveEmpresa As Integer = -1) As Boolean Public Function GetPrecioListas(Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -2177,7 +2240,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1, Optional UpdateFranquicia As Boolean = False) As Integer Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Restringida As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1, Optional UpdateFranquicia As Boolean = False) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Vta_PrecioListaAdd") DataAdapter("PA_Vta_PrecioListaAdd")
@@ -2188,6 +2251,7 @@ Public Class ClsVentas
.Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista .Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada .Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
.Add("@Restringida", SqlDbType.Bit).Value = Restringida
.Add("@CvePrecioListaClonar", SqlDbType.Int).Value = CvePrecioListaClonar .Add("@CvePrecioListaClonar", SqlDbType.Int).Value = CvePrecioListaClonar
.Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia .Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -2210,7 +2274,7 @@ Public Class ClsVentas
End Function End Function
Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double, Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double,
Predeterminada As Boolean, CvePrecioLista As Integer, Optional UpdateFranquicia As Boolean = False) As Boolean Predeterminada As Boolean, Restringida As Boolean, CvePrecioLista As Integer, Optional UpdateFranquicia As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaUpdate") DataAdapter("PA_Vta_PrecioListaUpdate")
@@ -2221,6 +2285,7 @@ Public Class ClsVentas
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada .Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
.Add("@Restringida", SqlDbType.Bit).Value = Restringida
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia .Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia
End With End With

View File

@@ -600,6 +600,9 @@ Namespace Extensiones
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>
Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "", Optional TipoMensaje As TipoMensaje = TipoMensaje.MsgError) Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "", Optional TipoMensaje As TipoMensaje = TipoMensaje.MsgError)
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
Dim resultado = CLSErrorMessage.GetErrorMesagge(Mensaje, Exeption, TipoMensaje)
Mensaje = resultado.Item1
TipoMensaje = resultado.Item2
Alert(Obj, Mensaje, TipoMensaje) Alert(Obj, Mensaje, TipoMensaje)
If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
End Sub End Sub

View File

@@ -107,12 +107,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
If context.Request("U").ToEntero > 0 Then If context.Request("U").ToEntero > 0 Then
CveUsuario = context.Request("U").ToEntero CveUsuario = context.Request("U").ToEntero
CveEmpresa = context.Request("E").ToEntero CveEmpresa = context.Request("E").ToEntero
Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1)
Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1)
FI = context.Request("start").ToDate FI = context.Request("start").ToDate
FF = context.Request("end").ToDate FF = context.Request("end").ToDate
@@ -487,168 +483,208 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim tipoVista As String = context.Request("tipoVista") Dim tipoVista As String = context.Request("tipoVista")
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
DT_SubProyectos.Columns.Add("backgroundColor") DT_SubProyectos.Columns.Add("backgroundColor")
DT_EstatusOS.Columns.Add("", GetType(Integer)) DT_EstatusOS.Columns.Add("", GetType(Integer))
Dim cveContrato As Integer = -1
If context.Request("cveContrato") IsNot Nothing Then
cveContrato = context.Request("cveContrato").ToEntero() Dim cveContrato As Integer = If(context.Request("cveContrato") IsNot Nothing, context.Request("cveContrato").ToEntero, -1)
Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1)
Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1)
Dim CveCliente As Integer = If(context.Request("CveCliente") IsNot Nothing, context.Request("CveCliente").ToEntero, -1)
Dim CveContratoEstatus As Integer = If(context.Request("CveContratoEstatus") IsNot Nothing, context.Request("CveContratoEstatus").ToEntero, -1)
Dim CveTipoActivoFijo As Integer = If(context.Request("CveTipoActivoFijo") IsNot Nothing, context.Request("CveTipoActivoFijo").ToEntero, -1)
Dim CvePersonal As Integer = If(context.Request("CvePersonal") IsNot Nothing, context.Request("CvePersonal").ToEntero, -1)
If Not cveContrato > 0 Then
cveContrato = -1
End If
If Not CveCliente > 0 Then
CveCliente = -1
End If End If
If ObjContratos.GetContratos(cveContrato, usuarioActual_.CveEmpresa, TipoContrato:=34) Then If ObjContratos.GetContratos(cveContrato, usuarioActual_.CveEmpresa, TipoContrato:=34, CveCliente:=CveCliente, CveEstatus:=CveContratoEstatus) Then
If ObjContratos.DtResultados.Rows.Count > 0 Then 'CveTipoAF
'CveChofer, CveChofer2
Try Dim filtro As String = ""
For Each dr As DataRow In ObjContratos.DtResultados.Rows If CveTipoActivoFijo > 0 Then
Dim cevent As CalendarEvent = New CalendarEvent() filtro = $"{filtro} CveTipoAF = {CveTipoActivoFijo}"
End If
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.title = dr("DescripcionContrato").ToString If CvePersonal > 0 Then
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) If filtro.Length > 0 Then
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) filtro = $"{filtro} AND "
cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) End If
cevent.allDay = False filtro = $"{filtro} CveChofer = {CvePersonal} OR CveChofer2 = {CvePersonal} "
cevent.NombreAcercamiento = dr("Ubicacion").ToString End If
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.NombreComercial = dr("NombreComercial").ToString
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero If CveSubProyecto > 0 Then
cevent.CvePersonal2 = dr("CveChofer2").ToString.ToEntero If filtro.Length > 0 Then
cevent.CveEventoEstatus = dr("CveContratosEstatus").ToString.ToEntero filtro = $"{filtro} AND "
cevent.Dolares = dr("Importe").ToString.ToDecimal End If
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal filtro = $"{filtro} CveSubProyecto = {CveSubProyecto} "
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal End If
Dim DTContratos As DataTable = ObjContratos.DtResultados.FiltraParametros(filtro)
If DTContratos.Rows.Count > 0 Then
Try
For Each dr As DataRow In DTContratos.Rows
Dim cevent As CalendarEvent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.title = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
cevent.allDay = False
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.NombreComercial = dr("NombreComercial").ToString
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
cevent.CvePersonal2 = dr("CveChofer2").ToString.ToEntero
cevent.CveEventoEstatus = dr("CveContratosEstatus").ToString.ToEntero
cevent.Dolares = dr("Importe").ToString.ToDecimal
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CveTipoAF = dr("CveTipoAF").ToString.ToEntero cevent.CveTipoAF = dr("CveTipoAF").ToString.ToEntero
cevent.backgroundColor = dr("BackgroundColor").ToString cevent.backgroundColor = dr("BackgroundColor").ToString
cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString
cevent.NumeroContrato = dr("NumeroContrato").ToString cevent.NumeroContrato = dr("NumeroContrato").ToString
cevent.Observaciones = dr("Observaciones").ToString cevent.Observaciones = dr("Observaciones").ToString
cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
If Not cevent.recurrenciatipo > 0 Then cevent.CveMoneda = dr("CveMoneda").ToString.ToEntero
cevent.Moneda = dr("Moneda").ToString
'AGREGAMOS CUANDO NO ES RECURRENTE
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA If Not cevent.recurrenciatipo > 0 Then
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicial").ToString.ToDateTime > tFecha Then
events.Add(cevent) 'AGREGAMOS CUANDO NO ES RECURRENTE
End If Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
Else 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicial").ToString.ToDateTime > tFecha Then
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE events.Add(cevent)
End If
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero Else
Dim FI As DateTime, FF As DateTime, FT As DateTime
Dim DiasSemana As String() = cevent.diassemana.Split(","c) 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
FI = cevent.start.ToDateTime
FF = cevent.end.ToDateTime Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
Dim FI As DateTime, FF As DateTime, FT As DateTime
'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA Dim DiasSemana As String() = cevent.diassemana.Split(","c)
Select Case FinRecurrencia FI = cevent.start.ToDateTime
Case -1 FF = cevent.end.ToDateTime
FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime)
Case Is > 0 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA
FinRecurrencia -= 1 Select Case FinRecurrencia
Select Case cevent.recurrenciatipo Case -1
Case 1 FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime)
FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) Case Is > 0
Case 2 FinRecurrencia -= 1
FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) Select Case cevent.recurrenciatipo
Case 3 Case 1
FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT) Case 2
Case 4 FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) Case 3
Case 5 FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT)
End Select Case 4
End Select FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
Case 5
'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
Do End Select
If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then End Select
For Each drDias As String In DiasSemana
Dim FIT As Date = FI, FFT As Date = FF 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES
Do
FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI) If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF) For Each drDias As String In DiasSemana
Dim FIT As Date = FI, FFT As Date = FF
cevent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
cevent.description = dr("DescripcionContrato").ToString FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent = New CalendarEvent()
cevent.allDay = False cevent.id = dr("CveContrato").ToString.ToEntero
cevent.CveCliente = dr("CveCliente").ToString.ToEntero cevent.description = dr("DescripcionContrato").ToString
cevent.NombreComercial = dr("NombreComercial").ToString cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.NombreAcercamiento = dr("Ubicacion").ToString cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.allDay = False
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.NombreComercial = dr("NombreComercial").ToString
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
'11/05/2018 - Evento Gasto Recurrente '11/05/2018 - Evento Gasto Recurrente
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
If cevent.CveTipoEvento = 10 Then If cevent.CveTipoEvento = 10 Then
cevent.Importe = dr("Importe").ToString.ToDouble cevent.Importe = dr("Importe").ToString.ToDouble
End If End If
If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
cevent.backgroundColor = "#1BBC9B" cevent.backgroundColor = "#1BBC9B"
End If End If
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA
If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then
events.Add(cevent) events.Add(cevent)
End If End If
Next Next
Else Else
cevent = New CalendarEvent() cevent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero cevent.id = dr("CveContrato").ToString.ToEntero
cevent.description = dr("DescripcionContrato").ToString cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.NombreAcercamiento = dr("Ubicacion").ToString cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.allDay = False cevent.allDay = False
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then
events.Add(cevent) events.Add(cevent)
End If End If
End If End If
Select Case cevent.recurrenciatipo Select Case cevent.recurrenciatipo
Case 1 Case 1
FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI) FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF) FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF)
Case 2 Case 2
FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI) FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF) FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF)
Case 3 Case 3
FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI) FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF) FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF)
Case 4 Case 4
FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI) FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF) FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF)
Case 5 Case 5
FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI) FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF) FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF)
End Select End Select
Loop Until FI > FT Loop Until FI > FT
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
GuardaLog(ex.ToString()) GuardaLog(ex.ToString())
End Try End Try
End If End If
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
Return ErrorEventos Return ErrorEventos
End Function End Function

View File

@@ -2852,7 +2852,7 @@ Partial Class Compras_eFacturas
Protected Sub LnkSolicitarSat_Click(ByVal sender As Object, ByVal e As EventArgs) Protected Sub LnkSolicitarSat_Click(ByVal sender As Object, ByVal e As EventArgs)
Exit Sub
Dim sbResultado As StringBuilder = New StringBuilder() Dim sbResultado As StringBuilder = New StringBuilder()
Dim idSolicitudCFDI As Integer = 0 Dim idSolicitudCFDI As Integer = 0

View File

@@ -424,12 +424,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-3 truncate ">Movimiento Permanente:</label> <label class="col-md-3 truncate ">Movimiento Permanente:</label>
<div class="col-md-3"> <div class="col-md-3">
<asp:CheckBox ID="ChkMovtoPermanente" AutoPostBack="true" OnCheckedChanged="ChkMovtoPermanente_CheckedChanged" CssClass="chksino" Text=" " runat="server" /> <asp:CheckBox ID="ChkMovtoPermanente" AutoPostBack="true" OnCheckedChanged="ChkMovtoPermanente_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
</div> </div>
<label class="col-md-3 truncate ">Aplica EfectiVale:</label>
<div class="col-md-3">
<asp:CheckBox ID="chkAplicaEfectivale" AutoPostBack="true" OnCheckedChanged="chkAplicaEfectivale_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -362,7 +362,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
int CveConceptoContablePasivo = DdlConceptoContablePasivo.SelectedValue.ToEntero(); int CveConceptoContablePasivo = DdlConceptoContablePasivo.SelectedValue.ToEntero();
int IdCtaContableB = (DdlCtaContableB.DataValueField == "Id" ? DdlCtaContableB.SelectedValue.ToEntero() : 0); int IdCtaContableB = (DdlCtaContableB.DataValueField == "Id" ? DdlCtaContableB.SelectedValue.ToEntero() : 0);
int CveCuentaB = (DdlCtaContableB.DataValueField == "Id" ? 0 : DdlCtaContableB.SelectedValue.ToEntero()); int CveCuentaB = (DdlCtaContableB.DataValueField == "Id" ? 0 : DdlCtaContableB.SelectedValue.ToEntero());
int AplicaEfectivale = chkAplicaEfectivale.Checked ? 1 : 0;
ClsNominas ObjNomina = new ClsNominas(); ClsNominas ObjNomina = new ClsNominas();
ObjNomina.IniciaTransacSQL(); ObjNomina.IniciaTransacSQL();
@@ -372,7 +372,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
{ {
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion,
CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,
UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , CveCuentaB, CveConceptoContablePasivo); UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale);
if (!TieneError) if (!TieneError)
{ {
@@ -404,7 +404,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
{ {
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir,
CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo); CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale);
@@ -502,6 +502,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
ChkEstado.Checked = drow["Estado"].Equals("Activo"); ChkEstado.Checked = drow["Estado"].Equals("Activo");
ChkSistema.Checked = drow["Sistema"].Equals("Sí"); ChkSistema.Checked = drow["Sistema"].Equals("Sí");
ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkAplicaEfectivale.Checked = drow["AplicaEfectivale"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkCtaImporteNegativoProv.Checked = drow["CtaImporteNegativoProv"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); chkCtaImporteNegativoProv.Checked = drow["CtaImporteNegativoProv"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
@@ -671,4 +672,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
//} //}
} }
protected void chkAplicaEfectivale_CheckedChanged(object sender, EventArgs e)
{
}
} }

View File

@@ -710,8 +710,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 && LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0); dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
} }
} }
} }
if (CvePersonal > 0) if (CvePersonal > 0)
@@ -7198,12 +7198,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
using (ClsNominas ObjMovt = new ClsNominas()) using (ClsNominas ObjMovt = new ClsNominas())
{ {
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente); ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados; GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados;
GVMovtoPermanenteSaldos.DataBind(); GVMovtoPermanenteSaldos.DataBind();
} }
CargaConcepto(); CargaConcepto();
DdlConcepto.SelectedValueExist(cveConcepto); DdlConcepto.SelectedValueExist(cveConcepto);
TxtDescripcion.Text = descripcion.ToString(); TxtDescripcion.Text = descripcion.ToString();
@@ -8797,7 +8797,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
protected void BtnGeneratepdf_Click(object sender, EventArgs e) protected void BtnGeneratepdf_Click(object sender, EventArgs e)
{ {
byte[] pdf = new byte[1]; byte[] pdf = new byte[1];
string nombre = $"recibos {LtlPeriodoseleccionado.Text}"; string nombre = $"recibos {LtlPeriodoseleccionado.Text}";
bool confiniquito = false; bool confiniquito = false;
int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero(); int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero();
if (CvePersonal > 0) if (CvePersonal > 0)
@@ -8806,7 +8806,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{ {
nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}"; nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}";
} }
if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1")) if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1"))
@@ -9894,7 +9894,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e) protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e)
{ {
ConvenioPagoElectronico = string.Empty; ConvenioPagoElectronico = string.Empty;
DivModalLayoutBancosFecha.Visible = false; DivModalLayoutBancosFecha.Visible = false;
@@ -9984,76 +9984,79 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago"));
Response.BinaryWrite(memoryStream.ToArray()); Response.BinaryWrite(memoryStream.ToArray());
Response.End(); Response.End();
}
}
protected void BtnEfectivaleXLS_Click(object sender, EventArgs e)
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Layout");
int row = 1;
int column = 1;
libro.Cell(row, column++).Value = "XSUBTOTAL";
//libro.Cell(row, column++).Value = "";
row = row + 1;
column = 1;
libro.Cell(row, column++).Value = "XCLIENTE";
libro.Cell(row, column++).Value = "XTIPOPEDIDO";
libro.Cell(row, column++).Value = "XNUMERO";
libro.Cell(row, column++).Value = "XIMPORTE";
//libro.Cell(row, column++).Value = "CLABE";
//libro.Cell(row, column++).Value = "Neto";
int maxxolumn = column;
libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
DataRow dcon;
decimal subtotal = 0;
if (dtempleados != null && dtempleados.Rows.Count > 0 && dtConceptos != null && dtConceptos.Rows.Count > 0 && (dcon = dtConceptos.FiltroPrimero("Tipo ='P' AND Codigo = 'P028' ")) != null)
{
foreach (DataRow dRow in dtempleados.FiltraParametros("CvePersonal > 0").Rows)
{
decimal importe = dRow[string.Format("V_{0}", dcon["CveConcepto"])].ToString().ToDecimal();
if (importe > 0)
{
subtotal = subtotal + importe;
row++;
column = 1;
libro.Cell(row, column++).Value = "'103646-1";
libro.Cell(row, column++).Value = "'DISPERSION";
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["Codigo"]);
libro.Cell(row, column++).Value = importe;
}
}
} }
libro.Cell(1, 2).Value = subtotal; }
protected void BtnEfectivaleXLS_Click(object sender, EventArgs e)
libro.Columns().AdjustToContents(); // Adjust columns to fit content {
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear(); ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
Response.Buffer = true;
var libro = wb.AddWorksheet("Layout");
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; int row = 1;
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); int column = 1;
Response.BinaryWrite(memoryStream.ToArray());
Response.End(); libro.Cell(row, column++).Value = "XSUBTOTAL";
//libro.Cell(row, column++).Value = "";
row = row + 1;
} column = 1;
libro.Cell(row, column++).Value = "XCLIENTE";
libro.Cell(row, column++).Value = "XTIPOPEDIDO";
libro.Cell(row, column++).Value = "XNUMERO";
libro.Cell(row, column++).Value = "XIMPORTE";
int maxxolumn = column;
libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
DataRow dcon;
decimal subtotal = 0;
DataTable dt = null;
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetEfectivaleXLS(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, -1);
dt = objnom.DtResultados;
}
if (dt != null && dt.Rows.Count > 0)
{
foreach (DataRow dRow in dt.Rows)
{
decimal importe = dRow["Importe"].ToString().ToDecimal();
subtotal = subtotal + importe;
row++;
column = 1;
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XCLIENTE"]);
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XTIPOPEDIDO"]);
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["CodigoDispersionVale"]);
libro.Cell(row, column++).Value = importe;
}
}
libro.Cell(1, 2).Value = subtotal;
libro.Columns().AdjustToContents(); // Adjust columns to fit content
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago"));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e) protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
{ {
@@ -10076,7 +10079,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1); CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1);
} }
} }
} }
else if (Banco == Bancos.Banamex) else if (Banco == Bancos.Banamex)
{ {
using (ClsNominas objnom = new ClsNominas()) using (ClsNominas objnom = new ClsNominas())
@@ -10126,8 +10129,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
SbErrores.AppendLine($"- {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0 SbErrores.AppendLine($"- {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
ErroresValidaciones = true; ErroresValidaciones = true;
} }
} }
if (!ErroresValidaciones) if (!ErroresValidaciones)
{ {
int Count = 1; int Count = 1;
@@ -10150,14 +10153,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
Nombre = Nombre.Substring(0, 40); Nombre = Nombre.Substring(0, 40);
SbLinea.Append(Nombre.Trim().PadRight(40)); SbLinea.Append(Nombre.Trim().PadRight(40));
if (modalidadnomina == 2) if (modalidadnomina == 2)
{ {
SbLinea.Append("001"); SbLinea.Append("001"); SbLinea.Append("001"); SbLinea.Append("001");
} }
else else
{ {
SbLinea.Append("012"); SbLinea.Append("000"); SbLinea.Append("012"); SbLinea.Append("000");
} }
sb.AppendLine(SbLinea.ToString()); sb.AppendLine(SbLinea.ToString());
Count = Count + 1; Count = Count + 1;
} }
@@ -10168,9 +10171,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.ContentType = "text/plain"; Response.ContentType = "text/plain";
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\""); //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\"");
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_BBVA_{DdlPeriodo.SelectedItem.Text}.txt\""); Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_BBVA_{DdlPeriodo.SelectedItem.Text}.txt\"");
Response.Write(sb.ToString()); Response.Write(sb.ToString());
//RegistraScript("$('#ModalLayoutBancos').modal('hide');"); //RegistraScript("$('#ModalLayoutBancos').modal('hide');");
// Response.Flush(); // Response.Flush();
Response.End(); Response.End();
} }
else else
@@ -10300,8 +10303,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
private void CrearLayoutNominaBanamex(DataTable DTNomina) private void CrearLayoutNominaBanamex(DataTable DTNomina)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -10342,55 +10345,55 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
ErroresValidaciones = false; ErroresValidaciones = false;
//LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR) //LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR)
//DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf //DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf
if (!ErroresValidaciones) if (!ErroresValidaciones)
{ {
DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero(""); DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero("");
var ClaveMoneda = "001"; // PESOS MEXICANOS var ClaveMoneda = "001"; // PESOS MEXICANOS
//REGISTRO DE CONTROL - IMPORTACIÓN //REGISTRO DE CONTROL - IMPORTACIÓN
var TipoRegistro = "1"; var TipoRegistro = "1";
var NumeroCliente = RowCuenta["ConvenioPagoElectronico"].ToString().Trim().PadLeft(12, '0'); //CONVENIO var NumeroCliente = RowCuenta["ConvenioPagoElectronico"].ToString().Trim().PadLeft(12, '0'); //CONVENIO
var Fecha = TxtModalLayoutBancosFecha.Text.ToDate(); var Fecha = TxtModalLayoutBancosFecha.Text.ToDate();
var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}"; var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}";
var Secuencia = (1).ToString("0000"); var Secuencia = (1).ToString("0000");
var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36); var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36);
var Descripcion = ("NOMINA").Trim().PadRight(20); var Descripcion = ("NOMINA").Trim().PadRight(20);
var Naturaleza = "05"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex var Naturaleza = "05"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex
var Instrucciones = ("").Trim().PadRight(40); var Instrucciones = ("").Trim().PadRight(40);
var Version = "C"; var Version = "C";
var Volumen = "0"; var Volumen = "0";
var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura
sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}"); sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}");
//REGISTRO GLOBAL - IMPORTACIÓN //REGISTRO GLOBAL - IMPORTACIÓN
var TipoReg2 = "2"; var TipoReg2 = "2";
var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo
var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales
var TipoCuenta = "01"; //CUENTA DE CHEQUES var TipoCuenta = "01"; //CUENTA DE CHEQUES
var Sucursal = RowCuenta["NumeroSucursal"].ToString(); var Sucursal = RowCuenta["NumeroSucursal"].ToString();
var NumCuenta = RowCuenta["NumCuenta"].ToString().Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS var NumCuenta = RowCuenta["NumCuenta"].ToString().Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS
var Espacio = ("").Trim().PadRight(20); var Espacio = ("").Trim().PadRight(20);
sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}"); sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}");
//REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN //REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN
int Count = 0; int Count = 0;
decimal SumaImportes = 0; decimal SumaImportes = 0;
foreach (DataRow dRow in DTNomina.Rows) foreach (DataRow dRow in DTNomina.Rows)
{ {
var TipoReg3 = "3"; //Registro de Movtos. Individuales var TipoReg3 = "3"; //Registro de Movtos. Individuales
var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros) var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros)
string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
//string BancoNumCuenta = dRow["BancoNumCuenta"].ToString(); //string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
@@ -10400,14 +10403,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", ""); var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", "");
var StrTipoCuenta = "03";// 01- Cheques / CLABE, 03=Plástico var StrTipoCuenta = "03";// 01- Cheques / CLABE, 03=Plástico
var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO
var ReferenciaAlfa = (dRow["Codigo"].ToString()).PadRight(10); //si banamex debe ser de 10 digitos, y agregar 30 espacios var ReferenciaAlfa = (dRow["Codigo"].ToString()).PadRight(10); //si banamex debe ser de 10 digitos, y agregar 30 espacios
var EspacioRefBen = ("").PadRight(30); var EspacioRefBen = ("").PadRight(30);
var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55); var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55);
var Inst3 = ("PAGO").PadRight(40); var Inst3 = ("PAGO").PadRight(40);
var DescTEF = ("").PadRight(24); var DescTEF = ("").PadRight(24);
var ClaveBanco = ("0000").PadRight(4); //No se ocupa si es nomina banamex var ClaveBanco = ("0000").PadRight(4); //No se ocupa si es nomina banamex
var ReferenciaNum = ("").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio , SOLO PARA INTERBANCARIOS var ReferenciaNum = ("").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio , SOLO PARA INTERBANCARIOS
var Plazo = ""; // 00 - MISMO DIA , 24 HRS var Plazo = ""; // 00 - MISMO DIA , 24 HRS
sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{EspacioRefBen}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00"); sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{EspacioRefBen}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00");
Count += 1; Count += 1;
@@ -10415,13 +10418,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
//REGISTRO DE TOTALES - IMPORTACIÓN //REGISTRO DE TOTALES - IMPORTACIÓN
var TipoReg4 = "4"; var TipoReg4 = "4";
// LOS ABONOS A LOS EMPLEADOS // LOS ABONOS A LOS EMPLEADOS
var NumAbonos = Count.ToString("000000"); var NumAbonos = Count.ToString("000000");
//EL CARGO QUE SE LE HIZO A LA CUENTA DE LA EMPRESA //EL CARGO QUE SE LE HIZO A LA CUENTA DE LA EMPRESA
var NumCargos = (1).ToString("000000"); var NumCargos = (1).ToString("000000");
var StrImportes = SumaImportes.ToString("0000000000000000.00").Replace(".", ""); var StrImportes = SumaImportes.ToString("0000000000000000.00").Replace(".", "");
sb.Append($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}"); sb.Append($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}");
Response.Clear(); Response.Clear();

View File

@@ -117,8 +117,7 @@
<div class="portlet-body rowpadding"> <div class="portlet-body rowpadding">
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4 bold text-primary">Folio</label> <label class="col-md-4 bold text-primary">Folio</label>
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text=""></asp:Label> <asp:Label class="col-md-8" runat="server" ID="LbFolio" Text=""></asp:Label>
<asp:Label runat="server" ID="LbCveSubProyecto" Visible="false"></asp:Label>
</div> </div>
<div class="row my-1"> <div class="row my-1">
@@ -136,6 +135,21 @@
</div> </div>
</div> </div>
<div class="row my-1">
<label class="col-md-4">
<asp:Label runat="server" ID="LblSubProyectoModal"></asp:Label>
</label>
<div class="col-md-8">
<asp:DropDownList runat="server" ID="DdlSubProyecto" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." Display="None"
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="input-group">
</div>
</div>
<div class="row"> <div class="row">
<label class="col-md-4">Servicio</label> <label class="col-md-4">Servicio</label>
<div class="col-md-8"> <div class="col-md-8">

View File

@@ -125,6 +125,15 @@ Partial Class RepContratoDetalle
'Lista de Monedas 'Lista de Monedas
DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind() DdlMoneda.DataBind()
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoModal)
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
'Información General 'Información General
@@ -139,7 +148,7 @@ Partial Class RepContratoDetalle
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
LbCveSubProyecto.Text = Contrato.Rows(0)("CveSubProyecto").ToString
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
DdlMoneda.SelectedValue = Contrato.Rows(0)("CveMoneda").ToString DdlMoneda.SelectedValue = Contrato.Rows(0)("CveMoneda").ToString
@@ -147,13 +156,14 @@ Partial Class RepContratoDetalle
TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString
TelefonoEmpresa = Contrato.Rows(0)("Telefono").ToString TelefonoEmpresa = Contrato.Rows(0)("Telefono").ToString
TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString) DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString)
TxtImporte.Text = Math.Round(Importe, 2).ToString TxtImporte.Text = Math.Round(Importe, 2).ToString
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
DdlSubProyecto.SelectedValueExist(Contrato.Rows(0)("CveSubProyecto").ToString)
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo) ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
@@ -277,7 +287,7 @@ Partial Class RepContratoDetalle
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
Try Try
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
Alert("Contrato actualizado correctamente") Alert("Contrato actualizado correctamente")
End If End If

View File

@@ -262,7 +262,8 @@
<label class="col-md-4">Cliente</label> <label class="col-md-4">Cliente</label>
<div class="col-md-8"> <div class="col-md-8">
<div class="input-group"> <div class="input-group">
<ADS:Dropdownlost ID="DdlClientes" CssClass="form-control" data-metodo="getcliente"
<ADS:Dropdownlost ID="DdlClientes" CssClass="form-control" data-metodo="getcliente" Width="100%" CssStyle="width: 100%;"
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
UsaWebService="true" Enabled="false"></ADS:Dropdownlost> UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
<div class="input-group-addon" style="background-color: #428bca"> <div class="input-group-addon" style="background-color: #428bca">
@@ -273,6 +274,28 @@
</div> </div>
</div> </div>
<div class="row my-1">
<label class="col-md-4">
<asp:Label runat="server" ID="LblSubProyectoModal"></asp:Label>
</label>
<div class="col-md-8">
<div class="input-group">
<asp:DropDownList runat="server" ID="DdlSubProyectoModal" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" CssClass="select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyectoModal" runat="server" ControlToValidate="DdlSubProyectoModal" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyectoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyectoModal" Width="300px"></ajax:ValidatorCalloutExtender>
<%-- <div class="input-group-addon" style="background-color: #428bca">
<asp:LinkButton runat="server" ForeColor="White" Text="<i class='fa fa-add'></i>"
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
</div>--%>
</div>
</div>
</div>
<div class="row"> <div class="row">
<label class="col-md-4">Servicio</label> <label class="col-md-4">Servicio</label>
<div class="col-md-8"> <div class="col-md-8">
@@ -323,18 +346,16 @@
<label class="col-md-4">Fecha Salida</label> <label class="col-md-4">Fecha Salida</label>
<div class="col-md-8"> <div class="col-md-8">
<div class="input-group"> <div class="input-group">
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True" <asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local"
Width="100%" Width="100%"
type="datetime"></asp:TextBox> ></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida" <asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo." Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco" <ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaSalida" Width="100%"> TargetControlID="RFVTxtFechaSalida" Width="100%">
</ajax:ValidatorCalloutExtender> </ajax:ValidatorCalloutExtender>
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -344,18 +365,16 @@
<div class="col-md-8"> <div class="col-md-8">
<div class="input-group"> <div class="input-group">
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True" <asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local"
Width="100%" Width="100%"
type="datetime"></asp:TextBox> ></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso" <asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo." Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaRegreso" Width="100%"> TargetControlID="RFVTxtFechaRegreso" Width="100%">
</ajax:ValidatorCalloutExtender> </ajax:ValidatorCalloutExtender>
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -468,10 +487,10 @@
Text="Agregar" Text="Agregar"
ValidationGroup="GrpGuardar"></asp:Button> ValidationGroup="GrpGuardar"></asp:Button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
<button type="button" class="btn btn-secondary" runat="server" clientidmode="Static" <%-- <button type="button" class="btn btn-secondary" runat="server" clientidmode="Static"
id="BtnArchivo" data-toggle="modal" data-target="#ModalUpload" visible="true"> id="BtnArchivo" data-toggle="modal" data-target="#ModalUpload" visible="true">
<i class="fa fa-upload" <i class="fa fa-upload"
aria-hidden="true"></i>Subir Archivo</button> aria-hidden="true"></i>Subir Archivo</button>--%>
</div> </div>
</div> </div>
</asp:Panel> </asp:Panel>

View File

@@ -51,6 +51,11 @@ Partial Class ListadoContratos
DdlEstatus.DataBind() DdlEstatus.DataBind()
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1")) DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoModal)
DdlSubProyectoModal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyectoModal.DataBind()
DdlSubProyectoModal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
@@ -91,27 +96,102 @@ Partial Class ListadoContratos
End Sub End Sub
Protected Sub AddContrato(sender As Object, e As EventArgs) Protected Sub AddContrato(sender As Object, e As EventArgs)
Dim ErrorProceso As Boolean = False
Dim CveContrato As Integer = -1
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
Dim Filename As String = ""
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
If Not Directory.Exists(folderContratosPath) Then
Directory.CreateDirectory(folderContratosPath)
End If
If DdlClientes.SelectedValue = "" Then If DdlClientes.SelectedValue = "" Then
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero 'Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
'Agregamos Contrato 'Agregamos Contrato
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "", CveSubProyecto, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then
ObjContratos.Commit() CveContrato = ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "",
Alert("Agregado Correctamente.") DdlSubProyectoModal.SelectedValue.ToEntero, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text,
CveVendedor:=UsuarioActual.CveVendedor)
If CveContrato > 0 Then
If Filesgral.Count > 0 Then
For Each fileItem As Archivo In Filesgral
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 fDestino = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}")
Try
If File.Exists(fDestino) Then
File.Delete(fDestino)
End If
File.Move(fileItem.FileUrl, fDestino)
If Not File.Exists(fDestino) Then
ErrorProceso = True
End If
If ObjContratos.UpdateContratoArchivo(CveContrato, $"{CveContrato.ToString}.{ FileExtension}", UsuarioActual.CveEmpresa) Then
ErrorProceso = False
End If
Catch ex As Exception
ErrorProceso = True
End Try
Exit For
Next
Else
ErrorProceso = False
End If
Anexo.Text = ""
Else
ErrorProceso = True
End If End If
ObjContratos.Dispose()
'Aumentamos Folio 'Aumentamos Folio
Dim ObjFolios As New ClsGralFolios Dim ObjFolios As New ClsGralFolios(ObjContratos.IniciaTransacSQL())
If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then If Not ObjFolios.UpdateFolioActual(DdlSubProyectoModal.SelectedValue.ToEntero, "Con", True, UsuarioActual.CveEmpresa) Then
ObjFolios.Dispose() ErrorProceso = True
End If End If
If Not ErrorProceso Then
ObjContratos.Commit()
Alert("Agregado Correctamente.")
Else
ObjContratos.RollBack()
Alert("Se presento un error al guardar el contrato.", TipoMensaje.MsgAdvertencia)
End If
ObjContratos.Dispose()
ResetModal()
CargaDatos()
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
End Sub
Protected Sub ResetModal()
'Reiniciamos modal 'Reiniciamos modal
TxtDescripcion.Text = "" TxtDescripcion.Text = ""
TxtFechaSalida.Text = "" TxtFechaSalida.Text = ""
@@ -119,6 +199,7 @@ Partial Class ListadoContratos
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
TxtUbicacion.Text = "" TxtUbicacion.Text = ""
DdlClientes.SelectedText = "" DdlClientes.SelectedText = ""
DdlSubProyectoModal.SelectedValueExist(-1)
DdlTipoAF.SelectedValueExist(-1) DdlTipoAF.SelectedValueExist(-1)
TxtImporte.Text = "" TxtImporte.Text = ""
TxtAnticipo.Text = "" TxtAnticipo.Text = ""
@@ -126,8 +207,6 @@ Partial Class ListadoContratos
LbArchivo.Text = "" LbArchivo.Text = ""
UpModal.Update() UpModal.Update()
CargaDatos()
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
End Sub End Sub
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)

View File

@@ -46,7 +46,7 @@
<%-- Filtros --%> <%-- Filtros --%>
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter" id="dvFiltros">
<%-- Filtro Visible - Consulta --%> <%-- Filtro Visible - Consulta --%>
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
@@ -103,7 +103,7 @@
<%-- Estatus --%> <%-- Estatus --%>
<label class="col-md-1 ">Estatus:</label> <label class="col-md-1 ">Estatus:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlEstatusConsulta" data-text="Todos" AppendDataBoundItems="true" <asp:DropDownList ID="DdlEstatusConsulta" data-text="Todos" AppendDataBoundItems="true" ClientIDMode="Static"
DataTextField="ContratoEstatus" DataTextField="ContratoEstatus"
DataValueField="CveContratoEstatus" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataValueField="CveContratoEstatus" CssClass="form-control ddlFiltros input-sm select2me Widthall"
Style="width: 100%;" runat="server"> Style="width: 100%;" runat="server">
@@ -118,7 +118,7 @@
<label class="col-md-1 truncate ">Centro de Costos</label> <label class="col-md-1 truncate ">Centro de Costos</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlSubProyectos" data-text="Todos" AppendDataBoundItems="true" <asp:DropDownList ID="DdlSubProyectos" data-text="Todos" AppendDataBoundItems="true"
DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
Style="width: 100%;" runat="server"> Style="width: 100%;" runat="server">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -126,7 +126,7 @@
<label class="col-md-1 ">Tipo de Unidad</label> <label class="col-md-1 ">Tipo de Unidad</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true" <asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true"
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
Style="width: 100%;" runat="server"> Style="width: 100%;" runat="server">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -134,7 +134,7 @@
<label class="col-md-1 ">Chofer:</label> <label class="col-md-1 ">Chofer:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlChoferFiltro" data-text="Todos" AppendDataBoundItems="true" <asp:DropDownList ID="DdlChoferFiltro" data-text="Todos" AppendDataBoundItems="true"
DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
Style="width: 100%;" runat="server"> Style="width: 100%;" runat="server">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -148,7 +148,7 @@
<div class="col-md-12"> <div class="col-md-12">
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0"> <ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
<%--Calendario Tab--%> <%--Calendario Tab--%>
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario"> <ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario" OnClientClick="TabAltaClicked" >
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria"> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
@@ -208,7 +208,7 @@
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado" <asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
GridLines="None" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros,CveMoneda"> data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros,CveMoneda,Moneda,CveSubProyecto">
<Columns> <Columns>
<asp:TemplateField HeaderText="Contrato"> <asp:TemplateField HeaderText="Contrato">
<ItemTemplate> <ItemTemplate>
@@ -358,6 +358,17 @@
</div> </div>
</div> </div>
<div class="row my-1">
<label class="col-md-4">
<asp:Label runat="server" ID="LblSubProyectoModal"></asp:Label>
</label>
<div class="col-md-8">
<asp:DropDownList runat="server" ID="DdlSubProyectoModal" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" CssClass="select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyectoModal" runat="server" ControlToValidate="DdlSubProyectoModal" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyectoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyectoModal" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row"> <div class="row">
<label class="col-md-4">Servicio:</label> <label class="col-md-4">Servicio:</label>
<div class="col-md-8"> <div class="col-md-8">
@@ -401,7 +412,7 @@
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4">Moneda:</label> <label class="col-md-4">Moneda:</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtMoneda" runat="server" ReadOnly="true" Width="100%"></asp:TextBox> <asp:TextBox ID="TxtMoneda" runat="server" Width="100%" Enabled="false"></asp:TextBox>
</div> </div>
</div> </div>
@@ -601,12 +612,22 @@
yAxis.data.setAll(categorias); yAxis.data.setAll(categorias);
// Obtener valores de las cajas de texto
var fechaI = document.getElementById('<%= txtFechaI.ClientID %>').value;
var fechaF = document.getElementById('<%= txtFechaF.ClientID %>').value;
// Convertir valores a objetos Date
var minDate = new Date(fechaI.split("/").reverse().join("-"));
var maxDate = new Date(fechaF.split("/").reverse().join("-"));
dateAxis = am5xy.DateAxis.new(root, { dateAxis = am5xy.DateAxis.new(root, {
baseInterval: { timeUnit: "minute", count: 1 }, baseInterval: { timeUnit: "day", count: 1 },
renderer: am5xy.AxisRendererX.new(root, { renderer: am5xy.AxisRendererX.new(root, {
minorGridEnabled: true, minorGridEnabled: true,
minGridDistance: 90 minGridDistance: 90
}) }),
min: minDate.getTime(),
max: maxDate.getTime()
//min: new Date(2024, 6, 15).getTime(), //min: new Date(2024, 6, 15).getTime(),
//max: new Date(2024, 6, 31).getTime() //max: new Date(2024, 6, 31).getTime()
}); });
@@ -752,10 +773,17 @@
$('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus); $('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus);
$('#<%=TxtDolares.ClientID%>').val(event.Dolares); $('#<%=TxtDolares.ClientID%>').val(event.Dolares);
$('#<%=TxtPesos.ClientID%>').val(event.Pesos); $('#<%=TxtPesos.ClientID%>').val(event.Pesos);
$('#<%=TxtMoneda.ClientID%>').val(event.Moneda);
//document.getElementById('<%= TxtMoneda.ClientID %>').value = event.Moneda;
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo); $('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
$('#<%=HdnCveContrato.ClientID%>').val(event.id); $('#<%=HdnCveContrato.ClientID%>').val(event.id);
$('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF); $('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF);
$('#<%=DdlSubProyectoModal.ClientID%>').val(event.CveSubProyecto);
// alert(event.Moneda);
if (event.NombreComercial !== null) { if (event.NombreComercial !== null) {
@@ -769,29 +797,46 @@
} }
function formatearFechaISO(fechaISO) {
let fecha = new Date(fechaISO);
function formatearFechaISO(fechaISO) { // Formatear la fecha en DD/MM/YYYY
let fecha = new Date(fechaISO); let dia = fecha.getDate().toString().padStart(2, '0');
let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
let año = fecha.getFullYear();
// Formatear la hora en formato 24 horas
let horas = fecha.getHours().toString().padStart(2, '0');
let minutos = fecha.getMinutes().toString().padStart(2, '0');
let segundos = fecha.getSeconds().toString().padStart(2, '0');
// Combinar la fecha y la hora
return `${dia}/${mes}/${año} ${horas}:${minutos}:${segundos}`;
}
//function formatearFechaISO(fechaISO) {
// let fecha = new Date(fechaISO);
// Formatear la fecha en DD/MM/YYYY // // Formatear la fecha en DD/MM/YYYY
let dia = fecha.getDate().toString().padStart(2, '0'); // let dia = fecha.getDate().toString().padStart(2, '0');
let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11 // let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
let año = fecha.getFullYear(); // let año = fecha.getFullYear();
// Formatear la hora en formato 12 horas con AM/PM // // Formatear la hora en formato 12 horas con AM/PM
let horas = fecha.getHours(); // let horas = fecha.getHours();
let minutos = fecha.getMinutes().toString().padStart(2, '0'); // let minutos = fecha.getMinutes().toString().padStart(2, '0');
let periodo = 'a. m.'; // let periodo = 'a. m.';
if (horas >= 12) { // if (horas >= 12) {
periodo = 'p. m.'; // periodo = 'p. m.';
horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas // horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas
} // }
if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m. // if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m.
horas = horas.toString().padStart(2, '0'); // horas = horas.toString().padStart(2, '0');
// Combinar la fecha y la hora // // Combinar la fecha y la hora
return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`; // return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`;
} //}
function RadionButtonSelectedValueSet(name, SelectdValue) { function RadionButtonSelectedValueSet(name, SelectdValue) {
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true); $('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
@@ -905,7 +950,11 @@
tipoVista: '<%= RBTipoVista.Text %>', tipoVista: '<%= RBTipoVista.Text %>',
METODO: 'contrato_transportes', METODO: 'contrato_transportes',
CveUsuarioPara: $('#DdlTecnico').val(), CveUsuarioPara: $('#DdlTecnico').val(),
CveSubProyecto: $('#DdlSubProyecto').val() CveSubProyecto: $('#DdlSubProyecto').val(),
CveCliente: $('#C_DdlCliente_Value').val(),
CveContratoEstatus: $('#DdlEstatusConsulta').val(),
CveTipoActivoFijo: $('#DdlTipoUnidad').val(),
CvePersonal: $('#DdlChoferFiltro').val()
} }
}, },
eventDrop: eventDropped, eventDrop: eventDropped,
@@ -944,6 +993,16 @@
} }
function TabAltaClicked(sender, e) {
setTimeout(function () {
InitCalendar();
}, 10);
}
</script> </script>

View File

@@ -75,6 +75,8 @@ Partial Class RepContratosCalendario
GvContratos.DataBind() GvContratos.DataBind()
UpTitulos.Update() UpTitulos.Update()
RegistraScript("InitCalendar();")
End Sub End Sub
Public Shared Function GetLastDayOfMonth(ByVal dateTime As DateTime) As DateTime Public Shared Function GetLastDayOfMonth(ByVal dateTime As DateTime) As DateTime
@@ -157,7 +159,7 @@ Partial Class RepContratosCalendario
DdlTipoUnidad.DataBind() DdlTipoUnidad.DataBind()
'Lista de Activos fijos 'Lista de Activos fijos
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros(" EstadoActivoFijo= 'Activo' ")
DdlAF.DataBind() DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", "-1")) DdlAF.Items.Insert(0, New ListItem("-", "-1"))
@@ -187,7 +189,13 @@ Partial Class RepContratosCalendario
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyectos.DataBind() DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoModal)
DdlSubProyectoModal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyectoModal.DataBind()
DdlSubProyectoModal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
'CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto) 'CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
UpModal.Update() UpModal.Update()
@@ -196,7 +204,8 @@ Partial Class RepContratosCalendario
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString() Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor) e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor)
e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaInicial").ToDate.Ticks.ToString)
End If End If
End Sub End Sub
Protected Sub MostrarModal(sender As Object, e As System.EventArgs) Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
@@ -219,15 +228,40 @@ Partial Class RepContratosCalendario
Protected Sub UpdateContrato(sender As Object, e As EventArgs) Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim) Then Dim DTAgendadados As New DataTable
RegistraScript("$('#ModalActualizar').modal('hide');") If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
DTAgendadados = ObjContratos.DtResultados.Copy
If DTAgendadados.Rows.Count > 0 Then
Dim sb As New StringBuilder
sb.Append($"Se detectaron Contratos con la unidad {DdlAF.SelectedItem.Text} asignada en las fechas especificadas.</br></br>")
For Each dr As DataRow In DTAgendadados.Rows
sb.AppendLine($"Contrato: <b>{dr("NumeroContrato").ToString }</b>, Salida: {dr("FechaInicial").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")}, Regreso: {dr("FechaFinal").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")} </br>")
Next
Alert(sb.ToString, TipoMensaje.MsgAdvertencia)
DTAgendadados.Dispose()
ObjContratos.Dispose()
Exit Sub
End If
End If
If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", DdlSubProyectoModal.SelectedValue.ToEntero,
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim) Then
RegistraScript("$('#ModalActualizar').modal('hide');")
Alert("Actualizado Correctamente.") Alert("Actualizado Correctamente.")
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
UpTitulos.Update()
CargaDatos() UpTitulos.Update()
InicializaCalendar() CargaDatos()
InicializaCalendar()
End Sub End Sub
Protected Sub UpdateModal(sender As Object, e As EventArgs) Protected Sub UpdateModal(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -238,14 +272,15 @@ Partial Class RepContratosCalendario
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato") TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
TxtObservaciones.Text = GvRow.DataKey("Observaciones") TxtObservaciones.Text = GvRow.DataKey("Observaciones")
TxtUbicacion.Text = GvRow.DataKey("Ubicacion") TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm tt") TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt") TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ")
TxtMoneda.Text = GvRow.DataKey("CveMoneda") TxtMoneda.Text = GvRow.DataKey("Moneda")
'Requeridos 'Requeridos
DdlAF.SelectedValue = GvRow.DataKey("CveAF") DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer")) DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2")) DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
DdlEstatusContrato.SelectedValue = GvRow.DataKey("CveContratosEstatus") DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus"))
DdlSubProyectoModal.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
CveContrato = GvRow.DataKey("CveContrato").ToEntero CveContrato = GvRow.DataKey("CveContrato").ToEntero
UpCommando.Update() UpCommando.Update()
UpModal.Update() UpModal.Update()
@@ -283,6 +318,8 @@ Partial Class RepContratosCalendario
Protected Sub RBTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub RBTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
InicializaCalendar() InicializaCalendar()
CargaCronograma() CargaCronograma()
End Sub End Sub
Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)

View File

@@ -1,108 +1,125 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPreciosLista.aspx.vb" Inherits="Ventas_CatPreciosLista" %> <%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPreciosLista.aspx.vb" Inherits="Ventas_CatPreciosLista" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Catálogo de Precios de Lista Catálogo de Precios de Lista
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>
<asp:UpdatePanel runat="server" UpdateMode="conditional"> <asp:UpdatePanel runat="server" UpdateMode="conditional">
<ContentTemplate> <ContentTemplate>
<asp:LinkButton runat="server" id="BtnOpenDiv"><i class="fa fa-plus"></i>Agregar Precio de Lista</asp:LinkButton> <asp:LinkButton runat="server" ID="BtnOpenDiv"><i class="fa fa-plus"></i>Agregar Precio de Lista</asp:LinkButton>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</li> </li>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="row" style="margin-left:0px;margin-top:5px;margin-bottom:5px;text-align: right;margin-right: 5px;" align="left"> <div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CvePrecioLista, PrecioLista, Estatus,Predeterminada" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros"> <asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CvePrecioLista, PrecioLista, Estatus,Predeterminada,Restringuida" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
<Columns> <Columns>
<asp:BoundField DataField="PrecioLista" ItemStyle-Width="50%" HeaderText="Precio de lista" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="PrecioLista" ItemStyle-Width="50%" HeaderText="Precio de lista" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label> <asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblCred" runat="server" Text='<%#If(Eval("Credito").ToString = "True", "Si", "") %>'></asp:Label> <asp:Label ID="LblCred" runat="server" Text='<%#If(Eval("Credito").ToString = "True", "Si", "") %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" /> <asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label> <asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="imgE_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="imgE_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="5%" HeaderText="Eliminar" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-Width="5%" HeaderText="Eliminar" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgD" ItemStyle-Width="5%" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" /> <asp:LinkButton ID="imgD" ItemStyle-Width="5%" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="divAgregar" class="modal ADS fade" role="dialog"> <div id="divAgregar" class="modal ADS fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<asp:UpdatePanel ID="UpAgregar" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAgregar" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="myModalLabel">Guardar Precio de Lista</h4> <h4 class="modal-title" id="myModalLabel">Guardar Precio de Lista</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpBodyCo" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpBodyCo" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecioLista" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtPrecioLista" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombrePlantilla" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPrecioLista" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio de Lista''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNombrePlantilla" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPrecioLista" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio de Lista''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio de Lista:</label> <label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio de Lista:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox> <asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox>
</div> </div>
<div id="dvEstatus" runat="server" class="form-group form-md-line-input input-iconright"> <div id="dvEstatus" runat="server" class="form-group form-md-line-input input-iconright">
<label>Activo: </label> <label>Activo: </label>
<asp:Checkbox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"> <asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
</asp:Checkbox> </div>
</div> <div id="divPermiso" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
</ContentTemplate> <label>Restringida a permiso: </label>
</asp:UpdatePanel> <asp:CheckBox ID="ChkRestringida" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
<div class="modal-footer"> </div>
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional"> <div class="row" id="divSP" runat="server" visible="false" >
<ContentTemplate> <div class="col-md-12">
<asp:LinkButton ID="BtnAgregarCatalogo" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"></asp:LinkButton> <asp:GridView ID="GvSubProyectos" runat="server" GridLines="None" DataKeyNames="CveSubProyecto,SubProyecto,Permitir" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
<button id="btnCancelar" data-dismiss="modal" class="btn btn-default" >Cancelar</button> <Columns>
</ContentTemplate> <asp:BoundField DataField="SubProyecto" ItemStyle-Width="80%" HeaderText="Sucursal" ItemStyle-HorizontalAlign="Left" />
</asp:UpdatePanel> <asp:TemplateField HeaderText="Permitir" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
</div> <ItemTemplate>
</div> <asp:CheckBox ID="ChkPermitir" runat="server" Checked='<%# Eval("Permitir") %>' />
</ContentTemplate> </ItemTemplate>
</asp:UpdatePanel> </asp:TemplateField>
</div> </Columns>
</div> </asp:GridView>
</asp:Content> </div>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> </div>
</asp:Content> </ContentTemplate>
</asp:UpdatePanel>
<div class="modal-footer">
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="BtnAgregarCatalogo" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"></asp:LinkButton>
<button id="btnCancelar" data-dismiss="modal" class="btn btn-default">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -31,6 +31,10 @@ Partial Class Ventas_CatPreciosLista
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CvePrecioLista = -1 CvePrecioLista = -1
EsEditar = 0 EsEditar = 0
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
divPermiso.Visible = True
divSP.Visible = True
End If
dvEstatus.Visible = False dvEstatus.Visible = False
CargaDatos() CargaDatos()
End If End If
@@ -56,9 +60,19 @@ Partial Class Ventas_CatPreciosLista
TxtPrecioLista.Text = GvRow.DataKey("PrecioLista").ToString TxtPrecioLista.Text = GvRow.DataKey("PrecioLista").ToString
ChkPredeterminada.Checked = GvRow.DataKey("Predeterminada") = "True" ChkPredeterminada.Checked = GvRow.DataKey("Predeterminada") = "True"
chkEstatus.Checked = CBool(GvRow.DataKey("Estatus")) chkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
ChkRestringida.Checked = CBool(GvRow.DataKey("Restringuida"))
EsEditar = 1 EsEditar = 1
BtnAgregarCatalogo.Text = "Actualizar" BtnAgregarCatalogo.Text = "Actualizar"
dvEstatus.Visible = True dvEstatus.Visible = True
Using ObjVenta As New ClsVentas
If ObjVenta.GetPreciosListasSubProyecto(CvePrecioLista, UsuarioActual.CveEmpresa) Then
GvSubProyectos.DataSource = ObjVenta.DtResultados.Copy()
End If
End Using
GvSubProyectos.DataBind()
UpBodyCo.Update() UpBodyCo.Update()
UpFooter.Update() UpFooter.Update()
RegistraScript("$('#divAgregar').modal()") RegistraScript("$('#divAgregar').modal()")
@@ -76,19 +90,46 @@ Partial Class Ventas_CatPreciosLista
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Try Try
If EsEditar = 0 Then If EsEditar = 0 Then
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, 0, UpdateFranquicia:=ActualizarFranquicias) > 0 Then Dim CvePrecioLista As Integer = ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, ChkRestringida.Checked, 0, UpdateFranquicia:=ActualizarFranquicias)
Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion) If Not CvePrecioLista > 0 Then
Else
Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError)
TieneError = True TieneError = True
End If End If
If Not TieneError Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
For Each GvRow As GridViewRow In GvSubProyectos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
Dim Permitir As Boolean = GvRow.FCCheckBox("ChkPermitir").Checked
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero()
If Not ObjVta.UpdatePreciosListasSubProyecto(CvePrecioLista, CveSubProyecto, Permitir, UsuarioActual.CveEmpresa) Then
TieneError = False
Exit For
End If
End If
Next
End If
End If
ElseIf EsEditar = 1 Then ElseIf EsEditar = 1 Then
If ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, CvePrecioLista, UpdateFranquicia:=ActualizarFranquicias) Then If Not ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, ChkRestringida.Checked, CvePrecioLista, UpdateFranquicia:=ActualizarFranquicias) Then
Alert("El Precio de Lista se editó correctamente", TipoMensaje.MsgInformacion)
Else
Alert("Ocurrió un error al editar al Precio de Lista", TipoMensaje.MsgError)
TieneError = True TieneError = True
End If End If
If Not TieneError Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
For Each GvRow As GridViewRow In GvSubProyectos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
Dim Permitir As Boolean = GvRow.FCCheckBox("ChkPermitir").Checked
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero()
If Not ObjVta.UpdatePreciosListasSubProyecto(Me.CvePrecioLista, CveSubProyecto, Permitir, UsuarioActual.CveEmpresa) Then
TieneError = False
Exit For
End If
End If
Next
End If
End If
EsEditar = 0 EsEditar = 0
dvEstatus.Visible = False dvEstatus.Visible = False
BtnAgregarCatalogo.Text = "Agregar" BtnAgregarCatalogo.Text = "Agregar"
@@ -100,8 +141,10 @@ Partial Class Ventas_CatPreciosLista
If TieneError Then If TieneError Then
ObjVta.RollBack() ObjVta.RollBack()
Alert("Ocurrió un error al guardar el precio de lista", TipoMensaje.MsgError)
Else Else
ObjVta.Commit() ObjVta.Commit()
Alert("El precio de lista se guardo correctamente", TipoMensaje.MsgInformacion)
End If End If
RegistraScript("$('#divAgregar').modal('hide')") RegistraScript("$('#divAgregar').modal('hide')")

View File

@@ -10619,7 +10619,7 @@ Partial Class Clientes
End If End If
Dim ObjVentas As New ClsVentas(transaccionSQL) Dim ObjVentas As New ClsVentas(transaccionSQL)
Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, 0, CvePrecioListaClonar:=CvePrecioListaClonar) Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, False, 0, CvePrecioListaClonar:=CvePrecioListaClonar)
If Not CvePrecioListaNuevo > 0 Then If Not CvePrecioListaNuevo > 0 Then
respuesta = False respuesta = False

View File

@@ -3731,6 +3731,20 @@ Partial Class Ventas
UpPS.Update() UpPS.Update()
End Sub End Sub
Private Sub CargaListasPreciosSubProyectos()
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
' DivPrecioLista.Visible = True
' Using ObjVta As New ClsVentas
' If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
' Dim Dt = ObjVta.DtResultados.Copy()
' DdlPrecioLista.DataSource = Dt
' DdlPrecioLista.SelectedValue = Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'")
' End If
' End Using
' UpPS.Update()
'End If
End Sub
Private Sub BloqueaClasificaciones() Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
DdlClasificacion.Enabled = False DdlClasificacion.Enabled = False
@@ -5284,8 +5298,12 @@ Partial Class Ventas
Trsaldo.Visible = True Trsaldo.Visible = True
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta")) HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta")) HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
TrMotivoDev.Visible = True
lblMotivoDev.Text = DbRowVenta("MotivoDevolucion").ToString() If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
TrMotivoDev.Visible = True
lblMotivoDev.Text = DbRowVenta("MotivoDevolucion").ToString()
End If
Case "Ped" Case "Ped"
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped")) DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped"))
CvePedido = CveVenta CvePedido = CveVenta
@@ -12279,7 +12297,13 @@ Partial Class Ventas
ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
ObjFactura.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim ObjFactura.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
ObjFactura.Det_ContraRecibo = TxtDet_ContraRecibo.Text.Trim ObjFactura.Det_ContraRecibo = TxtDet_ContraRecibo.Text.Trim
ObjFactura.MonedaAbreviatura = DdlMoneda.SelectedItem.Text ObjFactura.MonedaAbreviatura = ""
Try
ObjFactura.MonedaAbreviatura = GlobalDTMonedas().FiltroPrimeroValor("Moneda", $"CveMoneda = {DdlMoneda.SelectedValue.ToEntero}")
Catch ex As Exception
End Try
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
@@ -18540,6 +18564,8 @@ Partial Class Ventas
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue) DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
End If End If
CargaListasPreciosSubProyectos()
UpDetalle.Update() UpDetalle.Update()
UpEmitirTransitorio.Update() UpEmitirTransitorio.Update()
End Sub End Sub