Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -244,6 +244,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ViewState("Tipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CvePrePoliza As Integer
|
||||
Get
|
||||
Return CType(ViewState("CvePrePoliza"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePoliza") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -256,6 +264,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
EstatusAlmacenCompra = -1
|
||||
EsConsumoInterno = False
|
||||
EsNuevoMov = False
|
||||
CvePrePoliza = -1
|
||||
|
||||
CreaDT()
|
||||
CargaCombos()
|
||||
@@ -579,6 +588,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If DtMov.Rows(0)("CvePrePoliza").ToString.ToEntero > 0 Then
|
||||
HplPrePoliza.Visible = True
|
||||
HplPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", DtMov.Rows(0)("CvePrePoliza"))
|
||||
CvePrePoliza = DtMov.Rows(0)("CvePrePoliza").ToString.ToEntero
|
||||
Else
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
BtnGeneraPrepoliza.Visible = True
|
||||
@@ -1035,14 +1045,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles BtnRemove.Click
|
||||
Dim Borrar As Boolean = False
|
||||
If Not TxtDescripcion.Text = "" Then
|
||||
Dim ObjGral As New ClsGenerales
|
||||
ObjGral.IniciaTransacSQL()
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
Borrar = True
|
||||
End If
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
Inv.IniciaTransacSQL()
|
||||
Dim Conta As New ClsContabilidad(Inv.IniciaTransacSQL())
|
||||
Dim ObjGral As New ClsGenerales(Inv.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
@@ -1052,6 +1058,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ObjConta.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Inv.MovimientoRemove(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If HdnIdPoliza.Value.ToEntero > 0 Then
|
||||
@@ -1063,10 +1072,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||
Inv.Commit()
|
||||
ObjGral.Commit()
|
||||
|
||||
Alert("Movimientos Eliminado", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divDescripcion"))
|
||||
@@ -1074,7 +1088,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
If ObjConta IsNot Nothing Then ObjConta.RollBack()
|
||||
Inv.RollBack()
|
||||
ObjGral.RollBack()
|
||||
|
||||
Alert("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -1083,6 +1096,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If ObjConta IsNot Nothing Then ObjConta.Dispose()
|
||||
Inv.Dispose()
|
||||
ObjGral.Dispose()
|
||||
Conta.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -633,7 +633,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim Inv As New ClsInventarios
|
||||
Inv.IniciaTransacSQL()
|
||||
Dim Conta As New ClsContabilidad(Inv.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
@@ -654,6 +654,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'If Not TieneError Then
|
||||
' If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
' TieneError = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not TieneError Then
|
||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||
Inv.Commit()
|
||||
@@ -670,6 +676,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If ObjConta IsNot Nothing Then ObjConta.Dispose()
|
||||
Inv.Dispose()
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user