-- merge Saldos Iniciales

This commit is contained in:
2023-01-12 14:23:38 -07:00
47 changed files with 2001 additions and 1348 deletions

View File

@@ -40,6 +40,8 @@ Public Class CalendarEvent
Public Property CveOSDetalle As Integer
Public Property CveUsuarioAtendio As Integer
Public Property CveSubProyectoUsuarioAtendio As Integer
End Class

View File

@@ -2264,16 +2264,18 @@ Public Class ClsContPAQi
StrSQL.AppendLine(" @Folio INT,")
StrSQL.AppendLine(" @NumMovto INT,")
StrSQL.AppendLine(" @IdDiario INT,")
StrSQL.AppendLine(" @SegNegMovtos INT,")
StrSQL.AppendLine(" @Fecha DATETIME,")
StrSQL.AppendLine(" @IDEjercicio INT,")
StrSQL.AppendLine(" @TimeStamp NVARCHAR (200);")
StrSQL.AppendLine(" SET NOCOUNT ON;")
StrSQL.AppendLine(" ")
StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');")
StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');")
StrSQL.AppendLine(" SET @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);")
StrSQL.AppendLine(" SET @Fecha = @FechaMov;")
StrSQL.AppendLine(" SET @Fecha = @FechaMov;")
StrSQL.AppendLine(" SET @IdDiario = 0;")
StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;")
StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;")
StrSQL.AppendLine(" SELECT @SegNegMovtos = SegNegMovtos FROM Cuentas C WHERE Id = @IdCuenta;")
StrSQL.AppendLine("")
StrSQL.AppendLine(" BEGIN TRY")
StrSQL.AppendLine(" ")
@@ -2306,7 +2308,7 @@ Public Class ClsContPAQi
'StrSQL.AppendLine("END")
StrSQL.AppendLine(" INSERT INTO MovimientosPoliza (Id, RowVersion, IdPoliza, Ejercicio, Periodo, TipoPol, Folio, NumMovto, IdCuenta, TipoMovto, Importe, ImporteME, Referencia, Concepto, IdDiario, Fecha, IdSegNeg, SIGReferencia, TimeStamp, Guid)")
StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp, @GUID);")
StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, IIF(@SegNegMovtos = 1,@IdSegNeg,0), @SIGReferencia, @TimeStamp, @GUID);")
StrSQL.AppendLine(" ")
''DESCOMENTAR PARA CIERRE PERIODO
@@ -3331,7 +3333,7 @@ Public Class ClsContPAQi
StrSQL.Append(" INNER JOIN Cuentas C ON C.Id = A.IdSubCtade")
StrSQL.Append(" )")
StrSQL.Append(" SELECT Top(@RowNum) C.Id, C.Codigo, C.Nombre, C.IdAgrupadorSAT,SA.Nombre AS AgrupadorSAT, ")
StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ")
StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ")
StrSQL.Append(" C.Tipo, C.EsBaja, C.CtaMayor, C.Afectable, C.IdMoneda, C.DigAgrup, C.NomIdioma, ")
StrSQL.Append(" CASE ")
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '1' THEN 'Activo' ")
@@ -3339,8 +3341,8 @@ Public Class ClsContPAQi
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '3' THEN 'Capital' ")
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) IN ('4', '5', '6', '7', '8', '9') THEN 'ER' ")
StrSQL.Append(" ELSE 'Otras' ")
StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ")
StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ")
StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ")
StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ")
StrSQL.Append(" , CASE WHEN CtaSup IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE','_ORDEN') ")
StrSQL.Append(" AND NOT SubCtade IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE') THEN 1 ELSE 0 END AS CtaInicial,")
StrSQL.Append(" E.Nivel, E.Orden")

View File

@@ -1075,14 +1075,14 @@ Public Class ClsContabilidad
Select Case CveConcepto
Case 2, 17 'Pago Proveedores
Concepto = $"{NombreComercial} F:{SerieFolio}"
Case 30 'Bancos
Concepto = FolioBancario
Case 4, 6 'Compra
Case 1, 5 'Proveedores
Concepto = SerieFolio
Concepto = $"{NombreComercial} F:{SerieFolio}"
Case 37 'Deudores
@@ -1099,7 +1099,7 @@ Public Class ClsContabilidad
End Select
Case 4, 7, 11, 12
Case 4, 7, 11, 12, 122, 145
Select Case CveConcepto

View File

@@ -1248,7 +1248,7 @@ Public Class ClsGenerales
#End Region
#Region "C O L E C T I V A S"
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean
Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_ColectivasGet")

View File

@@ -1755,7 +1755,7 @@ Public Class ClsInventarios
Public Function RepMovimientos(CveEmpresa As Integer, CveMoneda As Integer, FechaI As String, FechaF As String, CveConcepto As Integer, CveProveedor As Integer, Almacenes As String,
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As Integer = -1, Optional CvePersonal As Integer = -1,
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As String = "-1", Optional CvePersonal As Integer = -1,
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1774,7 +1774,7 @@ Public Class ClsInventarios
' .Add("@CveSubFamilia", SqlDbType.Int).Value = CveSubFamilia
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveMarca", SqlDbType.VarChar).Value = CveMarca
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen

View File

@@ -2448,10 +2448,10 @@ Public Class ClsOIEventos
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
Optional CveSubProyecto As Integer = -1) As Boolean
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, -1, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto)

View File

@@ -64,6 +64,10 @@ Public Class ClsOS
Public Property Año As String = ""
Public Property CorreoOS As String = ""
Public Property FechaInicio As DateTime
Public Property SubProyecto As String
Public Property Condiciones As String
Private Class Especificaciones
Public CveValor As Integer
@@ -449,7 +453,8 @@ Public Class ClsOS
#Region "ClsOSOrdenesServicios"
'Reporte de Ventas
Public Function GetRepOrdenesServicio(FechaI As String, FechaF As String, FechaTerminado As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuarioRecibio As Integer, CveTecnico As Integer, CveEstatusOrdenServicio As Integer, CveEmpresa As Integer) As Boolean
Public Function GetRepOrdenesServicio(FechaI As String, FechaF As String, FechaTerminado As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuarioRecibio As Integer, CveTecnico As Integer,
CveEstatusOrdenServicio As Integer, CveEmpresa As Integer, Optional Opcion As Integer = -1, Optional CveUsuarioAsignado As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosGetRep")
@@ -465,6 +470,8 @@ Public Class ClsOS
.Add("@CveTecnico", SqlDbType.Int).Value = CveTecnico
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
End With
Try
@@ -532,6 +539,8 @@ Public Class ClsOS
Me.Año = Data.Rows(0)("Año").ToString
Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString.ToDateTime
Me.CveOSDetalle = Data.Rows(0)("CveOSDetalle").ToString.ToEntero
Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString
Me.Condiciones = Data.Rows(0)("Condiciones").ToString
End If
Retorno = True
@@ -586,7 +595,8 @@ Public Class ClsOS
End Function
Public Function AddOrdenesServicios(CveCliente As Integer, CveSubProyecto As Integer, PersonaSolicito As String, FechaRecepcion As Date, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer,
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "") As Boolean
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
Optional Condiciones As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosAdd")
@@ -612,6 +622,7 @@ Public Class ClsOS
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
.Add("@Año", SqlDbType.VarChar).Value = Año
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -655,8 +666,8 @@ Public Class ClsOS
Return Retorno
End Function
Public Function UpdateOrdenesServicios(PersonaSolicito As String, FechaRecepcion As String, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveOS As Integer, CveUsuarioModifico As Integer,
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1",
Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Boolean
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosUpdate")
@@ -678,6 +689,7 @@ Public Class ClsOS
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
.Add("@Año", SqlDbType.VarChar).Value = Año
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
End With
@@ -1768,3 +1780,4 @@ Public Class ClsOS
End Sub
#End Region
End Class

View File

@@ -375,61 +375,96 @@ Public Class ClsPaginas
Property GlobalDTFraccionArancelaria() As DataTable
Get
GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
ObjGrales.Dispose()
End If
GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End Get
Set(value As DataTable)
Application("GlobalDTFraccionArancelaria") = value
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTIncoterm() As DataTable
Get
GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable)
Dim AppNombre As String = "GlobalDTIncoterm"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTIncoterm") = value
Dim AppNombre As String = "GlobalDTIncoterm"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTTipoOperacion() As DataTable
Get
GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable)
Dim AppNombre As String = "GlobalDTTipoOperacion"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTTipoOperacion = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTTipoOperacion") = value
Dim AppNombre As String = "GlobalDTTipoOperacion"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATMotivoTraslado() As DataTable
Get
GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable)
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATMotivoTraslado() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTSATMotivoTraslado = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTSATMotivoTraslado") = value
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTUnidadAduana() As DataTable
Get
GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTUnidadAduana") = value
End Set
End Property
Property GlobalDTGralPaises() As DataTable
Get
If Application("GlobalDTGralPaises") Is Nothing Then
Dim AppNombre As String = "GlobalDTUnidadAduana"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
If ObjGrales.GetSATUnidadesAduana() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTGralPaises") = value
Dim AppNombre As String = "GlobalDTUnidadAduana"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralPaises() As DataTable
Get
Dim AppNombre As String = "GlobalDTGralPaises"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATPais() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTGralPaises = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTGralPaises"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
@@ -437,7 +472,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralEstados"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
@@ -463,7 +498,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralMunicipios"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
@@ -490,7 +525,7 @@ Public Class ClsPaginas
If Application("GlobalDTLocalidad") Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
@@ -523,14 +558,13 @@ Public Class ClsPaginas
End Property
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
Get
Dim AppNombre As String = "GlobalDTGralColonias"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
@@ -561,7 +595,7 @@ Public Class ClsPaginas
Get
If Application("GlobalDTPSATUM") Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable()
ObjGrales.Dispose()
End If
@@ -1007,18 +1041,36 @@ Public Class ClsPaginas
End Property
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTFamilias = Dv.ToTable
Dv.Dispose()
Else
GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTFamilias") = value
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTCategoriasPresupuestos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
@@ -1109,6 +1161,14 @@ Public Class ClsPaginas
'End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
Get
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
If EsPersonaFisica <> -1 Then
Dim Tipo As New StringBuilder
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
@@ -1117,16 +1177,17 @@ Public Class ClsPaginas
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
End If
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Application("GlobalDTSATUsosCFDI") = value
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
Application(AppNombre) = value
End Set
End Property
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
@@ -2616,11 +2677,11 @@ Public Class ClsPaginas
#Region "***********************************************************************DT GENERALES**************************************************************************************"
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
@@ -2634,54 +2695,69 @@ Public Class ClsPaginas
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTGralCategorias2 = Dv.ToTable
Dv.Dispose()
Else
GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable)
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
Dim filtro As New StringBuilder
'If CveMarca > 0 Then
' filtro.AppendFormat(" CveMarca={0} ", CveMarca)
'End If
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
GlobalDTGralCategorias2 = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Application("GlobalDTCategorias2") = value
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralEscolaridades() As DataTable
Get
GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable)
Dim AppNombre As String = "GlobalDTGralEscolaridades"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetEscolaridades() Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTGralEscolaridades = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTGralEscolaridades") = value
Dim AppNombre As String = "GlobalDTGralEscolaridades"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTGralColectivas = Dv.ToTable
Dv.Dispose()
Else
GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTGralColectivas") = value
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjMarcas As New ClsProductosServicios
@@ -2701,7 +2777,7 @@ Public Class ClsPaginas
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
@@ -3496,33 +3572,58 @@ Public Class ClsPaginas
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
Property GlobalDTAsistenciaDetalle() As DataTable
Get
GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable)
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetAsistenciasDetalle() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTAsistenciaDetalle = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTAsistenciaDetalle") = value
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTAsistenciasInasistencias() As DataTable
Get
GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTAsistenciasInasistencias") = value
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTEstatusPersonal() As DataTable
Get
GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable)
Dim AppNombre As String = "GlobalDTEstatusPersonal"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEstatusPersonal() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEstatusPersonal = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTEstatusPersonal") = value
Dim AppNombre As String = "GlobalDTEstatusPersonal"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
@@ -3530,145 +3631,239 @@ Public Class ClsPaginas
ObjPersonal.Dispose()
End If
If CveEmpresa <> -1 Or CvePersonal <> -1 Then
Dim Str As StringBuilder = New StringBuilder()
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTRHPersonal = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
End If
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTDepartamentos() As DataTable
Get
GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
Dim AppNombre As String = "GlobalDTDepartamentos"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetDepartamentos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTDepartamentos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTDepartamentos") = value
Dim AppNombre As String = "GlobalDTDepartamentos"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
GlobalDTRHPuestos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTRHPuestos") = value
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTEscolaridad() As DataTable
Get
GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable)
Dim AppNombre As String = "GlobalDTEscolaridad"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEscolaridades() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEscolaridad = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTEscolaridad") = value
Dim AppNombre As String = "GlobalDTEscolaridad"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTEstadoCivil() As DataTable
Get
GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable)
Dim AppNombre As String = "GlobalDTEstadoCivil"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetEstadoCivil() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTEstadoCivil = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTEstadoCivil") = value
Dim AppNombre As String = "GlobalDTEstadoCivil"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTDocumentos() As DataTable
Get
GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable)
Dim AppNombre As String = "GlobalDTDocumentos"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetDocumentos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTDocumentos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTDocumentos") = value
Dim AppNombre As String = "GlobalDTDocumentos"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGenero() As DataTable
Get
GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable)
Dim AppNombre As String = "GlobalDTGenero"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetGeneros() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTGenero = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTGenero") = value
Dim AppNombre As String = "GlobalDTGenero"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTMotivoBaja() As DataTable
Get
GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable)
Dim AppNombre As String = "GlobalDTMotivoBaja"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetMotivoBaja() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTMotivoBaja = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTMotivoBaja") = value
Dim AppNombre As String = "GlobalDTMotivoBaja"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTTiposContrato() As DataTable
Get
GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable)
Dim AppNombre As String = "GlobalDTTiposContrato"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTiposContrato() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTiposContrato = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTTiposContrato") = value
Dim AppNombre As String = "GlobalDTTiposContrato"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRutas() As DataTable
Get
GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable)
Dim AppNombre As String = "GlobalDTRutas"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetRutas() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTRutas = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTRutas") = value
Dim AppNombre As String = "GlobalDTRutas"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTTurno() As DataTable
Get
GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
Dim AppNombre As String = "GlobalDTTurno"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTurnos() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTurno = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTTurno") = value
Dim AppNombre As String = "GlobalDTTurno"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTJornadas() As DataTable
Get
GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable)
Dim AppNombre As String = "GlobalDTJornadas"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetJornadas() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTJornadas = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTJornadas") = value
Dim AppNombre As String = "GlobalDTJornadas"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTMotivosHorasExtras() As DataTable
Get
GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetMotivoHorasExtras() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTMotivosHorasExtras = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTMotivosHorasExtras") = value
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTTipoBuzon() As DataTable
Get
GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable)
Dim AppNombre As String = "GlobalDTTipoBuzon"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetTipoBuzon() Then Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTTipoBuzon = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTTipoBuzon") = value
Dim AppNombre As String = "GlobalDTTipoBuzon"
Application(AppNombre) = value
End Set
End Property
#End Region
#Region "*********** D T - C O M B U S T I B L E S ***********"
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
@@ -3884,19 +4079,20 @@ Public Class ClsPaginas
End Set
End Property
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTPaqueteriaGuiaTipos") = value
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
@@ -10298,8 +10494,8 @@ Public Class ClsPaginas
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
Else
'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True

