SMS - OS, poder hacer la cancelación de una OS/Pedido. cuando la OS no esté como finalizada.

This commit is contained in:
rakcsle
2024-08-24 13:51:04 -07:00
parent 0fd4a78a8b
commit bbe64521b5
14 changed files with 820 additions and 31 deletions

View File

@@ -4588,6 +4588,39 @@ Partial Class Inventarios_EntregaAlmacen
Dim ObjInventario As New ClsInventarios(TransaccionSql)
If ObjInventario.GetMovimientosDetalle(CveMovimientoGenerado, UsuarioActual.CveEmpresa) Then
If Not cancelarPeido Then
'Dim DT_Ventas_Detalles As DataTable = DTSolicitudDev.FiltraParametros("", "", {"CantidadPedido", "CvePS", "CveVentaDetalle"})
'DT_Ventas_Detalles.Columns.Add("CantidadUsada", GetType(Decimal))
'DT_Ventas_Detalles.AcceptChanges()
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
' For Each gvRow As GridViewRow In GvMU.Rows
' Dim CantidadUsada As Decimal = gvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
' If dRow("CvePS").ToString.ToDecimal = gvRow.DataKey("CvePS").ToDecimal AndAlso CantidadUsada > 0 Then
' dRow("CantidadUsada") = dRow("CantidadUsada").ToString.ToDecimal + CantidadUsada
' End If
' Next
'Next
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
' Dim CantidadUsada As Decimal = dRow("CantidadUsada").ToString.ToDecimal
' If dRow("CantidadUsada").ToString.ToDecimal < dRow("CantidadPedido").ToString.ToDecimal Then
' If Not ObjInventario.UpdatePedidoDetalleCantidad(dRow("CveVentaDetalle").ToString.ToEntero, CantidadUsada, 2) Then
' ProcesoOK = False
' Exit For
' End If
' End If
'Next
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero()
@@ -4603,8 +4636,10 @@ Partial Class Inventarios_EntregaAlmacen
End If
Next
End If
End If
End If
End If