-- vadilacion

This commit is contained in:
2023-11-15 10:20:26 -07:00
parent 5a18a670ca
commit bbb0ef0476

View File

@@ -14928,14 +14928,18 @@ Partial Class Ventas
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}")
End If
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
If PU <= 0 Then
Dim drPU As DataRow = DtExistencias.FiltroPrimero($"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero()}")
If drPU IsNot Nothing Then
PU = drPU("PU").ToString.ToDecimal
Else
'sino se encontró valor, manda mensaje
ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
OcurrioError = True
Exit For
End If
End If
Dim CveSeccionAlmacen As Integer = -3
Dim CveSeccionAlmacen As Integer = -3
'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
@@ -14999,17 +15003,17 @@ Partial Class Ventas
End If
'E119, verifica si la salida está con ps de importación para que se guarde el pedimento
If UsuarioActual.CveEmpresa = 119 AndAlso factura.TipoDocto.Contiene("Ing") Then
'If UsuarioActual.CveEmpresa = 119 AndAlso factura.TipoDocto.Contiene("Ing") Then
'If ObjInventario.GetVentasPedimento(CveVenta, UsuarioActual.CveEmpresa) Then
' Dim dttped As DataTable = ObjInventario.DtResultados
' 'If ObjInventario.GetVentasPedimento(CveVenta, UsuarioActual.CveEmpresa) Then
' ' Dim dttped As DataTable = ObjInventario.DtResultados
' For Each drt As DataRow In dttped.FiltraParametros("NumeroPedimento <> ''").Rows
' ' For Each drt As DataRow In dttped.FiltraParametros("NumeroPedimento <> ''").Rows
' ObjVentas.UpdateVentasDetalleNumeroPedimento(factura.CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("NumeroPedimento").ToString)
' Next
'End If
End If
' ' ObjVentas.UpdateVentasDetalleNumeroPedimento(factura.CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("NumeroPedimento").ToString)
' ' Next
' 'End If
'End If
Else
OcurrioError = True
ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")