-- TRIM EN NOMBRE ALMACEN, EN CARGA ALMACEN
This commit is contained in:
@@ -1790,7 +1790,6 @@ Partial Class General_SaldosIniciales
|
|||||||
Try
|
Try
|
||||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
||||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString.Trim
|
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString.Trim
|
||||||
'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
|
||||||
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||||
|
|
||||||
If CveAlmacen > 0 Then
|
If CveAlmacen > 0 Then
|
||||||
@@ -1798,9 +1797,8 @@ Partial Class General_SaldosIniciales
|
|||||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||||
If movimientoCabecera > 0 Then
|
If movimientoCabecera > 0 Then
|
||||||
|
|
||||||
|
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows
|
||||||
contadorMovimientos += 1
|
contadorMovimientos += 1
|
||||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
|
||||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
If RowPS IsNot Nothing Then
|
If RowPS IsNot Nothing Then
|
||||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
||||||
@@ -1823,6 +1821,11 @@ Partial Class General_SaldosIniciales
|
|||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
If contadorMovimientos = 0 Then
|
||||||
|
mensajeError = $"No se encontraros registros del almacen: ""{almacenActual}"""
|
||||||
|
Throw New Exception()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
mensajeError = $"No se registró el encabezado ""{almacenActual}"""
|
mensajeError = $"No se registró el encabezado ""{almacenActual}"""
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
|
|||||||
Reference in New Issue
Block a user