diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx index a12e04e17..6cf9690ed 100644 --- a/Inventarios/TrasladoSolicitud.aspx +++ b/Inventarios/TrasladoSolicitud.aspx @@ -213,7 +213,7 @@ - +
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index 8a0e4ee57..53d05aefa 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -334,14 +334,10 @@ Partial Class Inventarios_TrasladoSolicitud MensajeExistencia.Append("No hay la existencia suficiente de los siguientes productos:
") Dim CodigoPS As String = "" - - - - For Each row As GridViewRow In GvDatos.Rows - CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "") Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), Lote:=row.DataKey("Lote").ToString, FechaCaducidad:=row.DataKey("FechaCaducidad").ToString.ToDate) If Existencia - TempDT.SUM("Cantidad", $"CvePS = {row.DataKey("CvePS").ToEntero} AND CveUM = {row.DataKey("CveUM").ToEntero}") < 0 Then + CodigoPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "") MensajeExistencia.AppendFormat("
- {0}. Existencia: {1}", CodigoPS, Existencia) TieneErrorExistencia = True End If @@ -381,14 +377,7 @@ Partial Class Inventarios_TrasladoSolicitud For Each Row As GridViewRow In GvDatos.Rows 'Dim CveUM As Integer = Row.DataKey("CveUM").ToEntero Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero - Dim Cantidad As Integer = Row.DataKey("Cantidad").ToEntero - 'Dim Precio As Decimal = Row.DataKey("Precio").ToDecimal - 'Dim Observaciones As String = Row.DataKey("Observaciones") - 'Dim CveContratoDetalle As Integer = Row.DataKey("CveContratoDetalle").ToEntero - 'Dim Serie As String = Row.DataKey("Serie") - 'Dim Lote As String = Row.DataKey("Lote") - 'Dim FechaCaducidad As Date = Row.DataKey("FechaCaducidad").ToDate - + Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, -1, CvePS, 0, "", -1, "-1", "-1", MinFecha) Then TieneError = True Exit For @@ -396,7 +385,6 @@ Partial Class Inventarios_TrasladoSolicitud Next End If - If TieneError = False Then ObjInventarios.Commit() Alert($"La Solicitud de Traspaso se guardó correctamente con folio #: {Folio}.", TipoMensaje.MsgInformacion)