This commit is contained in:
@@ -1965,7 +1965,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
If DtTamanios IsNot Nothing AndAlso DtTamanios.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 Then
|
||||
Dim CveConceptoMovimientoVirtual = If(TipoMovimiento = 1, 3, 18) 'CHECA SI ES ENTRADA O DEVOLUCION
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text)
|
||||
CveAlmacenVirutal = ObjInventario.AddMovimiento(CveAlmacenVirutal, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text)
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
@@ -1975,7 +1975,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadEntrada, CveUM, CvePS, PU, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveAlmacenVirutal, CantidadEntrada, CveUM, CvePS, PU, -1) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -2430,7 +2430,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorMovInv = True
|
||||
OnError("Ocurrió un error al guardar",ex)
|
||||
OnError("Ocurrió un error al guardar", ex)
|
||||
End Try
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
@@ -510,7 +510,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyectosUsados()
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRecepcionUsados.Visible = True
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(190) Then
|
||||
|
||||
@@ -1445,14 +1445,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs)
|
||||
If GvDatosRecepcion.Rows.Count > 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Dtt As DataTable = Nothing
|
||||
|
||||
If ObjInventarios.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
||||
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"Codigo", "Cantidad"})
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
'Valida Movimientos
|
||||
Dim ValidaMovtos = 0.0
|
||||
For Each gvr As GridViewRow In GvDatosRecepcion.Rows
|
||||
@@ -1474,13 +1466,24 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
Dim Dtt As DataTable = Nothing
|
||||
Dim CveMovimientoEntrada As Integer = 0
|
||||
Dim Folio = 0
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim TextoError = ""
|
||||
|
||||
'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
|
||||
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
||||
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
||||
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"Codigo", "Cantidad"})
|
||||
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then
|
||||
|
||||
ObjInventario.Dispose()
|
||||
Alert("El traspaso no se ha puede completar, por inconsistencia en las cantidades recibidas")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
|
||||
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user