This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-01-16 07:32:57 -07:00
42 changed files with 9527 additions and 5498 deletions

View File

@@ -928,7 +928,7 @@ Public Class ClsAcumuladores
End Function End Function
#End Region #End Region
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, Puntos As Decimal, ImporteCargo As Decimal, ImporteBonificacion As Decimal, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, FechaIng As DateTime, Optional CveMovimiento As Integer = -1, CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, FechaIng As DateTime, Optional CveMovimiento As Integer = -1,
Optional CveVentaBonificacion As Integer = -1, Optional FacturadoBonificacion As Boolean = False) As Boolean Optional CveVentaBonificacion As Integer = -1, Optional FacturadoBonificacion As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -940,6 +940,9 @@ Public Class ClsAcumuladores
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño .Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
.Add("@Puntos", SqlDbType.Money).Value = Puntos
.Add("@ImporteCargo", SqlDbType.Money).Value = ImporteCargo
.Add("@ImporteBonificacion", SqlDbType.Money).Value = ImporteBonificacion
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
@@ -961,7 +964,8 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional CveVentaRNCCargo As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha,
Optional CveVentaRNCCargo As Integer = -1, Optional CveVentaRNCBonificacion As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -973,6 +977,7 @@ Public Class ClsAcumuladores
.Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo .Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo
.Add("@CveVentaRNCBonificacion", SqlDbType.Int).Value = CveVentaRNCBonificacion
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
End With End With

View File