View File

@@ -1628,6 +1628,66 @@ Namespace Extensiones
Public Function FCRangeValidator(ByVal Row As GridViewRow, ByVal Control As String) As RangeValidator
Return DirectCast(Row.FindControl(Control), RangeValidator)
End Function
<Runtime.CompilerServices.Extension()>
Public Function GetColumn(ByVal gv As GridView, ByVal name As String) As Integer
Dim index As Integer = 0
Dim found As Boolean = False
For Each c As DataControlField In gv.Columns
If TypeOf c Is BoundField Then
Dim field As BoundField = CType(c, BoundField)
If name = field.DataField OrElse name = field.SortExpression OrElse name = field.HeaderText Then
found = True
Exit For
End If
End If
index += 1
Next
Return If(found, index, -1)
End Function
<Runtime.CompilerServices.Extension()>
Public Function HiddenColumns(gv As GridView) As List(Of Integer)
Dim columns As New List(Of Integer)
For i As Integer = 0 To gv.Columns.Count - 1
If gv.Columns(i).Visible = False Then columns.Add(i)
Next
Return columns
End Function
<Runtime.CompilerServices.Extension()>
Public Sub ShowAllColumns(gv As GridView)
For i As Integer = 0 To gv.Columns.Count - 1
gv.Columns(i).Visible = True
Next
End Sub
<Runtime.CompilerServices.Extension()>
Public Sub HideColumns(gv As GridView, columns As List(Of Integer))
For Each i As Integer In columns
gv.Columns(i).Visible = False
Next
End Sub
<Runtime.CompilerServices.Extension()>
Public Sub DataBind(gv As GridView, BindearCamposNoVisibles As Boolean)
If BindearCamposNoVisibles Then
Dim NoVisibles As List(Of Integer) = gv.HiddenColumns()
gv.ShowAllColumns()
gv.DataBind()
gv.HideColumns(NoVisibles)
Else
gv.DataBind()
End If
End Sub
#End Region
#Region "Excel PDF"

View File

@@ -94,6 +94,49 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim ObjEventos As New ClsOIEventos
Dim ErrorEventos = False
Dim CveEmpresaCRM As Integer = 0
Dim DT_SubProyectos As New System.Data.DataTable
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
DT_SubProyectos.Columns.Add("backgroundColor")
'son 26
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
If CveOS = -2 Then
Dim objSub As New ClsSubProyectos
Dim DtTempSubproyectos As New DataTable
If objSub.GetSubProyectos(CveEmpresa) Then
DtTempSubproyectos = objSub.DtResultados.FiltraParametros("", "CveSubProyecto")
End If
objSub.Dispose()
Dim ColorIndex As Integer = 0
If DtTempSubproyectos.Rows.Count > 0 Then
For Each drow As DataRow In DtTempSubproyectos.Rows
Dim Subrow = DT_SubProyectos.NewRow
Subrow("CveSubProyecto") = drow("CveSubProyecto").ToString.ToEntero
Subrow("backgroundColor") = Colores(ColorIndex)
DT_SubProyectos.Rows.Add(Subrow)
ColorIndex = ColorIndex + 1
If ColorIndex >= 25 Then
ColorIndex = 0
End If
Next
End If
End If
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuarioPara, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF, CveSubProyecto:=CveSubProyecto) Then
If ObjEventos.DtResultados.Rows.Count > 0 Then
@@ -144,6 +187,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.CveOS = dr("CveOS").ToString.ToEntero
cevent.CveOSDetalle = dr("CveOSDetalle").ToString.ToEntero
cevent.CveUsuarioAtendio = dr("CveUsuarioAtendio").ToString.ToEntero
cevent.CveSubProyectoUsuarioAtendio = dr("CveSubProyectoUsuarioAtendio").ToString.ToEntero
cevent.NombreAcercamiento = dr("NombreAcercamiento").ToString
@@ -157,6 +201,11 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.backgroundColor = "#1BBC9B"
End If
If CveOS = -2 Then
cevent.backgroundColor = DT_SubProyectos.FiltroPrimeroValor("backgroundColor", $" CveSubProyecto = {cevent.CveSubProyectoUsuarioAtendio } ")
cevent.backgroundColor = If(cevent.backgroundColor.Trim = "", "#1BBC9B", cevent.backgroundColor.Trim)
End If
'VERIFICAMOS SI TIENE O NO RECURRENCIA
If Not cevent.recurrenciatipo > 0 Then

View File

@@ -1544,15 +1544,15 @@ Partial Class Bancos_IE
DivOtrosIngresosEgresos.Visible = True
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
UpGuardar.Update()
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' BtnGuardar.Enabled = False
' Else
' BtnGuardar.Enabled = True
' End If
' UpGuardar.Update()
'End If
CargaCuentasDepositos()
@@ -1600,15 +1600,15 @@ Partial Class Bancos_IE
HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString
IDCtaBeneficiario = ObjPersonal.IdCtaContPersonal
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
UpGuardar.Update()
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' BtnGuardar.Enabled = False
' Else
' BtnGuardar.Enabled = True
' End If
' UpGuardar.Update()
'End If
CargaCuentasDepositos()
Else

View File

@@ -550,8 +550,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
{
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
{
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
{
IDPoliza = ObjMov.ContaIdPoliza;
@@ -560,18 +559,16 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
}
}
else
{
if (IDCtaContableAcreedor < 1)
if (IDCtaContableAcreedor < 1 && UsuarioActual.Empresa.TipoContabilidad == 2)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
}
if (IDCtaContableBancos < 1)
if (IDCtaContableBancos < 1 && UsuarioActual.Empresa.TipoContabilidad == 2)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
}
}
}
if (MsgError.Equals(""))

View File

@@ -836,14 +836,14 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (CveMoneda != 1 && UsaComplementaria)
{
decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria);
if (difComplementaria != 0)
{
ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria);
}
//decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria);
//if (difComplementaria != 0)
//{
// ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria);
//}
ImporteComplementaria = (ImporteBanco * TC) - ImporteBanco;
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de bancos complementaria";

View File

@@ -379,8 +379,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
{
if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
{
//if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
//{
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
{
IDPoliza = ObjMov.ContaIdPoliza;
@@ -389,18 +389,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
{
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
}
}
else
{
if (IDCtaContablePrestamo < 1)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
}
if (IDCtaContableBancos < 1)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
}
}
//}
//else
//{
// if (IDCtaContablePrestamo < 1)
// {
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
// }
// if (IDCtaContableBancos < 1)
// {
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
// }
//}
}
if (MsgError.Equals(""))
@@ -635,8 +635,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
{
if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
{
//if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
//{
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
{
IDPoliza = ObjMov.ContaIdPoliza;
@@ -645,18 +645,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
{
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
}
}
else
{
if (IDCtaContablePrestamo < 1)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
}
if (IDCtaContableBancosPrestamo < 1)
{
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
}
}
//}
//else
//{
// if (IDCtaContablePrestamo < 1)
// {
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
// }
// if (IDCtaContableBancosPrestamo < 1)
// {
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
// }
//}
}
if (MsgError.Equals(""))

View File

