-- validación de carga excel, cuando no existe el PS

This commit is contained in:
2024-07-26 17:49:58 -07:00
parent 5baac63051
commit 12ac2b0561

View File

@@ -2953,16 +2953,14 @@ Partial Class Inventarios_TraspasoAlmacen
Dim RowPS As DataRow = DtPS.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Codigo").ToString()))
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
Dim Cantidad As Decimal = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = RowExcel("Observaciones").ToString()
If CveProducto > 0 Then
If RowPS IsNot Nothing Then
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
Dim Cantidad As Decimal = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = RowExcel("Observaciones").ToString()
Dim Valido As Boolean = True
Dim ValidarLote As Boolean = True
@@ -3001,10 +2999,9 @@ Partial Class Inventarios_TraspasoAlmacen
RowsNoCargados = RowsNoCargados + 1
ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString())
End If
Else
RowsNoCargados = RowsNoCargados + 1
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
ProductosNoCargados.AppendFormat("{0}, ", RowExcel("Producto").ToString())
End If
End If
Next