@@ -264,7 +264,8 @@ Public Class ClsClientes
End Sub End Sub
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer, Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1, CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1,
Optional Cuenta As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_ClientesGet") DataAdapter("PA_ClientesGet")
@@ -287,6 +288,8 @@ Public Class ClsClientes
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro .Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -2264,16 +2264,18 @@ Public Class ClsContPAQi
StrSQL.AppendLine(" @Folio INT,") StrSQL.AppendLine(" @Folio INT,")
StrSQL.AppendLine(" @NumMovto INT,") StrSQL.AppendLine(" @NumMovto INT,")
StrSQL.AppendLine(" @IdDiario INT,") StrSQL.AppendLine(" @IdDiario INT,")
StrSQL.AppendLine(" @SegNegMovtos INT,")
StrSQL.AppendLine(" @Fecha DATETIME,") StrSQL.AppendLine(" @Fecha DATETIME,")
StrSQL.AppendLine(" @IDEjercicio INT,") StrSQL.AppendLine(" @IDEjercicio INT,")
StrSQL.AppendLine(" @TimeStamp NVARCHAR (200);") StrSQL.AppendLine(" @TimeStamp NVARCHAR (200);")
StrSQL.AppendLine(" SET NOCOUNT ON;") StrSQL.AppendLine(" SET NOCOUNT ON;")
StrSQL.AppendLine(" ") 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 @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);")
StrSQL.AppendLine(" SET @Fecha = @FechaMov;") StrSQL.AppendLine(" SET @Fecha = @FechaMov;")
StrSQL.AppendLine(" SET @IdDiario = 0;") 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("")
StrSQL.AppendLine(" BEGIN TRY") StrSQL.AppendLine(" BEGIN TRY")
StrSQL.AppendLine(" ") StrSQL.AppendLine(" ")
@@ -2306,7 +2308,7 @@ Public Class ClsContPAQi
'StrSQL.AppendLine("END") '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(" 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(" ") StrSQL.AppendLine(" ")
''DESCOMENTAR PARA CIERRE PERIODO ''DESCOMENTAR PARA CIERRE PERIODO
@@ -3331,7 +3333,7 @@ Public Class ClsContPAQi
StrSQL.Append(" INNER JOIN Cuentas C ON C.Id = A.IdSubCtade") StrSQL.Append(" INNER JOIN Cuentas C ON C.Id = A.IdSubCtade")
StrSQL.Append(" )") StrSQL.Append(" )")
StrSQL.Append(" SELECT Top(@RowNum) C.Id, C.Codigo, C.Nombre, C.IdAgrupadorSAT,SA.Nombre AS AgrupadorSAT, ") 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(" C.Tipo, C.EsBaja, C.CtaMayor, C.Afectable, C.IdMoneda, C.DigAgrup, C.NomIdioma, ")
StrSQL.Append(" CASE ") StrSQL.Append(" CASE ")
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '1' THEN 'Activo' ") 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) = '3' THEN 'Capital' ")
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) IN ('4', '5', '6', '7', '8', '9') THEN 'ER' ") StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) IN ('4', '5', '6', '7', '8', '9') THEN 'ER' ")
StrSQL.Append(" ELSE 'Otras' ") 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(" 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 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(" 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(" , 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(" AND NOT SubCtade IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE') THEN 1 ELSE 0 END AS CtaInicial,")
StrSQL.Append(" E.Nivel, E.Orden") StrSQL.Append(" E.Nivel, E.Orden")

View File

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

View File

@@ -1248,7 +1248,7 @@ Public Class ClsGenerales
#End Region #End Region
#Region "C O L E C T I V A S" #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 Dim Retorno As Boolean = False
DataAdapter("PA_Gral_ColectivasGet") DataAdapter("PA_Gral_ColectivasGet")
@@ -4223,13 +4223,14 @@ Public Class ClsGenerales
Return Retorno Return Retorno
End Function End Function
Public Function AddTipoOrganico(TipoOrganico As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddTipoOrganico(TipoOrganico As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_TipoOrganicosAdd") DataAdapter("PA_Gral_TipoOrganicosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@TipoOrganico", SqlDbType.VarChar).Value = TipoOrganico .Add("@TipoOrganico", SqlDbType.VarChar).Value = TipoOrganico
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
@@ -4317,13 +4318,14 @@ Public Class ClsGenerales
Return Retorno Return Retorno
End Function End Function
Public Function AddEmpacado(TipoEmpacado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddEmpacado(TipoEmpacado As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_EmpacadosAdd") DataAdapter("PA_Gral_EmpacadosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@TipoEmpacado", SqlDbType.VarChar).Value = TipoEmpacado .Add("@TipoEmpacado", SqlDbType.VarChar).Value = TipoEmpacado
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With

View File

@@ -1630,6 +1630,48 @@ Public Class ClsOS
Return Retorno Return Retorno
End Function End Function
Public Function AddOrdenesServiciosTecnicoHorarioNoOperativo(CveUsuarioAsignado As Integer, HoraInicio As DateTime, HoraFin As DateTime, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_HorariosNoOperativosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
.Add("@HoraInicio", SqlDbType.Time).Value = HoraInicio.TimeOfDay
.Add("@HoraFin", SqlDbType.Time).Value = HoraFin.TimeOfDay
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el horario no operativo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetOrdenesServiciosTecnicoHorarioNoOperativo(CveUsuarioAsignado As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_HorariosNoOperativosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los horarios no operativos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region #End Region
#Region "ESTATUS USUARIOS OS" #Region "ESTATUS USUARIOS OS"

View File

@@ -375,61 +375,96 @@ Public Class ClsPaginas
Property GlobalDTFraccionArancelaria() As DataTable Property GlobalDTFraccionArancelaria() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTFraccionArancelaria") = value Dim AppNombre As String = "GlobalDTFraccionArancelaria"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTIncoterm() As DataTable Property GlobalDTIncoterm() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTIncoterm") = value Dim AppNombre As String = "GlobalDTIncoterm"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTipoOperacion() As DataTable Property GlobalDTTipoOperacion() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTipoOperacion") = value Dim AppNombre As String = "GlobalDTTipoOperacion"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTSATMotivoTraslado() As DataTable Property GlobalDTSATMotivoTraslado() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTSATMotivoTraslado") = value Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTUnidadAduana() As DataTable Property GlobalDTUnidadAduana() As DataTable
Get Get
GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable) Dim AppNombre As String = "GlobalDTUnidadAduana"
End Get If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Set(value As DataTable)
Application("GlobalDTUnidadAduana") = value
End Set
End Property
Property GlobalDTGralPaises() As DataTable
Get
If Application("GlobalDTGralPaises") Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable) GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) 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 Set
End Property End Property
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
@@ -437,7 +472,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralEstados" Dim AppNombre As String = "GlobalDTGralEstados"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
@@ -463,7 +498,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTGralMunicipios" Dim AppNombre As String = "GlobalDTGralMunicipios"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
@@ -490,7 +525,7 @@ Public Class ClsPaginas
If Application("GlobalDTLocalidad") Is Nothing Then If Application("GlobalDTLocalidad") Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
@@ -523,14 +558,13 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String, 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 Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = "GlobalDTGralColonias" Dim AppNombre As String = "GlobalDTGralColonias"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
@@ -561,7 +595,7 @@ Public Class ClsPaginas
Get Get
If Application("GlobalDTPSATUM") Is Nothing Then If Application("GlobalDTPSATUM") Is Nothing Then
Dim ObjGrales As New ClsGenerales 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() ObjGrales.Dispose()
End If End If
@@ -1007,18 +1041,36 @@ Public Class ClsPaginas
End Property End Property
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTFamilias = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
End If End If
GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) 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 Set
End Property End Property
@@ -1109,6 +1161,14 @@ Public Class ClsPaginas
'End Property 'End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
Get 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 If EsPersonaFisica <> -1 Then
Dim Tipo As New StringBuilder Dim Tipo As New StringBuilder
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1") 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) Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
End If 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 GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose() Dv.Dispose()
Else Else
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable) GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable)
End If End If
End Get End Get
Set(ByVal value As DataTable) Set(value As DataTable)
Application("GlobalDTSATUsosCFDI") = value Dim AppNombre As String = "GlobalDTSATUsosCFDI"
Application(AppNombre) = value
End Set End Set
End Property End Property
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
@@ -2616,11 +2677,11 @@ Public Class ClsPaginas
#Region "***********************************************************************DT GENERALES**************************************************************************************" #Region "***********************************************************************DT GENERALES**************************************************************************************"
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjGenerales As New ClsGenerales 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() ObjGenerales.Dispose()
End If End If
@@ -2634,54 +2695,69 @@ Public Class ClsPaginas
Dv.Dispose() Dv.Dispose()
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) 'sino existe, recarga los datos
GlobalDTGralCategorias2 = Dv.ToTable If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dv.Dispose() Dim ObjGenerales As New ClsGenerales
Else If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados
GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable) ObjGenerales.Dispose()
End If 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTCategorias2") = value Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralEscolaridades() As DataTable Property GlobalDTGralEscolaridades() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGralEscolaridades") = value Dim AppNombre As String = "GlobalDTGralEscolaridades"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTGralColectivas = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
End If End If
GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGralColectivas") = value Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjMarcas As New ClsProductosServicios Dim ObjMarcas As New ClsProductosServicios
@@ -2701,7 +2777,7 @@ Public Class ClsPaginas
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
@@ -3496,33 +3572,58 @@ Public Class ClsPaginas
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" #Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
Property GlobalDTAsistenciaDetalle() As DataTable Property GlobalDTAsistenciaDetalle() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTAsistenciaDetalle") = value Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTAsistenciasInasistencias() As DataTable Property GlobalDTAsistenciasInasistencias() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTAsistenciasInasistencias") = value Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEstatusPersonal() As DataTable Property GlobalDTEstatusPersonal() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEstatusPersonal") = value Dim AppNombre As String = "GlobalDTEstatusPersonal"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
'sino existe, recarga los datos 'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim ObjPersonal As New ClsRH Dim ObjPersonal As New ClsRH
@@ -3530,145 +3631,239 @@ Public Class ClsPaginas
ObjPersonal.Dispose() ObjPersonal.Dispose()
End If End If
If CveEmpresa <> -1 Or CvePersonal <> -1 Then GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
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
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTDepartamentos() As DataTable Property GlobalDTDepartamentos() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTDepartamentos") = value Dim AppNombre As String = "GlobalDTDepartamentos"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) 'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTRHPuestos = Dv.ToTable Dim ObjPersonal As New ClsRH
Dv.Dispose() If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
Else ObjPersonal.Dispose()
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
End If End If
GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTRHPuestos") = value Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEscolaridad() As DataTable Property GlobalDTEscolaridad() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEscolaridad") = value Dim AppNombre As String = "GlobalDTEscolaridad"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTEstadoCivil() As DataTable Property GlobalDTEstadoCivil() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTEstadoCivil") = value Dim AppNombre As String = "GlobalDTEstadoCivil"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTDocumentos() As DataTable Property GlobalDTDocumentos() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTDocumentos") = value Dim AppNombre As String = "GlobalDTDocumentos"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTGenero() As DataTable Property GlobalDTGenero() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTGenero") = value Dim AppNombre As String = "GlobalDTGenero"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTMotivoBaja() As DataTable Property GlobalDTMotivoBaja() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTMotivoBaja") = value Dim AppNombre As String = "GlobalDTMotivoBaja"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTiposContrato() As DataTable Property GlobalDTTiposContrato() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTiposContrato") = value Dim AppNombre As String = "GlobalDTTiposContrato"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTRutas() As DataTable Property GlobalDTRutas() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTRutas") = value Dim AppNombre As String = "GlobalDTRutas"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTurno() As DataTable Property GlobalDTTurno() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTurno") = value Dim AppNombre As String = "GlobalDTTurno"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTJornadas() As DataTable Property GlobalDTJornadas() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTJornadas") = value Dim AppNombre As String = "GlobalDTJornadas"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTMotivosHorasExtras() As DataTable Property GlobalDTMotivosHorasExtras() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTMotivosHorasExtras") = value Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTipoBuzon() As DataTable Property GlobalDTTipoBuzon() As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTTipoBuzon") = value Dim AppNombre As String = "GlobalDTTipoBuzon"
Application(AppNombre) = value
End Set End Set
End Property End Property
#End Region #End Region
#Region "*********** D T - C O M B U S T I B L E S ***********" #Region "*********** D T - C O M B U S T I B L E S ***********"
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
@@ -3884,19 +4079,20 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) 'sino existe, recarga los datos
Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
GlobalDTPaqueteriaGuiaTipos = Dv.ToTable Dim ObjGenerales As New ClsGenerales
Dv.Dispose() If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
Else ObjGenerales.Dispose()
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
End If End If
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable)
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTPaqueteriaGuiaTipos") = value Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
Application(AppNombre) = value
End Set End Set
End Property End Property
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
@@ -4117,6 +4313,40 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
#Region "CITRUS GAME"
Property GlobalDTGralEmpacados(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjGenerales As New ClsGenerales()
If ObjGenerales.GetEmpacados(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTGralEmpacados = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralTipoOrganicos(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjGenerales As New ClsGenerales()
If ObjGenerales.GetTipoOrganicos(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
ObjGenerales.Dispose()
End If
GlobalDTGralTipoOrganicos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
#End Region
#End Region #End Region
@@ -4125,8 +4355,6 @@ Public Class ClsPaginas
DirectorioSitio = 2 DirectorioSitio = 2
eFacturasCaptcha = 3 eFacturasCaptcha = 3
RutaEmpresasJM = 500 RutaEmpresasJM = 500
RutaEmpresasRM = 501 RutaEmpresasRM = 501
RutaEmpresasPC = 502 RutaEmpresasPC = 502
@@ -5135,6 +5363,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319) PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
PaginaDict.Add("/Inventarios/CartaPorteManual.aspx".ToUpper(), 1321) PaginaDict.Add("/Inventarios/CartaPorteManual.aspx".ToUpper(), 1321)
PaginaDict.Add("/Inventarios/EntradasSalidas.aspx?AL=1".ToUpper(), 1334)
#End Region #End Region
@@ -10298,8 +10528,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 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 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 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 Else
'Agregamos Nacional '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 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

@@ -762,8 +762,8 @@ Public Class ClsProductosServicios
.Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO .Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO
'Nuevo MLopez 18/11/2022 'Nuevo MLopez 18/11/2022
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoOrganico .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
End With End With

View File

@@ -2102,12 +2102,17 @@ Namespace Modelos
CveConcepto = 6 CveConcepto = 6
End Select End Select
'SI ES FACTURA,NC,DEV O ES RNC DE CARGO, CANCELAR MOVIMIENTOS 'SI ES FACTURA,NC,DEV O ES RNC DE CARGO, CANCELAR MOVIMIENTOS
If factura.TipoDocto.Contiene("Ing", "Dev", "Egs") OrElse factura.TipoDocto.Contiene("RNC") AndAlso factura.Num1 = 1 Then If factura.TipoDocto.Contiene("Ing", "Dev", "Egs") OrElse (factura.TipoDocto.Contiene("RNC") AndAlso factura.Num1 = 1) Then
If ObjAcum.DistribuidorMovtosGet(factura.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=factura.CveVenta, CveConcepto:=CveConcepto) Then If ObjAcum.DistribuidorMovtosGet(factura.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=factura.CveVenta, CveConcepto:=CveConcepto) Then
Dim DtMovimientos As DataTable = ObjAcum.DtResultados.FiltraParametros("Cantidad > 0") Dim DtMovimientos As DataTable = ObjAcum.DtResultados.FiltraParametros("Cantidad > 0")
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
For Each RowSalida As DataRow In DtMovimientos.Rows For Each RowSalida As DataRow In DtMovimientos.Rows
Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1 Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1
Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal()
Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal()
Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal()
Dim FacturadoBonificacion = False Dim FacturadoBonificacion = False
Dim CveVentaBonificacion As Integer = -1 Dim CveVentaBonificacion As Integer = -1
@@ -2117,15 +2122,15 @@ Namespace Modelos
FacturadoBonificacion = CBool(RowSalida("FacturadoBonificacion").ToString()) FacturadoBonificacion = CBool(RowSalida("FacturadoBonificacion").ToString())
End If End If
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", factura.Fecha, CveVentaBonificacion:=CveVentaBonificacion, FacturadoBonificacion:=FacturadoBonificacion) Then If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, Puntos, ImporteCargo, ImporteBonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", factura.Fecha, CveVentaBonificacion:=CveVentaBonificacion, FacturadoBonificacion:=FacturadoBonificacion) Then
Retorno = False Retorno = False
Exit For Exit For
End If End If
Next Next
DtMovimientos.Dispose() DtMovimientos.Dispose()
End If End If
End If End If
Else
End If End If
@@ -2138,15 +2143,25 @@ Namespace Modelos
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
If factura.TipoDocto = "Ing" AndAlso factura.Cliente.EsDistribuidor Then If factura.TipoDocto = "Ing" AndAlso factura.Cliente.EsDistribuidor Then
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
For Each drow As DataRow In factura.DtDetalle.Rows For Each drow As DataRow In factura.DtDetalle.Rows
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then If drow("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}")
UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then If DrTamanio IsNot Nothing Then
Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, 2, factura.CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then
Resultado = False
Exit For
End If
Else
Resultado = False Resultado = False
Exit For Exit For
End If End If
End If End If
Next Next
@@ -2197,13 +2212,22 @@ Namespace Modelos
If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}")
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then If DrTamanio IsNot Nothing Then
' Mensaje = "Error al guardar Movimientos de distribuidor" Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then
' Mensaje = "Error al guardar Movimientos de distribuidor"
Resultado = False
Exit For
End If
Else
Resultado = False Resultado = False
Exit For Exit For
End If End If
End If End If
End If End If
@@ -4867,6 +4891,11 @@ Namespace Modelos
AplicaRefacturacionConPagos = True AplicaRefacturacionConPagos = True
End If End If
'SI NO TIENE PAGOS, DEBE SEGUIR EL CAMINO DE REFACTURACION NORMAL
If AplicaRefacturacionConPagos AndAlso ObjFactura.Pagado = 0 Then
AplicaRefacturacionConPagos = False
End If
'VALIDA QUE LA FACTURA NO TENGA PAGOS 'VALIDA QUE LA FACTURA NO TENGA PAGOS
If Not AplicaRefacturacionConPagos AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then If Not AplicaRefacturacionConPagos AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
@@ -5380,7 +5409,10 @@ Namespace Modelos
DtSalidas = DtInventario.FiltraParametros($"CvePS IS NULL AND {Filtro}") DtSalidas = DtInventario.FiltraParametros($"CvePS IS NULL AND {Filtro}")
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 37 AND CveTipoAlmacen = 24") DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 37")
If ObjFactura.TipoDocto = "Dev" Then
DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 36")
End If
End If End If
If ObjFactura.TipoDocto = "Ing" Then If ObjFactura.TipoDocto = "Ing" Then
@@ -5593,7 +5625,7 @@ Namespace Modelos
If DtVirtuales IsNot Nothing Then If DtVirtuales IsNot Nothing Then
For Each RowVirtual As DataRow In DtVirtuales.Rows For Each RowVirtual As DataRow In DtVirtuales.Rows
'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL 'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
If Not ErrorCancelar AndAlso Not CancelarMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowVirtual("CveMovimiento").ToString().ToEntero(), ObjInventario) Then If Not ErrorCancelar AndAlso Not CancelarMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowVirtual("CveMovimiento").ToString().ToEntero(), ObjInventario, TipoDocto:=ObjFactura.TipoDocto) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un error al realizar la devolución del virtual. Por favor vuelva a intentar." MensajeError = "Ocurrió un error al realizar la devolución del virtual. Por favor vuelva a intentar."
End If End If
@@ -6130,7 +6162,7 @@ Namespace Modelos
Return Not ErrorCancelar Return Not ErrorCancelar
End Function End Function
Private Function CancelarMovimientosVirtuales(CveVenta As Integer, CveMovimientoDevolucion As Integer, CveMovimientoVirtualSalida As Integer, ByRef ObjInventario As ClsInventarios) As Boolean Private Function CancelarMovimientosVirtuales(CveVenta As Integer, CveMovimientoDevolucion As Integer, CveMovimientoVirtualSalida As Integer, ByRef ObjInventario As ClsInventarios, Optional TipoDocto As String = "") As Boolean
Dim ErrorCancelar As Boolean = False Dim ErrorCancelar As Boolean = False
Try Try
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
@@ -6163,6 +6195,10 @@ Namespace Modelos
End If End If
Dim CveConceptoMovimientoVirtual As Integer = 36 Dim CveConceptoMovimientoVirtual As Integer = 36
If TipoDocto = "Dev" Then
CveConceptoMovimientoVirtual = 37
End If
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
@@ -7382,6 +7418,14 @@ Namespace Modelos
#End Region #End Region
#Region "G L O B A L - D T" #Region "G L O B A L - D T"
Property GlobalDTAcumTamaños() As DataTable
Get
GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application("GlobalDTAcumTamaños"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTAcumTamaños") = value
End Set
End Property
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get Get
If GlobalTipoCambio <= 0 Then If GlobalTipoCambio <= 0 Then

View File

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

View File

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

View File

@@ -836,13 +836,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (CveMoneda != 1 && UsaComplementaria) if (CveMoneda != 1 && UsaComplementaria)
{ {
decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria); //decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria);
if (difComplementaria != 0)
{
ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria);
}
//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())) 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()))
{ {

View File

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

View File

@@ -59,7 +59,7 @@
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style=""> <div class="portlet solid grey-cascade portlet-filter" style="" id="DVFILTROS">
<div class="portlet-title portlet-filterT" style=""> <div class="portlet-title portlet-filterT" style="">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
@@ -124,10 +124,10 @@
</asp:DropDownList> </asp:DropDownList>
</li> </li>
<li>Cuenta:&nbsp;&nbsp;&nbsp;&nbsp; <li>Cuenta:&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/> <asp:Textbox runat="server" ID="TxtCuenta" Width="120px" Height="30px" />
</li> </li>
<li>Moneda: <li>Moneda:
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="80px"> <asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="120PX">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </li>

View File

@@ -69,13 +69,13 @@ Partial Class Bancos_RepCxCCliente
Mov.Dispose() Mov.Dispose()
GvCxC.DataBind() GvCxC.DataBind()
If (GvCxC.Rows.Count > 0) Then 'If (GvCxC.Rows.Count > 0) Then
GvCxC.UseAccessibleHeader = True GvCxC.UseAccessibleHeader = True
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
RegistraScript("OrdenarGV();") RegistraScript("OrdenarGV();")
UPDatos.Update()
UPDatos.Update() 'End If
End If
End Sub End Sub
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then

View File

@@ -1084,6 +1084,7 @@ Partial Class Compras_Compras
#End Region #End Region
Dim DTConceptos As DataTable Dim DTConceptos As DataTable
Private Property EmpresasOC As List(Of Integer) Private Property EmpresasOC As List(Of Integer)
Get Get
@@ -1185,6 +1186,18 @@ Partial Class Compras_Compras
End Property End Property
Private Property EsDevolucionApoyoLogistico As Boolean
Get
If ViewState("EsDevolucionApoyoLogistico") Is Nothing Then
ViewState("EsDevolucionApoyoLogistico") = False
End If
Return CType(ViewState("EsDevolucionApoyoLogistico"), Boolean)
End Get
Set(value As Boolean)
ViewState("EsDevolucionApoyoLogistico") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -1610,7 +1623,13 @@ Partial Class Compras_Compras
NCSeleccionFacturasRelacionadas(UUIDSList) NCSeleccionFacturasRelacionadas(UUIDSList)
End If End If
If CveFactura > 0 AndAlso Serie Isnot nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
EsDevolucionApoyoLogistico = True
DdlTipoComprobante.Items.Clear()
DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV"))
DdlTipoComprobante.SelectedValueExist("DEV")
End If
End If End If
@@ -3500,7 +3519,7 @@ Partial Class Compras_Compras
ViewState("IdCtaContRetIVA") = ObjProveedor.IdCtaContRetIVA ViewState("IdCtaContRetIVA") = ObjProveedor.IdCtaContRetIVA
ViewState("IdCtaContRetISR") = ObjProveedor.IdCtaContRetISR ViewState("IdCtaContRetISR") = ObjProveedor.IdCtaContRetISR
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ObjProveedor.IdCtaContProveedores < 1 Then If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ObjProveedor.IdCtaContProveedores < 1 Then
Alert("El Proveedor seleccionado no tiene cuenta contable asignada.", TipoMensaje.MsgAdvertencia) Alert("El Proveedor seleccionado no tiene cuenta contable asignada.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -5527,6 +5546,8 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue = "Fac" Then If DdlTipoComprobante.SelectedValue = "Fac" Then
For Each tCveAlmacen As Integer In ListAlmacenes For Each tCveAlmacen As Integer In ListAlmacenes
If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
Continue For Continue For
@@ -5553,7 +5574,7 @@ Partial Class Compras_Compras
ListaMovimientosAlmacen.Add(CveMovimientoInventario) ListaMovimientosAlmacen.Add(CveMovimientoInventario)
Dim contadorAlamcen As Integer = 0
For Each Dr As DataRow In DtInv.Rows For Each Dr As DataRow In DtInv.Rows
CveProducto = Dr("CvePS").ToString.ToEntero CveProducto = Dr("CvePS").ToString.ToEntero
@@ -5594,22 +5615,26 @@ Partial Class Compras_Compras
End If End If
End If End If
'si no es por serie lote
ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar)
'si no es por serie lote
ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto)
If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If
End If End If
End If End If
End If
i = i + 1
i = i + 1 contadorAlamcen = contadorAlamcen + 1
Next Next
End If End If
Next Next
End If End If
@@ -8633,6 +8658,7 @@ Partial Class Compras_Compras
Pago.ImportePago = ImporteAnt Pago.ImportePago = ImporteAnt
Pago.OtroGastoIngreso = ImporComisionAnticipo Pago.OtroGastoIngreso = ImporComisionAnticipo
Pago.CveMonedaPago = CveMonedaAnticipo Pago.CveMonedaPago = CveMonedaAnticipo
Pago.TCPago = TipoCambioAnt
Select Case gvr.DataKey("TipoDocto") Select Case gvr.DataKey("TipoDocto")
Case "NC", "DEV" Case "NC", "DEV"
@@ -8661,10 +8687,6 @@ Partial Class Compras_Compras
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
If CveMonedaAnticipo > 1 Then If CveMonedaAnticipo > 1 Then
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt 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 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
@@ -10991,7 +11013,16 @@ Partial Class Compras_Compras
e.Row.FCCheckBox("cbInv").Enabled = False e.Row.FCCheckBox("cbInv").Enabled = False
End If End If
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
If EsDevolucionApoyoLogistico Then
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 27") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
Else
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
End If
e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
e.Row.FCDropDownList("ddlEAlmacen").DataBind() e.Row.FCDropDownList("ddlEAlmacen").DataBind()
'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen")) 'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen"))
@@ -11103,6 +11134,10 @@ Partial Class Compras_Compras
StrAlmacenes = $"Modalidad = 0" StrAlmacenes = $"Modalidad = 0"
End If End If
If EsDevolucionApoyoLogistico Then
StrAlmacenes = " CveTipoAlmacen = 27"
End If
e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
e.Row.FCDropDownList("ddlAlmacen").DataBind() e.Row.FCDropDownList("ddlAlmacen").DataBind()
@@ -17628,6 +17663,8 @@ Partial Class Compras_Compras
'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0 'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0
Row("NoDeducible") = NoDeducible Row("NoDeducible") = NoDeducible
Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento
Row("PU") = Math.Round(PU, DecimalesPermitidos) Row("PU") = Math.Round(PU, DecimalesPermitidos)
If CargaXml And (Version = "3.3" Or Version = "4.0") Then If CargaXml And (Version = "3.3" Or Version = "4.0") Then

View File

@@ -5455,7 +5455,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) 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("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), "")))
params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString)) params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString))