@@ -8633,6 +8633,7 @@ Partial Class Compras_Compras
Pago.ImportePago = ImporteAnt
Pago.OtroGastoIngreso = ImporComisionAnticipo
Pago.CveMonedaPago = CveMonedaAnticipo
Pago.TCPago = TipoCambioAnt
Select Case gvr.DataKey("TipoDocto")
Case "NC", "DEV"
@@ -8661,10 +8662,6 @@ Partial Class Compras_Compras
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
If CveMonedaAnticipo > 1 Then
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then

View File

@@ -5454,6 +5454,9 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString))
params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), "")))
params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString))

View File

@@ -3835,7 +3835,6 @@ Partial Class Compras_Proveedores
Private Sub ImprimirReporteCxPCrystal(Optional Formato As String = "PDF")
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepProveedorCxP.rpt", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim DTCxPTempral As DataTable = Nothing
@@ -4217,7 +4216,6 @@ Partial Class Compras_Proveedores
params.Add(New ReportParameter("LimiteCredito", TxtLimiteCredito.Text))
params.Add(New ReportParameter("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble - dr("Saldo").ToString.ToDouble).ToString.FormatoNumero))
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b>&nbsp;{Proveedor}{FechaIn}{FechaFn}{FechVI}{FechVF}"))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepProveedorCxP.rdlc", DTCxPTempral, params, "RepCxP")
@@ -4225,7 +4223,6 @@ Partial Class Compras_Proveedores
Alert("No se encontraron datos con los filtros especificados", TipoMensaje.MsgAdvertencia)
End If
ElseIf rblreporte.SelectedValue = "anc" Then
'OBTENEMOS LOS DATOS

View File

@@ -618,8 +618,9 @@ Partial Class Compras_ReembolsosComprobaciones
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 2).ToString
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 2, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
'8
'AGREGO PREPOLIZA IE BANCOS
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
MsgError = "Error al registrar detalle de concepto bancario"
@@ -690,7 +691,7 @@ Partial Class Compras_ReembolsosComprobaciones
CompraActual.CveTipoConceptoProveedor = gvr.DataKey("CveTipoConcepto").ToEntero
CompraActual.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
CompraActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero
CompraActual.Fecha = gvr.DataKey("Fecha").ToDate
CompraActual.Fecha = gvr.DataKey("FechaCompra").ToDate
CompraActual.SerieFolio = gvr.DataKey("SerieFolio").ToString
CompraActual.ProveedorNombre = gvr.DataKey("Proveedor")
CompraActual.TC = gvr.DataKey("TipoCambio").ToDecimal

View File

@@ -15,44 +15,45 @@
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel runat="server" >
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LnkPersonalizar" CssClass="" data-toggle="tooltip" Visible="True" OnClick="LnkPersonalizar_Click"
data-placement="left" Text="<i class='fa fa-pencil'></i> Personalizar">
</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LnkPersonalizar" CssClass="" data-toggle="tooltip" Visible="True" OnClick="LnkPersonalizar_Click"
data-placement="left" title="Enviar Correo de Prueba" Text="<i class='fa fa-pencil'></i> Personalizar"></asp:LinkButton> </li>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="HplProgramar" runat="server">Programar Recursos</asp:HyperLink>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgImprimir" />
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="HplProgramar" runat="server">Programar Recursos</asp:HyperLink>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgImprimir" />
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de CxP - Detalle
@@ -216,18 +217,18 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" class="col-md-1" ID="LblProyecto"></asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" class="col-md-1" ID="LblSubProyectofiltro"></asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" class="col-md-1" ID="LblProyecto"></asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" class="col-md-1" ID="LblSubProyectofiltro"></asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" style="margin-left:20px"><span>Comprobación:</span></div>
<div class="col-md-1">
@@ -241,19 +242,19 @@
</div>
<div class="row">
<div class="row">
<div class="col-md-1"><span>Moneda:</span></div>
<div class="col-md-1">
<asp:DropDownList ID="Ddlmoneda" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Moneda" DataValueField="CveMoneda" Width="100%" ></asp:DropDownList>
</div>
<div class="col-md-1">
<asp:DropDownList ID="Ddlmoneda" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="Moneda" DataValueField="CveMoneda" Width="100%" ></asp:DropDownList>
</div>
<div class="col-md-1" style="margin-left:20px"><span>Aplica NC:</span></div>
<div class="col-md-1">
<div class="col-md-1">
<asp:DropDownList ID="DdlAplicaNC" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -264,7 +265,7 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<%--0--%>

View File

@@ -83,18 +83,6 @@ Partial Class RepCxPDetalle
ViewState("FechaFin") = value
End Set
End Property
Private Property Personalizo As Integer
Get
Return ViewState("Personalizo").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("Personalizo") = value
End Set
End Property
Public Property FechaVInicio() As String
Get
@@ -205,7 +193,6 @@ Partial Class RepCxPDetalle
Private Property TCEspecifico As Double
Public Property DTCuentasContables() As DataTable
Get
If ViewState("DTCuentasContables") Is Nothing Then
@@ -218,20 +205,14 @@ Partial Class RepCxPDetalle
Set(value As DataTable)
ViewState("DTCuentasContables") = value
End Set
End Property
End Property
#End Region
'pRivate ReadOnly Property ColumnasVisibles As
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Personalizo = 0
'Private ReadOnly Property ColumnasVisibles As
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("Opcion") = IfNull(Request("Op"), "S")
MostrarOcultarColumnas()
MostrarOcultarColumnas(False)
CargaCombos()
If Request("Op") IsNot Nothing Then
CargaDatos()
@@ -274,7 +255,6 @@ Partial Class RepCxPDetalle
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro)
Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
@@ -309,7 +289,6 @@ Partial Class RepCxPDetalle
FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString
txtCorteA.Text = $"31/12/{Now.Year}"
If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI")
If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF")
If Request("FechaVI") <> "-1" AndAlso IsDate(Request("FechaVI")) Then txtFechaVI.Text = Request("FechaVI")
@@ -349,8 +328,6 @@ Partial Class RepCxPDetalle
GvDatos.Columns(11).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
For Each lItem As ListItem In DdlGrupo.Items
If lItem.Value.ToEntero = 9 Then
@@ -358,7 +335,6 @@ Partial Class RepCxPDetalle
End If
Next
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
@@ -544,11 +520,8 @@ Partial Class RepCxPDetalle
End If
End If
End If
If e.Row.DBCampo("CveCompra") = "" Then
e.Row.FCLabel("LblMoneda").Text = ""
End If
@@ -595,7 +568,7 @@ Partial Class RepCxPDetalle
#End Region
#Region "PERSONALIZAR"
Protected Sub MostrarOcultarColumnas()
Protected Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True)
If ChkTipoDocto.Checked Then
GvDatos.Columns(0).Visible = True
@@ -639,15 +612,12 @@ Partial Class RepCxPDetalle
GvDatos.Columns(7).Visible = False
End If
If ChkMoneda.Checked Then
GvDatos.Columns(8).Visible = True
Else
GvDatos.Columns(8).Visible = False
End If
If ChkSaldo.Checked Then
GvDatos.Columns(9).Visible = True
Else
@@ -692,12 +662,12 @@ Partial Class RepCxPDetalle
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
Personalizo = 1
If Personalizo = 1 Then
If Personalizo Then
ImgExcelPersonalizado.Visible = True
Else
ImgExcelPersonalizado.Visible = False
End If
End If
UPAcciones.Update()
UPDatos.Update()
End Sub

View File

@@ -228,6 +228,16 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
Alert("Error al agregar la Plantilla Póliza y el Detalle.", TipoMensaje.MsgError)
End If
ObjPlantillaPoliza.Dispose()
If Not ErrorPlantilla Then
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetConta_PlantillasPolizas(-1, -1) Then Application("GlobalDTContaPlantillasPolizas") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizas") = Nothing
If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, -1) Then Application("GlobalDTContaPlantillasPolizasDetalle") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizasDetalle") = Nothing
End Using
End If
End Sub
Public Sub updatatos()

View File

@@ -498,7 +498,7 @@ Partial Class ContabilidadC_RegPrePoliza
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
divContabilziada.Visible = True
BtnEliminar.Visible = False
If UsuarioActual.CveUsuario = 100 Then
If UsuarioActual.CveUsuario = 100 OrElse UsuarioActual.CveEmpresa.Contiene(13, 83) Then
BtnContabilizar.Visible = True
BtnContabilizar.Text = "Actualizar Poliza"
End If

View File

@@ -125,7 +125,7 @@
<div class="form-line">
<div class="catcuentas left">Tipo de Cuenta</div>
<div class="catcuentas right">
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
@@ -145,7 +145,7 @@
<div class="form-line">
<div class="catcuentas left">Cuenta Mayor</div>
<div class="catcuentas right">
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
<asp:ListItem Text="No " Value="2"></asp:ListItem>

View File

@@ -1160,7 +1160,7 @@
<Top>0.71688cm</Top>
<Left>5.3112cm</Left>
<Height>0.56825cm</Height>
<Width>5.22521cm</Width>
<Width>4.54835cm</Width>
<ZIndex>12</ZIndex>
<Style>
<Border>
@@ -1227,7 +1227,7 @@
<Top>1.28513cm</Top>
<Left>5.3112cm</Left>
<Height>0.56825cm</Height>
<Width>5.22521cm</Width>
<Width>4.54835cm</Width>
<ZIndex>14</ZIndex>
<Style>
<Border>
@@ -1246,7 +1246,7 @@
<Width>7.99085in</Width>
<Page>
<PageHeader>
<Height>4.83183cm</Height>
<Height>5.18108cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1336,7 +1336,7 @@
</Style>
</Textbox>
<Line Name="Line1">
<Top>4.83183cm</Top>
<Top>5.18108cm</Top>
<Left>0.08599cm</Left>
<Height>0cm</Height>
<Width>20.21078cm</Width>
@@ -1434,7 +1434,7 @@
<rd:DefaultName>Textbox18</rd:DefaultName>
<Top>1.36809cm</Top>
<Left>11.46032cm</Left>
<Height>1.98807cm</Height>
<Height>1.04858cm</Height>
<Width>8.7798cm</Width>
<ZIndex>4</ZIndex>
<Style>
@@ -1580,6 +1580,29 @@
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Condiciones: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Condiciones.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
@@ -1599,8 +1622,8 @@
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.007in</Top>
<Left>0.08599cm</Left>
<Height>0.85363in</Height>
<Width>4.40864in</Width>
<Height>0.98905in</Height>
<Width>3.84786in</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
@@ -1627,6 +1650,92 @@
</Border>
</Style>
</Image>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Fecha de atención: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!FechaAtencion.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Ténico asignado: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!TecnicoAsignado.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.007in</Top>
<Left>9.93011cm</Left>
<Height>0.98905in</Height>
<Width>3.84786in</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>
@@ -1659,7 +1768,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.27339cm</Top>
<Top>0.27338cm</Top>
<Left>17.14236cm</Left>
<Height>0.68085cm</Height>
<Width>3.13456cm</Width>
@@ -1691,7 +1800,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.27339cm</Top>
<Top>0.27338cm</Top>
<Left>0.06614cm</Left>
<Height>0.68085cm</Height>
<Width>1.60042cm</Width>
@@ -1723,7 +1832,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.27339cm</Top>
<Top>0.27338cm</Top>
<Left>1.61047cm</Left>
<Height>0.68085cm</Height>
<Width>5.14936cm</Width>
@@ -1756,7 +1865,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.27339cm</Top>
<Top>0.27338cm</Top>
<Left>6.93622cm</Left>
<Height>0.68085cm</Height>
<Width>2.92333cm</Width>
@@ -1789,7 +1898,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.27339cm</Top>
<Top>0.27338cm</Top>
<Left>9.84544cm</Left>
<Height>0.68085cm</Height>
<Width>4.32745cm</Width>
@@ -1805,7 +1914,7 @@
</Style>
</Textbox>
<Line Name="Line2">
<Top>0.15873cm</Top>
<Top>0.15872cm</Top>
<Left>0.08599cm</Left>
<Height>0cm</Height>
<Width>20.21078cm</Width>
@@ -2033,6 +2142,24 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Condiciones">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="FechaAtencion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="TecnicoAsignado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo">

