SMS OS Devolver todo el material
This commit is contained in:
@@ -3007,6 +3007,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||||
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
||||||
|
|
||||||
|
Dim GenrarRemisionMovimientos As Boolean = False
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
Dim AplicaDevolucion As Boolean = False
|
Dim AplicaDevolucion As Boolean = False
|
||||||
For Each GvRow As GridViewRow In GvMU.Rows
|
For Each GvRow As GridViewRow In GvMU.Rows
|
||||||
@@ -3014,8 +3015,11 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||||
If CantidadDev > 0 Then
|
If CantidadDev > 0 Then
|
||||||
AplicaDevolucion = True
|
AplicaDevolucion = True
|
||||||
If Not ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then
|
If ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then
|
||||||
|
GenrarRemisionMovimientos = True
|
||||||
|
Else
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
|
GenrarRemisionMovimientos = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3032,7 +3036,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim ImporteAlmacen As Decimal
|
Dim ImporteAlmacen As Decimal
|
||||||
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
||||||
|
|
||||||
If ProcesoOK Then
|
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||||
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
||||||
|
|
||||||
If Respuesta.CveVenta > 0 Then
|
If Respuesta.CveVenta > 0 Then
|
||||||
@@ -3046,7 +3050,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ProcesoOK Then
|
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||||
|
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtil")
|
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtil")
|
||||||
Dim Folio As Integer = ObjInventario.Folio
|
Dim Folio As Integer = ObjInventario.Folio
|
||||||
|
|||||||
Reference in New Issue
Block a user