View File

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

View File

@@ -125,7 +125,7 @@
<div class="form-line"> <div class="form-line">
<div class="catcuentas left">Tipo de Cuenta</div> <div class="catcuentas left">Tipo de Cuenta</div>
<div class="catcuentas right"> <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 Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem> <asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem> <asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
@@ -145,7 +145,7 @@
<div class="form-line"> <div class="form-line">
<div class="catcuentas left">Cuenta Mayor</div> <div class="catcuentas left">Cuenta Mayor</div>
<div class="catcuentas right"> <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 Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem> <asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
<asp:ListItem Text="No " Value="2"></asp:ListItem> <asp:ListItem Text="No " Value="2"></asp:ListItem>

View File

@@ -537,6 +537,7 @@
<asp:BoundField HeaderText="Dias Trans" DataField="DiasTranscurridos" DataFormatString="{0}" Visible="false" /> <asp:BoundField HeaderText="Dias Trans" DataField="DiasTranscurridos" DataFormatString="{0}" Visible="false" />
<asp:BoundField HeaderText="T.C." DataField="TipoCambio" DataFormatString="{0}" Visible="false" /> <asp:BoundField HeaderText="T.C." DataField="TipoCambio" DataFormatString="{0}" Visible="false" />
<asp:BoundField HeaderText="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" /> <asp:BoundField HeaderText="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" />
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" ItemStyle-HorizontalAlign="Center" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
@@ -660,6 +661,13 @@
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkTC" runat="server" Text="&nbsp;Tipo Cambio" /></td> <asp:CheckBox ID="ChkTC" runat="server" Text="&nbsp;Tipo Cambio" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMostrarLineaAdicional" runat="server" Text="&nbsp;Linea Adicional" Checked="false" /></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -847,6 +847,13 @@ Partial Class RepCxCDetalle
GvDatos.Columns(44).Visible = False GvDatos.Columns(44).Visible = False
End If End If
If ChkMostrarLineaAdicional.Checked Then
GvDatos.Columns(45).Visible = True
SePersonalizo = 1
Else
GvDatos.Columns(45).Visible = False
End If
If SePersonalizo = 1 Then If SePersonalizo = 1 Then
ImgExcelPersonalizado.Visible = True ImgExcelPersonalizado.Visible = True

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,7 @@
'---------------------------------------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------------------------------------
'C A R G A - R H 'C A R G A - R H
#If False Then
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now)) GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
Using ObjRH As New ClsRH Using ObjRH As New ClsRH
@@ -59,6 +60,7 @@
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
End Using End Using
#End If
'---------------------------------------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------------------------------------
'C A R G A - O S 'C A R G A - O S
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now)) 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 'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
End Using End Using
'------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------
'A M O R T I Z A C I O N - C O N T A B L E '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.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = 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.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 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, 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, 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.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.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.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 If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
End Using End Using
#If False Then
'SAT 'SAT
Using ObjGrales As New ClsGenerales 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.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.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = 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.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing 'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
End Using End Using
#End If
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'E V E N T O S 'E V E N T O S

View File

@@ -2042,7 +2042,7 @@ Partial Class Inventarios_EntradasSalidas
If Not ErrorAC And Not ErrorMovInv Then If Not ErrorAC And Not ErrorMovInv Then
If Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then If ChkEmitirTimbrado.Checked AndAlso Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then
ErrorMovInv = True ErrorMovInv = True
Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia) Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -4404,6 +4404,11 @@ Partial Class Inventarios_EntradasSalidas
Exit Sub Exit Sub
End If End If
If Not TxtIFDescripcion.Text.Trim.Length > 0 Then
Alert("La descripción es requerida", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
@@ -4426,6 +4431,14 @@ Partial Class Inventarios_EntradasSalidas
Dim idCtaContableEntrada As Integer = 0 Dim idCtaContableEntrada As Integer = 0
Dim idCtaContableSalida As Integer = 0 Dim idCtaContableSalida As Integer = 0
Dim Prorratear As Boolean = If(UsuarioActual.CveEmpresa = 172 AndAlso DtMovimientosSalidaInvFisico.Rows.Count > 0 AndAlso DtMovimientosEntradaInvFisico.Rows.Count > 0, True, False)
Dim ProPU As Decimal = 0
'Dim ImporteSalida As Decimal =
'DtMovimientosSalidaInvFisico
'DtMovimientosEntradaInvFisico
Dim IdCuentaOtrosIngresos As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos Dim IdCuentaOtrosIngresos As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos
Select Case UsuarioActual.CveEmpresa Select Case UsuarioActual.CveEmpresa
Case 119 Case 119
@@ -4438,6 +4451,8 @@ Partial Class Inventarios_EntradasSalidas
Dim EsContabilizable As Boolean = (CveModalidad = 1) Dim EsContabilizable As Boolean = (CveModalidad = 1)
'MOVIMIENTO DE ENTRADA 'MOVIMIENTO DE ENTRADA
If DtMovimientosEntradaInvFisico.Rows.Count > 0 Then If DtMovimientosEntradaInvFisico.Rows.Count > 0 Then
'FolioEntrada = ObjInventario.GetFolioSiguiente(32, UsuarioActual.CveEmpresa) 'FolioEntrada = ObjInventario.GetFolioSiguiente(32, UsuarioActual.CveEmpresa)
@@ -4484,9 +4499,35 @@ Partial Class Inventarios_EntradasSalidas
End If End If
Next Next
If Prorratear Then
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim ProTotalSalida As Decimal = ObjInventario.DtResultados.SUMD("Total", "")
Dim ProCantidadEntrada As Decimal = DtMovimientosEntradaInvFisico.SUMD("Cantidad", "")
ProPU = (ProTotalSalida / ProCantidadEntrada).RoundSQL(6)
If Not ProPU > 0 Then
ErrorMovInv = True
Mensaje = $"Ocurrió un error al obtener el PU proraterado, pu {ProPU}"
End If
Else
ErrorMovInv = True
Mensaje = "Ocurrió un error al obtener el PU proraterado"
End If
End If
End If
If Not ErrorMovInv Then If Not ErrorMovInv Then
For Each Dr As DataRow In DtMovimientosEntradaInvFisico.Rows For Each Dr As DataRow In DtMovimientosEntradaInvFisico.Rows
ImporteConcepto = Dr("PU").ToString.ToDecimal ImporteConcepto = If(Prorratear, ProPU, Dr("PU").ToString.ToDecimal)
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
ImporteConcepto, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, ImporteConcepto, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then

View File

@@ -30,6 +30,10 @@ Partial Class Inventarios_KardexAlmacen
txtFechaI.Text = Now.ToShortDateString txtFechaI.Text = Now.ToShortDateString
End If End If
If UsuarioActual.TienePermisoProceso(349) Then
DdlIncluyeTransitorios.Items.RemoveAt(0) 'oculta opción "No" en tránsito
End If
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero) If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1") ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
End If End If
@@ -147,8 +151,9 @@ Partial Class Inventarios_KardexAlmacen
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM) Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero
Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue,
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then

View File

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

View File

@@ -1318,13 +1318,19 @@ Partial Class Inventarios_RecepcionUsados
If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}")
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, Now, CveMovimiento:=CveMovimiento) Then If DrTamanio IsNot Nothing Then
Mensaje = "Error al guardar Movimientos de distribuidor" Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
ErrorMovInv = True Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
Exit For Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal()
End If
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, Now, CveMovimiento:=CveMovimiento) Then
Mensaje = "Error al guardar Movimientos de distribuidor"
ErrorMovInv = True
Exit For
End If
End If
End If End If
Next Next

