Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -117,6 +117,19 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveTipoVenta As Integer
|
||||
Get
|
||||
If ViewState("CveTipoVenta") Is Nothing Then
|
||||
ViewState("CveTipoVenta") = -1
|
||||
End If
|
||||
Return CType(ViewState("CveTipoVenta"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property TipoEstatus As Integer
|
||||
Get
|
||||
@@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Property
|
||||
|
||||
|
||||
Private Property PedidoBloqueCantidad As Boolean
|
||||
Private Property BloqueCantidad As Boolean
|
||||
Get
|
||||
If ViewState("PedidoBloqueCantidad") Is Nothing Then
|
||||
ViewState("PedidoBloqueCantidad") = False
|
||||
If ViewState("BloqueCantidad") Is Nothing Then
|
||||
ViewState("BloqueCantidad") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString)
|
||||
Return Boolean.Parse(ViewState("BloqueCantidad").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PedidoBloqueCantidad") = value
|
||||
ViewState("BloqueCantidad") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
|
||||
CveVentaSurtir = CveVenta
|
||||
CveOSSurtir = CveOS
|
||||
CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero
|
||||
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
|
||||
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
|
||||
CveContrato = drE("CveContrato").ToString().ToEntero()
|
||||
@@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
UpGenerales.Update()
|
||||
If CveAlmacen <= 0 Then CargaGvDatos()
|
||||
UpGenerales.Update()
|
||||
|
||||
If (EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped") Or (UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso CveTipoVenta <> 3) Then
|
||||
BloqueCantidad = True
|
||||
Else
|
||||
BloqueCantidad = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
|
||||
PedidoBloqueCantidad = True
|
||||
End If
|
||||
If CveAlmacen <= 0 Then CargaGvDatos()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||
|
||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
@@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||
Else
|
||||
@@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
End If
|
||||
|
||||
If PedidoBloqueCantidad Then
|
||||
If BloqueCantidad Then
|
||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
End If
|
||||
|
||||
@@ -1839,8 +1858,21 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
ObjVentaInv.Dispose()
|
||||
|
||||
If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then
|
||||
Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
|
||||
Dim VerificaCancelada As Boolean = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then
|
||||
VerificaCancelada = False
|
||||
End If
|
||||
|
||||
If VerificaCancelada Then
|
||||
If TipoEstatus = 5 Then
|
||||
Alert("No se puede surtir esta venta, verifique que no esté cancelada", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If EsDevolucionVenta.Contiene(2, 3) Then
|
||||
Alert("No se puede surtir esta venta, verifique que no esté registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -2739,10 +2771,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
'se registra
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN
|
||||
ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError)
|
||||
End If
|
||||
|
||||
@@ -131,10 +131,15 @@ Partial Class Inventarios_Default
|
||||
RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor,
|
||||
End If
|
||||
|
||||
Dim BuscarEnTabla As Boolean = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then
|
||||
BuscarEnTabla = True
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
|
||||
CargaPS(CvePS)
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user