-- 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}") DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}")
End If End If
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal Dim drPU As DataRow = DtExistencias.FiltroPrimero($"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero()}")
If PU <= 0 Then 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 />") ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
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 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 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 End If
'E119, verifica si la salida está con ps de importación para que se guarde el pedimento '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 ' 'If ObjInventario.GetVentasPedimento(CveVenta, UsuarioActual.CveEmpresa) Then
' Dim dttped As DataTable = ObjInventario.DtResultados ' ' 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) ' ' ObjVentas.UpdateVentasDetalleNumeroPedimento(factura.CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("NumeroPedimento").ToString)
' Next ' ' Next
'End If ' 'End If
End If 'End If
Else Else
OcurrioError = True 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") ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")