View File

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

View File

@@ -130,6 +130,9 @@
<li> <li>
<asp:LinkButton ID="LnlAgregarServicioDomiciolio" runat="server" OnClick="LnlAgregarServicioDomiciolio_Click"> <i class="fa fa-plus" aria-hidden="true"></i> Agregar Servicios a Domicilio </asp:LinkButton> <asp:LinkButton ID="LnlAgregarServicioDomiciolio" runat="server" OnClick="LnlAgregarServicioDomiciolio_Click"> <i class="fa fa-plus" aria-hidden="true"></i> Agregar Servicios a Domicilio </asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LnkHorariosNoOperativos" runat="server" OnClick="LnkHorariosNoOperativos_Click"> <i class="fa fa-plus" aria-hidden="true"></i> Técnico Horarios no operativos </asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -431,6 +434,9 @@
<div id="DVModalOS" class="modal ADS fade" role="dialog"> <div id="DVModalOS" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalOS" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalOS" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -595,7 +601,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTecnicoAsignar" Width="100%" runat="server" CssClass="form-control select2me" DataTextField="Nombre" Visible="true" DataValueField="CveUsuario"> <asp:DropDownList ID="DdlTecnicoAsignar" Width="100%" runat="server" CssClass="form-control select2me" DataTextField="Nombre" Visible="true" DataValueField="CveUsuario" AutoPostBack="true" OnSelectedIndexChanged="DdlTecnicoAsignar_SelectedIndexChanged1">
</asp:DropDownList> </asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RfvDdlTecnicoAsignar" InitialValue="-1" runat="server" ControlToValidate="DdlTecnicoAsignar" Display="None" <%--<asp:RequiredFieldValidator ID="RfvDdlTecnicoAsignar" InitialValue="-1" runat="server" ControlToValidate="DdlTecnicoAsignar" Display="None"
@@ -626,7 +632,7 @@
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;"> <div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;"> <div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
<asp:TextBox ID="TxtModalFechaOS" ClientIDMode="Static" runat="server" Width="140px" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18"></asp:TextBox> <asp:TextBox ID="TxtModalFechaOS" onchange="SetDefault($(this).val());" ClientIDMode="Static" runat="server" Width="140px" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18"></asp:TextBox>
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtModalFechaOS.ClientID.ToString()%>">Fecha:</label> <label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtModalFechaOS.ClientID.ToString()%>">Fecha:</label>
</div> </div>
</div> </div>
@@ -662,11 +668,104 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="DVModalOSHorarioNoOperativo" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalHorariosNoOperativos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><asp:Label runat="server" ID="Label1" >Horarios No Operativos</asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTecnicoAsignarHorario" Width="100%" runat="server" CssClass="form-control select2me" DataTextField="Nombre" Visible="true" DataValueField="CveUsuario" AutoPostBack="true"
OnSelectedIndexChanged="DdlTecnicoAsignarHorario_SelectedIndexChanged">
</asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RfvDdlTecnicoAsignar" InitialValue="-1" runat="server" ControlToValidate="DdlTecnicoAsignar" Display="None"
ErrorMessage="El campo <b>''Técnico''</b> es requerido por la aplicación" ValidationGroup="GrpAsignar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlTecnicoAsignar" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTecnicoAsignar" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= DdlTecnicoAsignarHorario.ClientID.ToString()%>">Técnico: </label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= TxtHorarioInicio.ClientID.ToString() %>" style="font-size: 13px; color: #888888;">Hora Inicio:</label>
<div class="form-group form-md-line-input input-iconright">
<cc1:TimeSelector ID="TxtHorarioInicio" runat="server" DisplaySeconds="false" DisplayButtons="true">
</cc1:TimeSelector>
<asp:CustomValidator ID="CVHoraInicio" runat="server" ControlToValidate="TxtHorarioInicio" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="GrpObligatorio" ValidateEmptyText="true"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraInicio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= TxtHorarioFin.ClientID.ToString() %>" style="font-size: 13px; color: #888888;">Hora Fin:</label>
<div class="form-group form-md-line-input input-iconright">
<cc1:TimeSelector ID="TxtHorarioFin" runat="server" DisplaySeconds="false" DisplayButtons="true">
</cc1:TimeSelector>
<asp:CustomValidator ID="CVHoraFin" runat="server" ControlToValidate="TxtHorarioFin" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="GrpObligatorio" ValidateEmptyText="true"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraFin" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<%-- <div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= TxtHorarioEnvio.ClientID.ToString() %>" style="font-size: 13px; color: #888888;">Hora de Envío:</label>
<div class="form-group form-md-line-input input-iconright">
<cc1:TimeSelector ID="TxtHorarioEnvio" runat="server" DisplaySeconds="false" DisplayButtons="false">
</cc1:TimeSelector>
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TxtHorarioEnvio" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="GrpObligatorio" ValidateEmptyText="true"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraInicio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>--%>
</div>
<div class="modal-footer">
<asp:LinkButton runat="server" ID="LnkGuardarHorarioNoOpeartivo" CssClass="btn btn-success" Text="Guardar" OnClick="LnkGuardarHorarioNoOpeartivo_Click" ></asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div style="display:none"> <div style="display:none">
<asp:UpdatePanel ID="UpCommando" runat="server"> <asp:UpdatePanel ID="UpCommando" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:Button runat="server" ID="LnkCommando" OnClick="LnkCommando_Click"></asp:Button> <asp:Button runat="server" ID="LnkCommando" OnClick="LnkCommando_Click"></asp:Button>
<asp:Button runat="server" ID="LnkValidaHorarioNoOperativo" OnClick="LnkValidaHorarioNoOperativo_Click"></asp:Button>
<asp:HiddenField runat="server" ID="HFCveOS" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HFCveOS" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HFCveOsDetalle" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HFCveOsDetalle" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HFOCveOIEvento" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HFOCveOIEvento" Value="-1" ClientIDMode="Static" />
@@ -1082,14 +1181,9 @@
$(document).ready(function () { $(document).ready(function () {
Calendario(); Calendario();
//if (PrimeraCargaCalendario) {
//}
$("#TxtModalFechaOS").val("" + start.format("DD/MM/YYYY 08:00"));
}); });
@@ -1110,6 +1204,67 @@
function CargaPickers() {
$.datetimepicker.setLocale('es');
$('input.ADDateTimePicker').each(function () {
var TThis = $(this);
TThis.datetimepicker({
dayOfWeekStart: 1,
lang: 'es',
format: 'd/m/Y H:i',
formatDate: 'd/m/Y H:i',
step: 30
});
var Div = TThis.parent()
var boton = document.createElement('span');
boton.className = "input-group-btn"
var subboton = document.createElement('a')
subboton.className = "btn default"
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
subboton.addEventListener('click', function () {
TThis.datetimepicker('show')
});
boton.appendChild(subboton)
var agregar = true;
for (var i = 0; i < Div[0].children.length; i++) {
if (Div[0].children[i].isEqualNode(boton)) {
agregar = false;
}
}
if (agregar) {
Div[0].appendChild(boton);
}
//Div[0].appendChild(boton)
});
}
var validando = 0;
function SetDefault(Text) {
validando++;
if (validando == 1) {
var timestamp = Date.parse(Text);
if (isNaN(timestamp) == false) {
$('#<%=LnkValidaHorarioNoOperativo.ClientID%>').click();
}
}
if (validando >= 2) {
validando = 0;
}
}
</script> </script>

View File

