Compras corrrecion, no igualar poliza si no se unifico
This commit is contained in:
@@ -68,6 +68,11 @@ Public Class ClsContabilidad
|
|||||||
Public Property ValorPolizaDescuadre As Integer
|
Public Property ValorPolizaDescuadre As Integer
|
||||||
Public Property MensajePolizaDescuadre As String
|
Public Property MensajePolizaDescuadre As String
|
||||||
Public Property ValorDiferencia As String
|
Public Property ValorDiferencia As String
|
||||||
|
|
||||||
|
Public Property SeUnifico As Boolean = False
|
||||||
|
Public Property YaEstabaUnifida As Boolean = False
|
||||||
|
Public Property EstaContabilizada As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Function IniciaTransacSQL() As SqlTransaction
|
Public Function IniciaTransacSQL() As SqlTransaction
|
||||||
@@ -756,16 +761,30 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
SeUnifico = False
|
||||||
|
YaEstabaUnifida = False
|
||||||
|
EstaContabilizada = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_PrePolizaUnificacion")
|
DataAdapter("PA_Conta_PrePolizaUnificacion")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
.Add("@CvePrePolizaVieja", SqlDbType.Int).Value = CvePrePolizaVieja
|
.Add("@CvePrePolizaVieja", SqlDbType.Int).Value = CvePrePolizaVieja
|
||||||
|
.Add("@SeUnifico", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||||
|
.Add("@YaEstabaUnifida", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||||
|
.Add("@EstaContabilizada", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
SeUnifico = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@SeUnifico").Value.ToString)
|
||||||
|
YaEstabaUnifida = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@YaEstabaUnifida").Value.ToString)
|
||||||
|
EstaContabilizada = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@EstaContabilizada").Value.ToString)
|
||||||
|
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
Catch ex1 As SqlException
|
Catch ex1 As SqlException
|
||||||
OnError("Ocurrió un error al actualizar la Poliza Original", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al actualizar la Poliza Original", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -773,6 +792,7 @@ Public Class ClsContabilidad
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|||||||
@@ -9340,7 +9340,11 @@ Partial Class Compras_Compras
|
|||||||
ErrorMovtosCxP = 1
|
ErrorMovtosCxP = 1
|
||||||
Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva
|
|
||||||
|
If ObjConta.SeUnifico Then
|
||||||
|
CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
'Simplificacion de PrePolizas
|
||||||
|
|||||||
Reference in New Issue
Block a user