Devolucion directa a entrega por adelantado
This commit is contained in:
@@ -260,6 +260,15 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property EsDevolucionDirecta As Boolean
|
||||||
|
Get
|
||||||
|
Return CBool(If(ViewState("EsDevolucionDirecta") Is Nothing, 0, ViewState("EsDevolucionDirecta")))
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("EsDevolucionDirecta") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
@@ -639,6 +648,19 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
|
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then
|
||||||
|
Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"})
|
||||||
|
If DtMov.Rows.Count > 0 Then
|
||||||
|
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||||
|
DdlAlmacen.Items.Clear()
|
||||||
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
|
||||||
|
DdlAlmacen.DataBind()
|
||||||
|
|
||||||
|
DdlAlmacen.SelectedValueExist(CveAlmacenDev)
|
||||||
|
EsDevolucionDirecta = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -1896,6 +1918,11 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'DEVOLUCION DIRECTA A ENTREGA POR ADELANTADO
|
||||||
|
If TipoMovimiento = 2 And ConceptoMovimiento = 18 AndAlso EsDevolucionDirecta Then
|
||||||
|
ConceptoMovimiento = 41
|
||||||
|
End If
|
||||||
|
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
||||||
CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7")
|
CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7")
|
||||||
Folio = ObjInventario.Folio
|
Folio = ObjInventario.Folio
|
||||||
|
|||||||
Reference in New Issue
Block a user