@@ -9,6 +9,7 @@ Imports Telerik.Web.UI
Imports APP_Code_CSharp Imports APP_Code_CSharp
Imports AjaxControlToolkit.AsyncFileUpload.Constants Imports AjaxControlToolkit.AsyncFileUpload.Constants
Imports System Imports System
Imports System.Globalization
Partial Class OS_RepServicioDomicilio Partial Class OS_RepServicioDomicilio
Inherits ClsPaginas Inherits ClsPaginas
@@ -740,7 +741,7 @@ Partial Class OS_RepServicioDomicilio
DdlTecnicoAsignar.SelectedValueExist(ObjOS.CveUsuarioAtendio) DdlTecnicoAsignar.SelectedValueExist(ObjOS.CveUsuarioAtendio)
CveTecnicoAsignarOrioginal = ObjOS.CveUsuarioAtendio CveTecnicoAsignarOrioginal = ObjOS.CveUsuarioAtendio
FechaInicioOriginal = ObjOS.FechaInicio FechaInicioOriginal = ObjOS.FechaInicio
TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy hh:mm") TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy HH:mm")
DvModalSubProyecto.Visible = True DvModalSubProyecto.Visible = True
'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour) 'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour)
'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute 'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute
@@ -971,11 +972,11 @@ Partial Class OS_RepServicioDomicilio
Dim CorreoAsignado As String = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString Dim CorreoAsignado As String = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString
If Not TieneError And CorreoAsignado.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then If Not TieneError And CorreoAsignado.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
CorreoAsignado = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString CorreoAsignado = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString
MandaCorreOS(CveOSAsignar, CorreoAsignado) MandaCorreOS(CveOS, CorreoAsignado)
End If End If
If Not TieneError And TxtEmail.Text.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then If Not TieneError And TxtEmail.Text.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
MandaCorreOS(CveOSAsignar, TxtEmail.Text, True) MandaCorreOS(CveOS, TxtEmail.Text, True)
End If End If
If Not TieneError Then If Not TieneError Then
@@ -1092,7 +1093,7 @@ Partial Class OS_RepServicioDomicilio
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) 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("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), "")))
params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString)) params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString))
@@ -1126,7 +1127,7 @@ Partial Class OS_RepServicioDomicilio
Dim lrds As New List(Of ReportDataSource) Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS} Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS} Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTMaterialesOS}
lrds.Add(rds) lrds.Add(rds)
lrds.Add(rds2) lrds.Add(rds2)
@@ -1247,4 +1248,149 @@ Partial Class OS_RepServicioDomicilio
End Sub End Sub
Protected Sub LnkHorariosNoOperativos_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DVModalOSHorarioNoOperativo').modal('show');")
DdlTecnicoAsignarHorario.Items.Clear()
DdlTecnicoAsignarHorario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
DdlTecnicoAsignarHorario.DataBind()
DdlTecnicoAsignarHorario.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
DdlTecnicoAsignarHorario.SelectedValueExist("-1")
TxtHorarioInicio.SetTime(0, 0, 0, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
TxtHorarioFin.SetTime(0, 0, 1, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
UpModalHorariosNoOperativos.Update()
End Sub
Protected Sub DdlTecnicoAsignarHorario_SelectedIndexChanged(sender As Object, e As EventArgs)
TxtHorarioInicio.SetTime(0, 0, 0, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
TxtHorarioFin.SetTime(0, 0, 1, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
If DdlTecnicoAsignarHorario.SelectedValue.ToEntero > 0 Then
Dim objOS As New ClsOS
Dim DTHorarios As New DataTable
If objOS.GetOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignarHorario.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DTHorarios = objOS.DtResultados
End If
objOS.Dispose()
If DTHorarios IsNot Nothing AndAlso DTHorarios.Rows.Count > 0 Then
Dim HoraInicio As String = DTHorarios.Rows(0)("HoraInicio").ToString
Dim HoraFin As String = DTHorarios.Rows(0)("HoraFin").ToString
TxtHorarioInicio.SetTime(HoraInicio.ToDateTime.Hour, HoraInicio.ToDateTime.Minute, HoraInicio.ToDateTime.Second, If(HoraInicio.ToDateTime.ToString("tt", CultureInfo.InvariantCulture) = "PM", MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM))
TxtHorarioFin.SetTime(HoraFin.ToDateTime.Hour, HoraFin.ToDateTime.Minute, HoraFin.ToDateTime.Second, If(HoraFin.ToDateTime.ToString("tt", CultureInfo.InvariantCulture) = "PM", MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM))
End If
End If
UpModalHorariosNoOperativos.Update()
End Sub
Protected Sub LnkGuardarHorarioNoOpeartivo_Click(sender As Object, e As EventArgs)
If DdlTecnicoAsignarHorario.SelectedValue.ToEntero > 0 Then
Dim HoraInicio = $"{TxtHorarioInicio.Hour}:{TxtHorarioInicio.Minute}:{TxtHorarioInicio.Second} {TxtHorarioInicio.AmPm}".ToDateTime
Dim HoraFin = $"{TxtHorarioFin.Hour}:{TxtHorarioFin.Minute}:{TxtHorarioFin.Second} {TxtHorarioFin.AmPm}".ToDateTime
If HoraInicio > HoraFin Then
Alert("La hora final no debe ser mayor a la hora inicial", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If HoraFin = HoraInicio Then
Alert("la hora de inicio y la hora fin no pueden ser iguales", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim objOS As New ClsOS
If objOS.AddOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignarHorario.SelectedValue.ToEntero, HoraInicio, HoraFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("Horario no operativo guardado correntamente.")
RegistraScript("$('#DVModalOSHorarioNoOperativo').modal('hide');")
End If
objOS.Dispose()
End If
End Sub
Protected Sub DdlTecnicoAsignar_SelectedIndexChanged1(sender As Object, e As EventArgs)
ValidaHorarioNoOperativo()
End Sub
Protected Sub LnkValidaHorarioNoOperativo_Click(sender As Object, e As EventArgs)
ValidaHorarioNoOperativo()
End Sub
Private Sub ValidaHorarioNoOperativo()
If DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
Dim objOS As New ClsOS
Dim DTHorarios As New DataTable
If objOS.GetOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DTHorarios = objOS.DtResultados
End If
objOS.Dispose()
If DTHorarios IsNot Nothing AndAlso DTHorarios.Rows.Count > 0 Then
Dim HoraInicio As TimeSpan = DTHorarios.Rows(0)("HoraInicio").ToString.ToDate.TimeOfDay
Dim HoraFin As TimeSpan = DTHorarios.Rows(0)("HoraFin").ToString.ToDate.TimeOfDay
Dim HoraAsignacion As TimeSpan = TxtModalFechaOS.Text.ToDate.TimeOfDay
If HoraAsignacion >= HoraInicio And HoraAsignacion <= HoraFin Then
Alert($"La hora especificada esta dentro del horario no operativo del Técnico {HoraInicio.ToString()} a {HoraFin.ToString()} .", TipoMensaje.MsgAdvertencia)
End If
End If
'ViewState("Validando") = Nothing
End If
End Sub
End Class End Class

View File

@@ -50,7 +50,8 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None"> DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" >
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
@@ -111,7 +112,8 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal> <asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoadFormato_ClickDocumentacion" runat="server" Visible="false"
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -419,7 +419,10 @@ Partial Class RH_CatDocumentos
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
Dim separado As Char() = {"."} Dim separado As Char() = {"."}
Dim array() As String = DocumetacionFormato.Split(separado) Dim array() As String = DocumetacionFormato.Split(separado)
Dim extencion As String = "" Dim extencion As String = ""
@@ -430,23 +433,46 @@ Partial Class RH_CatDocumentos
If DocumetacionFormato.Trim.Length > 0 Then If DocumetacionFormato.Trim.Length > 0 Then
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato Dim FileD = New FileInfo(PathDescargaArchivo)
If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True If FileD.Exists Then
If extencion.Length > 0 Then ImgDownLoadFormato.Visible = True
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato) ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
Else
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato)
End If
Else
ImgDownLoad.Visible = False
End If End If
Else
ImgDownLoad.Visible = False
End If End If
End If
End Sub
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
'Dim Adjunto As String = GvRow.DataKey("Adjunto")
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
Dim DocumetacionFormato As String = GvRow.DataKey("DocumentacionFormato").ToString
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
Dim FileD = New FileInfo(PathDescargaArchivo)
If FileD.Exists Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name)
Response.AddHeader("Content-Length", FileD.Length.ToString())
Response.ContentType = "text/octet-stream"
Response.Flush()
Response.TransmitFile(FileD.FullName)
Response.End()
End If End If
End Sub End Sub
@@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos
RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros")) RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros"))
End Sub End Sub
End Class End Class

View File

@@ -1641,7 +1641,346 @@
<asp:UpdatePanel ID="UpImprimir" runat="server"> <asp:UpdatePanel ID="UpImprimir" runat="server">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-7">
<div class="col-md-7">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Parametros</span>
</div>
<div class="tools">
<asp:CheckBox ID="ChkPermiteCredito" runat="server" Text="Permite Crédito" />
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<asp:UpdatePanel ID="UpParametros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Button ID="BtnCargaCxC" runat="server" ClientIDMode="Static" Text="CargaCxC" Style="display: none;" OnClick="BtnCargaCxC_Click" />
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtLimiteCredito" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="13" Text="0" Enabled="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="None" runat="server" ControlToValidate="TxtLimiteCredito" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Límite Crédito''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FIETTxtLimiteCredito" TargetControlID="TxtLimiteCredito" FilterType="Numbers,Custom" ValidChars=".," runat="server" />
<label for="<%= TxtLimiteCredito.ClientID.ToString()%>">Límite Crédito M.N.:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
<asp:TextBox ID="TxtFechaLimiteCredito" CssClass="form-control" runat="server" Width="150px"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
<asp:LinkButton ID="LnkTxtFechaLimiteCredito" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaLimiteCredito" runat="server" TargetControlID="TxtFechaLimiteCredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaLimiteCredito" TargetControlID="TxtFechaLimiteCredito" PopupButtonID="LnkTxtFechaLimiteCredito" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>">F. Limite Crédito: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtPlazoCobranza" runat="server" CssClass="form-control" MaxLength="3" Text="0" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator CssClass="help-block errorimput" ID="RFVPlazoCobranza" runat="server" ControlToValidate="TxtPlazoCobranza" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Plazo de Cobranza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator CssClass="help-block errorimput" ID="CVPlazoCobranza" runat="server" ControlToValidate="TxtPlazoCobranza" ErrorMessage="El campo <b>''Plazo de Cobranza''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<label for="<%= TxtPlazoCobranza.ClientID.ToString()%>">Plazo Cobranza: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtPlazoCobranzaRemision" runat="server" CssClass="form-control" MaxLength="4" Text="0" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator CssClass="help-block errorimput" ID="RFVPlazoCobranzaRemision" runat="server" ControlToValidate="TxtPlazoCobranzaRemision" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Plazo de Cobranza Remisión''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator CssClass="help-block errorimput" ID="CompareValidator2" runat="server" ControlToValidate="TxtPlazoCobranzaRemision" ErrorMessage="El campo <b>''Plazo de Cobranza Remisión''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<label for="<%= TxtPlazoCobranzaRemision.ClientID.ToString()%>">Plazo Remisión: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input">
<asp:Label ID="LblDiasPago" runat="server" ForeColor="#888888" Text="Días de pago:"></asp:Label>
<br />
<label><b>L</b></label>&nbsp;&nbsp;
<label><b>M</b></label>&nbsp;&nbsp;&nbsp;
<label><b>MI</b></label>&nbsp;&nbsp;
<label><b>J</b></label>&nbsp;&nbsp;
<label><b>V</b></label>&nbsp;&nbsp;
<label><b>S</b></label>&nbsp;&nbsp;
<br />
<asp:CheckBox ID="ChkLunes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkMartes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkMiercoles" runat="server" />&nbsp;
<asp:CheckBox ID="ChkJueves" runat="server" />&nbsp;
<asp:CheckBox ID="ChkViernes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkSabado" runat="server" />&nbsp;
</div>
</div>
<div class="col-md-4" style="margin-top: 10px;">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtDiasEspecifico" runat="server" CssClass="form-control" Enabled="false"></asp:TextBox>
<label for="<%= TxtDiasEspecifico.ClientID.ToString()%>">Días específicos: </label>
</div>
</div>
<div class="col-md-4" style="margin-top: 10px;">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTipoPago" runat="server" CssClass="form-control select2me">
<asp:ListItem Value="Efectivo" Text="Efectivo"></asp:ListItem>
<asp:ListItem Value="Cheque" Text="Cheque"></asp:ListItem>
<asp:ListItem Value="Tranferencia" Text="Transferencia"></asp:ListItem>
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoPago.ClientID.ToString()%>">Tipo Pago:</label>
</div>
</div>
</div>
<div>
<label for="<%= TxtDocumentacion.ClientID.ToString()%>">Documentación:</label>
<asp:TextBox ID="TxtDocumentacion" CssClass="form-control" runat="server" Rows="3"></asp:TextBox>
</div>
<div class="row" id="DivDiasRevision" runat="server" visible="false">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:Label ID="LblDiasRevision" runat="server" Text="Días de Revisión:"></asp:Label>
<br />
<label><b>L</b></label>&nbsp;&nbsp;
<label><b>M</b></label>&nbsp;&nbsp;&nbsp;
<label><b>MI</b></label>&nbsp;&nbsp;
<label><b>J</b></label>&nbsp;&nbsp;
<label><b>V</b></label>&nbsp;&nbsp;
<label><b>S</b></label>&nbsp;&nbsp;
<br />
<asp:CheckBox ID="ChkRevLunes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkRevMartes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkRevMiercoles" runat="server" />&nbsp;
<asp:CheckBox ID="ChkRevJueves" runat="server" />&nbsp;
<asp:CheckBox ID="ChkRevViernes" runat="server" />&nbsp;
<asp:CheckBox ID="ChkRevSabado" runat="server" />&nbsp;
</div>
</div>
</div>
<div class="form-group form-md-line-input" id="DivDiasRevisionObs" runat="server" visible="false">
<asp:TextBox ID="TxtObsDiasRevision" runat="server" CssClass="form-control" Enabled="false"></asp:TextBox>
<label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtCobranzaContacto.ClientID.ToString()%>">Nombre Contacto de Pagos: </label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaTelefono" CssClass="form-control" runat="server" MaxLength="13"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtCobranzaTelefono" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
<label for="<%= TxtCobranzaTelefono.ClientID.ToString()%>">Tel. Pagos: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaExt" CssClass="form-control" runat="server" MaxLength="10"></asp:TextBox>
<label for="<%= TxtCobranzaExt.ClientID.ToString()%>">No.Ext: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaCorreo" CssClass="form-control" runat="server" MaxLength="2000"></asp:TextBox>
<label for="<%= TxtCobranzaCorreo.ClientID.ToString()%>">Correo Pagos: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlResponsable" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%" runat="server" CssClass="form-control select2me">
</asp:DropDownList>
<label for="<%= DdlResponsable.ClientID.ToString()%>">Responsable Cobranza: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtHorario" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
<label for="<%= TxtHorario.ClientID.ToString()%>">Horario: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtPortalFacturacion.ClientID.ToString()%>">Portal de Facturas: </label>
</div>
</div>
</div>
<div class="row" id="DivPortal" runat="server" visible="false" >
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtContraseñaPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtContraseñaPortalFacturacion.ClientID.ToString()%>">Contraseña Portal: </label>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="col-md-5">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Estado de Cuenta</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body">
<asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" />
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaInicioCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaInicioCxP" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label for="<%= TxtFechaInicioCxP.ClientID.ToString()%>">Fecha Inicio: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
<asp:TextBox ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaFinCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaFinCxP" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label for="<%= TxtFechaFinCxP.ClientID.ToString()%>">Fecha Fin: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
<asp:LinkButton ID="ImgCalendarioFIV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFIV" runat="server" TargetControlID="TxtFechaVICxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioFIV" runat="server" TargetControlID="TxtFechaVICxP" PopupButtonID="ImgCalendarioFIV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
<asp:LinkButton ID="ImgCalendarioFFV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFFV" runat="server" TargetControlID="TxtFechaVFCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioFFV" runat="server" TargetControlID="TxtFechaVFCxP" PopupButtonID="ImgCalendarioFFV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label for="<%= TxtFechaVFCxP.ClientID.ToString()%>">Fecha V. Fin: </label>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<label>Movimientos</label>
<asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoCuentasCxC" runat="server" Width="120px">
<asp:ListItem Value="-1" Text="Todas" />
<asp:ListItem Selected="True" Value="1" Text="Con Saldo" />
</asp:DropDownList>
</div>
<div class="col-md-6">
<label>Tipo Docto</label>
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Width="150px" runat="server">
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Selected="True" Value="NC" Text="NC"></asp:ListItem>
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Selected="True" Value="RNC" Text="Remisión de Nota de crédito"></asp:ListItem>
</asp:ListBox>
<%-- <asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoDocto" runat="server" Width="120px">
<asp:ListItem Selected="True" Value="-1" Text="Todos" />
<asp:ListItem Value="Ing" Text="Factura" />
<asp:ListItem Value="Rem" Text="Remisión " />
<asp:ListItem Value="Ant" Text="Anticipo" />
</asp:DropDownList>--%>
</div>
</div>
<div class="row">
<div class="col-md-4">
<asp:CheckBox ID="ChkCobranzaEnviarCorreo" runat="server" Text="Enviar Correo Cobranza" />
</div>
</div>
<div class="row" style="position: relative; top: -15px;">
<div class="col-md-12 text-center">
<asp:LinkButton ID="LnkGenerarReporteCxC" CssClass="btn btn-success" Text="<i class='fa fa-cogs'></i> Generar" runat="server" />
&nbsp;&nbsp;<asp:Button ID="BtnCobranzaSMS" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" runat="server" Visible="false" Text=" Enviar SMS" OnClick="BtnCobranzaSMS_Click" CssClass="btn btn-default" />
</div>
<div class="col-md-12 text-center">
<asp:RadioButtonList ID="RBLGenerarReporteCxC" RepeatDirection="Horizontal" runat="server" Style="margin: 0 auto;">
<asp:ListItem Text="PDF" Value="PDF" Selected="True" />
<asp:ListItem Text="EXCEL" Value="EXCEL" />
</asp:RadioButtonList>
</div>
</div>
</div>
<div class="portlet-footer" >
</div>
</div>
</div>
<%-- <div class="col-md-7">
<div class="portlet light bordered xspadding"> <div class="portlet light bordered xspadding">
<div class="portlet-title"> <div class="portlet-title">
@@ -1668,7 +2007,7 @@
<asp:TextBox ID="TxtLimiteCredito" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="13" Text="0" Enabled="true"></asp:TextBox> <asp:TextBox ID="TxtLimiteCredito" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="13" Text="0" Enabled="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="None" runat="server" ControlToValidate="TxtLimiteCredito" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Límite Crédito''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="None" runat="server" ControlToValidate="TxtLimiteCredito" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Límite Crédito''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FIETTxtLimiteCredito" TargetControlID="TxtLimiteCredito" FilterType="Numbers,Custom" ValidChars=".," runat="server" /> <ajax:FilteredTextBoxExtender ID="FIETTxtLimiteCredito" TargetControlID="TxtLimiteCredito" FilterType="Numbers,Custom" ValidChars=".," runat="server" />
<%-- <asp:CompareValidator CssClass="help-block errorimput" ID="CompareValidator1" runat="server" ControlToValidate="TxtLimiteCredito" ErrorMessage="El campo <b>''Límite Crédito''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<label for="<%= TxtLimiteCredito.ClientID.ToString()%>">Límite Crédito M.N.:</label> <label for="<%= TxtLimiteCredito.ClientID.ToString()%>">Límite Crédito M.N.:</label>
</div> </div>
@@ -1783,66 +2122,13 @@
<label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label> <label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label>
</div> </div>
<%-- <asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite" Visible="false">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
<ItemTemplate>
<asp:Literal ID="ImgRequired" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Documento">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacion" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Completo" ItemStyle-Width="40px">
<ItemTemplate>
<asp:CheckBox ID="chkEstatus" runat="server" CssClass="make-switchsd" Checked='<%# Eval("Estatus").ToString = "1" %>'></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" ItemStyle-Width="100">
<ItemTemplate>
<asp:TextBox ID="TxtObservaciones" Width="300" MaxLength="100" runat="server" Text='<%# Eval("Observacion") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha limite" ItemStyle-Width="100">
<ItemTemplate>
<asp:TextBox ID="TxtFechaLimite" Width="100" onKeyPress="return handleInput(this.value)" MaxLength="100" runat="server" Text='<%# Eval("FechaLimite", "{0:d}") %>'></asp:TextBox>
<ajax:CalendarExtender runat="server" ID="Calendario6" TargetControlID="TxtFechaLimite" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha limite''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpRL"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI4" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" OnClick="Upload_ClickDocumentacion" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px">
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="Update_ClickDocumentacion"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-check'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>--%>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVCobranzaContacto" runat="server" ControlToValidate="TxtCobranzaContacto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contacto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtCobranzaContacto.ClientID.ToString()%>">Nombre Contacto de Pagos: </label> <label for="<%= TxtCobranzaContacto.ClientID.ToString()%>">Nombre Contacto de Pagos: </label>
</div> </div>
@@ -1852,7 +2138,6 @@
<asp:TextBox ID="TxtCobranzaTelefono" CssClass="form-control" runat="server" MaxLength="13"></asp:TextBox> <asp:TextBox ID="TxtCobranzaTelefono" CssClass="form-control" runat="server" MaxLength="13"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtCobranzaTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtCobranzaTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
<%--<asp:RequiredFieldValidator ID="RFVCobranzaTelefono" runat="server" ControlToValidate="TxtCobranzaTelefono" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtCobranzaTelefono.ClientID.ToString()%>">Teléfono de Pagos: </label> <label for="<%= TxtCobranzaTelefono.ClientID.ToString()%>">Teléfono de Pagos: </label>
</div> </div>
</div> </div>
@@ -1868,7 +2153,6 @@
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCobranzaCorreo" CssClass="form-control" runat="server" MaxLength="2000"></asp:TextBox> <asp:TextBox ID="TxtCobranzaCorreo" CssClass="form-control" runat="server" MaxLength="2000"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVCobranzaCorreo" runat="server" ControlToValidate="TxtCobranzaCorreo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtCobranzaCorreo.ClientID.ToString()%>">Correo de Pagos: </label> <label for="<%= TxtCobranzaCorreo.ClientID.ToString()%>">Correo de Pagos: </label>
</div> </div>
@@ -1877,45 +2161,21 @@
<label for="<%= TxtHorario.ClientID.ToString()%>">Horario: </label> <label for="<%= TxtHorario.ClientID.ToString()%>">Horario: </label>
</div> </div>
<%-- <div class="form-group form-md-line-input">
<label for="<%= TxtHorario1.ClientID.ToString()%>">Horario: </label>
<div class="row">
<div class="col-md-5">
<asp:TextBox ID="TxtHorario1" Text="" runat="server" CssClass="form-control" />
<ajax:MaskedEditExtender ID="MaskedEditExtender7" runat="server" TargetControlID="TxtHorario1" AcceptAMPM="true" Mask="99:99" MaskType="Time"></ajax:MaskedEditExtender>
</div>
<div class="col-md-1" style="text-align: left; margin-top:5px;">
<label>A</label>
</div>
<div class="col-md-5"">
<asp:TextBox ID="TxtHorario2" Text="" runat="server" CssClass="form-control" />
<ajax:MaskedEditExtender ID="MaskedEditExtender6" runat="server" TargetControlID="TxtHorario2" AcceptAMPM="true" Mask="99:99" MaskType="Time"></ajax:MaskedEditExtender>
</div>
</div>
</div>--%>
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVPortalFacturacion" runat="server" ControlToValidate="TxtPortalFacturacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Portal Facturacion''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtPortalFacturacion.ClientID.ToString()%>">Portal de Facturas: </label> <label for="<%= TxtPortalFacturacion.ClientID.ToString()%>">Portal de Facturas: </label>
</div> </div>
<div id="DivPortal" runat="server" visible="false"> <div id="DivPortal" runat="server" visible="false">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVPortalFacturacion" runat="server" ControlToValidate="TxtPortalFacturacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Portal Facturacion''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label> <label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label>
</div> </div>
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtContraseñaPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtContraseñaPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVPortalFacturacion" runat="server" ControlToValidate="TxtPortalFacturacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Portal Facturacion''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtContraseñaPortalFacturacion.ClientID.ToString()%>">Contraseña Portal: </label> <label for="<%= TxtContraseñaPortalFacturacion.ClientID.ToString()%>">Contraseña Portal: </label>
</div> </div>
</div> </div>
@@ -1947,10 +2207,7 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<%-- <asp:RadioButtonList ID="rblreporte" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="cxc" Selected="True">Cuentas por Cobrar</asp:ListItem>
<asp:ListItem Value="anc" Selected="False">Anticipos / NC</asp:ListItem>
</asp:RadioButtonList>--%>
<asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" /> <asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" />
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
@@ -2021,12 +2278,7 @@
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem> <asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Selected="True" Value="RNC" Text="Remisión de Nota de crédito"></asp:ListItem> <asp:ListItem Selected="True" Value="RNC" Text="Remisión de Nota de crédito"></asp:ListItem>
</asp:ListBox> </asp:ListBox>
<%-- <asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoDocto" runat="server" Width="120px">
<asp:ListItem Selected="True" Value="-1" Text="Todos" />
<asp:ListItem Value="Ing" Text="Factura" />
<asp:ListItem Value="Rem" Text="Remisión " />
<asp:ListItem Value="Ant" Text="Anticipo" />
</asp:DropDownList>--%>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@@ -2052,11 +2304,13 @@
</div> </div>
</div> </div>
<div class="row col-md-12" align="right"> --%>
<input type="text" id="TxtCxCActivas" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div> </div>
<div class="portlet light bordered xspadding"> <div class="portlet light bordered xspadding">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -2085,6 +2339,15 @@
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12" align="right">
<input type="text" id="TxtCxCActivas" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC" <asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC"
@@ -2135,7 +2398,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Abonar"> <asp:TemplateField HeaderText="Abonar">
<ItemTemplate> <ItemTemplate>
<%--<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor:pointer;" />--%>
<asp:HyperLink ID="ImgAbonar" CssClass="Texto thickbox" runat="server" ImageUrl="~/Imagenes/Money_add.png" ToolTip="Registrar Pago/Abono"></asp:HyperLink> <asp:HyperLink ID="ImgAbonar" CssClass="Texto thickbox" runat="server" ImageUrl="~/Imagenes/Money_add.png" ToolTip="Registrar Pago/Abono"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -6800,7 +7063,19 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="DvLineaAdicionalDiasVenciemientoModal" visible="false">
<asp:TextBox ID="TxtDiasVencimientoLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true" Width="250px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtDiasVencimientoLineaAdicionalModal" runat="server" ControlToValidate="TxtDiasVencimientoLineaAdicionalModal" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasVencimientoLineaAdicionalModal" ValidChars="1234567890" FilterType="Custom" />
<label for="<%= TxtDiasVencimientoLineaAdicionalModal.ClientID.ToString()%>">Días de Vencimiento: </label>
</div>
</div>
<div class="col-md-4" id="DvFechaVencimiento" runat="server">
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker"> <div class="form-group form-md-line-input input-iconright date date-picker date date-picker">
<asp:TextBox ID="TxtFechaVencimientoLineaAdicionalModal" CssClass="form-control" runat="server"></asp:TextBox> <asp:TextBox ID="TxtFechaVencimientoLineaAdicionalModal" CssClass="form-control" runat="server"></asp:TextBox>
@@ -6819,18 +7094,7 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
</div> </div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="DvLineaAdicionalDiasVenciemientoModal" visible="false">
<asp:TextBox ID="TxtDiasVencimientoLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true" Width="250px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtDiasVencimientoLineaAdicionalModal" runat="server" ControlToValidate="TxtDiasVencimientoLineaAdicionalModal" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasVencimientoLineaAdicionalModal" ValidChars="1234567890" FilterType="Custom" />
<label for="<%= TxtDiasVencimientoLineaAdicionalModal.ClientID.ToString()%>">Días de Vencimiento: </label>
</div>
</div>
</div> </div>

View File

@@ -514,6 +514,20 @@ Partial Class Clientes
ViewState("CveLineaAdicional") = value ViewState("CveLineaAdicional") = value
End Set End Set
End Property End Property
Private Property FechaIngLineaAdicional As DateTime
Get
If ViewState("FechaIngLineaAdicional") Is Nothing Then
ViewState("FechaIngLineaAdicional") = MinFecha
End If
Return ViewState("FechaIngLineaAdicional").ToString().ToDateTime()
End Get
Set(value As DateTime)
ViewState("FechaIngLineaAdicional") = value
End Set
End Property
@@ -750,9 +764,11 @@ Partial Class Clientes
If UsuarioActual.TienePermisoProceso(162) Then If UsuarioActual.TienePermisoProceso(162) Then
ChkPermiteCredito.Enabled = True ChkPermiteCredito.Enabled = True
TxtLimiteCreditoSucursal.Enabled = True TxtLimiteCreditoSucursal.Enabled = True
TxtFechaLimiteCredito.Enabled = True
Else Else
ChkPermiteCredito.Enabled = False ChkPermiteCredito.Enabled = False
TxtLimiteCreditoSucursal.Enabled = False TxtLimiteCreditoSucursal.Enabled = False
TxtFechaLimiteCredito.Enabled = False
End If End If
ChkEstado.Enabled = False ChkEstado.Enabled = False
If UsuarioActual.TienePermisoProceso(180) Then If UsuarioActual.TienePermisoProceso(180) Then
@@ -1621,6 +1637,9 @@ Partial Class Clientes
ChkRequiereOC.Checked = ObjClientes.RequiereOC ChkRequiereOC.Checked = ObjClientes.RequiereOC
ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString()) ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString())
CobranzaTelefono = ObjClientes.CobranzaTelefono CobranzaTelefono = ObjClientes.CobranzaTelefono
TxtFechaLimiteCredito.Text = If(ObjClientes.DtResultados.Rows(0)("FechaLimiteCredito").ToString.ToDate = New Date(1900, 1, 1), "", ObjClientes.DtResultados.Rows(0)("FechaLimiteCredito").ToString.ToDate.ToString("dd/MM/yyyy"))
If CobranzaTelefono.Length = 10 Then If CobranzaTelefono.Length = 10 Then
BtnCobranzaSMS.ToolTip = $"El mensaje SMS será enviado al número celular <b>{CobranzaTelefono}</b> <br> con #referencia ""<b>{If(UsuarioActual.CveEmpresa = 4, TxtNombreCorto.Text, CodigoCliente)}</b>""" BtnCobranzaSMS.ToolTip = $"El mensaje SMS será enviado al número celular <b>{CobranzaTelefono}</b> <br> con #referencia ""<b>{If(UsuarioActual.CveEmpresa = 4, TxtNombreCorto.Text, CodigoCliente)}</b>"""
End If End If
@@ -2670,6 +2689,10 @@ Partial Class Clientes
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False) Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
If CveCliente = -1 Then If CveCliente = -1 Then
Dim ErrorAC As Boolean = False Dim ErrorAC As Boolean = False
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero() Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
@@ -2733,7 +2756,7 @@ Partial Class Clientes
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim()) Then CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito) Then
ViewState("CveCliente") = ObjClientes.CveCliente ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2830,7 +2853,7 @@ Partial Class Clientes
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim()) Then NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente) ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -9889,14 +9912,12 @@ Partial Class Clientes
End Sub End Sub
Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
Dim Acum As New ClsAcumuladores Dim Acum As New ClsAcumuladores
Dim Puntos As Decimal = -GvUsadosResumen.Rows.Cast(Of GridViewRow).Where(Function(x) x.RowType = DataControlRowType.DataRow).FirstOrDefault(Function(gvr) gvr.RowIndex = 3).DataKey("Puntos").ToEntero() Dim Puntos As Decimal = -GvUsadosResumen.Rows.Cast(Of GridViewRow).Where(Function(x) x.RowType = DataControlRowType.DataRow).FirstOrDefault(Function(gvr) gvr.RowIndex = 3).DataKey("Puntos").ToEntero()
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, Puntos, 0, 0, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then
Alert("Puntuación Inicializada") Alert("Puntuación Inicializada")
End If End If
Acum.Dispose() Acum.Dispose()
End Sub End Sub
#End Region #End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -10406,6 +10427,8 @@ Partial Class Clientes
Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs)
CveLineaAdicional = -1 CveLineaAdicional = -1
FechaIngLineaAdicional = Nothing
RegistraScript("$('#DVLineasAdicionales').modal('show')") RegistraScript("$('#DVLineasAdicionales').modal('show')")
LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional" LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional"
AgregarLineaAdicionalLimpiarControles() AgregarLineaAdicionalLimpiarControles()
@@ -10437,11 +10460,13 @@ Partial Class Clientes
' Exit Sub ' Exit Sub
'End If 'End If
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If CveLineaAdicional > 0 Then If CveLineaAdicional > 0 Then
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
End If
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
@@ -10450,6 +10475,10 @@ Partial Class Clientes
Alert("Linea Adicional Actualizada Correctamente") Alert("Linea Adicional Actualizada Correctamente")
End If End If
Else Else
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
End If
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero,
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
@@ -10476,6 +10505,7 @@ Partial Class Clientes
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime()
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional") TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor") DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor") DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
@@ -10520,6 +10550,7 @@ Partial Class Clientes
Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs)
DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False) DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False)
DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True)
UpLineaAdicionalmodal.Update() UpLineaAdicionalmodal.Update()
End Sub End Sub