View File

@@ -2864,6 +2864,24 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Condiciones">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="FechaAtencion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="TecnicoAsignado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo1">

View File

@@ -2449,6 +2449,24 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Condiciones">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="FechaAtencion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="TecnicoAsignado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>

View File

@@ -19,25 +19,27 @@
background-color: #95A5A6;
color: white;
}
.table-scrollable {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.margenbound {
margin-left: 15px;
text-align: right;
}
.amChartsAttribution {
margin-top: -2px;
margin-bottom: 8px;
visibility: hidden;
}
div[id^=chartdiv] {
width: 100%;
height: 400px;
}
.portlet-total {
float:right!important;
display:inline-block!important;
}
.abbr {
overflow: hidden;
text-overflow: ellipsis;
display:block!important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
@@ -96,12 +98,6 @@
</div>
</div>
<%--<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6 amChartsAttribution">
<a href="http://www.amcharts.com/" class="amChartsLegend" id="amChartsAttribution">JS charts by amCharts</a>
</div>
</div>--%>
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
@@ -111,15 +107,15 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="SpObs" runat="server" class="caption-subject bold uppercase">Ventas por Productos </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLVxP" runat="server" class="caption-subject bold uppercase">Ventas por Productos</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLVxPTot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvVxP" runat="server" GridLines="None"
@@ -129,7 +125,13 @@
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
<asp:TemplateField ItemStyle-CssClass="margenbound" HeaderText="P. Promedio">
<ItemTemplate>
<%--TODO: Esto puede tronar si el valor es DBNull --%>
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
@@ -143,11 +145,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span4" runat="server" class="caption-subject bold uppercase">Ventas por Productos - Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaVxP" runat="server" class="caption-subject bold uppercase">Ventas por Productos - Gráfica </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -168,20 +166,20 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span8" runat="server" class="caption-subject bold uppercase">Compras Productores</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLCompProductores" runat="server" class="caption-subject bold uppercase">Compras Productores</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLCompProductoresTot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCompProductores" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
<Columns>
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad(kg)" />
@@ -190,6 +188,7 @@
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
</Columns>
<FooterStyle CssClass="Totales"/>
</asp:GridView>
</div>
</ContentTemplate>
@@ -202,11 +201,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span9" runat="server" class="caption-subject bold uppercase">Compras Productores - Gráfica por Cantidad(Kg) </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaCompProductores" runat="server" class="caption-subject bold uppercase">Compras Productores - Gráfica por Cantidad(Kg) </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -227,15 +222,15 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span1" runat="server" class="caption-subject bold uppercase">Gastos </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGastos" runat="server" class="caption-subject bold uppercase">Gastos </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLGastosTot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCompAcreed" runat="server" GridLines="None"
@@ -258,11 +253,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span2" runat="server" class="caption-subject bold uppercase">Compras por clasificación - Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaGastos" runat="server" class="caption-subject bold uppercase">Compras por clasificación - Gráfica </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -283,15 +274,15 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span3" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLCxC" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLCxCTot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCxC" runat="server" GridLines="None"
@@ -314,11 +305,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span5" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar - Gráfica Saldo VS Recuperado</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaCxC" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar - Gráfica Saldo VS Recuperado</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -330,30 +317,6 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-6">
<asp:UpdatePanel ID="UPGraficaCxCRec" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
<ContentTemplate>
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span10" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar - Gráfica Recuperado</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<div id="chartdiv_cxcrec"></div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="row">
@@ -363,15 +326,15 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span11" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar productores</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLCxP192" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar productores</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLCxP192Tot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCxP192" runat="server" GridLines="None"
@@ -393,11 +356,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span12" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar productores - Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaCxP192" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar productores - Gráfica </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -418,15 +377,15 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span6" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar no productores</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLCxP" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar no productores</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption font-green portlet-total">
<span id="PLCxPTot" class="caption-subject bold uppercase" runat="server" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCxP" runat="server" GridLines="None"
@@ -448,11 +407,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span7" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar no productores - Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
<span id="PLGraficaCxP" runat="server" class="caption-subject bold uppercase">Cuentas por Pagar no productores - Gráfica </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
@@ -507,7 +462,17 @@
align: 'left'
},
legend: {
enabled: false
enabled: false,
// esto es para la grafica de pie
layout: 'vertical',
align: 'right',
width: 220,
verticalAlign: 'middle',
borderWidth: 0,
useHTML: true,
labelFormatter: function () {
return '<div style="width:190px"><span class="abbr">' + this.name + '</br>' + '</span><span style="float:left">' + this.y.toLocaleString() + this.unit + '</span><span style="float:right">' + '$' + this.y2.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + '</span></div>';
},
},
xAxis: {
type: 'category'
@@ -547,6 +512,10 @@
// },
// //footerFormat: '{point.key}'
//},
tooltip: {
//valuePrefix: '$',
valueSuffix: " " + '{point.unit}'
},
plotOptions: {
series: {
animation: true,
@@ -577,9 +546,14 @@
}
},
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true
}
enabled: true,
distance: -30,
format: '{point.percentage:.1f} %'
},
showInLegend: true
}
},
series: [
@@ -594,11 +568,11 @@
//AmCharts.makeChart("chartdiv_vxp", { ...chartconfig, type: "serial", dataProvider: json["VxP"] }); // Ventas x Producto
$('#' + "chartdiv_vxp").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["VxP"]) }] })
$('#' + "chartdiv_compproductores").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], type: 'pie', data: customAccessor(json["CompProductores"]) }] })
$('#' + "chartdiv_compproductores").highcharts({ ...chartconfig, chart: {}, legend: { ...chartconfig.legend, enabled: true }, series: [{ ...chartconfig.series[0], keys: ['name', 'y', 'y2', 'unit', 'unit2'], type: 'pie', data: customAccessorPie(json["CompProductores"]) }] })
$('#' + "chartdiv_compacreed").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CompAcreed"]) }] })
$('#' + "chartdiv_cxp192").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxP192"]) }] })
$('#' + "chartdiv_cxp").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxP"]) }] })
$('#' + "chartdiv_cxc").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxC"]) }, { type: 'line', data: customAccessor(json["CxCR"]) }] })
$('#' + "chartdiv_cxc").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxC"]) }, { ...chartconfig.series[0], type: 'line', data: customAccessor(json["CxCR"]) }] })
function customAccessor(data) {
const newData = [];
@@ -609,10 +583,18 @@
newData.push([point.Texto, point.Valor, point.Unidad]);
}
});
//newData.sort(function (a, b) {
// return a[0] > b[0] ? 1 : -1;
//});
//console.log(JSON.stringify(newData))
return newData;
}
function customAccessorPie(data) {
const newData = [];
data.forEach(function (point, index) {
if (point.Texto == "Otros") {
newData.push({ name: point.Texto, y: point.Cantidad, y2: point.Importe, unit: point.UnidadC, unit2:point.UnidadI, color: '#000000' });
} else {
newData.push([point.Texto, point.Cantidad, point.Importe, point.UnidadC, point.UnidadI]);
}
});
return newData;
}

View File

