diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index 9656f3e26..aa758b05f 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -557,8 +557,8 @@ Public Class Timbrado
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
MsgCancelacion.AppendFormat("-3.3")
- 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE
- If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError = "202" Then
+ 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279")
+ If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then
MsgCancelacion.AppendFormat("-3.4")
CancelacionMensaje = resultadoCancelacion.Descripcion
Dim xmlDoc As New System.Xml.XmlDocument()
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 4a3ee93ec..277f7e9b2 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -638,12 +638,12 @@
Serie: |
-
+ <%--
-
-
+ --%>
|
Fecha Caducidad: |
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 0f84dbfc9..5b36fbde1 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -1142,11 +1142,11 @@ Partial Class Inventarios_EntregaAlmacen
If CveMetodoInventario = 6 Then
- RegistraScript("$('#DivLote').modal('show')")
+ RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
CargaLote()
UpLoteBatch.Update()
Else
- RegistraScript("$('#DivSerie').modal('show')")
+ RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false});")
CargaSerie()
UpSerie.Update()
End If
@@ -1173,7 +1173,7 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False, Optional CargaMasivo As Boolean = False)
- If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal('show')", "show")
+ If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false})", "show")
Dim AplicaCaducidad = False
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
@@ -1270,8 +1270,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim Series As String = Nothing
Series = TxtSerie.Text.Trim
- Series = Series.Remove(0, 1)
- Series = Series.Remove(Series.Length - 1, 1)
+ Series = Series.Replace("*", "")
ArraySeries = Series.Trim.Split(","c)
For i As Integer = 0 To ArraySeries.Length - 1
@@ -1285,7 +1284,12 @@ Partial Class Inventarios_EntregaAlmacen
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional CargaMasivo As Boolean = False)
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
+ End If
+
+ If Serie.Trim.Length < 6 Then
+ Alert("El campo 'Serie' debe tener minimo 6 caracteres. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -1303,26 +1307,26 @@ Partial Class Inventarios_EntregaAlmacen
'Valida Existencia
- 'If TipoMovimiento = 1 Then
- ' Dim ObjInventarios As New ClsInventarios
- ' Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
- ' If Existencia < 1 Then
- ' Alert($"No hay existencia suficiente del producto ""{PSSerie}"" con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
- ' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
- ' ObjInventarios.Dispose()
- ' Exit Sub
- ' End If
- ' ObjInventarios.Dispose()
- 'Else
- ' If DtExistencias IsNot Nothing Then
- ' Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
- ' If Existencia < 1 Then
- ' Alert($"No hay existencia suficiente del producto ""{PSSerie}"" con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
- ' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
- ' Exit Sub
- ' End If
- ' End If
- 'End If
+ If TipoMovimiento = 1 Then
+ Dim ObjInventarios As New ClsInventarios
+ Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
+ If Existencia < 1 Then
+ Alert($"No hay existencia suficiente del producto ""{PSSerie}"" con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
+ RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
+ ObjInventarios.Dispose()
+ Exit Sub
+ End If
+ ObjInventarios.Dispose()
+ Else
+ If DtExistencias IsNot Nothing Then
+ Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
+ If Existencia < 1 Then
+ Alert($"No hay existencia suficiente del producto ""{PSSerie}"" con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
+ RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
+ Exit Sub
+ End If
+ End If
+ End If
Dim Row = DtDatosDetalle.NewRow
@@ -1433,7 +1437,7 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
Private Sub CargaLote(Optional CerrarCompletado As Boolean = False)
- RegistraScript("$('#DivLote').modal('show')")
+ RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false})")
GvLote.Columns(2).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
GvLote.DataSource = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
GvLote.DataBind()
@@ -3353,6 +3357,11 @@ Partial Class Inventarios_EntregaAlmacen
Dim CveSeccionAlmacen As Integer = -1
For Each Dr As DataRow In DtDatos.Rows
+
+ If ErrorMovInv Then
+ Exit For
+ End If
+
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1")
CveSeccionAlmacen = If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)
@@ -3363,7 +3372,7 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr1 As DataRow In DtDetalle.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), 0, Serie:=Dr1("Serie").ToString(), Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=-1, CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero()) Then
ErrorMovInv = True
- TextoError = "Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar."
+ TextoError = $"Ocurrió un error al procesar los conceptos con serie '{Dr1("Serie").ToString()}'. Por favor vuelva a intentar."
Exit For
End If
Next
@@ -3990,7 +3999,7 @@ Partial Class Inventarios_EntregaAlmacen
UpVerSugerencias.Update()
- RegistraScript("$('#ModalVerSugerencias').modal()")
+ RegistraScript("$('#ModalVerSugerencias').modal({backdrop: 'static', keyboard: false});")
End Sub
Protected Sub BtnAplicarSugerencias_Click(sender As Object, e As EventArgs)
@@ -4171,7 +4180,7 @@ Partial Class Inventarios_EntregaAlmacen
HdnCveVenta.Value = CveVentaSurtir.ToString
CargaModalCombosDirecciones(CveCliente, CveDireccionEnvio)
- RegistraScript("$('#DivEditarEntrega').modal('show');")
+ RegistraScript("$('#DivEditarEntrega').modal({backdrop: 'static', keyboard: false});")
End Sub
|