Bloquear PrePolizasDetalle al contabilizar y desbloquearlos al descontabilizar.
This commit is contained in:
@@ -933,6 +933,22 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
|
.Add("@Bloquear", SqlDbType.Bit).Value = Bloquear
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al bloquear o desbloquear las prepolizas detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
|
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
|
||||||
@@ -981,6 +997,8 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim tIdPoliza As Integer
|
Dim tIdPoliza As Integer
|
||||||
Dim CveTipoPoliza, FolioFijo As Integer
|
Dim CveTipoPoliza, FolioFijo As Integer
|
||||||
Dim Cargos As Decimal
|
Dim Cargos As Decimal
|
||||||
@@ -1260,6 +1278,12 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not OcurrioError Then
|
||||||
|
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then
|
'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then
|
||||||
|
|
||||||
' Dim CodigoPersona As String = ""
|
' Dim CodigoPersona As String = ""
|
||||||
|
|||||||
@@ -1712,6 +1712,13 @@ Partial Class RegPoliza
|
|||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorTrans Then
|
||||||
|
If Not ObjMov.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
ErrorTrans = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorTrans Then
|
If Not ErrorTrans Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
ObjMov.Commit()
|
ObjMov.Commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user