-- que se pueda veriicar serie
This commit is contained in:
@@ -1758,13 +1758,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||
|
||||
|
||||
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvSerie.DataBind()
|
||||
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||
BtnAgregarPS.Enabled = False
|
||||
BtnAgregarPS.Enabled = True
|
||||
If CerrarCompletado Then
|
||||
RegistraScript("$('#DivSerie').modal('hide');")
|
||||
End If
|
||||
@@ -1807,9 +1806,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
AgregaSerie(TxtSerie.Text.Replace(" ", String.Empty), 1)
|
||||
End Sub
|
||||
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional AlertaSonido As Boolean = True)
|
||||
'SerieLote = SerieLote.Trim.Replace(" ", " ")
|
||||
|
||||
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional AlertaSonido As Boolean = True, Optional CargaMasivaSeries As Boolean = False)
|
||||
If Serie.Trim = "" Then
|
||||
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -1820,10 +1817,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'VALIDACION DE SERIES DUPLICADAS
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
Dim DtDuplicado As New DataTable
|
||||
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")
|
||||
@@ -1832,12 +1825,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
|
||||
Continue For
|
||||
End If
|
||||
|
||||
DtDuplicado = DtSeriesNuevas.FiltraParametros($"Serie = '{Serie}'")
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado se encuentra duplicado.")
|
||||
TxtSerie.Text = ""
|
||||
TxtSerie.Focus()
|
||||
Continue For
|
||||
End If
|
||||
|
||||
@@ -1846,27 +1835,21 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim Row = DtSeriesNuevas.NewRow
|
||||
Row("Serie") = Serie
|
||||
DtSeriesNuevas.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
If MensajeAlert.ToString <> "" Then
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgAdvertencia)
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.ToastError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim MensajeSinExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Index = 0
|
||||
|
||||
For Each Serie In SeriesArreglo
|
||||
If Serie <> "" Then
|
||||
|
||||
|
||||
|
||||
Dim Row = DtDatosDetalle.NewRow
|
||||
|
||||
Index = Index + 1
|
||||
@@ -1895,11 +1878,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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
|
||||
@@ -1918,7 +1896,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
TxtSerie.Text = ""
|
||||
End If
|
||||
|
||||
CargaSerie(Tipo, True)
|
||||
If Not CargaMasivaSeries Then CargaSerie(Tipo, True)
|
||||
|
||||
If MensajeAlert.ToString <> "" Then
|
||||
If AlertaSonido Then RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
|
||||
Reference in New Issue
Block a user