@@ -83,38 +83,51 @@ Partial Class General_RepIndicadorResumen
GvCxC.HeaderRow.Cells(2).Text = "<a href=""/Ventas/RepRecuperacion.aspx"" target=""_blank"">Recuperado</a>"
End If
'Mostrar gráficos solo si hay datos en su respectiva tabla
'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla
If GvVxP.Rows.Count > 0 Then
UPGraficaVxP.Visible = True
PLVxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "Orden IS NOT NULL")) _
+ "<span style=""font-weight:800; margin-left:1em"">" + "Total: " + "</span>" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "Orden IS NOT NULL"))
Else
UPGraficaVxP.Visible = False
PLVxPTot.InnerHtml = Nothing
End If
If GvCompProductores.Rows.Count > 0 Then
UPGraficaCompProductores.Visible = True
PLCompProductoresTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvCompProductores.DataSource, DataTable).SUM("Cantidad", ""))
Else
UPGraficaCompProductores.Visible = False
PLCompProductoresTot.InnerHtml = Nothing
End If
If GvCompAcreed.Rows.Count > 0 Then
UPGraficaCompAcreed.Visible = True
PLGastosTot.InnerHtml = "<span style=""font-weight:800"">" + "Importe: " + "</span>" + String.Format("{0:c} MXN", CType(GvCompAcreed.DataSource, DataTable).SUM("SubTotalMN", "CveClasificacion IS NOT NULL"))
Else
UPGraficaCompAcreed.Visible = False
PLGastosTot.InnerHtml = Nothing
End If
If GvCxC.Rows.Count > 0 Then
UPGraficaCxC.Visible = True
'UPGraficaCxCRec.Visible = True
PLCxCTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("SaldoMN", "CveCliente IS NOT NULL"))
Dim Recuper As Double = CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL")
If (Recuper > 0) Then PLCxCTot.InnerHtml += "<span style="" font-weight:800; margin-left:1em"">" + "Rec: " + "</span>" + String.Format("{0:c} MXN", CType(GvCxC.DataSource, DataTable).SUM("RecuperadoMN", "CveCliente IS NOT NULL"))
Else
UPGraficaCxC.Visible = False
'UPGraficaCxCRec.Visible = False
PLCxCTot.InnerHtml = Nothing
End If
If GvCxP192.Rows.Count > 0 Then
UPGraficaCxP192.Visible = True
PLCxP192Tot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", CType(GvCxP192.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL"))
Else
UPGraficaCxP192.Visible = False
PLCxP192Tot.InnerHtml = Nothing
End If
If GvCxP.Rows.Count > 0 Then
UPGraficaCxP.Visible = True
PLCxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Saldo: " + "</span>" + String.Format("{0:c} MXN", CType(GvCxP.DataSource, DataTable).SUM("SaldoMN", "CveProveedor IS NOT NULL"))
Else
UPGraficaCxP.Visible = False
PLCxPTot.InnerHtml = Nothing
End If
'Si no había datos en ninguna tabla no cargar función de gráficos
@@ -149,6 +162,32 @@ Partial Class General_RepIndicadorResumen
End If
End If
End Sub
Dim CompProductoresTotales As Decimal() = New Decimal(5 - 1) {}
Protected Sub GvCompProductores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompProductores.RowDataBound
'Esto tambien se podría meter en el Stored Procedure
If e.Row.RowType = DataControlRowType.DataRow Then
CompProductoresTotales(0) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Cantidad"), 0))
CompProductoresTotales(1) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "SubTotal"), 0))
CompProductoresTotales(2) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "PUPromedioKG"), 0))
CompProductoresTotales(3) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Saldo"), 0))
CompProductoresTotales(4) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Abonado"), 0))
ElseIf e.Row.RowType = DataControlRowType.Footer Then
'Movemos el pie a la primera fila de la tabla
Dim footerRow As GridViewRow = e.Row
GvCompProductores.Controls(0).Controls.Remove(footerRow)
GvCompProductores.Controls(0).Controls.AddAt(1, footerRow)
'Ahora se registran los datos
e.Row.Cells(0).Text = "Totales"
e.Row.Cells(1).Text = CompProductoresTotales(0).ToString("N")
e.Row.Cells(2).Text = CompProductoresTotales(1).ToString("C")
e.Row.Cells(3).Text = (CompProductoresTotales(2) / GvCompProductores.Rows.Count).ToString("C") 'Promedio
e.Row.Cells(4).Text = CompProductoresTotales(3).ToString("C")
e.Row.Cells(5).Text = CompProductoresTotales(4).ToString("C")
For i As Integer = 1 To e.Row.Cells.Count - 1
e.Row.Cells(i).CssClass = "margenbound"
Next
End If
End Sub
Protected Sub GvComprasAcreed_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompAcreed.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveClasificacion") = "" Then
@@ -230,32 +269,40 @@ Partial Class General_RepIndicadorResumen
'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group
'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList()
'Compras ProveedorClasificacion=192
'Compras Productores ProveedorClasificacion=192
DtCompProductores.Reset()
DtCompProductores.Columns.Add("Texto")
DtCompProductores.Columns.Add("Valor")
DtCompProductores.Columns.Add("Unidad")
DtCompProductores.Columns.Add("Cantidad")
DtCompProductores.Columns.Add("Importe")
DtCompProductores.Columns.Add("UnidadC")
DtCompProductores.Columns.Add("UnidadI")
For Each Dr As DataRow In GvCompProductores.DataSource.Rows
Dim Row = DtCompProductores.NewRow()
Row("Texto") = Dr("RazonSocial").ToString
Row("Valor") = Dr("Cantidad").ToString.FormatoNumero
Row("Unidad") = "Kg"
Row("Cantidad") = Dr("Cantidad").ToString.FormatoNumero
Row("Importe") = Dr("SubTotal").ToString.FormatoNumero
Row("UnidadC") = "Kg"
Row("UnidadI") = "MXN"
DtCompProductores.Rows.Add(Row)
Next
Dim comp_productores = From s In DtCompProductores.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
Dim comp_productores = From s In DtCompProductores.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Cantidad = s("Cantidad").ToString().ToDouble(), .Importe = s("Importe").ToString().ToDouble(), .UnidadC = s("UnidadC").ToString(), .UnidadI = s("UnidadI").ToString()}
Dim group_comp_productores = comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
.Texto = g.Key,
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN"
.Cantidad = Math.Round(g.Sum(Function(x) x.Cantidad), 2),
.Importe = Math.Round(g.Sum(Function(x) x.Importe), 2),
.UnidadC = "Kg",
.UnidadI = "MXN"
}).ToDataTable
Dim top_comp_productores = From s In group_comp_productores.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
Dim resto_comp_productores = From s In group_comp_productores.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
Dim top_comp_productores = From s In group_comp_productores.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Cantidad = s("Cantidad").ToString().ToDouble(), .Importe = s("Importe").ToString().ToDouble(), .UnidadC = s("UnidadC").ToString(), .UnidadI = s("UnidadI").ToString()}
Dim resto_comp_productores = From s In group_comp_productores.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Cantidad = s("Cantidad").ToString().ToDouble(), .Importe = s("Importe").ToString().ToDouble(), .UnidadC = s("UnidadC").ToString(), .UnidadI = s("UnidadI").ToString()}
Dim group_resto_comp_productores = resto_comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
.Texto = "Otros",
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN"
.Cantidad = Math.Round(g.Sum(Function(x) x.Cantidad), 2),
.Importe = Math.Round(g.Sum(Function(x) x.Importe), 2),
.UnidadC = "Kg",
.UnidadI = "MXN"
})
Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Valor)
Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Cantidad)
'Compras TipoProveedor=1 Acreedores (Gastos)
DtCompAcreed.Reset()
@@ -403,6 +450,7 @@ Partial Class General_RepIndicadorResumen
})
Dim query_cxp = top_cxp.Union(group_resto_cxp).OrderByDescending(Function(x) x.Valor)
'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp})
'Alert(json)

File diff suppressed because it is too large Load Diff

View File

@@ -9,36 +9,37 @@
<script RunAt="server">
Public ReadOnly Property EsProduccion As String
Get
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
Return "0"
Else
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
End If
End Get
Public ReadOnly Property EsProduccion As String
Get
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
Return "0"
Else
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
End If
End Get
End Property
Private Sub GuardaLogAsax(str As String)
'GuardaLog(str)
End Sub
Sub Application_Start(sender As Object, e As EventArgs)
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
Application("s") = sessionData
'BANDERA PARA VALIDACION DE CFDI
Sub Application_Start(sender As Object, e As EventArgs)
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
Application("s") = sessionData
'BANDERA PARA VALIDACION DE CFDI
Application("GlobalValidarCFDI") = True
'----------------------------------------------------------------------------------------------------------------------
'C A R G A - R H
#If False Then
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
Using ObjRH As New ClsRH
@@ -59,6 +60,7 @@
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
End Using
#End If
'----------------------------------------------------------------------------------------------------------------------
'C A R G A - O S
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now))
@@ -89,7 +91,6 @@
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
End Using
'-------------------------------------------------------------------------------------------------------------------------
'A M O R T I Z A C I O N - C O N T A B L E
@@ -234,20 +235,20 @@
'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing
'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
End Using
#If False Then
'SAT
Using ObjGrales As New ClsGenerales
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
@@ -261,7 +262,7 @@
'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
End Using
#End If
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'E V E N T O S

View File

@@ -2041,14 +2041,21 @@ Partial Class Inventarios_EntradasSalidas
If Not ErrorAC And Not ErrorMovInv Then
If ChkEmitirTimbrado.Checked Then
If Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then
ErrorMovInv = True
Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia)
End If
If ChkEmitirTimbrado.Checked AndAlso Not ErrorMovInv Then
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero,
CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, DdlDireccionEnvio.SelectedValue.ToEntero, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero,
CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
If CveEntregaAlmacen > 0 Then
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
@@ -2069,7 +2076,7 @@ Partial Class Inventarios_EntradasSalidas
If Not ErrorAC And Not ErrorMovInv Then
If Not ErrorAC And Not ErrorMovInv Then
Dim Msg As New StringBuilder
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))

View File

@@ -190,6 +190,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
<asp:BoundField DataField="Transito" ItemStyle-HorizontalAlign="Right" HeaderText="En Tránsito" DataFormatString="{0:#,###.######}" />
</Columns>
</asp:GridView>
</div>

View File

@@ -1,22 +1,37 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEntradasSalidas.aspx.vb" Inherits="Inventarios_ReporteEntradasSalidas" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Formato Inventario</asp:LinkButton>
</li>
<asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
</li>
<%-- <li>
<li>
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Formato Inventario</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
</li>
<%-- <li>
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
</li>--%>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir" />
<asp:PostBackTrigger ControlID="LnkExportar" />
<asp:PostBackTrigger ControlID="LnkExcelPersonalizado" />
<asp:PostBackTrigger ControlID="LnkFormatoInventario" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
<style>
@@ -119,7 +134,7 @@
<div class="row">
<div class="col-md-1 truncate">Proveedor</div>
<div class="col-md-2">
<ADS:DropDownLost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" data-metodo="getproveedores" CssClassDdl="select2me " Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></ADS:DropDownLost>
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" data-metodo="getproveedores" CssClassDdl="select2me " Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></ADS:Dropdownlost>
</div>
<div class="col-md-1 truncate">Categoría</div>
<div class="col-md-2">
@@ -127,59 +142,59 @@
</div>
<div class="col-md-1 truncate">Clasificación</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-1 truncate" >Producto</div>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
</div>
<div runat="Server" id="DivMarca">
<div class="col-md-1 truncate" >Marca</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
</div>
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-md-1 truncate">Producto</div>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
</div>
<div class="col-md-1 truncate">Personal</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
</div>
<div class="col-md-1 truncate">Tipo Almacén:</div>
</div>
<div class="row">
<div runat="Server" id="DivMarca">
<div class="col-md-1 truncate">Marca</div>
<div class="col-md-2">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
<asp:ListBox ID="DdlMarca" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate">Modalidad:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Solo Existencia" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" id="DivClaisficacionLabel" runat="server">Clasificación 2:</div>
<div class="col-md-2 " >
<asp:DropDownList ID="DdlClasificacion2" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="100%">
</asp:DropDownList>
</div>
</div>
<div class="col-md-1 truncate">Tipo Almacén:</div>
<div class="col-md-2">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate">Modalidad:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Solo Existencia" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" id="DivClaisficacionLabel" runat="server">Clasificación 2:</div>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlClasificacion2" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="100%">
</asp:DropDownList>
</div>
</div>
<div id="DivFamiliaSubFamilia" style="display:none" class="row" runat="server" visible="false">
<div class="col-md-1 truncate" >SubFamilia</div>
<div id="DivFamiliaSubFamilia" style="display: none" class="row" runat="server" visible="false">
<div class="col-md-1 truncate">SubFamilia</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubFamilia" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Clasificacion" DataValueField="CveClasificacion"></asp:DropDownList>
<asp:DropDownList ID="DdlSubFamilia" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Clasificacion" DataValueField="CveClasificacion"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="row">
</div>
</div>
</div>
@@ -212,7 +227,7 @@
<Columns>
<%--0--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
<%--1--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
<%--2--%>

View File

@@ -55,8 +55,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
End Get
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -73,7 +71,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
CargaCombos()
GvM.DataBind()
GvM.DataBind(True)
If Not IsNothing(Request("CveAlmacen")) Then
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
TxtFechaI.Text = "01/01/2000"
@@ -226,6 +224,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
'Dim fechaF As String = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
@@ -235,7 +234,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
DdlMovs.SelectedValue.ToEntero, CveMarca, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
dt = Reporte.DtResultados
@@ -245,10 +244,8 @@ Partial Class Inventarios_ReporteEntradasSalidas
rpt = dt
End If
Reporte.Dispose()
GvM.DataBind()
GvM.DataBind(True)
UPPMov.Update()
End Sub
@@ -321,7 +318,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
e.Row.FCLabel("lbSaldoF2").Text = If(e.Row.DBCampo("SaldoFImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SaldoFImp").ToDouble.ToString("N2"))
End If
End If
End Sub
@@ -348,6 +344,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
' GvM.ExportToExcel("Reporte de Entradas y Salidas")
ImprimiReporte("EXCEL")
End Sub
Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click
GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString + ".xls")
End Sub
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
ImprimiReporte()
End Sub
@@ -419,8 +418,14 @@ Partial Class Inventarios_ReporteEntradasSalidas
ImprimirPDF(RutaPDF, If(FormatoInventario, dt.FiltraParametros("", "RazonSocial, PS ASC"), dt), params, NombreArchivoDescarga, Formato:=Formato)
End Sub
Private Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click
RegistraScript("$('#DivPersonalizar').modal('hide')")
Private Sub LnkFormatoInventario_Click(sender As Object, e As EventArgs) Handles LnkFormatoInventario.Click
ImprimiReporte("EXCEL", True)
End Sub
#End Region
#Region "PERSONALIZAR"
Private Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True)
GvM.Columns(1).Visible = ChkCodigoAlterno.Checked
GvM.Columns(2).Visible = ChkCodigoBarras.Checked
GvM.Columns(3).Visible = ChkClasificacion2.Checked
@@ -495,13 +500,23 @@ Partial Class Inventarios_ReporteEntradasSalidas
dvCan.Style.Add("width", "21%")
End If
CargaDatos()
If Personalizo Then
LnkExcelPersonalizado.Visible = True
Else
LnkExcelPersonalizado.Visible = False
End If
UPAcciones.Update()
UpEncabezado.Update()
UPPMov.Update()
End Sub
Private Sub LnkFormatoInventario_Click(sender As Object, e As EventArgs) Handles LnkFormatoInventario.Click
ImprimiReporte("EXCEL", True)
Private Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click
MostrarOcultarColumnas()
RegistraScript("$('#DivPersonalizar').modal('hide')")
'CargaDatos()
End Sub
#End Region
#Region "B I T A C O R A"

