diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx
index 77831e2cd..1898557f3 100644
--- a/OS/OrdenesServicios.aspx
+++ b/OS/OrdenesServicios.aspx
@@ -1306,11 +1306,11 @@
<%--MODAL FINALIZAR ORDEN INICIO --%>
-
-
-
diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb
index 7d09c7cd3..367f50a7d 100644
--- a/OS/OrdenesServicios.aspx.vb
+++ b/OS/OrdenesServicios.aspx.vb
@@ -3575,6 +3575,7 @@ Partial Class OS_OrdenesServicios
TmpDTMat.Columns.Add("Lote", GetType(String))
TmpDTMat.Columns.Add("FechaCaducidad", GetType(Date))
TmpDTMat.Columns.Add("CveVentaDetalle", GetType(Integer))
+ TmpDTMat.Columns.Add("CantidadConversion", GetType(Decimal))
'unificar en un solo producto, y generar las salidas a esa relación
Dim tdtt As DataTable = AgrupadoProductos(GvMU)
'se recorren los renglones agrupados por producto y acumuladas las cantidades
@@ -3584,7 +3585,7 @@ Partial Class OS_OrdenesServicios
Dim PU As Decimal = drr("PU").ToString.ToDecimal
Dim Descuento As Decimal = drr("Descuento").ToString.ToDecimal
Dim Obs As String = ""
- If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=drr("CveVentaDetallePadre").ToString.ToEntero) Then
+ If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=drr("CveVentaDetallePadre").ToString.ToEntero, CantidadConversion:=drr("CantidadConversion").ToString.ToDecimal) Then
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
ProcesoOK = False
@@ -3655,17 +3656,19 @@ Partial Class OS_OrdenesServicios
.PU = PU,
.Descuento = Descuento,
.CveVentaDetallePadre = Group.Max(Function(r) r.DataKey("CveVentaDetalle").ToEntero()),
+ .CantidadConversion = Group.Max(Function(r) r.DataKey("CantidadConversion").ToDecimal()),
.Cantidad = Group.Sum(Function(r) Convert.ToDecimal(r.FCTextBox("TxtUtilizado").Text.ToDecimal)),
.Lotes = String.Join(", ", Group.Select(Function(r) gridView.DataKeys(r.RowIndex)("Lote").ToString()).Distinct())
}
' Crear un nuevo DataTable para almacenar los resultados agrupados
Dim resultTable As New DataTable()
- resultTable.Columns.Add("CvePS")
- resultTable.Columns.Add("PU")
- resultTable.Columns.Add("Descuento")
- resultTable.Columns.Add("CveVentaDetallePadre")
+ resultTable.Columns.Add("CvePS", GetType(Integer))
+ resultTable.Columns.Add("PU", GetType(Decimal))
+ resultTable.Columns.Add("Descuento", GetType(Decimal))
+ resultTable.Columns.Add("CveVentaDetallePadre", GetType(Integer))
resultTable.Columns.Add("Cantidad", GetType(Decimal))
+ resultTable.Columns.Add("CantidadConversion", GetType(Decimal))
For Each item In groupedData
If item.Cantidad > 0 Then
@@ -3675,6 +3678,7 @@ Partial Class OS_OrdenesServicios
newRow("Descuento") = item.Descuento
newRow("CveVentaDetallePadre") = item.CveVentaDetallePadre
newRow("Cantidad") = item.Cantidad
+ newRow("CantidadConversion") = item.CantidadConversion
resultTable.Rows.Add(newRow)
End If
Next