From 46857900e459fdd3531b1ffd15e000db2fe80763 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 21 Feb 2022 17:30:09 -0700 Subject: [PATCH] --estilo del texto de "recibir" fontawesome --- Inventarios/RecepcionAlmacen.aspx.vb | 85 ++++++++++++++-------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 5719ca0ec..fbdf9185a 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -841,10 +841,10 @@ Partial Class Inventarios_RecepcionAlmacen If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString.ToEntero = 0 Then e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary input-sm" - e.Row.FCLinkButton("BtnSurtir").Text = " Recibir" + e.Row.FCLinkButton("BtnSurtir").Text = " Recibir" Else e.Row.FCLinkButton("BtnSurtir").CssClass = "btn yellow-gold input-sm" - e.Row.FCLinkButton("BtnSurtir").Text = " Devolver " + e.Row.FCLinkButton("BtnSurtir").Text = " Devolver " End If If UsuarioActual.TienePermisoProceso(201) Then @@ -1773,6 +1773,8 @@ Partial Class Inventarios_RecepcionAlmacen Dim DtSeriesNuevas As New DataTable DtSeriesNuevas.Columns.Add("Serie", GetType(String)) + 'If CvePSS > 0 And CvePSSerie = 0 Then CvePSSerie = CvePSS + 'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS") @@ -1812,48 +1814,52 @@ Partial Class Inventarios_RecepcionAlmacen Dim Index = 0 For Each Serie In SeriesArreglo - Dim Row = DtDatosDetalle.NewRow + If Serie <> "" Then - Index = Index + 1 - If Index > LbCantidad.Text.ToEntero Then - Exit For - End If - 'VALIDA QUE SIGA AGREGANDO - If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then - Exit For - End If + Dim Row = DtDatosDetalle.NewRow - 'VERIFICA EXISTENCIAS - If TipoMovimiento > 1 Then - Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie) - If Existencia < 1 Then - MensajeSinExistencias.Append($"Serie: {Serie}.
") - Continue For + Index = Index + 1 + If Index > LbCantidad.Text.ToEntero Then + Exit For End If - If TipoMovimiento = 2 Then - If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then + 'VALIDA QUE SIGA AGREGANDO + If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then + Exit For + End If + + 'VERIFICA EXISTENCIAS + If TipoMovimiento > 1 Then + Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie) + If Existencia < 1 Then MensajeSinExistencias.Append($"Serie: {Serie}.
") Continue For End If + + If TipoMovimiento = 2 Then + If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then + MensajeSinExistencias.Append($"Serie: {Serie}.
") + Continue For + End If + End If End If + + 'Dim AplicaCaducidad = False + 'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then + ' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False) + 'End If + + Row("ConsecId") = CveConsecSerie + Row("Consec") = DtDatosDetalle.Rows.Count + 1 + Row("CvePS") = CvePSSerie + Row("CveUM") = CveUMSerie + Row("PU") = PUSerie + Row("Serie") = Serie + Row("FechaCaducidad") = MinFecha.ToShortDateString + + DtDatosDetalle.Rows.Add(Row) End If - - 'Dim AplicaCaducidad = False - 'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then - ' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False) - 'End If - - Row("ConsecId") = CveConsecSerie - Row("Consec") = DtDatosDetalle.Rows.Count + 1 - Row("CvePS") = CvePSSerie - Row("CveUM") = CveUMSerie - Row("PU") = PUSerie - Row("Serie") = Serie - Row("FechaCaducidad") = MinFecha.ToShortDateString - - DtDatosDetalle.Rows.Add(Row) Next ObjInventarios.Dispose() @@ -4841,14 +4847,6 @@ Partial Class Inventarios_RecepcionAlmacen Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If - 'If Not dt.Columns(4).ColumnName = "Lote" Then - ' Alert("El nombre de la cuarta columna debe ser 'Lote'. Favor de corregirlo", TipoMensaje.MsgError) - ' Exit Sub - 'End If - 'If Not dt.Columns(5).ColumnName = "FechaCaducidad" Then - ' Alert("El nombre de la cuarta columna debe ser 'Fecha Caducidad'. Favor de corregirlo", TipoMensaje.MsgError) - ' Exit Sub - 'End If dt.TableName = "Datos" @@ -4871,12 +4869,15 @@ Partial Class Inventarios_RecepcionAlmacen Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero() Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero() + CvePSSerie = CveProducto + CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() Dim Serie As String = RowExcel("Serie").ToString() Dim Lote As String = "" '= RowExcel("Lote").ToString() Dim FechaCaducidad As Date = MinFecha '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) Dim Observaciones As String = "" '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString + LbCantidad.Text = Cantidad.ToString Dim Valido As Boolean = True