From 69fe2884205e161a0fb2587875d99e9727024201 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 23 Apr 2024 18:51:08 -0700 Subject: [PATCH] carga almacen solo con cantidad > 0 --- General/SaldosIniciales.aspx.vb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 76b6e6e28..e68ea9d04 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -2614,10 +2614,13 @@ Partial Class General_SaldosIniciales Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad)) - If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then - mensajeError.Append("No se logró generar el detalle del movimiento") - Throw New Exception() + If Cantidad > 0 Then + If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then + mensajeError.Append("No se logró generar el detalle del movimiento") + Throw New Exception() + End If End If + Else mensajeError.Append($"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}") Throw New Exception()