View File

@@ -73,6 +73,19 @@
</asp:DropDownList> </asp:DropDownList>
</td> </td>
</tr> </tr>
<tr align="left">
<td class="text-right"><b>Cuenta:</b></td>
<td>
<asp:Textbox runat="server" ID="TxtCuenta" Width="200px" MaxLength="50"/>
</td>
<td class="text-right"><b></b></td>
<td>
</td>
</tr>
<tr> <tr>
<td style="text-align: center;" colspan="4"> <td style="text-align: center;" colspan="4">
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td> <asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td>

View File

@@ -2,6 +2,8 @@
Option Strict On Option Strict On
Imports Extensiones Imports Extensiones
Imports Microsoft.Owin.Security.Provider
Partial Class PopUpBuscarClientes Partial Class PopUpBuscarClientes
Inherits ClsPaginas Inherits ClsPaginas
@@ -74,13 +76,17 @@ Partial Class PopUpBuscarClientes
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
Dim CveUsuarioConsulta As Integer Dim CveUsuarioConsulta As Integer
Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
If UsuarioActual.TienePermisoProceso(322) Then If UsuarioActual.TienePermisoProceso(322) Then
CveUsuarioConsulta = UsuarioActual.CveVendedor CveUsuarioConsulta = UsuarioActual.CveVendedor
Else Else
CveUsuarioConsulta = -1 CveUsuarioConsulta = -1
End If End If
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta) Then DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta, Cuenta:=Cuenta) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then If ObjClientes.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0) LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjClientes.DtResultados GV.DataSource = ObjClientes.DtResultados
@@ -150,6 +156,7 @@ Partial Class PopUpBuscarClientes
If TxtMail.Text.Trim <> String.Empty Then Return True If TxtMail.Text.Trim <> String.Empty Then Return True
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
If TxtCuenta.Text.Trim.Length > 0 Then Return True
Return False Return False
End Function End Function