View File

@@ -690,8 +690,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
else
{
//e.Row.Cells[11].Text = "";
e.Row.Cells[12].Text = "";
e.Row.Cells[13].Text = "";
e.Row.Cells[14].Text = "";
e.Row.Cells[15].Text = "";
}
if (e.Row.DataKey("Estatus").ToEntero() == 2)

View File

@@ -90,7 +90,7 @@
</div>
<div class="copyright">
<asp:Literal ID="Ltlcopyright" runat="server">2022 © AD Sistemas.</asp:Literal>
<asp:Literal ID="Ltlcopyright" runat="server">2023 © AD Sistemas.</asp:Literal>
</div>
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>

View File

@@ -184,20 +184,20 @@ Partial Class LogIn
Return URLParametros
End Function
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
Get
If CveUsuario <> -1 Then
Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
End If
End Get
Set(value As Data.DataTable)
Application("GlobalDTUsuarios") = value
End Set
End Property
'Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
' Get
' If CveUsuario <> -1 Then
' Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
' GlobalDTUsuarios = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
' End If
' End Get
' Set(value As Data.DataTable)
' Application("GlobalDTUsuarios") = value
' End Set
'End Property
Dim BtnLogIn_Clickenter As Integer = 0
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
Dim ReturnUrl As String = "/"
@@ -251,16 +251,20 @@ Partial Class LogIn
Else
'PLATAFORMA SIG
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
If dt IsNot Nothing Then
If dt.Rows.Count >= 1 Then
If dt.Rows.Count > 1 Then
Usuario.MultipleEmpresa = True
Using ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario) Then
Dim dt As Data.DataTable = ObjUsuarios.DtResultados
If dt IsNot Nothing Then
If dt.Rows.Count >= 1 Then
If dt.Rows.Count > 1 Then
Usuario.MultipleEmpresa = True
End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
End If
End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
dt.Dispose()
End If
End If
dt.Dispose()
End Using
End If
Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False)

View File

