Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4308,13 +4308,14 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date, CveUsuario As Integer) As Boolean
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date, CveUsuario As Integer, Optional DejarConciliado As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_IEDesconciliar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaDesconciliado", SqlDbType.Date).Value = FechaDesconciliado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@DejarConciliado", SqlDbType.Int).Value = If(DejarConciliado, 1, 0)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -2234,7 +2234,8 @@ Public Class ClsContPAQi
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function AddMovimiento(IdPoliza As Integer, IdCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
|
||||
Concepto As String, IdSegNeg As Integer, FechaMovto As Date, SIGReferencia As String, Optional ImporteMonedaExtranjera As Double = 0, Optional GUID As String = "-1") As Boolean
|
||||
Concepto As String, IdSegNeg As Integer, FechaMovto As Date, SIGReferencia As String, Optional ImporteMonedaExtranjera As Double = 0, Optional GUID As String = "-1",
|
||||
Optional CvePrePolizaDetalle As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If IdPoliza <= 0 Or IdCuenta <= 0 Then
|
||||
@@ -2307,8 +2308,8 @@ Public Class ClsContPAQi
|
||||
'StrSQL.AppendLine("")
|
||||
'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, IIF(@SegNegMovtos = 1,@IdSegNeg,0), @SIGReferencia, @TimeStamp, @GUID);")
|
||||
StrSQL.AppendLine(" INSERT INTO MovimientosPoliza (Id, RowVersion, IdPoliza, Ejercicio, Periodo, TipoPol, Folio, NumMovto, IdCuenta, TipoMovto, Importe, ImporteME, Referencia, Concepto, IdDiario, Fecha, IdSegNeg, SIGReferencia, TimeStamp, Guid, CvePrePolizaDetalle)")
|
||||
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, IIF(@CvePrePolizaDetalle=-1,NULL,@CvePrePolizaDetalle));")
|
||||
StrSQL.AppendLine(" ")
|
||||
|
||||
''DESCOMENTAR PARA CIERRE PERIODO
|
||||
@@ -2344,156 +2345,6 @@ Public Class ClsContPAQi
|
||||
|
||||
|
||||
|
||||
SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@RowVersion", SqlDbType.Int).Value = GlobalRowVersion
|
||||
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
||||
.Add("@IdCuenta", SqlDbType.Int).Value = IdCuenta
|
||||
.Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
|
||||
.Add("@Importe", SqlDbType.Money).Value = Math.Round(Importe, 2)
|
||||
.Add("@Referencia", SqlDbType.VarChar, 30).Value = If(Referencia.Length > 30, Referencia.Substring(1, 30), Referencia)
|
||||
.Add("@Concepto", SqlDbType.VarChar, 100).Value = If(Concepto.Length > 100, Concepto.Substring(1, 100), Concepto)
|
||||
.Add("@IdSegNeg", SqlDbType.Int).Value = IdSegNeg
|
||||
.Add("@FechaMov", SqlDbType.DateTime).Value = FechaMovto
|
||||
.Add("@SIGReferencia", SqlDbType.VarChar).Value = SIGReferencia
|
||||
.Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
|
||||
.Add("@GUID", SqlDbType.VarChar).Value = GUID
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
GUIDMovimiento = GUID
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Agrega un movimiento a una póliza
|
||||
''' </summary>
|
||||
''' <param name="IdPoliza">Es el ID que generó la póliza</param>
|
||||
''' <param name="IdCuenta">Es el ID de la cuenta del movimiento a agregar</param>
|
||||
''' <param name="TipoMovto">Cargo = False; Abono = True</param>
|
||||
''' <param name="Importe">Es el Importe del movimiento a agregar</param>
|
||||
''' <param name="Referencia">Es la referencia del movimiento, hasta 30 dígitos</param>
|
||||
''' <param name="Concepto">Es el concepto del movimiento, hasta 100 dígitos</param>
|
||||
''' <param name="IdSegNeg">Es el ID del Segmento de Negocio</param>
|
||||
''' <param name="FechaMovto">Es la fecha del movimiento</param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function AddMovimiento(IdPoliza As Integer, IdCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
|
||||
Concepto As String, IdSegNeg As Integer, FechaMovto As Date, SIGReferencia As String, CvePrePolizaDetalle As Integer, Optional ImporteMonedaExtranjera As Double = 0, Optional GUID As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If IdPoliza <= 0 Or IdCuenta <= 0 Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not FNC_GetCounter() Then
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
If Not FNC_GetNumMovto() Then
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
'SqlDataAdapter("PA_AddMovimiento
|
||||
If GUID = "-1" Then GUID = System.Guid.NewGuid().ToString()
|
||||
|
||||
StrSQL.Clear()
|
||||
StrSQL.AppendLine("BEGIN")
|
||||
StrSQL.AppendLine("")
|
||||
StrSQL.AppendLine(" DECLARE ")
|
||||
StrSQL.AppendLine(" @Error NVARCHAR(300),")
|
||||
StrSQL.AppendLine(" @Id INT,")
|
||||
StrSQL.AppendLine(" @Ejercicio INT,")
|
||||
StrSQL.AppendLine(" @Periodo INT,")
|
||||
StrSQL.AppendLine(" @TipoPol INT,")
|
||||
StrSQL.AppendLine(" @Folio INT,")
|
||||
StrSQL.AppendLine(" @NumMovto INT,")
|
||||
StrSQL.AppendLine(" @IdDiario 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 @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);")
|
||||
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("")
|
||||
StrSQL.AppendLine(" BEGIN TRY")
|
||||
StrSQL.AppendLine(" ")
|
||||
|
||||
''DESCOMENTAR PARA CIERRE PERIODO
|
||||
'StrSQL.AppendLine("DECLARE")
|
||||
'StrSQL.AppendLine(" @IdCtaCierre INT,")
|
||||
'StrSQL.AppendLine(" @IdPolCierre INT,")
|
||||
'StrSQL.AppendLine(" @NumMovtoCierre INT;")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine("SET @NumMovtoCierre = 0;")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine("-- SI ES CUENTA DE RESULTADOS")
|
||||
'StrSQL.AppendLine("IF (SELECT Tipo FROM Cuentas WHERE Id = @IdCuenta) IN ('G','H')")
|
||||
'StrSQL.AppendLine("BEGIN ")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine(" SELECT @IdCtaCierre = IdCtaCierre, @IdPolCierre = IdPolCierre FROM Ejercicios WHERE Ejercicio = @Ejercicio")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine(" -- SI ESTA CERRADO EL EJERCICIO")
|
||||
'StrSQL.AppendLine(" IF (@IdCtaCierre > 0 AND @IdPolCierre > 0)")
|
||||
'StrSQL.AppendLine(" BEGIN")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine(" -- PARA QUE EL MOVIMIENTO SE AGREGUE DIRECTO EN LA POLIZA DE CIERRE")
|
||||
'StrSQL.AppendLine(" SET @IdPoliza = @IdPolCierre;")
|
||||
'StrSQL.AppendLine(" SET @NumMovto = dbo.FNC_GetNumMovto (@IdPolCierre);")
|
||||
'StrSQL.AppendLine(" SET @NumMovtoCierre = @NumMovto + 1")
|
||||
'StrSQL.AppendLine("")
|
||||
'StrSQL.AppendLine(" END")
|
||||
'StrSQL.AppendLine("")
|
||||
'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, CvePrePolizaDetalle)")
|
||||
StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp, @GUID, @CvePrePolizaDetalle);")
|
||||
StrSQL.AppendLine(" ")
|
||||
|
||||
''DESCOMENTAR PARA CIERRE PERIODO
|
||||
'StrSQL.AppendLine(" IF @NumMovtoCierre > 0 ")
|
||||
'StrSQL.AppendLine(" BEGIN ")
|
||||
'StrSQL.AppendLine(" IF @TipoMovto = 0 BEGIN ")
|
||||
'StrSQL.AppendLine(" SET @TipoMovto = 1 ")
|
||||
'StrSQL.AppendLine(" END ")
|
||||
'StrSQL.AppendLine(" ELSE BEGIN ")
|
||||
'StrSQL.AppendLine(" SET @TipoMovto = 0 ")
|
||||
'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 + 1, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovtoCierre, @IdCtaCierre, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp,''); ")
|
||||
'StrSQL.AppendLine(" EXEC PA_UpdateId 'Id_MovimientoPoliza';")
|
||||
'StrSQL.AppendLine(" END ")
|
||||
|
||||
StrSQL.AppendLine(" EXEC PA_UpdateId 'Id_MovimientoPoliza';")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" SELECT @IDEjercicio = ID FROM Ejercicios WHERE Ejercicio = @Ejercicio;")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" EXEC PA_UpdateSaldos @IdCuenta, @TipoMovto, @Importe, @IDEjercicio, @Periodo, @Id, @IdPoliza;")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" SELECT @Id AS IdMovto, @NumMovto AS NumMovto, @GUID AS GUID ;")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" END TRY")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" BEGIN CATCH")
|
||||
StrSQL.AppendLine(" SET @Error = CONCAT('Número: ' , ERROR_NUMBER(), '; Procedimiento: ' , ERROR_PROCEDURE(), '; Linea: ' ,ERROR_LINE(), '; Detalle: ' , ERROR_MESSAGE());")
|
||||
StrSQL.AppendLine(" RAISERROR(@Error, 16, 1);")
|
||||
StrSQL.AppendLine(" END CATCH")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine("END;")
|
||||
|
||||
|
||||
|
||||
SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2523,6 +2374,159 @@ Public Class ClsContPAQi
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'''' <summary>
|
||||
'''' Agrega un movimiento a una póliza
|
||||
'''' </summary>
|
||||
'''' <param name="IdPoliza">Es el ID que generó la póliza</param>
|
||||
'''' <param name="IdCuenta">Es el ID de la cuenta del movimiento a agregar</param>
|
||||
'''' <param name="TipoMovto">Cargo = False; Abono = True</param>
|
||||
'''' <param name="Importe">Es el Importe del movimiento a agregar</param>
|
||||
'''' <param name="Referencia">Es la referencia del movimiento, hasta 30 dígitos</param>
|
||||
'''' <param name="Concepto">Es el concepto del movimiento, hasta 100 dígitos</param>
|
||||
'''' <param name="IdSegNeg">Es el ID del Segmento de Negocio</param>
|
||||
'''' <param name="FechaMovto">Es la fecha del movimiento</param>
|
||||
'''' <returns></returns>
|
||||
'''' <remarks></remarks>
|
||||
'Public Function AddMovimiento(IdPoliza As Integer, IdCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
|
||||
' Concepto As String, IdSegNeg As Integer, FechaMovto As Date, SIGReferencia As String, CvePrePolizaDetalle As Integer, Optional ImporteMonedaExtranjera As Double = 0, Optional GUID As String = "-1") As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' If IdPoliza <= 0 Or IdCuenta <= 0 Then
|
||||
' Return False
|
||||
' End If
|
||||
|
||||
' If Not FNC_GetCounter() Then
|
||||
' Return Retorno
|
||||
' End If
|
||||
|
||||
' If Not FNC_GetNumMovto() Then
|
||||
' Return Retorno
|
||||
' End If
|
||||
|
||||
' 'SqlDataAdapter("PA_AddMovimiento
|
||||
' If GUID = "-1" Then GUID = System.Guid.NewGuid().ToString()
|
||||
|
||||
' StrSQL.Clear()
|
||||
' StrSQL.AppendLine("BEGIN")
|
||||
' StrSQL.AppendLine("")
|
||||
' StrSQL.AppendLine(" DECLARE ")
|
||||
' StrSQL.AppendLine(" @Error NVARCHAR(300),")
|
||||
' StrSQL.AppendLine(" @Id INT,")
|
||||
' StrSQL.AppendLine(" @Ejercicio INT,")
|
||||
' StrSQL.AppendLine(" @Periodo INT,")
|
||||
' StrSQL.AppendLine(" @TipoPol INT,")
|
||||
' 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 @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);")
|
||||
' 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 @SegNegMovtos = SegNegMovtos FROM Cuentas C WHERE Id = @IdCuenta;")
|
||||
' StrSQL.AppendLine("")
|
||||
' StrSQL.AppendLine(" BEGIN TRY")
|
||||
' StrSQL.AppendLine(" ")
|
||||
|
||||
' ''DESCOMENTAR PARA CIERRE PERIODO
|
||||
' 'StrSQL.AppendLine("DECLARE")
|
||||
' 'StrSQL.AppendLine(" @IdCtaCierre INT,")
|
||||
' 'StrSQL.AppendLine(" @IdPolCierre INT,")
|
||||
' 'StrSQL.AppendLine(" @NumMovtoCierre INT;")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine("SET @NumMovtoCierre = 0;")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine("-- SI ES CUENTA DE RESULTADOS")
|
||||
' 'StrSQL.AppendLine("IF (SELECT Tipo FROM Cuentas WHERE Id = @IdCuenta) IN ('G','H')")
|
||||
' 'StrSQL.AppendLine("BEGIN ")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine(" SELECT @IdCtaCierre = IdCtaCierre, @IdPolCierre = IdPolCierre FROM Ejercicios WHERE Ejercicio = @Ejercicio")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine(" -- SI ESTA CERRADO EL EJERCICIO")
|
||||
' 'StrSQL.AppendLine(" IF (@IdCtaCierre > 0 AND @IdPolCierre > 0)")
|
||||
' 'StrSQL.AppendLine(" BEGIN")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine(" -- PARA QUE EL MOVIMIENTO SE AGREGUE DIRECTO EN LA POLIZA DE CIERRE")
|
||||
' 'StrSQL.AppendLine(" SET @IdPoliza = @IdPolCierre;")
|
||||
' 'StrSQL.AppendLine(" SET @NumMovto = dbo.FNC_GetNumMovto (@IdPolCierre);")
|
||||
' 'StrSQL.AppendLine(" SET @NumMovtoCierre = @NumMovto + 1")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' 'StrSQL.AppendLine(" END")
|
||||
' 'StrSQL.AppendLine("")
|
||||
' '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, CvePrePolizaDetalle)")
|
||||
' 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, @CvePrePolizaDetalle);")
|
||||
' StrSQL.AppendLine(" ")
|
||||
|
||||
' ''DESCOMENTAR PARA CIERRE PERIODO
|
||||
' 'StrSQL.AppendLine(" IF @NumMovtoCierre > 0 ")
|
||||
' 'StrSQL.AppendLine(" BEGIN ")
|
||||
' 'StrSQL.AppendLine(" IF @TipoMovto = 0 BEGIN ")
|
||||
' 'StrSQL.AppendLine(" SET @TipoMovto = 1 ")
|
||||
' 'StrSQL.AppendLine(" END ")
|
||||
' 'StrSQL.AppendLine(" ELSE BEGIN ")
|
||||
' 'StrSQL.AppendLine(" SET @TipoMovto = 0 ")
|
||||
' '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 + 1, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovtoCierre, @IdCtaCierre, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp,''); ")
|
||||
' 'StrSQL.AppendLine(" EXEC PA_UpdateId 'Id_MovimientoPoliza';")
|
||||
' 'StrSQL.AppendLine(" END ")
|
||||
|
||||
' StrSQL.AppendLine(" EXEC PA_UpdateId 'Id_MovimientoPoliza';")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine(" SELECT @IDEjercicio = ID FROM Ejercicios WHERE Ejercicio = @Ejercicio;")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine(" EXEC PA_UpdateSaldos @IdCuenta, @TipoMovto, @Importe, @IDEjercicio, @Periodo, @Id, @IdPoliza;")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine(" SELECT @Id AS IdMovto, @NumMovto AS NumMovto, @GUID AS GUID ;")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine(" END TRY")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine(" BEGIN CATCH")
|
||||
' StrSQL.AppendLine(" SET @Error = CONCAT('Número: ' , ERROR_NUMBER(), '; Procedimiento: ' , ERROR_PROCEDURE(), '; Linea: ' ,ERROR_LINE(), '; Detalle: ' , ERROR_MESSAGE());")
|
||||
' StrSQL.AppendLine(" RAISERROR(@Error, 16, 1);")
|
||||
' StrSQL.AppendLine(" END CATCH")
|
||||
' StrSQL.AppendLine(" ")
|
||||
' StrSQL.AppendLine("END;")
|
||||
|
||||
|
||||
|
||||
' SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@RowVersion", SqlDbType.Int).Value = GlobalRowVersion
|
||||
' .Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
||||
' .Add("@IdCuenta", SqlDbType.Int).Value = IdCuenta
|
||||
' .Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
|
||||
' .Add("@Importe", SqlDbType.Money).Value = Math.Round(Importe, 2)
|
||||
' .Add("@Referencia", SqlDbType.VarChar, 30).Value = If(Referencia.Length > 30, Referencia.Substring(1, 30), Referencia)
|
||||
' .Add("@Concepto", SqlDbType.VarChar, 100).Value = If(Concepto.Length > 100, Concepto.Substring(1, 100), Concepto)
|
||||
' .Add("@IdSegNeg", SqlDbType.Int).Value = IdSegNeg
|
||||
' .Add("@FechaMov", SqlDbType.DateTime).Value = FechaMovto
|
||||
' .Add("@SIGReferencia", SqlDbType.VarChar).Value = SIGReferencia
|
||||
' .Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
|
||||
' .Add("@GUID", SqlDbType.VarChar).Value = GUID
|
||||
' .Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' GUIDMovimiento = GUID
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function UpdatePoliza(Concepto As String, Cargos As Double, Abonos As Double, IdUsuario As Integer, FechaPoliza As Date, Folio As String, TipoPoliza As Integer, IdPoliza As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -1406,7 +1406,7 @@ Public Class ClsContabilidad
|
||||
If dr("ImporteMN").ToString.ToDecimal <> 0 Then
|
||||
|
||||
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
|
||||
dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, CvePrePolizaDetalle:=dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.1 - ")
|
||||
Exit For
|
||||
@@ -1415,7 +1415,7 @@ Public Class ClsContabilidad
|
||||
Else
|
||||
|
||||
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
|
||||
dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, CvePrePolizaDetalle:=dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
StrLog.AppendFormat(" Error 1.2 - ")
|
||||
Exit For
|
||||
@@ -1456,7 +1456,7 @@ Public Class ClsContabilidad
|
||||
Dim RFC As String = ""
|
||||
Dim RazonSocial As String = ""
|
||||
If Not OcurrioError AndAlso ContabilizarDIOT Then
|
||||
If GetDIOTValores(CvePrePoliza) AndAlso Data.Rows.Count > 0 Then
|
||||
If GetDIOTValores(CvePrePoliza, Empresa.CveEmpresa) AndAlso Data.Rows.Count > 0 Then
|
||||
Dim IdProveedor As Integer
|
||||
|
||||
For Each dr As DataRow In Data.Rows
|
||||
@@ -1685,7 +1685,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetDIOTValores(CvePrePoliza As Integer) As Boolean 'Editado por charlie
|
||||
Public Function GetDIOTValores(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1693,6 +1693,7 @@ Public Class ClsContabilidad
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1153,7 +1153,7 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function MovimientoRemove(CveMovimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function MovimientoRemove(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1162,6 +1162,7 @@ Public Class ClsInventarios
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -5599,7 +5599,7 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetLineasAdicionalesSaldo(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Optional ConSaldo As Integer = -1, Optional FechaVencimientoConsulta As DateTime = MaxFecha) As Boolean
|
||||
Public Function GetLineasAdicionalesSaldo(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, TipoCambioConsulta As Decimal, Optional ConSaldo As Integer = -1, Optional FechaVencimientoConsulta As DateTime = MaxFecha) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesSaldoGet")
|
||||
@@ -5611,6 +5611,7 @@ Public Class ClsVentas
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@ConSaldo", SqlDbType.Int).Value = ConSaldo
|
||||
.Add("@TipoCambioConsulta", SqlDbType.Decimal).Value = TipoCambioConsulta
|
||||
.Add("@FechaVencimientoConsulta", SqlDbType.Date).Value = FechaVencimientoConsulta
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SqlServerTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility methods related to CLR Types for SQL Server
|
||||
/// </summary>
|
||||
public class Utilities
|
||||
{
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr LoadLibrary(string libname);
|
||||
|
||||
/// <summary>
|
||||
/// Loads the required native assemblies for the current architecture (x86 or x64)
|
||||
/// </summary>
|
||||
/// <param name="rootApplicationPath">
|
||||
/// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
|
||||
/// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
|
||||
/// </param>
|
||||
public static void LoadNativeAssemblies(string rootApplicationPath)
|
||||
{
|
||||
var nativeBinaryPath = IntPtr.Size > 4
|
||||
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
|
||||
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
|
||||
|
||||
LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
|
||||
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
|
||||
}
|
||||
|
||||
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
|
||||
{
|
||||
var path = Path.Combine(nativeBinaryPath, assemblyName);
|
||||
var ptr = LoadLibrary(path);
|
||||
if (ptr == IntPtr.Zero)
|
||||
{
|
||||
throw new Exception(string.Format(
|
||||
"Error loading {0} (ErrorCode: {1})",
|
||||
assemblyName,
|
||||
Marshal.GetLastWin32Error()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,12 +102,17 @@ Public Class E141 : Implements IHttpHandler
|
||||
|
||||
'DESCARGA DEL PDF
|
||||
If Not String.IsNullOrEmpty(Params) Then
|
||||
Try
|
||||
Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
|
||||
|
||||
Dim File As String = UrlParametros("FILE").ToString()
|
||||
If Not String.IsNullOrEmpty(File) Then
|
||||
ImprimirbytesPDF(context, DescargarFactura(File), File)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141")
|
||||
End Try
|
||||
|
||||
Else
|
||||
|
||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
|
||||
@@ -396,10 +396,10 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="text-align: left">Fecha Desconciliado:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<div class="col-md-3" style="text-align: left">Fecha Desconciliado:</div>
|
||||
<div class="col-md-3" style="text-align:left">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaDesconciliado" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
@@ -409,6 +409,8 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VceFechaDesconciliado" runat="server" HighlightCssClass="vco" TargetControlID="RfvFechaDesconciliado"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkDejarConciliado" runat="server" Text="Dejar Conciliado" TextAlign="Right" /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -402,7 +402,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
If ModalidadDesconciliar = "D" Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario, ChkDejarConciliado.Checked) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIEDesconciliar) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
@@ -412,7 +412,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
ElseIf ModalidadDesconciliar = "DT" Then
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Not Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario, ChkDejarConciliado.Checked) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
|
||||
@@ -719,7 +719,10 @@ Partial Class Bancos_Creditos
|
||||
ErrorCredito = True
|
||||
End If
|
||||
|
||||
If ObjCredito.AddCreditos(TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate, TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra), -1, -1, -1, CveProveedor, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjetaCredito.SelectedValue.ToEntero, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False)) > 0 Then
|
||||
If ObjCredito.AddCreditos(TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate,
|
||||
TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra),
|
||||
-1, -1, -1, CveProveedor, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjetaCredito.SelectedValue.ToEntero,
|
||||
AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False)) > 0 Then
|
||||
'Dim Fecha = If(TipoCreditoTemp = 2, TxtCSFechaDeposito.Text.ToDate, TxtCSFechaVencimiento.Text.ToDate)
|
||||
'For i = 1 To If(TipoCreditoTemp = 2, TxtCSPeriodos.Text.Trim.ToEntero, 1)
|
||||
'DateAdd("d", TxtPlazo.Text.ToEntero, Fecha)
|
||||
@@ -761,7 +764,10 @@ Partial Class Bancos_Creditos
|
||||
If CveCredito > 0 Then
|
||||
Dim TipoCreditoTemp = DdlTipoCredito.SelectedValue.ToEntero
|
||||
|
||||
If ObjCredito.UpdateCreditos(CveCredito, TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate, TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra), -1, -1, -1, -1, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjetaCredito.SelectedValue.ToEntero, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False)) Then
|
||||
If ObjCredito.UpdateCreditos(CveCredito, TipoCreditoTemp, TxtCSReferencia.Text, TxtCSObservaciones.Text, DdlCuentaCredito.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero, -1, DdlCSTipoMoneda.SelectedValue.ToEntero, TxtCSFechaInicio.Text.Trim.ToDate,
|
||||
TxtCSFechaVencimiento.Text.Trim.ToDate, TxtCSTasa.Text.Trim.ToDouble, TxtCSSobreTasa.Text.Trim.ToDouble, -1, TxtCSPlazo.Text.ToEntero, CveIE, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToEntero, TotalCompra),
|
||||
-1, -1, -1, -1, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjetaCredito.SelectedValue.ToEntero,
|
||||
AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False)) Then
|
||||
If Not ObjCredito.UpdateCreditosDetalle(ObjCredito.CveCredito, TxtCSFechaVencimiento.Text.ToDate, If(TipoCreditoTemp = 2, TxtCSTotalCredito.Text.ToString.ToEntero, TotalCompra), 0.0, 0.0, 0.0, 0.0, 0.0, If(TipoCreditoTemp = 1, 101, 1)) Then
|
||||
ErrorCredito = True
|
||||
End If
|
||||
|
||||
@@ -827,14 +827,6 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="TRComplementoSustitucion" visible="false">
|
||||
<td>Complemento de pago Sustituto de: </td>
|
||||
<td>
|
||||
<a id="ARefIESustitucion" runat="server" href="" target='_blank' class='Texto'></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -1034,9 +1026,6 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
@@ -1054,8 +1043,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 ">
|
||||
@@ -1422,15 +1409,7 @@
|
||||
|
||||
<asp:BoundField HeaderText="Fecha C" DataField="FechaCancelacion" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Regenerar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgRegenerar" OnClick="imgRegenerar_Click" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Regenerar"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea regenerar?" data-btn-ok-label="si"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-reply-all'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||
<asp:TemplateField HeaderText="Motivo" Visible="false" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible="false">
|
||||
</asp:DropDownList>
|
||||
@@ -1439,7 +1418,7 @@
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarComplemetno" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el complemento?" data-btn-ok-label="si"
|
||||
|
||||
@@ -1218,16 +1218,16 @@ Partial Class Bancos_IE
|
||||
UpCancelacion.Update()
|
||||
|
||||
'OTROS DATOS - DATOS COMPLEMENTO SUSTITUCION
|
||||
Dim CveIESustitucion As Integer = ObjIE.DtResultados(0)("CveIESustitucion").ToString.ToEntero
|
||||
If CveIESustitucion > 0 Then
|
||||
TRComplementoSustitucion.Visible = True
|
||||
'Dim CveIESustitucion As Integer = ObjIE.DtResultados(0)("CveIESustitucion").ToString.ToEntero
|
||||
'If CveIESustitucion > 0 Then
|
||||
' TRComplementoSustitucion.Visible = True
|
||||
|
||||
If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) And ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
ARefIESustitucion.HRef = String.Format("/Bancos/IE.aspx?CveIE={0}", CveIESustitucion)
|
||||
ARefIESustitucion.InnerText = ObjIE.Folio
|
||||
End If
|
||||
' If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) And ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
' ARefIESustitucion.HRef = String.Format("/Bancos/IE.aspx?CveIE={0}", CveIESustitucion)
|
||||
' ARefIESustitucion.InnerText = ObjIE.Folio
|
||||
' End If
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
|
||||
'DETALLES - MOVIMIENTOS
|
||||
@@ -5691,44 +5691,32 @@ Partial Class Bancos_IE
|
||||
If Tipo = "Abono" Then
|
||||
|
||||
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
|
||||
|
||||
Else
|
||||
GvComplementoPagos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvComplementoPagos.Columns(7).Visible = False
|
||||
Else
|
||||
If CveIE > 0 Then
|
||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||
DivCancelarComplemento.Visible = True
|
||||
GvComplementoPagos.Columns(7).Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(85) Then GvComplementoPagos.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "Folio", "SerieFolio", "FechaComplemento", "Importe", "RFCReceptor", "StrEstatus", "FechaCancelacion", "Tipo", "Estatus", "CveIE", "CvePAC", "MotivoCancelacion"})
|
||||
|
||||
'"CveComplementoPago","FolioFiscal","Folio","SerieFolio","FechaComplemento","Importe","RFCReceptor","StrEstatus","FechaCancelacion","Tipo,Estatus","CveIE","CvePAC"
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
GvComplementoPagos.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
ObjBancos.Dispose()
|
||||
GvComplementoPagos.DataBind()
|
||||
UpComplementoPagos.Update()
|
||||
|
||||
|
||||
UpEliminarCotizacion.Update() 'Esto se ocupa para mostrar DVmotivoCancelacion
|
||||
|
||||
'ObjBancos.Dispose()
|
||||
@@ -5930,7 +5918,7 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
|
||||
If ChkConciliado.Checked Then
|
||||
If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
'TxtFechaDesconciliado.Text = Now.ToShortDateString
|
||||
'UpDesconciliar.Update()
|
||||
'RegistraScript("$('#DModalDesconciliar').modal()")
|
||||
|
||||
@@ -295,7 +295,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If UsuarioActual.TienePermisoProceso(98) Then
|
||||
PermiteModificarImporte = False
|
||||
End If
|
||||
Calendario.StartDate = Now.AddMonths(-8)
|
||||
Calendario.StartDate = Now.AddMonths(-18)
|
||||
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
|
||||
If UsuarioActual.TienePermisoProceso(105) Then
|
||||
Calendario.StartDate = Now
|
||||
@@ -898,12 +898,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Else
|
||||
Dim ImporteME As Decimal = 0
|
||||
If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago
|
||||
If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then
|
||||
ImporteME = tImporteMN
|
||||
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=tImporteMN) Then
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
@@ -2032,7 +2033,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-12).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-18).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString
|
||||
Calendario.EndDate = DateTime.Now
|
||||
|
||||
|
||||
@@ -6331,7 +6331,7 @@ Partial Class Compras_Compras
|
||||
funcionalidad = 317
|
||||
ConceptoContable = 243
|
||||
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
||||
funcionalidad = 349
|
||||
funcionalidad = 348
|
||||
ConceptoContable = 327
|
||||
End If
|
||||
importeMovimiento = CompraActual.RetISR
|
||||
@@ -8557,40 +8557,45 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim CveMovimientoActual As Integer = diRow("CveMovimiento").ToString.ToEntero
|
||||
|
||||
Dim DTMovimientoActual As DataTable = DTInventarios.FiltraParametros($"CveMovimiento = {CveMovimientoActual} ")
|
||||
|
||||
Dim detalleDescripcion As String = ""
|
||||
Dim Description As String = ""
|
||||
|
||||
Dim FolioMovimiento As String = ""
|
||||
Dim ConceptoMovimiento As String = ""
|
||||
|
||||
For Each dRowMovActual As DataRow In DTMovimientoActual.Rows
|
||||
|
||||
If dRowMovActual("UM").ToString = "" Then
|
||||
FolioMovimiento = dRowMovActual("Folio").ToString
|
||||
ConceptoMovimiento = dRowMovActual("Concepto").ToString
|
||||
|
||||
Description = String.Format("Eliminación Compra {6},Movimiento con Concepto: {0}, Almacen: {1}, Fecha: {2}, Folio: {3}, Usuario: {4}, Observaciones adicionales: {5}, Productos Información:<br/>",
|
||||
ConceptoMovimiento,
|
||||
dRowMovActual("Almacen").ToString,
|
||||
dRowMovActual("FechaMovto").ToString.ToDate.ToString("dd/MM/yyyy"),
|
||||
FolioMovimiento,
|
||||
dRowMovActual("Usuario").ToString,
|
||||
dRowMovActual("Observaciones").ToString,
|
||||
$"{TxtSerie.Text}-{TxtFolio.Text}")
|
||||
Else
|
||||
detalleDescripcion = String.Format("- Cant: {0}, PS: {1}, PU: {2}, UM: {3}<br/>", dRowMovActual("Cantidad").ToString.ToEntero, dRowMovActual("CodigoPS"), dRowMovActual("PU"), dRowMovActual("UM"))
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
|
||||
String.Format("{0}, Informacion = {1}", Description, detalleDescripcion),
|
||||
"Inventarios", FolioMovimiento + " / " + ConceptoMovimiento) Then
|
||||
If Not ObjInventarios.MovimientoRemove(CveMovimientoActual, UsuarioActual.CveEmpresa, CveUsuario:=UsuarioActual.CveUsuario) Then
|
||||
ErrorCompra = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Dim DTMovimientoActual As DataTable = DTInventarios.FiltraParametros($"CveMovimiento = {CveMovimientoActual} ")
|
||||
|
||||
'Dim detalleDescripcion As String = ""
|
||||
'Dim Description As String = ""
|
||||
|
||||
'Dim FolioMovimiento As String = ""
|
||||
'Dim ConceptoMovimiento As String = ""
|
||||
|
||||
'For Each dRowMovActual As DataRow In DTMovimientoActual.Rows
|
||||
|
||||
' If dRowMovActual("UM").ToString = "" Then
|
||||
' FolioMovimiento = dRowMovActual("Folio").ToString
|
||||
' ConceptoMovimiento = dRowMovActual("Concepto").ToString
|
||||
|
||||
' Description = String.Format("Eliminación Compra {6},Movimiento con Concepto: {0}, Almacen: {1}, Fecha: {2}, Folio: {3}, Usuario: {4}, Observaciones adicionales: {5}, Productos Información:<br/>",
|
||||
' ConceptoMovimiento,
|
||||
' dRowMovActual("Almacen").ToString,
|
||||
' dRowMovActual("FechaMovto").ToString.ToDate.ToString("dd/MM/yyyy"),
|
||||
' FolioMovimiento,
|
||||
' dRowMovActual("Usuario").ToString,
|
||||
' dRowMovActual("Observaciones").ToString,
|
||||
' $"{TxtSerie.Text}-{TxtFolio.Text}")
|
||||
' Else
|
||||
' detalleDescripcion = String.Format("- Cant: {0}, PS: {1}, PU: {2}, UM: {3}<br/>", dRowMovActual("Cantidad").ToString.ToEntero, dRowMovActual("CodigoPS"), dRowMovActual("PU"), dRowMovActual("UM"))
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
'If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
|
||||
' String.Format("{0}, Informacion = {1}", Description, detalleDescripcion),
|
||||
' "Inventarios", FolioMovimiento + " / " + ConceptoMovimiento) Then
|
||||
' ErrorCompra = True
|
||||
' Exit For
|
||||
'End If
|
||||
Next
|
||||
|
||||
End If
|
||||
@@ -8655,6 +8660,7 @@ Partial Class Compras_Compras
|
||||
ObjConta = New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
||||
End If
|
||||
|
||||
Try
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
Dim Importe As Double = 0
|
||||
@@ -8783,7 +8789,10 @@ Partial Class Compras_Compras
|
||||
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta)
|
||||
|
||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -8895,6 +8904,11 @@ Partial Class Compras_Compras
|
||||
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
UPPAnticiposSel.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
ObjCompra.RollBack()
|
||||
ObjCompra.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -9350,7 +9364,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim CvePersonal As Integer = 0
|
||||
If Cont < GvPersonal.Rows.Count Then CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
|
||||
Dim Referencia As String
|
||||
Dim Referencia As String = ""
|
||||
If Cont < GvPersonal.Rows.Count Then Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text
|
||||
|
||||
Cont = Cont + 1
|
||||
|
||||
@@ -162,7 +162,12 @@
|
||||
</asp:Panel>
|
||||
|
||||
<br />
|
||||
<div class="chequesie" style="width: 700px;" runat="server" id="TableExpedirCheque" visible="false">
|
||||
|
||||
<div class="row" runat="server" id="TableExpedirCheque" visible="false" >
|
||||
|
||||
<div class="col-lg-8">
|
||||
|
||||
<div class="chequesie" style="width: 700px;" >
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 130px;">Tipo Movimiento:</label>
|
||||
@@ -255,6 +260,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
|
||||
@@ -521,6 +521,17 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
|
||||
Next
|
||||
|
||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
|
||||
Dim filemove As String = ""
|
||||
Dim Comprobante As String = ""
|
||||
Dim ComprobanteIE = ""
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
Next
|
||||
|
||||
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
|
||||
CveIERegistrado = DDlCheques.SelectedValue.ToEntero
|
||||
|
||||
@@ -569,14 +580,31 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
|
||||
If ChkChequeExcedente.Checked Then
|
||||
CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones3", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
|
||||
CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, If(CveCajaChica > 0, 30, 29), TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEExcedente, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||
MsgError = "Error al registrar detalle de concepto bancario"
|
||||
End If
|
||||
|
||||
If CveIEExcedente > 0 Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIEExcedente.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
Anexo.Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
ElseIf Not ChkReembolsarSinBancos.Checked Then
|
||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones4", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
|
||||
CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
|
||||
|
||||
If CveIERegistrado > 0 Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIERegistrado.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
Anexo.Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGO PREPOLIZA IE BANCOS
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||
|
||||
@@ -1,5 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DataSet">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>c1c71852-6fe8-4864-a742-cae14c1bf38d</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DataSet1">
|
||||
<Query>
|
||||
<DataSourceName>DataSet</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Id">
|
||||
<DataField>Id</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nombre">
|
||||
<DataField>Nombre</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Tipo">
|
||||
<DataField>Tipo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CveTipo">
|
||||
<DataField>CveTipo</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CtaMayor">
|
||||
<DataField>CtaMayor</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nivel">
|
||||
<DataField>Nivel</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Clasificacion">
|
||||
<DataField>Clasificacion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Sup">
|
||||
<DataField>Sup</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Orden">
|
||||
<DataField>Orden</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoInicial">
|
||||
<DataField>SaldoInicial</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoActual">
|
||||
<DataField>SaldoActual</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Cargos">
|
||||
<DataField>Cargos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Abonos">
|
||||
<DataField>Abonos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Codigo">
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoID">
|
||||
<DataField>SaldoID</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoIA">
|
||||
<DataField>SaldoIA</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="TotalCargos">
|
||||
<DataField>TotalCargos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="TotalAbonos">
|
||||
<DataField>TotalAbonos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoAD">
|
||||
<DataField>SaldoAD</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoAA">
|
||||
<DataField>SaldoAA</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DataTable1</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Rectangle Name="Rectangle1">
|
||||
@@ -1432,7 +1542,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>14.86367cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.37513cm</Width>
|
||||
@@ -1466,7 +1575,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>3.43894cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
@@ -1497,7 +1605,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>9.48438cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.37929cm</Width>
|
||||
@@ -1528,114 +1635,8 @@
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DataSet">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>c1c71852-6fe8-4864-a742-cae14c1bf38d</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DataSet1">
|
||||
<Query>
|
||||
<DataSourceName>DataSet</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Id">
|
||||
<DataField>Id</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nombre">
|
||||
<DataField>Nombre</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Tipo">
|
||||
<DataField>Tipo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CveTipo">
|
||||
<DataField>CveTipo</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CtaMayor">
|
||||
<DataField>CtaMayor</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nivel">
|
||||
<DataField>Nivel</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Clasificacion">
|
||||
<DataField>Clasificacion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Sup">
|
||||
<DataField>Sup</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Orden">
|
||||
<DataField>Orden</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoInicial">
|
||||
<DataField>SaldoInicial</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoActual">
|
||||
<DataField>SaldoActual</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Cargos">
|
||||
<DataField>Cargos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Abonos">
|
||||
<DataField>Abonos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Codigo">
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoID">
|
||||
<DataField>SaldoID</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoIA">
|
||||
<DataField>SaldoIA</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="TotalCargos">
|
||||
<DataField>TotalCargos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="TotalAbonos">
|
||||
<DataField>TotalAbonos</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoAD">
|
||||
<DataField>SaldoAD</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SaldoAA">
|
||||
<DataField>SaldoAA</DataField>
|
||||
<rd:TypeName>System.Int16</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DataTable1</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="pEmp">
|
||||
<DataType>String</DataType>
|
||||
@@ -1643,6 +1644,8 @@
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="pImg">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="pFechaIni">
|
||||
|
||||
@@ -2406,7 +2406,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
|
||||
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
|
||||
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
|
||||
FolioGarantia = ObjInventario.Folio
|
||||
|
||||
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||
|
||||
@@ -769,7 +769,7 @@
|
||||
|
||||
<div>
|
||||
<asp:GridView ID="GvPersonalAltas" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvPersonalAltas_RowDataBound"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None"
|
||||
DataKeyNames="CvePersonalAltas,FechaInicio,FechaFin">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha Inicio" DataField="FechaInicio" DataFormatString="{0:d}">
|
||||
@@ -778,12 +778,12 @@
|
||||
<asp:BoundField HeaderText="Fecha Fin" DataField="FechaFin" DataFormatString="{0:d}">
|
||||
<ItemStyle Width="150px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkUpAltass" OnClick="LnkUpAltass_Click" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkDAltas" OnClick="LnkDAltas_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -148,6 +148,8 @@ Partial Class CatRoles
|
||||
Next
|
||||
Roles.Dispose()
|
||||
RegistraScript("$('#DivPermisos').modal('hide');")
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardaProcesos_Click(sender As Object, e As EventArgs) Handles BtnGuardaProcesos.Click
|
||||
@@ -157,6 +159,8 @@ Partial Class CatRoles
|
||||
Next
|
||||
Roles.Dispose()
|
||||
RegistraScript("$('#DivProcesos').modal('hide');")
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
@@ -176,6 +180,12 @@ Partial Class CatRoles
|
||||
End If
|
||||
Rol.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaGlobal()
|
||||
GlobalDTRoles(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -229,10 +229,14 @@ Partial Class Sistemas_RolesDetalle
|
||||
End If
|
||||
|
||||
ObjEmpresa.Dispose()
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub RecargaGlobal()
|
||||
GlobalDTRoles(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -3141,9 +3141,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div id="DivCodEnsamble" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:CustomValidator ID="CVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" ValidateEmptyText="true" Display="None" ClientValidationFunction="ValidarCodigoEnsamble" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<asp:CustomValidator ID="CVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" ClientValidationFunction="ValidarCodigoEnsamble" ValidateEmptyText="true" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3162,7 +3162,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:CustomValidator ID="CVCodLinea" runat="server" ControlToValidate="TxtCodLinea" ClientValidationFunction="ValidarCodigoLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<asp:CustomValidator ID="CVCodLinea" runat="server" ControlToValidate="TxtCodLinea" ClientValidationFunction="ValidarCodigoLinea" ValidateEmptyText="true" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3185,7 +3185,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:CustomValidator ID="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<asp:CustomValidator ID="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" ValidateEmptyText="true" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||
<%-- <asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>--%>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
|
||||
|
||||
@@ -297,7 +297,7 @@ Partial Class RepVentaDetalle
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Sin Vendedor", "-2"))
|
||||
|
||||
|
||||
@@ -592,6 +592,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpParametros" runat="server" UpdateMode="Conditional" class="portlet light xspadding .nolineheight bordered whitoutcol" style="width: 310px;">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="HdnCargarInventario" runat="server" ClientIDMode="Static" Value="True" />
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -698,7 +699,7 @@
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UPPVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="200px">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
@@ -728,7 +729,7 @@
|
||||
<tr id="TrLineaAdicional" runat="server" visible="false">
|
||||
<td align="left"><b>Linea Adicional:</b></td>
|
||||
<td align="left">
|
||||
<asp:DropDownList ID="DdlLineaAdicional" DataTextField="InfoGeneral" DataValueField="CveLineaAdicional" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" Width="80%" OnSelectedIndexChanged="DdlLineaAdicional_SelectedIndexChanged">
|
||||
<asp:DropDownList ID="DdlLineaAdicional" DataTextField="InfoGeneral" DataValueField="CveLineaAdicional" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" Width="100%" OnSelectedIndexChanged="DdlLineaAdicional_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateLineaAdicional" OnClick="LnkUpdateLineaAdicional_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la linea adicional de crédito de la factura?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Linea adicional" />
|
||||
@@ -1719,7 +1720,6 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpINV" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="HdnCargarInventario" runat="server" ClientIDMode="Static" Value="True"/>
|
||||
<asp:Button ID="BtnCargarInventario" runat="server" ClientIDMode="Static" Text="" Style="display: none;" OnClick="BtnCargarInventario_Click" />
|
||||
<div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server">
|
||||
<div class="portlet-title">
|
||||
@@ -9501,6 +9501,8 @@
|
||||
$("#TabAlmacen_tab .ajax__tab_inner").click(function () {
|
||||
CargaMovimientosInventario();
|
||||
});
|
||||
}else {
|
||||
$("#TabAlmacen_tab .ajax__tab_inner").unbind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2401,6 +2401,7 @@ Partial Class Ventas
|
||||
ViewState("ClienteRetISR") = 0
|
||||
ViewState("CvePrecioLista") = 0
|
||||
ViewState("CvePrecioListaCliente") = 0
|
||||
HdnCargarInventario.Value = "True"
|
||||
Me.CveVendedorVenta = -1
|
||||
Me.CveVendedorCliente = -1
|
||||
Me.CveVendedorClienteSucursal = -1
|
||||
@@ -2851,8 +2852,7 @@ Partial Class Ventas
|
||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||
HdnCargarInventario.Value = "False"
|
||||
'spanAlmacen.Attributes.Remove("onclick")
|
||||
Tab.ActiveTabIndex = 1
|
||||
Updatetabs.Update()
|
||||
UpParametros.Update()
|
||||
End If
|
||||
|
||||
'Modalidad Devoluciones y Refacturacion
|
||||
@@ -9461,21 +9461,105 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
|
||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
||||
If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
|
||||
If ObjFactura.TipoDocto = "Ing" Then
|
||||
If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
||||
|
||||
'SI LA LINEA ESTA EN PESOS Y LA FACTURA ESTA EN DOLARES
|
||||
If Me.CveMonedaLineaAdicional = 1 AndAlso ObjFactura.CveMoneda = 2 Then
|
||||
Dim SaldoUSD As Decimal = SaldoIngresosLineaAdicional / TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoUSD < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI LA LINEA ESTA EN DOLARES Y LA FACTURA ESTA EN PESOS
|
||||
If Me.CveMonedaLineaAdicional = 2 AndAlso ObjFactura.CveMoneda = 1 Then
|
||||
Dim SaldoMXN As Decimal = SaldoIngresosLineaAdicional * TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoMXN < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'SI LA LINEA Y LA FACTURA TIENEN LA MISMA MONEDA
|
||||
If Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Rem" Then
|
||||
If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
||||
|
||||
'SI LA LINEA ESTA EN PESOS Y LA FACTURA ESTA EN DOLARES
|
||||
If Me.CveMonedaLineaAdicional = 1 AndAlso ObjFactura.CveMoneda = 2 Then
|
||||
Dim SaldoUSD As Decimal = SaldoLineaAdicional / TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoUSD < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI LA LINEA ESTA EN DOLARES Y LA FACTURA ESTA EN PESOS
|
||||
If Me.CveMonedaLineaAdicional = 2 AndAlso ObjFactura.CveMoneda = 1 Then
|
||||
Dim SaldoMXN As Decimal = SaldoLineaAdicional * TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoMXN < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'SI LA LINEA Y LA FACTURA TIENEN LA MISMA MONEDA
|
||||
If Me.SaldoLineaAdicional < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
||||
'If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
||||
' TmpDT = TmpDTError.Copy()
|
||||
' CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
' Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'Else
|
||||
' If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
|
||||
' TmpDT = TmpDTError.Copy()
|
||||
' CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
' Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
'If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
|
||||
' TmpDT = TmpDTError.Copy()
|
||||
' CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
' Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
@@ -9484,12 +9568,6 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'If Not CveEmpresaCRM > 0 Then
|
||||
@@ -14198,14 +14276,26 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
ElseIf AplicoNCFacturaActual AndAlso ChkAplicaNCAnticipo.Checked Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -14317,7 +14407,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -14526,7 +14621,12 @@ Partial Class Ventas
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
@@ -14647,7 +14747,13 @@ Partial Class Ventas
|
||||
|
||||
|
||||
If sumaAmorticaciones <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, 251, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
@@ -18806,10 +18912,12 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "PA") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
DdlLineaAdicional.DataSource = Nothing
|
||||
|
||||
Dim TCConsulta As Decimal = TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
'SI ES VENTA EXISTENTE , SI SE VA EDITAR SOLO MOSTRAR LAS CON SALDO, FECHA DE VENCIMIENTO VIGENTE O LA LINEA ACTUAL
|
||||
If CveVenta > 0 Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
|
||||
@@ -18818,14 +18926,14 @@ Partial Class Ventas
|
||||
Else
|
||||
'SI SE ESTA FACTURANDO UNA REMISION DEBE SELECCIONAR LA LINEA ADICIONAL DE ESTA
|
||||
If Me.CveLineaAdicionalVenta > 0 Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(Me.CveLineaAdicionalVenta, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(Me.CveLineaAdicionalVenta, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
@@ -24775,16 +24883,31 @@ Partial Class Ventas
|
||||
|
||||
If SaldoVenta <> 0 Then
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||
If UsuarioActual.TienePermisoProceso(269) Then
|
||||
DivDevAlm.Visible = True
|
||||
TieneAlmacen = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
DivDevAlm.Visible = True
|
||||
TieneAlmacen = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
ChkDevAlm.Checked = True
|
||||
ChkDevAlm.Enabled = False
|
||||
End If
|
||||
|
||||
If (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not AplicaDevolucion Then
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetInv_Mov(Me.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
Dim RowInv As DataRow = ObjInv.DtResultados.FiltroPrimero("CveConcepto IN (3,40)")
|
||||
If RowInv IsNot Nothing Then
|
||||
CveAlmacenDevolucion = RowInv("CveAlmacen").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -32910,9 +33033,9 @@ Partial Class Ventas
|
||||
|
||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||
'spanAlmacen.Attributes.Remove("onclick")
|
||||
Tab.ActiveTabIndex = 1
|
||||
|
||||
HdnCargarInventario.Value = "False"
|
||||
Updatetabs.Update()
|
||||
UpParametros.Update()
|
||||
|
||||
|
||||
UpnTools.Update()
|
||||
@@ -36441,8 +36564,10 @@ Partial Class Ventas
|
||||
RBLPago.SelectedValue = "1"
|
||||
RBLPago.Enabled = False
|
||||
|
||||
Dim TCConsulta As Decimal = TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
If RowLinea IsNot Nothing Then
|
||||
@@ -36552,18 +36677,38 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim TotalDocumento As Decimal = TxtTotal.Text.ToDecimal()
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If Me.SaldoLineaAdicional < TxtTotal.Text.ToDecimal() Then
|
||||
If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then
|
||||
|
||||
'SI LA LINEA ESTA EN PESOS Y LA FACTURA ESTA EN DOLARES
|
||||
If Me.CveMonedaLineaAdicional = 1 AndAlso DdlMoneda.SelectedValue.ToEntero() = 2 Then
|
||||
Dim SaldoUSD As Decimal = SaldoLineaAdicional / TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoUSD < TotalDocumento Then
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
||||
If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then
|
||||
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
||||
'SI LA LINEA ESTA EN DOLARES Y LA FACTURA ESTA EN PESOS
|
||||
If Me.CveMonedaLineaAdicional = 2 AndAlso DdlMoneda.SelectedValue.ToEntero() = 1 Then
|
||||
Dim SaldoMXN As Decimal = SaldoLineaAdicional * TxtTipoCambio.Text.ToDecimal()
|
||||
|
||||
If SaldoMXN < TotalDocumento Then
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'SI LA LINEA Y LA FACTURA TIENEN LA MISMA MONEDA
|
||||
If Me.SaldoLineaAdicional < TotalDocumento Then
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -36601,7 +36746,7 @@ Partial Class Ventas
|
||||
'Tab.ActiveTabIndex = 1
|
||||
HdnCargarInventario.Value = "False"
|
||||
'Updatetabs.Update()
|
||||
UpINV.Update()
|
||||
UpParametros.Update()
|
||||
End Sub
|
||||
Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user