View File

@@ -438,21 +438,12 @@ Partial Class ProductosyServicios
End Sub End Sub
Private Sub CargaPanelCitricos() Private Sub CargaPanelCitricos()
Dim ObjGral As New ClsGenerales() DdlEmpacado.DataSource = GlobalDTGralEmpacados(UsuarioActual.CveEmpresa)
If ObjGral.GetEmpacados(UsuarioActual.CveEmpresa) Then DdlTipoOrganico.DataSource = GlobalDTGralTipoOrganicos(UsuarioActual.CveEmpresa)
DdlEmpacado.DataSource = ObjGral.DtResultados
End If
If ObjGral.GetTipoOrganicos(UsuarioActual.CveEmpresa) Then
DdlTipoOrganico.DataSource = ObjGral.DtResultados
End If
ObjGral.Dispose()
DdlEmpacado.DataBind() DdlEmpacado.DataBind()
DdlTipoOrganico.DataBind() DdlTipoOrganico.DataBind()
End Sub End Sub
Private Sub MuestraPanel(Optional AfterPageLoad As Boolean = False) Private Sub MuestraPanel(Optional AfterPageLoad As Boolean = False)
If AfterPageLoad Then If AfterPageLoad Then
RegistraScript("window.onload = function MuestraPanel() { document.getElementById(""C_BtnMostrarPanel"").click(); }") RegistraScript("window.onload = function MuestraPanel() { document.getElementById(""C_BtnMostrarPanel"").click(); }")

View File

@@ -136,8 +136,11 @@
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" /> <asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="DiasTranscurridos" HeaderText="D.Trans" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="FechaVenta" HeaderText="F. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="FechaVencimientoVenta" HeaderText="F. Venc. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" /> <asp:BoundField DataField="Estatus" HeaderText="Estatus" />
<asp:BoundField DataField="FechaEnvio" HeaderText="F. Envío" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Opciones" ItemStyle-Width="100px" HeaderStyle-Width="100px"> <asp:TemplateField HeaderText="Opciones" ItemStyle-Width="100px" HeaderStyle-Width="100px">
<ItemTemplate> <ItemTemplate>
<div class="row" > <div class="row" >

View File

@@ -132,6 +132,7 @@
<div class="col-md-2"> <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: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 Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem>
<asp:ListItem Text="Familia-Linea" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>

View File