@@ -434,8 +434,8 @@ public partial class Nomina_Aguinaldo : ClsPaginas
FraccionI = (aguinaldogravado / diasanio) * diasmes;
FraccionII_1 = salariomensual + FraccionI;
str.Clear();
str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, 00, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes);
str.AppendFormat(" dbo.Fnc_NomValues(40, 0, 00, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes);
str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
if (objbase.runQuerystr(str.ToString()))
{
DataRow drow = objbase.DtResultados.Rows[0];

View File

@@ -262,6 +262,9 @@
<li>
<asp:LinkButton ID="LnkModalPlantillaNomina" OnClick="LnkModalPlantillaNomina_Click" runat="server"><i class="fa fa-upload"></i>Cargar masiva de conceptos</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkCargaNetos" OnClick="LnkCargaNetos_Click" runat="server"><i class="fa fa-upload"></i>Cargar netos</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server"><i class="fa fa-columns" aria-hidden="true"></i>Tablas de cálculo</asp:LinkButton>
</li>
@@ -404,7 +407,7 @@
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 85px;">Tipo Trabajador:</label>
<div class="col-md-1">
<asp:DropDownList Width="100%" ID="DdlTipoTrabajador" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar">
DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar">
</asp:DropDownList>
</div>
<div class="col-md-2" style="max-width: 160px !important; white-space: nowrap;">
@@ -629,7 +632,7 @@
<%--<asp:LinkButton ID="LnkProcesarReporteIncidenciaCitrus" CssClass="btn yellow-gold" OnClick="LnkProcesarReporteIncidenciaCitrus_Click" runat="server">Descargar</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" CssClass="btn yellow-gold" OnClick="LnkMostrarocultarConceptos_Click" runat="server">Cargar</asp:LinkButton>--%>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" class="btn-group ">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" class="btn-group ">
<ContentTemplate>
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="sidebar-toggler-wrapper"></i>Asistencia
<i class="fa fa-angle-down"></i>
@@ -663,7 +666,7 @@
<asp:Literal ID="ltlGvAsistencia" runat="server"></asp:Literal>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
@@ -3231,7 +3234,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DModalAsistenciaTabular" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel3" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
@@ -3269,7 +3272,7 @@
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -3364,6 +3367,9 @@
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
<div class=" text-right">
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
</div>
</div>
</div>
</div>
@@ -3383,6 +3389,60 @@
</asp:UpdatePanel>
</div>
<div id="DmodalNetos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel4" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Netos </h4>
</div>
<div class="modal-body">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">Cargar archivo </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkFormatoNetos" OnClick="LnkFormatoNetos_Click" CssClass="btn yellow-gold" runat="server"><i class="fa fa-download"></i> Descargar Plantilla</asp:LinkButton>
</div>
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body rowpadding ">
<asp:TextBox ID="TxtCargarNetos" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCargarNominaNetos" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkFormatoNetos" />
</Triggers>
</asp:UpdatePanel>
</div>
<div id="DModalCargaASistenciaMasiva" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModalAsistenciaMasiva" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -134,7 +134,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["PermisoEmitir"] = value; }
}
protected int CveTipoTrabajador
{
get
@@ -247,9 +247,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (!IsPostBack)
{
LnkCargaNetos.Visible = (UsuarioActual.CveRol == 1);
using (ClsRH objrh = new ClsRH())
{
if(objrh.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa))
if (objrh.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa))
{
DataTable dt = objrh.DtResultados;
DataRow drow = dt.NewRow();
@@ -259,13 +260,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
dt.AcceptChanges();
DdlTipoTrabajador.DataSource = dt;
DdlTipoTrabajador.DataBind();
DdlTipoTrabajador.SelectedValueExist( "-1");
DdlTipoTrabajador.SelectedValueExist("-1");
}
}
if (UsuarioActual.CveUsuario == 100)
{
Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia);
}
if (UsuarioActual.CveUsuario == 100)
{
Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia);
}
//CreaObjetoEmpresa(UsuarioActual);
DataTable dtperinc = null;
using (ClsNominas objnom = new ClsNominas())
@@ -1311,9 +1312,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
LogicNominas lognom = new LogicNominas();
string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0)
{
Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP);
@@ -1498,8 +1499,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
UsuarioActual = this.UsuarioActual;
}*/
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0)
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
else
@@ -1742,6 +1743,178 @@ public partial class Nomina_Nomina2 : ClsPaginas
UpCargarNomina.Update();
}
protected void LnkCargaNetos_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalNetos').modal();");
}
protected void LnkFormatoNetos_Click(object sender, EventArgs e)
{
try
{
StringBuilder str = new StringBuilder("0");
bool continuar = false;
using (ClsNominas ObjNomina = new ClsNominas())
{
if (ObjNomina.GetConceptos(UsuarioActual.CveEmpresa))
{
GVConceptosPlantilla.DataSource = ObjNomina.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}");
GVConceptosPlantilla.DataBind();
foreach (DataRow gvrow in ObjNomina.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveSistema =-1").Rows)
{
if (gvrow["CveConcepto"].ToEntero() > 0 )
{
str.AppendFormat(",{0}", gvrow["CveConcepto"]);
continuar = true;
}
}
}
}
string msgerror = "Debe seleccionar los conceptos a cargar.";
if (dtConceptos == null || dtConceptos.Columns.Count <= 2)
{
msgerror = "Debe cargar el periodo antes de descargar la plantilla";
continuar = false;
}
if (continuar)
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Nomina");
int column = 1;
libro.Row(1).Hide();
libro.Cell(1, column).Value = "Codigo";
libro.Cell(3, column).Value = "Codigo";
column++;
libro.Cell(1, column).Value = "Empleado";
libro.Cell(3, column).Value = "Empleado";
libro.Column(column).Width = 35;
DataTable dtcP = dtConceptos.FiltraParametros(string.Format("Tipo = 'P' AND EsPadre = 1 AND CveConcepto in({0})", str));
DataTable dtcD = dtConceptos.FiltraParametros(string.Format("Tipo = 'D' AND EsPadre = 1 AND CveConcepto in({0})", str));
DataTable dtcO = dtConceptos.FiltraParametros(string.Format("Tipo = 'O' AND EsPadre = 1 AND CveConcepto in({0})", str));
int iniciotipe = column;
foreach (DataRow row in dtcP.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
iniciotipe = column;
foreach (DataRow row in dtcD.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
iniciotipe = column;
foreach (DataRow row in dtcO.Rows)
{
column++;
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
libro.Cell(FilaConceptos, column).Value = "S";
libro.Cell(3, column).Value = row["Concepto"].ToString();
libro.Cell(4, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
}
if (iniciotipe < column)
{
libro.Range(2, iniciotipe + 1, 2, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(2, iniciotipe + 1, 2, column).Merge().Value = "-";
}
libro.Range(2, 1, 2, 2).Merge().Value = "";
libro.Range(4, 1, 4, 2).Merge().Value = "";
libro.Range(2, 1, 2, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Range(4, 1, 4, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(3).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(4).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(FilaConceptos).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(3).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Row(4).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
//libro.Row(FilaConceptos).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
libro.Cell(FilaConceptos, 1).Value = "'-------";
libro.Cell(FilaConceptos, 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.FromArgb(177, 160, 199);
libro.Cell(FilaConceptos, 2).Value = "¿Modificar SI(S)/NO(N)?";
libro.Cell(FilaConceptos, 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
libro.Row(FilaConceptos).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
int Fila = 5;
foreach (DataRow erow in dtempleados.FiltraParametros("CvePersonal>0 AND NomAutorizado=0").Rows)
{
Fila++;
column = 1;
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]);
column++;
libro.Cell(Fila, column).Value = erow["Nombre"];
foreach (DataRow row in dtcP.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
foreach (DataRow row in dtcD.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
foreach (DataRow row in dtcO.Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
}
}
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", "Plantilla conceptos nómina "));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
else
{
Alert(msgerror, TipoMensaje.MsgAdvertencia);
}
}
catch (Exception ex)
{
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia);
}
}
protected void LnkFormato_Click(object sender, EventArgs e)
{
try
@@ -1909,6 +2082,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
int chkImporte = 1;
int chkImporteGravado = 0;
List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos;
if(((LinkButton)sender).ID == LnkCargarNominaNetos.ID)
{
Filesgral = TxtCargarNetos.getfiles().Archivos;
}
bool continuar = Filesgral.Count > 0;
string stringError = "";
Archivo fileItem = continuar ? Filesgral[0] : null;
@@ -1924,6 +2102,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
stringError = "No se inserto un archivo de tipo Excel";
}
}
else
{
stringError = "favor de ingresar el archivo y esperar a que cargue";
}
if (!(CvePeriodoSeleccionado >= 0))
{
@@ -2105,6 +2288,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
else
{
Alert("La información se a actualizado satisfactoriamente");
if (((LinkButton)sender).ID == LnkCargarNominaNetos.ID || ChkRecalcularNomina.Checked)
{
cargaDatos(false);
}
}
}
@@ -6423,7 +6610,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
ObjPersonal.IniciaTransacSQL();
bool OcurrioError = false;
if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,-1))
if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1))
OcurrioError = true;
if (OcurrioError)
@@ -8267,7 +8454,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
for (int i = 2; i < DTEXcel.Columns.Count; i++)
{
DateTime FechaAsis = DTEXcel.Columns[i].ColumnName.ToDateTime();
if( FechaAsis < fechai || FechaAsis > fechaf)
if (FechaAsis < fechai || FechaAsis > fechaf)
{
continuar = false;
stringError = "Las fechas no concuerdadn con el periodo seleccionado";

View File

@@ -1218,38 +1218,54 @@ Partial Class OS_OrdenesServicios
Dim Especificaciones As String = Row("Especificaciones").ToString
Dim ComentarioTecnico As String = Row("ComentarioTecnico").ToString
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
Dim Archivo As New System.IO.FileInfo(Row("Archivo").ToString)
Dim fname As String = ""
If File.Exists(Row("Archivo").ToString) Then
Dim Archivo As New System.IO.FileInfo("")
fname = Archivo.Name
End If
Dim CveUsuarioEntrego As Integer = If(Entregar = True, UsuarioActual.CveUsuario, -1)
Dim FechaEntrega As String = If(Entregar = True, Now.ToString("dd/MM/yyy"), "-1")
Dim Consecutivo As Integer = Row("Consecutivo").ToString.ToEntero
CveConsecutivo = Consecutivo
If CveOSDetalle > 0 Then
If Not ObjOrdenServicio.UpdateOrdenesServiciosDetalle(CvePS, Cantidad, CveUsuarioEntrego, Observaciones, SeSuperviso, SeFacturara, Estatus, ComentarioTecnico, CveCuentaEquipo, Archivo.Name, "-1", FechaEntrega, CveOSDetalle, CveOS) Then
If Not ObjOrdenServicio.UpdateOrdenesServiciosDetalle(CvePS, Cantidad, CveUsuarioEntrego, Observaciones, SeSuperviso, SeFacturara, Estatus, ComentarioTecnico, CveCuentaEquipo, fname, "-1", FechaEntrega, CveOSDetalle, CveOS) Then
Errores = True
End If
Else
CveOSDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(CveOS, CvePS, Cantidad, -1, CveUsuarioEntrego, Observaciones, SeSuperviso, SeFacturara, Estatus, CveCuentaEquipo, "-1", "-1", FechaEntrega, ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
CveOSDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(CveOS, CvePS, Cantidad, -1, CveUsuarioEntrego, Observaciones, SeSuperviso, SeFacturara, Estatus, CveCuentaEquipo, "-1", "-1", FechaEntrega, ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=fname)
If Not CveOSDetalle > 0 Then Errores = True
End If
If Archivo.Name <> "-1" Then
'Cambiar el nombre del archivo de CveUsuario-Consecutivo.ext a CveOS-Consecutivo.ext
Dim ArchivoFinal As New System.IO.FileInfo(String.Format("{0}OS\Archivos\OS{1}-{2}{3}", UsuarioActual.Empresa.Ruta, CveOS, Consecutivo, System.IO.Path.GetExtension(Archivo.Extension)))
If ArchivoFinal.Exists() Then
ArchivoFinal.Delete()
End If
'Mover el archivo de los temporales a OS
System.IO.File.Move(UsuarioActual.Empresa.Ruta & "\OS\Temp\" & Archivo.Name, UsuarioActual.Empresa.Ruta & "\OS\Archivos\" & ArchivoFinal.Name)
If File.Exists(Row("Archivo").ToString) Then
Dim Archivo As New System.IO.FileInfo("")
If Archivo.Name <> "-1" Then
'Cambiar el nombre del archivo de CveUsuario-Consecutivo.ext a CveOS-Consecutivo.ext
Dim ArchivoFinal As New System.IO.FileInfo(String.Format("{0}OS\Archivos\OS{1}-{2}{3}", UsuarioActual.Empresa.Ruta, CveOS, Consecutivo, System.IO.Path.GetExtension(Archivo.Extension)))
If Not ObjOrdenServicio.UpdateOrdenesServiciosDetalleArchivo(ArchivoFinal.Name, ObjOrdenServicio.CveOSDetalle) Then
Errores = True
If ArchivoFinal.Exists() Then
ArchivoFinal.Delete()
End If
'Mover el archivo de los temporales a OS
System.IO.File.Move(UsuarioActual.Empresa.Ruta & "\OS\Temp\" & Archivo.Name, UsuarioActual.Empresa.Ruta & "\OS\Archivos\" & ArchivoFinal.Name)
If Not ObjOrdenServicio.UpdateOrdenesServiciosDetalleArchivo(ArchivoFinal.Name, ObjOrdenServicio.CveOSDetalle) Then
Errores = True
End If
End If
End If
If TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows.Count > 0 Then
For Each RowE As DataRow In TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", Consecutivo)).Rows
@@ -1279,6 +1295,7 @@ Partial Class OS_OrdenesServicios
Next
End If
End If
Next
Else
Errores = True

View File

@@ -20,6 +20,8 @@ Partial Class OS_RepOrdenesServicios
ViewState("CveUsuarioTecnico") = -1
End If
txtFechaI.Text = $"01/01/{Now.Year}"
CargaDatos()
OrdenaDatos()
End If
@@ -60,7 +62,18 @@ Partial Class OS_RepOrdenesServicios
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
FechaTerminado = If(IsDate(TxtFechaTerminado.Text.Trim()), TxtFechaTerminado.Text.Trim(), "-1")
If ObjOrdenesServicios.GetRepOrdenesServicio(FechaI, FechaF, FechaTerminado, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlUsuarioRecibio.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
Dim Opcion As Integer = 1
Dim CveUsuarioAsignado As Integer = UsuarioActual.CveUsuario
If UsuarioActual.TienePermisoProceso(348) Then
Opcion = 2
CveUsuarioAsignado = -1
End If
If ObjOrdenesServicios.GetRepOrdenesServicio(FechaI, FechaF, FechaTerminado, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlUsuarioRecibio.SelectedValue.ToEntero,
DdlTecnico.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=Opcion, CveUsuarioAsignado:=CveUsuarioAsignado) Then
Dim Filtro As String = ""
Select Case DdlFacturado.SelectedValue
Case "1"

View File

@@ -111,6 +111,12 @@
.select2-container--open {
z-index: 1000 !important;
}
/* #C_DVModalAsignacion > div:nth-child(2) > div > div > span{
margin-left:200px!important;
}*/
</style>
@@ -469,17 +475,17 @@
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<div class="form-group form-md-line-input" runat="server" visible="false" id="DvModalSubProyecto">
<asp:DropDownList ID="DdlSubProyectoOS" AppendDataBoundItems="true" CssClass="form-control select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" Height="30px">
<%--<asp:DropDownList ID="DdlSubProyectoOS" AppendDataBoundItems="true" CssClass="form-control select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" Height="30px">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoOS" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectoOS" Display="None"
ErrorMessage="El campo <b>''''</b> es requerido por la aplicación" ValidationGroup="GrpAsignar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDdlSubProyectoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyectoOS" Width="350px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlSubProyectoOS.ClientID.ToString()%>">
<ajax:ValidatorCalloutExtender ID="VCEDdlSubProyectoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyectoOS" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<asp:Label runat="server" ID="LblModalSubproyecto" CssClass="form-control"></asp:Label>
<label for="<%= LblModalSubproyecto.ClientID.ToString()%>">
<asp:Label runat="server" ID="LblSubProyectoOS"></asp:Label>
</label>
</div>
@@ -550,6 +556,16 @@
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
<div class="row">
<div class="col-md-12">
<%--CONDICIONES--%>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCondiciones" runat="server" MaxLength="300" CssClass="form-control" />
<label for="<%= TxtCondiciones.ClientID.ToString()%>">Condiciones: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
@@ -575,7 +591,7 @@
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
<div class="row">
<div class="row" runat="server" id="DVModalAsignacion" visible ="false">
<div class="col-md-6">
<div class="form-group form-md-line-input">
@@ -672,6 +688,7 @@
<script>
var PrimeraCargaCalendario = true;
function FechaFinSet(RB, TXT) {
RB = "#" + RB
@@ -1057,16 +1074,42 @@
eventDrop: eventDropped,
eventResize: eventResized
});
clickSemana();
}
function InitCalendar() {
$(document).ready(function () {
Calendario();
//if (PrimeraCargaCalendario) {
//}
$("#TxtModalFechaOS").val("" + start.format("DD/MM/YYYY 08:00"));
});
}
function wait(ms) {
var start = new Date().getTime();
var end = start;
while (end < start + ms) {
end = new Date().getTime();
}
}
function clickSemana() {
$('#calendar > div.fc-toolbar > div.fc-right > div > button.fc-agendaDay-button.fc-button.fc-state-default.fc-corner-right').click();
PrimeraCargaCalendario = false;
}
</script>

View File

@@ -280,6 +280,15 @@ Partial Class OS_RepServicioDomicilio
cargaDropsModal()
CargaClientePublicoGeneral()
If UsuarioActual.TienePermisoProceso(348) Then
DVModalAsignacion.Visible = True
End If
'RegistraScript(" PrimeraCargaCalendario = true;")
End If
End Sub
@@ -595,7 +604,7 @@ Partial Class OS_RepServicioDomicilio
End If
'DdlSubProyectoOS.Items.Clear()
CargarCentrosDeCosto(Nothing, DdlSubProyectoOS, Nothing, LblSubProyectoOS)
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoOS)
'DdlModeloAuto.Items.Clear()
Dim ObjGral As New ClsGenerales
@@ -607,6 +616,7 @@ Partial Class OS_RepServicioDomicilio
DdlModeloAuto.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
End Sub
Private Sub CargaClientes()
@@ -623,7 +633,7 @@ Partial Class OS_RepServicioDomicilio
TxtSolicito.Text = ""
TxtDescripcion.Text = ""
TxtFechaOS.Text = ""
DdlSubProyectoOS.SelectedValueExist("-1")
'DdlSubProyectoOS.SelectedValueExist("-1")
TxtDireccion.Text = ""
TxtEmail.Text = ""
TxtTelefono.Text = ""
@@ -645,6 +655,9 @@ Partial Class OS_RepServicioDomicilio
FechaInicioOriginal = DateTime.Now
DVFolio.Visible = False
DvModalSubProyecto.Visible = False
TxtCondiciones.Text = ""
End Sub
@@ -707,7 +720,7 @@ Partial Class OS_RepServicioDomicilio
TxtDescripcion.Text = ObjOS.Descripcion
TxtSolicito.Text = ObjOS.PersonaSolicito
TxtFechaOS.Text = ObjOS.FechaRecepcion.ToString("dd/MM/yyyy")
DdlSubProyectoOS.SelectedValueExist(ObjOS.CveSubProyecto)
'DdlSubProyectoOS.SelectedValueExist(ObjOS.CveSubProyecto)
TxtDireccion.Text = ObjOS.DtResultados.Rows(0)("DireccionOS").ToString
TxtEmail.Text = ObjOS.CorreoOS
TxtTelefono.Text = ObjOS.Telefono
@@ -718,6 +731,9 @@ Partial Class OS_RepServicioDomicilio
DdlModeloAuto.SelectedValueExist(ObjOS.CveModeloAuto)
TxtAnio.Text = ObjOS.Año
LblModalSubproyecto.Text = ObjOS.SubProyecto
TxtCondiciones.Text = ObjOS.Condiciones
If TipoAccion = OSModalTipoAccion.Actualizacion Then
@@ -725,6 +741,7 @@ Partial Class OS_RepServicioDomicilio
CveTecnicoAsignarOrioginal = ObjOS.CveUsuarioAtendio
FechaInicioOriginal = ObjOS.FechaInicio
TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy hh:mm")
DvModalSubProyecto.Visible = True
'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour)
'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute
'TSTimeSelector.AmPm = If(ObjOS.FechaInicio.Hour > 12, MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
@@ -786,6 +803,15 @@ Partial Class OS_RepServicioDomicilio
Dim CveOS As Integer = HFCveOS.Value.ToEntero
Dim CveOsDetalle As Integer = HFCveOsDetalle.Value.ToEntero
Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero, -1)
If TipoAccion = OSModalTipoAccion.Asignacion AndAlso Not CveSubProyectoTecnico > 0 Then
Alert("No se encontro el subproyecto o centro de costo del tecnico seleccionado.")
Exit Sub
End If
If Not CvePSDetalle > 0 Then
Alert("No esta asiganado el producto del detalle a la funcionalidad.")
Exit Sub
@@ -822,9 +848,10 @@ Partial Class OS_RepServicioDomicilio
CveEstatosOrdenNueva = CveEstatusAsiganada
End If
If ObjOS.AddOrdenesServicios(CveCliente, DdlSubProyectoOS.SelectedValue.ToEntero, TxtSolicito.Text, TxtFechaOS.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, CveEstatosOrdenNueva,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOrdenServicioTipo, CveClienteSucursal:=-1,
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, Correo:=TxtEmail.Text) Then
If ObjOS.AddOrdenesServicios(CveCliente, CveSubProyectoTecnico, TxtSolicito.Text, TxtFechaOS.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, CveEstatosOrdenNueva,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOrdenServicioTipo, CveClienteSucursal:=-1, Direccion:=TxtDireccion.Text,
Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, Correo:=TxtEmail.Text,
Condiciones:=TxtCondiciones.Text.Trim) Then
CveOS = ObjOS.CveOS
CveOsDetalle = ObjOS.AddOrdenesServiciosDetalle(CveOS, CvePSDetalle, 1, -1, -1, "", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, "")
@@ -854,8 +881,8 @@ Partial Class OS_RepServicioDomicilio
If CveOS > 0 Then
If Not ObjOS.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaOS.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, CveEstatusOrden, CveOS, UsuarioActual.CveUsuario,
-1, CveClienteSucursal:=-1, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveSubProyecto:=DdlSubProyectoOS.SelectedValue.ToEntero, Correo:=TxtEmail.Text) Then
-1, CveClienteSucursal:=-1, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text,
CveSubProyecto:=CveSubProyectoTecnico, Correo:=TxtEmail.Text, Condiciones:=TxtCondiciones.Text.Trim) Then
TieneError = True
End If
@@ -876,21 +903,26 @@ Partial Class OS_RepServicioDomicilio
If ObjOS.GetSubProyectosEstatusInicial(DdlTecnicoAsignar.SelectedValue.ToEntero, 3, UsuarioActual.CveEmpresa) Then
Dim subProyectoDelTecnico As DataTable
subProyectoDelTecnico = ObjOS.DtResultados.FiltraParametros($"CveSubProyecto = {DdlSubProyectoOS.SelectedValue.ToEntero}")
If subProyectoDelTecnico.Rows.Count > 0 Then
If Not ObjOS.UpdateOrdenesServiciosAsignadas(CveOsDetalle, DdlTecnicoAsignar.SelectedValue.ToEntero, TxtModalFechaOS.Text.ToDate, TxtModalFechaOS.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
TieneError = True
End If
Else
Alert("El técnico y la Orden de Servicio deben pertenecer al mismo subProyecto", TipoMensaje.MsgAdvertencia)
TieneError = True
End If
If Not ObjOS.UpdateOrdenesServiciosAsignadas(CveOsDetalle, DdlTecnicoAsignar.SelectedValue.ToEntero, TxtModalFechaOS.Text.ToDate, TxtModalFechaOS.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
TieneError = True
End If
'If ObjOS.GetSubProyectosEstatusInicial(DdlTecnicoAsignar.SelectedValue.ToEntero, 3, UsuarioActual.CveEmpresa) Then
' Dim subProyectoDelTecnico As DataTable
' subProyectoDelTecnico = ObjOS.DtResultados.FiltraParametros($"CveSubProyecto = {CveSubProyectoTecnico}")
' If subProyectoDelTecnico.Rows.Count > 0 Then
' If Not ObjOS.UpdateOrdenesServiciosAsignadas(CveOsDetalle, DdlTecnicoAsignar.SelectedValue.ToEntero, TxtModalFechaOS.Text.ToDate, TxtModalFechaOS.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
' TieneError = True
' End If
' Else
' Alert("El técnico y la Orden de Servicio deben pertenecer al mismo subProyecto", TipoMensaje.MsgAdvertencia)
' TieneError = True
' End If
'End If
If Not TieneError Then
@@ -916,7 +948,7 @@ Partial Class OS_RepServicioDomicilio
Dim OIDescripcion As String = $"{DdlTecnicoAsignar.SelectedItem.Text} <b><a href='/OS/OrdenesServicios.aspx?CveOS={CveOS}' target='_blank' class='Texto' >Orden de servicio {FolioAsignar} </a></b>"
If Not ObjEventos.AddEventoAgenda(2, DdlTecnicoAsignar.SelectedItem.Text, OIDescripcion, 2, TxtModalFechaOS.Text.ToDateTime(), TxtModalFechaOS.Text.ToDateTime().AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=2,
Importe:=0, CveOS:=CveOS, CveSubProyecto:=DdlSubProyectoOS.SelectedValue.ToEntero) Then
Importe:=0, CveOS:=CveOS, CveSubProyecto:=CveSubProyectoTecnico, CveUsuarioPara:=DdlTecnicoAsignar.SelectedValue.ToEntero) Then
TieneError = True
End If
End If
@@ -942,6 +974,10 @@ Partial Class OS_RepServicioDomicilio
MandaCorreOS(CveOSAsignar, CorreoAsignado)
End If
If Not TieneError And TxtEmail.Text.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
MandaCorreOS(CveOSAsignar, TxtEmail.Text, True)
End If
If Not TieneError Then
ConsultaOrdenesServiciosNoAsignadas()
@@ -961,7 +997,7 @@ Partial Class OS_RepServicioDomicilio
End Sub
Private Sub MandaCorreOS(CveOS As Integer, CorreoUsuarioAsignado As String)
Private Sub MandaCorreOS(CveOS As Integer, CorreoUsuarioAsignado As String, Optional EsCliente As Boolean = False)
@@ -1023,9 +1059,8 @@ Partial Class OS_RepServicioDomicilio
params.Add(New ReportParameter("Solicito", dr("PersonaSolicito").ToString))
params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
params.Add(New ReportParameter("Recibio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaRecibido", dr("FechaRecepcion").ToString))
params.Add(New ReportParameter("FechaRecibido", dr("FechaRecepcion").ToString.ToDate.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FolioOS", dr("Folio").ToString))
FolioOS = dr("Folio").ToString
params.Add(New ReportParameter("ClienteTelefono", dr("Telefono").ToString))
params.Add(New ReportParameter("ClienteCalle", dr("Direccion").ToString))
params.Add(New ReportParameter("ClienteColonia", dr("Colonia").ToString))
@@ -1033,19 +1068,40 @@ Partial Class OS_RepServicioDomicilio
params.Add(New ReportParameter("ClienteEstado", dr("Estado").ToString))
CveFolio = dr("Folio").ToString
If RutaReporte.Exists Then
params.Add(New ReportParameter("NoDeCliente", dr("CveCliente").ToString))
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
params.Add(New ReportParameter("Vendedor", " "))
params.Add(New ReportParameter("Correo", dr("Correo").ToString))
params.Add(New ReportParameter("CodigoDeServicio", dr("CveOS").ToString))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
params.Add(New ReportParameter("TipoServicio", dr("TipoServicio").ToString))
params.Add(New ReportParameter("TipoEquipo", dr("TipoEquipo").ToString))
params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
params.Add(New ReportParameter("Copia", "Copia: Original"))
params.Add(New ReportParameter("Equipo", dr("Equipo").ToString))
End If
'If RutaReporte.Exists Then
params.Add(New ReportParameter("NoDeCliente", dr("CveCliente").ToString))
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
params.Add(New ReportParameter("Vendedor", " "))
params.Add(New ReportParameter("Correo", dr("Correo").ToString))
params.Add(New ReportParameter("CodigoDeServicio", dr("CveOS").ToString))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
params.Add(New ReportParameter("TipoServicio", dr("TipoServicio").ToString))
params.Add(New ReportParameter("TipoEquipo", dr("TipoEquipo").ToString))
'params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
params.Add(New ReportParameter("Copia", "Copia: Original"))
params.Add(New ReportParameter("Equipo", dr("Equipo").ToString))
params.Add(New ReportParameter("DireccionOS", dr("DireccionOS").ToString))
params.Add(New ReportParameter("Telefono", dr("Telefono").ToString))
params.Add(New ReportParameter("CorreoOS", dr("CorreoOS").ToString))
params.Add(New ReportParameter("ModeloMarca", dr("ModeloMarca").ToString))
params.Add(New ReportParameter("Año", dr("Año").ToString))
params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString))
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString))
params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), "")))
params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString))
'End If
End If
End If
@@ -1063,13 +1119,11 @@ Partial Class OS_RepServicioDomicilio
End If
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTOS = ObjOS.DtResultados
End If
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTMaterialesOS = ObjOS.DtResultados
End If
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}

View File

@@ -15,8 +15,10 @@
<!-- BEGIN STYLES -->
<%: Scripts.Render("~/bundles/modernizr") %>
<%: Styles.Render("~/Content/AjaxControlToolkit/Styles/Bundle") %>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800" rel="stylesheet">
<link href="/Metronic/fontawesome6/css/all.min.css" rel="stylesheet" type="text/css" />
<%-- <link href="/Metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="/Metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

View File

@@ -1,16 +1,13 @@
<link href="Metronic/assets/global/css/css?v=uC_Xd4yGLEBrebFllFBJXKRlBE1P1CpqOtQ63B3w90o1" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800" rel="stylesheet">
<link href="Metronic/assets/admin/layout/css/custom.css" rel="stylesheet">
<style>
.margenbound {
text-align: right;
}
.amChartsAttribution {
display: none!important;
}
div[id*=UPGrafica] {
display: none;
}
@@ -29,4 +26,8 @@
.portlet.light.bordered {
border: none!important;
}
.portlet-total {
float:right!important;
display:inline-block!important;
}
</style>

View File

@@ -132,6 +132,7 @@
<div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem>
<asp:ListItem Text="Familia-Linea" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>