Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -925,10 +925,10 @@ Public Class ClsAcumuladores
|
||||
OnError("Ocurrió un al eliminar poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#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,
|
||||
Optional CveVentaBonificacion As Integer = -1, Optional FacturadoBonificacion As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -940,6 +940,9 @@ Public Class ClsAcumuladores
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.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("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
@@ -961,7 +964,8 @@ Public Class ClsAcumuladores
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -973,6 +977,7 @@ Public Class ClsAcumuladores
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo
|
||||
.Add("@CveVentaRNCBonificacion", SqlDbType.Int).Value = CveVentaRNCBonificacion
|
||||
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
End With
|
||||
|
||||
|
||||
@@ -264,7 +264,8 @@ Public Class ClsClientes
|
||||
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,
|
||||
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
|
||||
|
||||
DataAdapter("PA_ClientesGet")
|
||||
@@ -287,6 +288,8 @@ Public Class ClsClientes
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -2264,16 +2264,18 @@ Public Class ClsContPAQi
|
||||
StrSQL.AppendLine(" @Folio INT,")
|
||||
StrSQL.AppendLine(" @NumMovto INT,")
|
||||
StrSQL.AppendLine(" @IdDiario INT,")
|
||||
StrSQL.AppendLine(" @SegNegMovtos INT,")
|
||||
StrSQL.AppendLine(" @Fecha DATETIME,")
|
||||
StrSQL.AppendLine(" @IDEjercicio INT,")
|
||||
StrSQL.AppendLine(" @TimeStamp NVARCHAR (200);")
|
||||
StrSQL.AppendLine(" SET NOCOUNT ON;")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');")
|
||||
StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');")
|
||||
StrSQL.AppendLine(" SET @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);")
|
||||
StrSQL.AppendLine(" SET @Fecha = @FechaMov;")
|
||||
StrSQL.AppendLine(" SET @Fecha = @FechaMov;")
|
||||
StrSQL.AppendLine(" SET @IdDiario = 0;")
|
||||
StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;")
|
||||
StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;")
|
||||
StrSQL.AppendLine(" SELECT @SegNegMovtos = SegNegMovtos FROM Cuentas C WHERE Id = @IdCuenta;")
|
||||
StrSQL.AppendLine("")
|
||||
StrSQL.AppendLine(" BEGIN TRY")
|
||||
StrSQL.AppendLine(" ")
|
||||
@@ -2306,7 +2308,7 @@ Public Class ClsContPAQi
|
||||
'StrSQL.AppendLine("END")
|
||||
|
||||
StrSQL.AppendLine(" INSERT INTO MovimientosPoliza (Id, RowVersion, IdPoliza, Ejercicio, Periodo, TipoPol, Folio, NumMovto, IdCuenta, TipoMovto, Importe, ImporteME, Referencia, Concepto, IdDiario, Fecha, IdSegNeg, SIGReferencia, TimeStamp, Guid)")
|
||||
StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp, @GUID);")
|
||||
StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, IIF(@SegNegMovtos = 1,@IdSegNeg,0), @SIGReferencia, @TimeStamp, @GUID);")
|
||||
StrSQL.AppendLine(" ")
|
||||
|
||||
''DESCOMENTAR PARA CIERRE PERIODO
|
||||
@@ -3331,7 +3333,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" INNER JOIN Cuentas C ON C.Id = A.IdSubCtade")
|
||||
StrSQL.Append(" )")
|
||||
StrSQL.Append(" SELECT Top(@RowNum) C.Id, C.Codigo, C.Nombre, C.IdAgrupadorSAT,SA.Nombre AS AgrupadorSAT, ")
|
||||
StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ")
|
||||
StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ")
|
||||
StrSQL.Append(" C.Tipo, C.EsBaja, C.CtaMayor, C.Afectable, C.IdMoneda, C.DigAgrup, C.NomIdioma, ")
|
||||
StrSQL.Append(" CASE ")
|
||||
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '1' THEN 'Activo' ")
|
||||
@@ -3339,8 +3341,8 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '3' THEN 'Capital' ")
|
||||
StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) IN ('4', '5', '6', '7', '8', '9') THEN 'ER' ")
|
||||
StrSQL.Append(" ELSE 'Otras' ")
|
||||
StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ")
|
||||
StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ")
|
||||
StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ")
|
||||
StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ")
|
||||
StrSQL.Append(" , CASE WHEN CtaSup IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE','_ORDEN') ")
|
||||
StrSQL.Append(" AND NOT SubCtade IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE') THEN 1 ELSE 0 END AS CtaInicial,")
|
||||
StrSQL.Append(" E.Nivel, E.Orden")
|
||||
|
||||
@@ -1075,14 +1075,14 @@ Public Class ClsContabilidad
|
||||
Select Case CveConcepto
|
||||
|
||||
Case 2, 17 'Pago Proveedores
|
||||
|
||||
Concepto = $"{NombreComercial} F:{SerieFolio}"
|
||||
Case 30 'Bancos
|
||||
Concepto = FolioBancario
|
||||
|
||||
Case 4, 6 'Compra
|
||||
|
||||
Case 1, 5 'Proveedores
|
||||
Concepto = SerieFolio
|
||||
Concepto = $"{NombreComercial} F:{SerieFolio}"
|
||||
|
||||
Case 37 'Deudores
|
||||
|
||||
@@ -1099,7 +1099,7 @@ Public Class ClsContabilidad
|
||||
|
||||
End Select
|
||||
|
||||
Case 4, 7, 11, 12
|
||||
Case 4, 7, 11, 12, 122, 145
|
||||
|
||||
Select Case CveConcepto
|
||||
|
||||
|
||||
@@ -1248,7 +1248,7 @@ Public Class ClsGenerales
|
||||
#End Region
|
||||
|
||||
#Region "C O L E C T I V A S"
|
||||
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_ColectivasGet")
|
||||
|
||||
@@ -4223,15 +4223,16 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_Gral_TipoOrganicosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@TipoOrganico", SqlDbType.VarChar).Value = TipoOrganico
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -4317,15 +4318,16 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_Gral_EmpacadosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@TipoEmpacado", SqlDbType.VarChar).Value = TipoEmpacado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1630,6 +1630,48 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
#Region "ESTATUS USUARIOS OS"
|
||||
|
||||
@@ -375,61 +375,96 @@ Public Class ClsPaginas
|
||||
|
||||
Property GlobalDTFraccionArancelaria() As DataTable
|
||||
Get
|
||||
GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTFraccionArancelaria") = value
|
||||
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTIncoterm() As DataTable
|
||||
Get
|
||||
GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTIncoterm") = value
|
||||
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTTipoOperacion() As DataTable
|
||||
Get
|
||||
GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTTipoOperacion"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTTipoOperacion = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTTipoOperacion") = value
|
||||
Dim AppNombre As String = "GlobalDTTipoOperacion"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTSATMotivoTraslado() As DataTable
|
||||
Get
|
||||
GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATMotivoTraslado() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTSATMotivoTraslado = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTSATMotivoTraslado") = value
|
||||
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTUnidadAduana() As DataTable
|
||||
Get
|
||||
GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTUnidadAduana") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property GlobalDTGralPaises() As DataTable
|
||||
Get
|
||||
If Application("GlobalDTGralPaises") Is Nothing Then
|
||||
Dim AppNombre As String = "GlobalDTUnidadAduana"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
|
||||
If ObjGrales.GetSATUnidadesAduana() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
|
||||
GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTGralPaises") = value
|
||||
Dim AppNombre As String = "GlobalDTUnidadAduana"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTGralPaises() As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = "GlobalDTGralPaises"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATPais() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
GlobalDTGralPaises = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = "GlobalDTGralPaises"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
|
||||
@@ -437,7 +472,7 @@ Public Class ClsPaginas
|
||||
Dim AppNombre As String = "GlobalDTGralEstados"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
||||
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
@@ -463,7 +498,7 @@ Public Class ClsPaginas
|
||||
Dim AppNombre As String = "GlobalDTGralMunicipios"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
||||
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
@@ -490,7 +525,7 @@ Public Class ClsPaginas
|
||||
If Application("GlobalDTLocalidad") Is Nothing Then
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing
|
||||
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
|
||||
End If
|
||||
@@ -523,14 +558,13 @@ Public Class ClsPaginas
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
|
||||
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = "GlobalDTGralColonias"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
||||
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
@@ -561,7 +595,7 @@ Public Class ClsPaginas
|
||||
Get
|
||||
If Application("GlobalDTPSATUM") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
||||
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable()
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
@@ -1007,18 +1041,36 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTFamilias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTFamilias") = value
|
||||
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTCategoriasPresupuestos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1109,6 +1161,14 @@ Public Class ClsPaginas
|
||||
'End Property
|
||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
If EsPersonaFisica <> -1 Then
|
||||
Dim Tipo As New StringBuilder
|
||||
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
|
||||
@@ -1117,16 +1177,17 @@ Public Class ClsPaginas
|
||||
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
|
||||
End If
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||
GlobalDTSATUsosCFDI = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
|
||||
GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Application("GlobalDTSATUsosCFDI") = value
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
@@ -2616,11 +2677,11 @@ Public Class ClsPaginas
|
||||
#Region "***********************************************************************DT GENERALES**************************************************************************************"
|
||||
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing
|
||||
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
@@ -2634,54 +2695,69 @@ Public Class ClsPaginas
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
|
||||
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralCategorias2 = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
'If CveMarca > 0 Then
|
||||
' filtro.AppendFormat(" CveMarca={0} ", CveMarca)
|
||||
'End If
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralCategorias2 = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTCategorias2") = value
|
||||
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTGralEscolaridades() As DataTable
|
||||
Get
|
||||
GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTGralEscolaridades"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetEscolaridades() Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
GlobalDTGralEscolaridades = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTGralEscolaridades") = value
|
||||
Dim AppNombre As String = "GlobalDTGralEscolaridades"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralColectivas = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTGralColectivas") = value
|
||||
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
@@ -2701,7 +2777,7 @@ Public Class ClsPaginas
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -3496,33 +3572,58 @@ Public Class ClsPaginas
|
||||
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
|
||||
Property GlobalDTAsistenciaDetalle() As DataTable
|
||||
Get
|
||||
GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetAsistenciasDetalle() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTAsistenciaDetalle = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTAsistenciaDetalle") = value
|
||||
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAsistenciasInasistencias() As DataTable
|
||||
Get
|
||||
GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTAsistenciasInasistencias") = value
|
||||
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEstatusPersonal() As DataTable
|
||||
Get
|
||||
GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTEstatusPersonal"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetEstatusPersonal() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTEstatusPersonal = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTEstatusPersonal") = value
|
||||
Dim AppNombre As String = "GlobalDTEstatusPersonal"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
|
||||
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
@@ -3530,145 +3631,239 @@ Public Class ClsPaginas
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
If CveEmpresa <> -1 Or CvePersonal <> -1 Then
|
||||
Dim Str As StringBuilder = New StringBuilder()
|
||||
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTRHPersonal = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Property GlobalDTDepartamentos() As DataTable
|
||||
Get
|
||||
GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTDepartamentos"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetDepartamentos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTDepartamentos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTDepartamentos") = value
|
||||
Dim AppNombre As String = "GlobalDTDepartamentos"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTRHPuestos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTRHPuestos") = value
|
||||
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEscolaridad() As DataTable
|
||||
Get
|
||||
GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTEscolaridad"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetEscolaridades() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTEscolaridad = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTEscolaridad") = value
|
||||
Dim AppNombre As String = "GlobalDTEscolaridad"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTEstadoCivil() As DataTable
|
||||
Get
|
||||
GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTEstadoCivil"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetEstadoCivil() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTEstadoCivil = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTEstadoCivil") = value
|
||||
Dim AppNombre As String = "GlobalDTEstadoCivil"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTDocumentos() As DataTable
|
||||
Get
|
||||
GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTDocumentos"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetDocumentos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTDocumentos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTDocumentos") = value
|
||||
Dim AppNombre As String = "GlobalDTDocumentos"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTGenero() As DataTable
|
||||
Get
|
||||
GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTGenero"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetGeneros() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTGenero = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTGenero") = value
|
||||
Dim AppNombre As String = "GlobalDTGenero"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTMotivoBaja() As DataTable
|
||||
Get
|
||||
GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTMotivoBaja"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetMotivoBaja() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTMotivoBaja = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTMotivoBaja") = value
|
||||
Dim AppNombre As String = "GlobalDTMotivoBaja"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTTiposContrato() As DataTable
|
||||
Get
|
||||
GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTTiposContrato"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetTiposContrato() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTTiposContrato = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTTiposContrato") = value
|
||||
Dim AppNombre As String = "GlobalDTTiposContrato"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTRutas() As DataTable
|
||||
Get
|
||||
GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTRutas"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetRutas() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTRutas = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTRutas") = value
|
||||
Dim AppNombre As String = "GlobalDTRutas"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTTurno() As DataTable
|
||||
Get
|
||||
GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTTurno"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetTurnos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTTurno = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTTurno") = value
|
||||
Dim AppNombre As String = "GlobalDTTurno"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTJornadas() As DataTable
|
||||
Get
|
||||
GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTJornadas"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetJornadas() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTJornadas = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTJornadas") = value
|
||||
Dim AppNombre As String = "GlobalDTJornadas"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTMotivosHorasExtras() As DataTable
|
||||
Get
|
||||
GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetMotivoHorasExtras() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTMotivosHorasExtras = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTMotivosHorasExtras") = value
|
||||
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTTipoBuzon() As DataTable
|
||||
Get
|
||||
GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTTipoBuzon"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetTipoBuzon() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTTipoBuzon = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTTipoBuzon") = value
|
||||
Dim AppNombre As String = "GlobalDTTipoBuzon"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
||||
|
||||
|
||||
|
||||
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -3884,19 +4079,20 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
|
||||
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTPaqueteriaGuiaTipos") = value
|
||||
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
|
||||
@@ -4117,6 +4313,40 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
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
|
||||
|
||||
|
||||
@@ -4125,8 +4355,6 @@ Public Class ClsPaginas
|
||||
DirectorioSitio = 2
|
||||
eFacturasCaptcha = 3
|
||||
|
||||
|
||||
|
||||
RutaEmpresasJM = 500
|
||||
RutaEmpresasRM = 501
|
||||
RutaEmpresasPC = 502
|
||||
@@ -5135,6 +5363,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319)
|
||||
PaginaDict.Add("/Inventarios/CartaPorteManual.aspx".ToUpper(), 1321)
|
||||
|
||||
PaginaDict.Add("/Inventarios/EntradasSalidas.aspx?AL=1".ToUpper(), 1334)
|
||||
|
||||
|
||||
|
||||
#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
|
||||
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
|
||||
|
||||
@@ -762,8 +762,8 @@ Public Class ClsProductosServicios
|
||||
.Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO
|
||||
|
||||
'Nuevo MLopez 18/11/2022
|
||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoOrganico
|
||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoEmpacado
|
||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -2102,12 +2102,17 @@ Namespace Modelos
|
||||
CveConcepto = 6
|
||||
End Select
|
||||
'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
|
||||
Dim DtMovimientos As DataTable = ObjAcum.DtResultados.FiltraParametros("Cantidad > 0")
|
||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||
For Each RowSalida As DataRow In DtMovimientos.Rows
|
||||
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 CveVentaBonificacion As Integer = -1
|
||||
@@ -2117,15 +2122,15 @@ Namespace Modelos
|
||||
FacturadoBonificacion = CBool(RowSalida("FacturadoBonificacion").ToString())
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
DtMovimientos.Dispose()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
@@ -2138,15 +2143,25 @@ Namespace Modelos
|
||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") 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
|
||||
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, 2, factura.CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then
|
||||
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()
|
||||
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -2197,13 +2212,22 @@ Namespace Modelos
|
||||
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then
|
||||
' Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}")
|
||||
If DrTamanio IsNot Nothing Then
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4867,6 +4891,11 @@ Namespace Modelos
|
||||
AplicaRefacturacionConPagos = True
|
||||
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
|
||||
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."
|
||||
@@ -5380,7 +5409,10 @@ Namespace Modelos
|
||||
DtSalidas = DtInventario.FiltraParametros($"CvePS IS NULL AND {Filtro}")
|
||||
|
||||
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
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" Then
|
||||
@@ -5593,7 +5625,7 @@ Namespace Modelos
|
||||
If DtVirtuales IsNot Nothing Then
|
||||
For Each RowVirtual As DataRow In DtVirtuales.Rows
|
||||
'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
|
||||
MensajeError = "Ocurrió un error al realizar la devolución del virtual. Por favor vuelva a intentar."
|
||||
End If
|
||||
@@ -6130,7 +6162,7 @@ Namespace Modelos
|
||||
Return Not ErrorCancelar
|
||||
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
|
||||
Try
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
@@ -6163,6 +6195,10 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 36
|
||||
If TipoDocto = "Dev" Then
|
||||
CveConceptoMovimientoVirtual = 37
|
||||
End If
|
||||
|
||||
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
|
||||
@@ -7382,6 +7418,14 @@ Namespace Modelos
|
||||
#End Region
|
||||
|
||||
#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
|
||||
Get
|
||||
If GlobalTipoCambio <= 0 Then
|
||||
|
||||
@@ -1544,15 +1544,15 @@ Partial Class Bancos_IE
|
||||
DivOtrosIngresosEgresos.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
Else
|
||||
BtnGuardar.Enabled = True
|
||||
End If
|
||||
UpGuardar.Update()
|
||||
End If
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
' BtnGuardar.Enabled = False
|
||||
' Else
|
||||
' BtnGuardar.Enabled = True
|
||||
' End If
|
||||
' UpGuardar.Update()
|
||||
'End If
|
||||
|
||||
CargaCuentasDepositos()
|
||||
|
||||
@@ -1600,15 +1600,15 @@ Partial Class Bancos_IE
|
||||
HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString
|
||||
IDCtaBeneficiario = ObjPersonal.IdCtaContPersonal
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Enabled = False
|
||||
Else
|
||||
BtnGuardar.Enabled = True
|
||||
End If
|
||||
UpGuardar.Update()
|
||||
End If
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
' BtnGuardar.Enabled = False
|
||||
' Else
|
||||
' BtnGuardar.Enabled = True
|
||||
' End If
|
||||
' UpGuardar.Update()
|
||||
'End If
|
||||
|
||||
CargaCuentasDepositos()
|
||||
Else
|
||||
|
||||
@@ -550,8 +550,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
|
||||
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
|
||||
{
|
||||
IDPoliza = ObjMov.ContaIdPoliza;
|
||||
@@ -560,18 +559,16 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IDCtaContableAcreedor < 1)
|
||||
|
||||
if (IDCtaContableAcreedor < 1 && UsuarioActual.Empresa.TipoContabilidad == 2)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
if (IDCtaContableBancos < 1)
|
||||
if (IDCtaContableBancos < 1 && UsuarioActual.Empresa.TipoContabilidad == 2)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (MsgError.Equals(""))
|
||||
|
||||
@@ -836,14 +836,14 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (CveMoneda != 1 && UsaComplementaria)
|
||||
{
|
||||
|
||||
decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria);
|
||||
|
||||
if (difComplementaria != 0)
|
||||
{
|
||||
ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria);
|
||||
}
|
||||
|
||||
//decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria);
|
||||
|
||||
//if (difComplementaria != 0)
|
||||
//{
|
||||
// ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria);
|
||||
//}
|
||||
ImporteComplementaria = (ImporteBanco * TC) - ImporteBanco;
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
|
||||
@@ -379,8 +379,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
//if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
|
||||
//{
|
||||
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
|
||||
{
|
||||
IDPoliza = ObjMov.ContaIdPoliza;
|
||||
@@ -389,18 +389,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IDCtaContablePrestamo < 1)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
if (IDCtaContableBancos < 1)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (IDCtaContablePrestamo < 1)
|
||||
// {
|
||||
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
|
||||
// }
|
||||
// if (IDCtaContableBancos < 1)
|
||||
// {
|
||||
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
if (MsgError.Equals(""))
|
||||
@@ -635,8 +635,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
|
||||
{
|
||||
//if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
|
||||
//{
|
||||
if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
|
||||
{
|
||||
IDPoliza = ObjMov.ContaIdPoliza;
|
||||
@@ -645,18 +645,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IDCtaContablePrestamo < 1)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
if (IDCtaContableBancosPrestamo < 1)
|
||||
{
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (IDCtaContablePrestamo < 1)
|
||||
// {
|
||||
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia);
|
||||
// }
|
||||
// if (IDCtaContableBancosPrestamo < 1)
|
||||
// {
|
||||
// Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
if (MsgError.Equals(""))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<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="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
@@ -124,10 +124,10 @@
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/>
|
||||
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px" Height="30px" />
|
||||
</li>
|
||||
<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:DropDownList>
|
||||
</li>
|
||||
|
||||
@@ -69,13 +69,13 @@ Partial Class Bancos_RepCxCCliente
|
||||
Mov.Dispose()
|
||||
GvCxC.DataBind()
|
||||
|
||||
If (GvCxC.Rows.Count > 0) Then
|
||||
GvCxC.UseAccessibleHeader = True
|
||||
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
'If (GvCxC.Rows.Count > 0) Then
|
||||
GvCxC.UseAccessibleHeader = True
|
||||
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
UPDatos.Update()
|
||||
|
||||
UPDatos.Update()
|
||||
End If
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -1084,6 +1084,7 @@ Partial Class Compras_Compras
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Dim DTConceptos As DataTable
|
||||
Private Property EmpresasOC As List(Of Integer)
|
||||
Get
|
||||
@@ -1185,6 +1186,18 @@ Partial Class Compras_Compras
|
||||
|
||||
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
|
||||
@@ -1610,7 +1623,13 @@ Partial Class Compras_Compras
|
||||
NCSeleccionFacturasRelacionadas(UUIDSList)
|
||||
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
|
||||
|
||||
@@ -3500,7 +3519,7 @@ Partial Class Compras_Compras
|
||||
ViewState("IdCtaContRetIVA") = ObjProveedor.IdCtaContRetIVA
|
||||
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)
|
||||
End If
|
||||
|
||||
@@ -5527,6 +5546,8 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||
|
||||
|
||||
For Each tCveAlmacen As Integer In ListAlmacenes
|
||||
If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
|
||||
Continue For
|
||||
@@ -5553,7 +5574,7 @@ Partial Class Compras_Compras
|
||||
|
||||
ListaMovimientosAlmacen.Add(CveMovimientoInventario)
|
||||
|
||||
|
||||
Dim contadorAlamcen As Integer = 0
|
||||
For Each Dr As DataRow In DtInv.Rows
|
||||
|
||||
CveProducto = Dr("CvePS").ToString.ToEntero
|
||||
@@ -5594,22 +5615,26 @@ Partial Class Compras_Compras
|
||||
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)
|
||||
'si no es por serie lote
|
||||
ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto)
|
||||
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
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
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
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
i = i + 1
|
||||
i = i + 1
|
||||
contadorAlamcen = contadorAlamcen + 1
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -8633,6 +8658,7 @@ Partial Class Compras_Compras
|
||||
Pago.ImportePago = ImporteAnt
|
||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||
Pago.CveMonedaPago = CveMonedaAnticipo
|
||||
Pago.TCPago = TipoCambioAnt
|
||||
|
||||
Select Case gvr.DataKey("TipoDocto")
|
||||
Case "NC", "DEV"
|
||||
@@ -8661,10 +8687,6 @@ Partial Class Compras_Compras
|
||||
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If CveMonedaAnticipo > 1 Then
|
||||
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
@@ -10991,7 +11013,16 @@ Partial Class Compras_Compras
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
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").DataBind()
|
||||
'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"
|
||||
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").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
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
|
||||
Row("NoDeducible") = NoDeducible
|
||||
|
||||
|
||||
Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento
|
||||
Row("PU") = Math.Round(PU, DecimalesPermitidos)
|
||||
If CargaXml And (Version = "3.3" Or Version = "4.0") Then
|
||||
|
||||
|
||||
@@ -5455,7 +5455,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString))
|
||||
params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), "")))
|
||||
params.Add(New ReportParameter("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))
|
||||
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||
divContabilziada.Visible = True
|
||||
BtnEliminar.Visible = False
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
If UsuarioActual.CveUsuario = 100 OrElse UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
BtnContabilizar.Visible = True
|
||||
BtnContabilizar.Text = "Actualizar Poliza"
|
||||
End If
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Tipo de Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
||||
@@ -145,7 +145,7 @@
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta Mayor</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
||||
|
||||
@@ -537,6 +537,7 @@
|
||||
<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="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -660,6 +661,13 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTC" runat="server" Text=" Tipo Cambio" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMostrarLineaAdicional" runat="server" Text=" Linea Adicional" Checked="false" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -847,6 +847,13 @@ Partial Class RepCxCDetalle
|
||||
GvDatos.Columns(44).Visible = False
|
||||
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
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
65
Global.asax
65
Global.asax
@@ -9,36 +9,37 @@
|
||||
|
||||
<script RunAt="server">
|
||||
|
||||
Public ReadOnly Property EsProduccion As String
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return "0"
|
||||
Else
|
||||
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
|
||||
End If
|
||||
End Get
|
||||
Public ReadOnly Property EsProduccion As String
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return "0"
|
||||
Else
|
||||
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Private Sub GuardaLogAsax(str As String)
|
||||
'GuardaLog(str)
|
||||
End Sub
|
||||
Sub Application_Start(sender As Object, e As EventArgs)
|
||||
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
|
||||
|
||||
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
|
||||
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
|
||||
|
||||
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
|
||||
|
||||
|
||||
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
|
||||
Application("s") = sessionData
|
||||
|
||||
|
||||
'BANDERA PARA VALIDACION DE CFDI
|
||||
Sub Application_Start(sender As Object, e As EventArgs)
|
||||
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
|
||||
|
||||
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
|
||||
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
|
||||
|
||||
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
|
||||
|
||||
|
||||
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
|
||||
Application("s") = sessionData
|
||||
|
||||
|
||||
'BANDERA PARA VALIDACION DE CFDI
|
||||
Application("GlobalValidarCFDI") = True
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------------------
|
||||
'C A R G A - R H
|
||||
#If False Then
|
||||
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
|
||||
Using ObjRH As New ClsRH
|
||||
|
||||
@@ -59,6 +60,7 @@
|
||||
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
|
||||
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
|
||||
End Using
|
||||
#End If
|
||||
'----------------------------------------------------------------------------------------------------------------------
|
||||
'C A R G A - O S
|
||||
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now))
|
||||
@@ -89,7 +91,6 @@
|
||||
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
|
||||
End Using
|
||||
|
||||
|
||||
'-------------------------------------------------------------------------------------------------------------------------
|
||||
'A M O R T I Z A C I O N - C O N T A B L E
|
||||
|
||||
@@ -234,20 +235,20 @@
|
||||
'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
|
||||
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
|
||||
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
|
||||
If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
||||
'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
||||
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing
|
||||
'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||
'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||
'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||
'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
|
||||
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
||||
If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
||||
'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
||||
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
|
||||
|
||||
End Using
|
||||
#If False Then
|
||||
'SAT
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
||||
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
|
||||
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
|
||||
@@ -261,7 +262,7 @@
|
||||
'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
|
||||
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
|
||||
End Using
|
||||
|
||||
#End If
|
||||
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'E V E N T O S
|
||||
|
||||
@@ -2042,7 +2042,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
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
|
||||
Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -4404,6 +4404,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Exit Sub
|
||||
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 ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
|
||||
@@ -4426,6 +4431,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim idCtaContableEntrada 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
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 119
|
||||
@@ -4438,6 +4451,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
||||
|
||||
|
||||
|
||||
'MOVIMIENTO DE ENTRADA
|
||||
If DtMovimientosEntradaInvFisico.Rows.Count > 0 Then
|
||||
'FolioEntrada = ObjInventario.GetFolioSiguiente(32, UsuarioActual.CveEmpresa)
|
||||
@@ -4484,9 +4499,35 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
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
|
||||
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,
|
||||
ImporteConcepto, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
|
||||
@@ -30,6 +30,10 @@ Partial Class Inventarios_KardexAlmacen
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
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)
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
End If
|
||||
@@ -147,8 +151,9 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
|
||||
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
|
||||
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,
|
||||
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
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||
<asp:BoundField DataField="Transito" ItemStyle-HorizontalAlign="Right" HeaderText="En Tránsito" DataFormatString="{0:#,###.######}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -1318,13 +1318,19 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, Now, CveMovimiento:=CveMovimiento) Then
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}")
|
||||
If DrTamanio IsNot Nothing Then
|
||||
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(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
|
||||
Next
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2022 © AD Sistemas.</asp:Literal>
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2023 © AD Sistemas.</asp:Literal>
|
||||
</div>
|
||||
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
|
||||
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>
|
||||
|
||||
@@ -184,20 +184,20 @@ Partial Class LogIn
|
||||
Return URLParametros
|
||||
End Function
|
||||
|
||||
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
|
||||
Get
|
||||
If CveUsuario <> -1 Then
|
||||
Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
|
||||
GlobalDTUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
Application("GlobalDTUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
|
||||
' Get
|
||||
' If CveUsuario <> -1 Then
|
||||
' Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
|
||||
' GlobalDTUsuarios = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' Else
|
||||
' GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As Data.DataTable)
|
||||
' Application("GlobalDTUsuarios") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Dim BtnLogIn_Clickenter As Integer = 0
|
||||
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
|
||||
Dim ReturnUrl As String = "/"
|
||||
@@ -251,16 +251,20 @@ Partial Class LogIn
|
||||
Else
|
||||
'PLATAFORMA SIG
|
||||
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then
|
||||
Usuario.MultipleEmpresa = True
|
||||
Using ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario) Then
|
||||
Dim dt As Data.DataTable = ObjUsuarios.DtResultados
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then
|
||||
Usuario.MultipleEmpresa = True
|
||||
End If
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
End If
|
||||
End If
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
dt.Dispose()
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End Using
|
||||
End If
|
||||
|
||||
Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False)
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
<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>
|
||||
</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>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -431,6 +434,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalOS" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalOS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -595,7 +601,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<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: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="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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -662,11 +668,104 @@
|
||||
</asp:UpdatePanel>
|
||||
</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">×</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">
|
||||
|
||||
<asp:UpdatePanel ID="UpCommando" runat="server">
|
||||
<ContentTemplate>
|
||||
<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="HFCveOsDetalle" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HFOCveOIEvento" Value="-1" ClientIDMode="Static" />
|
||||
@@ -1081,15 +1180,10 @@
|
||||
function InitCalendar() {
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
Calendario();
|
||||
|
||||
//if (PrimeraCargaCalendario) {
|
||||
|
||||
//}
|
||||
|
||||
|
||||
$("#TxtModalFechaOS").val("" + start.format("DD/MM/YYYY 08:00"));
|
||||
Calendario();
|
||||
|
||||
|
||||
|
||||
});
|
||||
@@ -1109,7 +1203,68 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports Telerik.Web.UI
|
||||
Imports APP_Code_CSharp
|
||||
Imports AjaxControlToolkit.AsyncFileUpload.Constants
|
||||
Imports System
|
||||
Imports System.Globalization
|
||||
|
||||
Partial Class OS_RepServicioDomicilio
|
||||
Inherits ClsPaginas
|
||||
@@ -740,7 +741,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
DdlTecnicoAsignar.SelectedValueExist(ObjOS.CveUsuarioAtendio)
|
||||
CveTecnicoAsignarOrioginal = ObjOS.CveUsuarioAtendio
|
||||
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
|
||||
'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour)
|
||||
'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
|
||||
If Not TieneError And CorreoAsignado.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
|
||||
CorreoAsignado = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString
|
||||
MandaCorreOS(CveOSAsignar, CorreoAsignado)
|
||||
MandaCorreOS(CveOS, CorreoAsignado)
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
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("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString))
|
||||
params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), "")))
|
||||
params.Add(New ReportParameter("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))
|
||||
|
||||
|
||||
@@ -1126,7 +1127,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
|
||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
|
||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTMaterialesOS}
|
||||
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
@@ -1247,4 +1248,149 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
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
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<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>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
||||
@@ -111,7 +112,8 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -418,8 +418,11 @@ Partial Class RH_CatDocumentos
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
|
||||
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
||||
|
||||
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||
|
||||
Dim separado As Char() = {"."}
|
||||
Dim array() As String = DocumetacionFormato.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
@@ -430,27 +433,50 @@ Partial Class RH_CatDocumentos
|
||||
|
||||
If DocumetacionFormato.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
If extencion.Length > 0 Then
|
||||
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)
|
||||
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
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
Dim FileD = New FileInfo(PathDescargaArchivo)
|
||||
|
||||
If FileD.Exists Then
|
||||
ImgDownLoadFormato.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||
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 Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1641,7 +1641,346 @@
|
||||
<asp:UpdatePanel ID="UpImprimir" runat="server">
|
||||
<ContentTemplate>
|
||||
<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>
|
||||
<label><b>M</b></label>
|
||||
<label><b>MI</b></label>
|
||||
<label><b>J</b></label>
|
||||
<label><b>V</b></label>
|
||||
<label><b>S</b></label>
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkLunes" runat="server" />
|
||||
<asp:CheckBox ID="ChkMartes" runat="server" />
|
||||
<asp:CheckBox ID="ChkMiercoles" runat="server" />
|
||||
<asp:CheckBox ID="ChkJueves" runat="server" />
|
||||
<asp:CheckBox ID="ChkViernes" runat="server" />
|
||||
<asp:CheckBox ID="ChkSabado" runat="server" />
|
||||
|
||||
</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>
|
||||
<label><b>M</b></label>
|
||||
<label><b>MI</b></label>
|
||||
<label><b>J</b></label>
|
||||
<label><b>V</b></label>
|
||||
<label><b>S</b></label>
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkRevLunes" runat="server" />
|
||||
<asp:CheckBox ID="ChkRevMartes" runat="server" />
|
||||
<asp:CheckBox ID="ChkRevMiercoles" runat="server" />
|
||||
<asp:CheckBox ID="ChkRevJueves" runat="server" />
|
||||
<asp:CheckBox ID="ChkRevViernes" runat="server" />
|
||||
<asp:CheckBox ID="ChkRevSabado" runat="server" />
|
||||
</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" />
|
||||
<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-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: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" />
|
||||
<%-- <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>
|
||||
</div>
|
||||
|
||||
@@ -1783,66 +2122,13 @@
|
||||
<label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label>
|
||||
</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 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>
|
||||
<%--<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>--%>
|
||||
<asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtCobranzaContacto.ClientID.ToString()%>">Nombre Contacto de Pagos: </label>
|
||||
</div>
|
||||
|
||||
@@ -1851,8 +2137,7 @@
|
||||
<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="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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1867,8 +2152,7 @@
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<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>--%>
|
||||
<asp:TextBox ID="TxtCobranzaCorreo" CssClass="form-control" runat="server" MaxLength="2000"></asp:TextBox>
|
||||
<label for="<%= TxtCobranzaCorreo.ClientID.ToString()%>">Correo de Pagos: </label>
|
||||
</div>
|
||||
|
||||
@@ -1877,45 +2161,21 @@
|
||||
<label for="<%= TxtHorario.ClientID.ToString()%>">Horario: </label>
|
||||
</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">
|
||||
<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>--%>
|
||||
<asp:TextBox ID="TxtPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtPortalFacturacion.ClientID.ToString()%>">Portal de Facturas: </label>
|
||||
</div>
|
||||
|
||||
<div id="DivPortal" runat="server" visible="false">
|
||||
<div class="form-group form-md-line-input">
|
||||
<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>--%>
|
||||
<asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<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>--%>
|
||||
<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>
|
||||
@@ -1947,10 +2207,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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" />
|
||||
<div class="row">
|
||||
<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="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">
|
||||
@@ -2052,11 +2304,13 @@
|
||||
</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 class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -2085,6 +2339,15 @@
|
||||
|
||||
</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="col-md-12">
|
||||
<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 HeaderText="Abonar">
|
||||
<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>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -6800,7 +7063,19 @@
|
||||
|
||||
|
||||
<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">
|
||||
<asp:TextBox ID="TxtFechaVencimientoLineaAdicionalModal" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
@@ -6819,18 +7094,7 @@
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
@@ -513,12 +513,26 @@ Partial Class Clientes
|
||||
Set(value As Integer)
|
||||
ViewState("CveLineaAdicional") = value
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -750,9 +764,11 @@ Partial Class Clientes
|
||||
If UsuarioActual.TienePermisoProceso(162) Then
|
||||
ChkPermiteCredito.Enabled = True
|
||||
TxtLimiteCreditoSucursal.Enabled = True
|
||||
TxtFechaLimiteCredito.Enabled = True
|
||||
Else
|
||||
ChkPermiteCredito.Enabled = False
|
||||
TxtLimiteCreditoSucursal.Enabled = False
|
||||
TxtFechaLimiteCredito.Enabled = False
|
||||
End If
|
||||
ChkEstado.Enabled = False
|
||||
If UsuarioActual.TienePermisoProceso(180) Then
|
||||
@@ -941,10 +957,10 @@ Partial Class Clientes
|
||||
LnkAgregarLineaAdicional.Visible = True
|
||||
GetLineasAdicionales()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
||||
@@ -1621,6 +1637,9 @@ Partial Class Clientes
|
||||
ChkRequiereOC.Checked = ObjClientes.RequiereOC
|
||||
ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString())
|
||||
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
|
||||
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
|
||||
@@ -2085,15 +2104,15 @@ Partial Class Clientes
|
||||
UpAgregarSucursal.Update()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Public Sub CargaAFAsignados()
|
||||
'Dim ObjAF As New ClsAF()
|
||||
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then
|
||||
' GvAFAsignado.DataSource = ObjAF.DtResultados
|
||||
'Else
|
||||
' GvAFAsignado.DataSource = Nothing
|
||||
'End If
|
||||
'ObjAF.Dispose()
|
||||
'GvAFAsignado.DataBind()
|
||||
Public Sub CargaAFAsignados()
|
||||
'Dim ObjAF As New ClsAF()
|
||||
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then
|
||||
' GvAFAsignado.DataSource = ObjAF.DtResultados
|
||||
'Else
|
||||
' GvAFAsignado.DataSource = Nothing
|
||||
'End If
|
||||
'ObjAF.Dispose()
|
||||
'GvAFAsignado.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaMetodosPago33()
|
||||
DdlMetodoPago33.Items.Clear()
|
||||
@@ -2670,6 +2689,10 @@ Partial Class Clientes
|
||||
|
||||
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
|
||||
Dim ErrorAC As Boolean = False
|
||||
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(),
|
||||
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()),
|
||||
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
|
||||
|
||||
@@ -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(),
|
||||
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()),
|
||||
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)
|
||||
@@ -4068,10 +4091,10 @@ Partial Class Clientes
|
||||
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim DtCxCFact As DataTable = Nothing
|
||||
|
||||
Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
||||
@@ -4277,16 +4300,16 @@ Partial Class Clientes
|
||||
Else
|
||||
If Archivo.Exists Then
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4329,16 +4352,16 @@ Partial Class Clientes
|
||||
DtCxCFact2.Rows.Add(drr)
|
||||
|
||||
If Archivo.Exists Then
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4361,9 +4384,9 @@ Partial Class Clientes
|
||||
End Using
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "E N V I O C O R R E O"
|
||||
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
|
||||
|
||||
@@ -4431,11 +4454,11 @@ Partial Class Clientes
|
||||
a.GuardaLog()
|
||||
Dim Mail As New ClsSisMail()
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " COTIZACIONES "
|
||||
|
||||
|
||||
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
|
||||
If BtnVerMasCot.Text = "Ver Más" Then
|
||||
CargaCotizaciones(-1)
|
||||
@@ -4505,11 +4528,11 @@ Partial Class Clientes
|
||||
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D I R E C C I O N E N V I O "
|
||||
|
||||
|
||||
Private Sub CargaCombosDirecionesClientesSAT()
|
||||
CargaDirClientePais()
|
||||
CargaDirClienteEstado()
|
||||
@@ -4732,12 +4755,12 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
CargaDireccionesEnvio()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " IMPORTAR SALDOS "
|
||||
|
||||
|
||||
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
|
||||
CargaClientesImportarSaldos()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
|
||||
@@ -4841,9 +4864,9 @@ Partial Class Clientes
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo")))
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Cuentas/Equipos"
|
||||
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
|
||||
HdnModalidad.Value = "I"
|
||||
@@ -5431,9 +5454,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GPS"
|
||||
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
|
||||
If hdnArrayDispositivo.Value.Length > 0 Then
|
||||
@@ -5574,10 +5597,10 @@ Partial Class Clientes
|
||||
UpMoverDispositivo.Update()
|
||||
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Sucursales"
|
||||
Public Sub CreaDTSucursales()
|
||||
|
||||
@@ -5811,14 +5834,14 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G P S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
||||
|
||||
Try
|
||||
@@ -5889,16 +5912,16 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O N T R A T O S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDatosContrato()
|
||||
If CveCliente <= 0 Then
|
||||
Exit Sub
|
||||
@@ -5943,10 +5966,10 @@ Partial Class Clientes
|
||||
e.Row.CssClass = "Totales white"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "M E T O D O S "
|
||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
||||
@@ -6356,13 +6379,13 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "IMPRIMIR GVHistorial"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim retorno As Byte() = Nothing
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
@@ -6437,18 +6460,18 @@ Partial Class Clientes
|
||||
ObjClientes.Dispose()
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O B R A N Z A"
|
||||
Public Sub Visitas_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Usuarios"
|
||||
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
|
||||
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero()
|
||||
@@ -6483,12 +6506,12 @@ Partial Class Clientes
|
||||
e.Row.Cells(5).Visible = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C U E N T A S - B A N C A R I A S"
|
||||
|
||||
|
||||
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
|
||||
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
@@ -6661,8 +6684,8 @@ Partial Class Clientes
|
||||
TxtNumeroCuenta2.Text = ""
|
||||
TxtConvenioCIE2.Text = ""
|
||||
TxtReferencia2.Text = ""
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
||||
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -6718,10 +6741,10 @@ Partial Class Clientes
|
||||
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub CargaPSGridCuentasBancos()
|
||||
If CveCliente > 0 Then
|
||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||
@@ -6779,9 +6802,9 @@ Partial Class Clientes
|
||||
divestatus.Visible = True
|
||||
UpAddBancos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||
GenerarPDF("Excel")
|
||||
@@ -6803,11 +6826,11 @@ Partial Class Clientes
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "VENTAS"
|
||||
|
||||
|
||||
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim Vta As Modelos.Factura = Nothing
|
||||
@@ -7038,10 +7061,10 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Return PdfFactura(Vta)
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMERCIO EXTERIOR"
|
||||
Public Sub CargaCombosComercioExterior()
|
||||
|
||||
@@ -7165,12 +7188,12 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D O C U M E N T A C I O N "
|
||||
|
||||
|
||||
Private Sub CargaDocumentacionCliente()
|
||||
Dim objRH As New ClsEdocumentacion()
|
||||
|
||||
@@ -7808,12 +7831,12 @@ Partial Class Clientes
|
||||
|
||||
RegistraScript("Download('" & baseUrl & "')")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D O C U M E N T O S V E N T A S"
|
||||
|
||||
|
||||
Private Sub CargaDocumentosVenta(tCveCliente As Integer)
|
||||
Dim objInv As New ClsEdocumentacion
|
||||
|
||||
@@ -7984,11 +8007,11 @@ Partial Class Clientes
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PERSONA FISICA"
|
||||
Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#DivModalPersonaFisica').modal();")
|
||||
@@ -8013,9 +8036,9 @@ Partial Class Clientes
|
||||
|
||||
ObjCliente.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "USUARIOS PLATAFORMA CLIENTE - 6 "
|
||||
Protected Sub CargaUsuariosPortalCliente()
|
||||
Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios
|
||||
@@ -8024,19 +8047,19 @@ Partial Class Clientes
|
||||
GvUsuarios.DataBind()
|
||||
End If
|
||||
objUsuario.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " DEVOLVER DINERO ANT/NC "
|
||||
Private Sub InicializaDevolverDinero()
|
||||
If UsuarioActual.TienePermisoProceso(247) Then
|
||||
GVAnticipos.Columns(6).Visible = True
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "MODAL GRAFICA/PEDIDOS"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If CargaDatatables() Then
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')")
|
||||
@@ -8373,13 +8396,13 @@ Partial Class Clientes
|
||||
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
|
||||
|
||||
UPModalProd.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TAB - COMPORTAMIENTO DE VENTAS"
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
|
||||
@@ -8563,12 +8586,12 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
GvComportamientoVenta.DataBind()
|
||||
UpDatosComportamientoVenta.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "DISPOSITIVOS"
|
||||
|
||||
|
||||
Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs)
|
||||
Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero()
|
||||
Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero()
|
||||
@@ -8606,10 +8629,10 @@ Partial Class Clientes
|
||||
CargaEventoBitacora()
|
||||
NombreDispositivo = ""
|
||||
RegistraScript("$('#DivMoverDispositivo').modal('hide');")
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CRM"
|
||||
Protected Sub CargaDatosCRM()
|
||||
Dim ObjCRM = New ClsCRM()
|
||||
@@ -8709,9 +8732,9 @@ Partial Class Clientes
|
||||
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE MARCAS"
|
||||
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
||||
@@ -8936,9 +8959,9 @@ Partial Class Clientes
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||
@@ -9174,12 +9197,12 @@ Partial Class Clientes
|
||||
|
||||
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2)
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " A C U M U L A D O R E S"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
|
||||
'CveVentaNota = 0
|
||||
|
||||
@@ -9822,11 +9845,11 @@ Partial Class Clientes
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
|
||||
@@ -9889,15 +9912,13 @@ Partial Class Clientes
|
||||
End Sub
|
||||
|
||||
Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
|
||||
|
||||
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()
|
||||
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")
|
||||
End If
|
||||
Acum.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
@@ -10406,6 +10427,8 @@ Partial Class Clientes
|
||||
|
||||
Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
CveLineaAdicional = -1
|
||||
FechaIngLineaAdicional = Nothing
|
||||
|
||||
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
||||
LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional"
|
||||
AgregarLineaAdicionalLimpiarControles()
|
||||
@@ -10437,11 +10460,13 @@ Partial Class Clientes
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If CveLineaAdicional > 0 Then
|
||||
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
|
||||
If CveLineaAdicional > 0 Then
|
||||
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,
|
||||
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
|
||||
@@ -10449,7 +10474,11 @@ Partial Class Clientes
|
||||
Else
|
||||
Alert("Linea Adicional Actualizada Correctamente")
|
||||
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,
|
||||
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero,
|
||||
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
|
||||
@@ -10476,6 +10505,7 @@ Partial Class Clientes
|
||||
|
||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
|
||||
FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime()
|
||||
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
|
||||
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
|
||||
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
@@ -10520,6 +10550,7 @@ Partial Class Clientes
|
||||
Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False)
|
||||
DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True)
|
||||
UpLineaAdicionalmodal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -73,6 +73,19 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</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>
|
||||
<td style="text-align: center;" colspan="4">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Owin.Security.Provider
|
||||
|
||||
Partial Class PopUpBuscarClientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -74,13 +76,17 @@ Partial Class PopUpBuscarClientes
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim CveUsuarioConsulta As Integer
|
||||
|
||||
|
||||
Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(322) Then
|
||||
CveUsuarioConsulta = UsuarioActual.CveVendedor
|
||||
Else
|
||||
CveUsuarioConsulta = -1
|
||||
End If
|
||||
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
|
||||
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjClientes.DtResultados
|
||||
@@ -150,6 +156,7 @@ Partial Class PopUpBuscarClientes
|
||||
If TxtMail.Text.Trim <> String.Empty Then Return True
|
||||
If DdlSubProyecto.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
|
||||
End Function
|
||||
|
||||
|
||||
@@ -438,21 +438,12 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPanelCitricos()
|
||||
Dim ObjGral As New ClsGenerales()
|
||||
If ObjGral.GetEmpacados(UsuarioActual.CveEmpresa) Then
|
||||
DdlEmpacado.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
If ObjGral.GetTipoOrganicos(UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoOrganico.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
|
||||
DdlEmpacado.DataSource = GlobalDTGralEmpacados(UsuarioActual.CveEmpresa)
|
||||
DdlTipoOrganico.DataSource = GlobalDTGralTipoOrganicos(UsuarioActual.CveEmpresa)
|
||||
DdlEmpacado.DataBind()
|
||||
DdlTipoOrganico.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MuestraPanel(Optional AfterPageLoad As Boolean = False)
|
||||
If AfterPageLoad Then
|
||||
RegistraScript("window.onload = function MuestraPanel() { document.getElementById(""C_BtnMostrarPanel"").click(); }")
|
||||
|
||||
@@ -136,8 +136,11 @@
|
||||
<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="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="FechaEnvio" HeaderText="F. Envío" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Opciones" ItemStyle-Width="100px" HeaderStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<div class="row" >
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Familia-Linea" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4702,6 +4702,15 @@ Partial Class Ventas
|
||||
If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True
|
||||
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 = 20 Then
|
||||
' LbCancelarDocumentoManual.Visible = True
|
||||
@@ -9471,6 +9480,7 @@ Partial Class Ventas
|
||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim ObjContPaq As ClsContPAQi = Nothing
|
||||
'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
|
||||
@@ -9541,7 +9551,7 @@ Partial Class Ventas
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
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
|
||||
ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion)
|
||||
End If
|
||||
@@ -9681,7 +9691,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
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
|
||||
ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion)
|
||||
End If
|
||||
@@ -9839,12 +9849,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ObjVentas.Commit()
|
||||
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
@@ -9854,7 +9858,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
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)
|
||||
End Try
|
||||
|
||||
|
||||
Try
|
||||
'RMF, cuando es pedido, se manda autorización.
|
||||
If ObjFactura.TipoDocto.Contiene("PA") Then
|
||||
@@ -10133,12 +10135,8 @@ Partial Class Ventas
|
||||
|
||||
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)))
|
||||
|
||||
|
||||
If ChkEnviarFacturaCRM.Checked AndAlso CorreoContactoCRM.Trim.Length > 0 Then
|
||||
|
||||
Try
|
||||
|
||||
Dim pdfCRM As Byte() = Nothing
|
||||
'If CveVenta > 0 Then
|
||||
' 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)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
End If
|
||||
@@ -10178,9 +10170,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'ERROR DE NO TIMBRADO
|
||||
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.")
|
||||
@@ -10202,12 +10191,10 @@ Partial Class Ventas
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
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")
|
||||
End If
|
||||
|
||||
|
||||
'DESCARGAR PDF DE CICOVISA
|
||||
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
@@ -10235,8 +10222,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
||||
Else
|
||||
'Enviar pore correo cot CRM
|
||||
End If
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Rem" 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)
|
||||
End If
|
||||
|
||||
|
||||
MensajeAlert.Clear()
|
||||
|
||||
Try
|
||||
@@ -10324,7 +10308,6 @@ Partial Class Ventas
|
||||
OnError("Ocurrió un error al limpiar los datos", ex)
|
||||
End Try
|
||||
|
||||
|
||||
Else
|
||||
ObjVentas.RollBack()
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||
@@ -10343,6 +10326,7 @@ Partial Class Ventas
|
||||
ObjCGame.Dispose()
|
||||
ObjContr.Dispose()
|
||||
ObjDocCliente.Dispose()
|
||||
ObjAcum.Dispose()
|
||||
'ObjFolios.Dispose()
|
||||
ErrorList.Clear()
|
||||
ErrorList = Nothing
|
||||
@@ -10986,24 +10970,27 @@ Partial Class Ventas
|
||||
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,
|
||||
Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional IndexNC As Integer = 0) As Boolean
|
||||
Dim ProcesoCorrecto As Boolean = True
|
||||
|
||||
'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
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero()))
|
||||
If DT.Rows.Count > 0 Then
|
||||
factura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero()
|
||||
Else
|
||||
ProcesoCorrecto = False
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
'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()))
|
||||
' If DT.Rows.Count > 0 Then
|
||||
' factura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero()
|
||||
' Else
|
||||
' ProcesoCorrecto = False
|
||||
' End If
|
||||
' DT.Dispose()
|
||||
'End If
|
||||
|
||||
factura.Serie = "-1"
|
||||
factura.Folio = -1
|
||||
|
||||
If NCDescuento Then
|
||||
|
||||
@@ -11019,7 +11006,7 @@ Partial Class Ventas
|
||||
|
||||
factura.CveVentaPadre = Me.CveVenta
|
||||
'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
|
||||
'GENERO LOS DATOS DE LA NC
|
||||
@@ -11158,7 +11145,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion)
|
||||
|
||||
'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
|
||||
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 "
|
||||
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 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
|
||||
If Not NuevaFactura.Contiene(1) 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")
|
||||
End If
|
||||
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")
|
||||
End If
|
||||
End If
|
||||
@@ -13238,7 +13225,6 @@ Partial Class Ventas
|
||||
Dim ListaRNC As List(Of Modelos.Factura) = Nothing
|
||||
|
||||
If NCDescuento Then
|
||||
EsCargo = (Not ListaNCDescuento.Any(Function(RNC) RNC.Num2 = 1))
|
||||
ListaRNC = ListaNCDescuento
|
||||
Else
|
||||
EsCargo = RblRNCTipo.SelectedValue = "1"
|
||||
@@ -13246,26 +13232,93 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'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
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then
|
||||
Dim CvePSCargo As Integer = -1
|
||||
For Each RNC In ListaRNC
|
||||
CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero()
|
||||
If CvePSCargo > 0 Then
|
||||
Exit For
|
||||
Dim CveVentaRNC As Integer = -1
|
||||
|
||||
For Each RNC As Modelos.Factura In ListaRNC
|
||||
|
||||
If NCDescuento Then
|
||||
EsCargo = (Not RNC.Num1 = 2)
|
||||
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
|
||||
|
||||
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 Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Row("Cantidad").ToString().ToDecimal(), CveTamanio, 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
|
||||
'If RowTamanio IsNot Nothing Then
|
||||
' Dim CveTamanio As Integer = RowTamanio("CveTamaño").ToString().ToEntero()
|
||||
' Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||
' Dim Puntos As Decimal = Cantidad * RowTamanio("Puntos").ToString().ToDecimal()
|
||||
' Dim Cargo As Decimal = Cantidad * RowTamanio("Cargo").ToString().ToDecimal()
|
||||
' 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
|
||||
@@ -24786,9 +24839,9 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then
|
||||
ChkDevAlm.Checked = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Rem", "Dev") Then
|
||||
' ChkDevAlm.Checked = True
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then
|
||||
ChkDevAlm.Checked = True
|
||||
@@ -29314,13 +29367,15 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
Dim CveVentaDetalleRNC As Integer = RNCBonificacion.DtDetalle.FiltroPrimeroValor("CveVentaDetalle").ToEntero()
|
||||
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
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(),
|
||||
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,
|
||||
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
|
||||
|
||||
Next
|
||||
@@ -32935,29 +32990,36 @@ Partial Class Ventas
|
||||
End If
|
||||
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
|
||||
|
||||
If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
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
|
||||
|
||||
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,
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, 0D, "", Now) Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Resultado = True
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Resultado
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
@@ -36023,6 +36085,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
TxtFechaPago.Enabled = True
|
||||
imgCalendario.Visible = True
|
||||
|
||||
If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
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
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
TxtFechaPago.Enabled = False
|
||||
imgCalendario.Visible = False
|
||||
End If
|
||||
|
||||
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
|
||||
|
||||
Reference in New Issue
Block a user