@@ -4702,6 +4702,15 @@ Partial Class Ventas
If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True
VentaSaldoAlmacen = DbRowVenta("SaldoAlmacen").ToString().ToDecimal VentaSaldoAlmacen = DbRowVenta("SaldoAlmacen").ToString().ToDecimal
If DbRowVenta("TipoDocto").ToString().Contiene("Rem", "Dev") AndAlso VentaSaldoAlmacen <> 0 Then
ChkDevAlm.Checked = True
LiDevolucionAlmacen.Visible = True
If DbRowVenta("TipoDocto").ToString() = "Dev" Then
LblDevAlm.Text = "Salida de almacen"
End If
End If
If CveEstatus = 5 Then LbCancelarDocumento.Enabled = False If CveEstatus = 5 Then LbCancelarDocumento.Enabled = False
'If CveEstatus = 20 Then 'If CveEstatus = 20 Then
' LbCancelarDocumentoManual.Visible = True ' LbCancelarDocumentoManual.Visible = True
@@ -9471,6 +9480,7 @@ Partial Class Ventas
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL()) Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL()) Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL()) Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
Dim ObjContPaq As ClsContPAQi = Nothing Dim ObjContPaq As ClsContPAQi = Nothing
'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
@@ -9541,7 +9551,7 @@ Partial Class Ventas
Dim CveTimbreCartaPorte As Integer = -1 Dim CveTimbreCartaPorte As Integer = -1
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS,
ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion, CveAnticipoPadre:=CveAnticipoPadre) ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion, CveAnticipoPadre:=CveAnticipoPadre)
If ErrorList.Count = 0 AndAlso ChkEmitirCartaPorte.Checked AndAlso ObjFactura.TipoDocto = "Ing" Then If ErrorList.Count = 0 AndAlso ChkEmitirCartaPorte.Checked AndAlso ObjFactura.TipoDocto = "Ing" Then
@@ -9668,7 +9678,7 @@ Partial Class Ventas
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing, If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing,
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then
ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion) ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion)
End If End If
@@ -9681,7 +9691,7 @@ Partial Class Ventas
End If End If
CreaObjetosVentaBonificacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) CreaObjetosVentaBonificacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaBonificacion, ObjBancos, Nothing, If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjContPaq, ObjFacturaBonificacion, ObjBancos, Nothing,
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then
ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion) ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion)
End If End If
@@ -9839,12 +9849,6 @@ Partial Class Ventas
End If End If
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
ObjVentas.Commit() ObjVentas.Commit()
'ENVIAR POLIZA VIRTUAL 'ENVIAR POLIZA VIRTUAL
@@ -9854,7 +9858,6 @@ Partial Class Ventas
End If End If
End If End If
'ContPAQ El movimiento 1 es el de Venta 'ContPAQ El movimiento 1 es el de Venta
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
@@ -9891,7 +9894,6 @@ Partial Class Ventas
OnError("Ocurrió un error al contabilizar la factura", ex) OnError("Ocurrió un error al contabilizar la factura", ex)
End Try End Try
Try Try
'RMF, cuando es pedido, se manda autorización. 'RMF, cuando es pedido, se manda autorización.
If ObjFactura.TipoDocto.Contiene("PA") Then If ObjFactura.TipoDocto.Contiene("PA") Then
@@ -10133,12 +10135,8 @@ Partial Class Ventas
If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))) MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
If ChkEnviarFacturaCRM.Checked AndAlso CorreoContactoCRM.Trim.Length > 0 Then If ChkEnviarFacturaCRM.Checked AndAlso CorreoContactoCRM.Trim.Length > 0 Then
Try Try
Dim pdfCRM As Byte() = Nothing Dim pdfCRM As Byte() = Nothing
'If CveVenta > 0 Then 'If CveVenta > 0 Then
' ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False) ' ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
@@ -10151,16 +10149,10 @@ Partial Class Ventas
GeneraPDFCotizacion(True, CorreoContactoCRM:=CorreoContactoCRM, pdfCRM:=pdfCRM, SerieFolioCRM:=SerieFolioCRM, TipoDoctoCRM:=TipoDoctoCRM) GeneraPDFCotizacion(True, CorreoContactoCRM:=CorreoContactoCRM, pdfCRM:=pdfCRM, SerieFolioCRM:=SerieFolioCRM, TipoDoctoCRM:=TipoDoctoCRM)
End If End If
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al enviar el PDF", ex) OnError("Ocurrió un error al enviar el PDF", ex)
End Try End Try
End If End If
Else Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ") MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
End If End If
@@ -10178,9 +10170,6 @@ Partial Class Ventas
End If End If
End If End If
'ERROR DE NO TIMBRADO 'ERROR DE NO TIMBRADO
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.") MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
@@ -10202,12 +10191,10 @@ Partial Class Ventas
End Select End Select
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir") RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
End If End If
'DESCARGAR PDF DE CICOVISA 'DESCARGAR PDF DE CICOVISA
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then 'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then ' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
@@ -10235,8 +10222,6 @@ Partial Class Ventas
End If End If
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
Else
'Enviar pore correo cot CRM
End If End If
ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then
If UsuarioActual.CveEmpresa.Contiene(81, 109) Then If UsuarioActual.CveEmpresa.Contiene(81, 109) Then
@@ -10311,7 +10296,6 @@ Partial Class Ventas
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False) Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
End If End If
MensajeAlert.Clear() MensajeAlert.Clear()
Try Try
@@ -10324,7 +10308,6 @@ Partial Class Ventas
OnError("Ocurrió un error al limpiar los datos", ex) OnError("Ocurrió un error al limpiar los datos", ex)
End Try End Try
Else Else
ObjVentas.RollBack() ObjVentas.RollBack()
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack() If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
@@ -10343,6 +10326,7 @@ Partial Class Ventas
ObjCGame.Dispose() ObjCGame.Dispose()
ObjContr.Dispose() ObjContr.Dispose()
ObjDocCliente.Dispose() ObjDocCliente.Dispose()
ObjAcum.Dispose()
'ObjFolios.Dispose() 'ObjFolios.Dispose()
ErrorList.Clear() ErrorList.Clear()
ErrorList = Nothing ErrorList = Nothing
@@ -10986,24 +10970,27 @@ Partial Class Ventas
End Sub End Sub
Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjAcum As ClsAcumuladores, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi,
ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos, Optional NCDescuento As Boolean = False, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos, Optional NCDescuento As Boolean = False,
Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional IndexNC As Integer = 0) As Boolean Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional IndexNC As Integer = 0) As Boolean
Dim ProcesoCorrecto As Boolean = True Dim ProcesoCorrecto As Boolean = True
'GENERAMOS EL NUEVO FOLIO 'GENERAMOS EL NUEVO FOLIO
Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then 'If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero())) ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero()))
If DT.Rows.Count > 0 Then ' If DT.Rows.Count > 0 Then
factura.Serie = DT.Rows(0)("Serie").ToString() ' factura.Serie = DT.Rows(0)("Serie").ToString()
factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero() ' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero()
Else ' Else
ProcesoCorrecto = False ' ProcesoCorrecto = False
End If ' End If
DT.Dispose() ' DT.Dispose()
End If 'End If
factura.Serie = "-1"
factura.Folio = -1
If NCDescuento Then If NCDescuento Then
@@ -11019,7 +11006,7 @@ Partial Class Ventas
factura.CveVentaPadre = Me.CveVenta factura.CveVentaPadre = Me.CveVenta
'Registramos la venta 'Registramos la venta
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, factura.DtDetalle, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=False, NCDescuento:=True, ListaNCDescuento:=ListaNCDescuento) GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, factura, factura.DtDetalle, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=False, NCDescuento:=True, ListaNCDescuento:=ListaNCDescuento)
Else Else
'GENERO LOS DATOS DE LA NC 'GENERO LOS DATOS DE LA NC
@@ -11158,7 +11145,7 @@ Partial Class Ventas
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion) ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion)
'Registramos la venta 'Registramos la venta
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, tmpcon, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=True) GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, factura, tmpcon, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=True)
Else Else
ErrorList.Add("No se encontró un producto para generar la nota de crédito") ErrorList.Add("No se encontró un producto para generar la nota de crédito")
@@ -12916,7 +12903,7 @@ Partial Class Ventas
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO " #Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO "
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjAcum As ClsAcumuladores, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer,
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing,
ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional CveAnticipoPadre As Integer = -1) ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional CveAnticipoPadre As Integer = -1)
@@ -13128,11 +13115,11 @@ Partial Class Ventas
'SI ES REFACTURACION, NO DEBE AFECTAR LOS USADOS 'SI ES REFACTURACION, NO DEBE AFECTAR LOS USADOS
If Not NuevaFactura.Contiene(1) Then If Not NuevaFactura.Contiene(1) Then
If ObjFactura.TipoDocto = "Ing" Then If ObjFactura.TipoDocto = "Ing" Then
If Not GuardarUsados(2, ObjVentas.IniciaTransacSQL, factura) Then If Not GuardarUsados(2, ObjVentas.IniciaTransacSQL, factura, ObjAcum) Then
ErrorList.Add("Error al guardar usados") ErrorList.Add("Error al guardar usados")
End If End If
ElseIf ObjFactura.TipoDocto = "Dev" Then ElseIf ObjFactura.TipoDocto = "Dev" Then
If Not GuardarUsados(1, ObjVentas.IniciaTransacSQL, factura) Then If Not GuardarUsados(1, ObjVentas.IniciaTransacSQL, factura, ObjAcum) Then
ErrorList.Add("Error al guardar usados") ErrorList.Add("Error al guardar usados")
End If End If
End If End If
@@ -13238,7 +13225,6 @@ Partial Class Ventas
Dim ListaRNC As List(Of Modelos.Factura) = Nothing Dim ListaRNC As List(Of Modelos.Factura) = Nothing
If NCDescuento Then If NCDescuento Then
EsCargo = (Not ListaNCDescuento.Any(Function(RNC) RNC.Num2 = 1))
ListaRNC = ListaNCDescuento ListaRNC = ListaNCDescuento
Else Else
EsCargo = RblRNCTipo.SelectedValue = "1" EsCargo = RblRNCTipo.SelectedValue = "1"
@@ -13246,26 +13232,93 @@ Partial Class Ventas
End If End If
'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO 'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO
If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso EsCargo AndAlso Not factura.EsGarantia Then If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
Dim CvePSCargo As Integer = -1 Dim CvePSCargo As Integer = -1
For Each RNC In ListaRNC Dim CveVentaRNC As Integer = -1
CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero()
If CvePSCargo > 0 Then For Each RNC As Modelos.Factura In ListaRNC
Exit For
If NCDescuento Then
EsCargo = (Not RNC.Num1 = 2)
End If End If
CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero()
CveVentaRNC = RNC.DtDetalle.FiltroPrimeroValor("CveVenta", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero()
If EsCargo Then
If Not ObjAcum.DistribuidorMovtosGet(Me.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=CveVentaRNC) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
ErrorList.Add("Ocurrió un error al obtener los movimientos del distribuidor.")
Exit For
End If
Dim RowMovto As DataRow = ObjAcum.DtResultados.FiltroPrimero($"CvePSCargo={CvePSCargo}")
If RowMovto IsNot Nothing Then
'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO
Dim ImporteCargoOriginal = (RowMovto("ImporteCargo").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2)
'Dim ImporteBonificacionOriginal = (RowMovto("ImporteBonificacion").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2)
Dim PuntosOriginales = (RowMovto("Puntos").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2)
Dim CveTamanio As Integer = RowMovto("CveTamaño").ToString().ToEntero()
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim Puntos As Decimal = Cantidad * PuntosOriginales
Dim Cargo As Decimal = Cantidad * ImporteCargoOriginal
Dim Bonificacion As Decimal = 0
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.")
Exit For
End If
End If
Else
Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}")
If DrTamanio IsNot Nothing Then
'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO
Dim ImporteBonificacion = Row("Total").ToString().ToDecimal().RoundSQL(2)
Dim CveTamanio As Integer = DrTamanio("CveTamaño").ToString().ToEntero()
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim Puntos As Decimal = 0
Dim Cargo As Decimal = 0
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.")
Exit For
End If
End If
End If
Next Next
Dim CveTamanio As Integer = GlobalDTAcumTamaños().FiltroPrimeroValor("CveTamaño", $"CvePSCargo={CvePSCargo}").ToEntero() 'Dim RowTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}")
If CveTamanio > 0 Then 'If RowTamanio IsNot Nothing Then
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Row("Cantidad").ToString().ToDecimal(), CveTamanio, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then ' Dim CveTamanio As Integer = RowTamanio("CveTamaño").ToString().ToEntero()
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") ' Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Exit For ' Dim Puntos As Decimal = Cantidad * RowTamanio("Puntos").ToString().ToDecimal()
End If ' Dim Cargo As Decimal = Cantidad * RowTamanio("Cargo").ToString().ToDecimal()
End If ' Dim Bonificacion As Decimal = Cantidad * RowTamanio("Bonificacion").ToString().ToDecimal()
' If EsCargo Then
' Bonificacion = 0
' Else
' Puntos = 0
' Cargo = 0
' End If
' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
' ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
' Exit For
' End If
'End If
End If End If
End If End If
@@ -24786,9 +24839,9 @@ Partial Class Ventas
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Rem", "Dev") Then
ChkDevAlm.Checked = True ' ChkDevAlm.Checked = True
End If 'End If
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then
ChkDevAlm.Checked = True ChkDevAlm.Checked = True
@@ -29314,13 +29367,15 @@ Partial Class Ventas
End If End If
UltimoRenglonRNC += 1 UltimoRenglonRNC += 1
Dim CveVentaDetalleRNC As Integer = RNCBonificacion.DtDetalle.FiltroPrimeroValor("CveVentaDetalle").ToEntero()
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO 'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
If Cantidad.RoundSQL(6) > 0D AndAlso ImportePU.RoundSQL(6) > 0 Then If Cantidad.RoundSQL(6) > 0D AndAlso ImportePU.RoundSQL(6) > 0 Then
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1, RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString()) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=CveVentaDetalleRNC, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
End If End If
Next Next
@@ -32935,29 +32990,36 @@ Partial Class Ventas
End If End If
End Sub End Sub
Private Function GuardarUsados(CveConcepto As Integer, SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura) As Boolean Private Function GuardarUsados(CveConcepto As Integer, SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura, ObjAcum As ClsAcumuladores) As Boolean
Dim Resultado As Boolean = True Dim Resultado As Boolean = True
If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then
For Each drow As DataRow In factura.DtDetalle.Rows
If drow("CveTamaño").ToString.ToEntero > 0 Then
Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}")
If DrTamanio IsNot Nothing Then
Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal()
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero If drow("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario,
For Each drow As DataRow In factura.DtDetalle.Rows
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0D, "", Now) Then UsuarioActual.CveEmpresa, 0D, "", Now) Then
Resultado = False Resultado = False
Exit For Exit For
End If
End If
Else
Resultado = False
Exit For
End If
End If End If
End If Next
Next End If
Else
Resultado = True
End If End If
Return Resultado Return Resultado
End Function End Function
@@ -36023,6 +36085,9 @@ Partial Class Ventas
Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs)
TxtFechaPago.Enabled = True
imgCalendario.Visible = True
If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
RBLPago.SelectedValue = "1" RBLPago.SelectedValue = "1"
RBLPago.Enabled = False RBLPago.Enabled = False
@@ -36037,6 +36102,8 @@ Partial Class Ventas
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
If RowLinea("TipoLinea").ToString() = "2" Then If RowLinea("TipoLinea").ToString() = "2" Then
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
TxtFechaPago.Enabled = False
imgCalendario.Visible = False
End If End If
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero() Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()