Modificacion para la busqueda del PS
This commit is contained in:
@@ -4581,6 +4581,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
NumRow = 0
|
NumRow = 0
|
||||||
Dim RowNoEncontrados As String = ""
|
Dim RowNoEncontrados As String = ""
|
||||||
Dim NumAgregados As Integer = 0
|
Dim NumAgregados As Integer = 0
|
||||||
|
Dim PSTemp As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.Rows
|
||||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||||
@@ -4596,6 +4597,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
Dim CveUM As Integer = 0
|
Dim CveUM As Integer = 0
|
||||||
|
Dim DataTemp As DataTable
|
||||||
|
|
||||||
NumRow = NumRow + 1
|
NumRow = NumRow + 1
|
||||||
|
|
||||||
@@ -4607,36 +4609,48 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
|
|
||||||
If Codigo <> "" Then
|
If Codigo <> "" Then
|
||||||
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
DataTemp = PSTemp.FiltraParametros(String.Format("Codigo = '{0}'", Codigo))
|
||||||
If StrArray.Length > 0 Then
|
CvePS = DataTemp.FiltroPrimeroValor("CvePS", "").ToEntero
|
||||||
If CBool(StrArray(0)) = True Then
|
DataTemp.Dispose()
|
||||||
CvePS = StrArray(1).ToEntero
|
If CvePS = 0 Then
|
||||||
Else
|
RowNoEncontrados &= Codigo & "<\BR>"
|
||||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
'ElseIf CodigoBarras <> "" Then
|
|
||||||
' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
|
||||||
' If StrArray.Length > 0 Then
|
|
||||||
' If CBool(StrArray(0)) = True Then
|
|
||||||
' CvePS = StrArray(1).ToEntero
|
|
||||||
' Else
|
|
||||||
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
ElseIf ProductoServicio <> "" Then
|
|
||||||
Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
|
||||||
If StrArray.Length > 0 Then
|
|
||||||
If CBool(StrArray(0)) = True Then
|
|
||||||
CvePS = StrArray(1).ToEntero
|
|
||||||
Else
|
|
||||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'If Codigo <> "" Then
|
||||||
|
' Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
||||||
|
' If StrArray.Length > 0 Then
|
||||||
|
' If CBool(StrArray(0)) = True Then
|
||||||
|
' CvePS = StrArray(1).ToEntero
|
||||||
|
' Else
|
||||||
|
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' 'ElseIf CodigoBarras <> "" Then
|
||||||
|
' ' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
||||||
|
' ' If StrArray.Length > 0 Then
|
||||||
|
' ' If CBool(StrArray(0)) = True Then
|
||||||
|
' ' CvePS = StrArray(1).ToEntero
|
||||||
|
' ' Else
|
||||||
|
' ' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' ' End If
|
||||||
|
' ' End If
|
||||||
|
'ElseIf ProductoServicio <> "" Then
|
||||||
|
' Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
||||||
|
' If StrArray.Length > 0 Then
|
||||||
|
' If CBool(StrArray(0)) = True Then
|
||||||
|
' CvePS = StrArray(1).ToEntero
|
||||||
|
' Else
|
||||||
|
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'Else
|
||||||
|
' RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||||
|
'End If
|
||||||
|
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||||
|
|
||||||
@@ -4644,7 +4658,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
|
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "",
|
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "",
|
||||||
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
|
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user