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