paqueteria guia terminado
This commit is contained in:
@@ -1593,6 +1593,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL())
|
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjAcumuladores As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
Dim ObjAcumuladores As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||||
|
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||||
Dim CveMovimiento As Integer
|
Dim CveMovimiento As Integer
|
||||||
Dim Folio As Integer
|
Dim Folio As Integer
|
||||||
Dim ErrorMovInv As Boolean
|
Dim ErrorMovInv As Boolean
|
||||||
@@ -2413,11 +2414,33 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
OnError("Ocurrió un error al guardar", ex)
|
OnError("Ocurrió un error al guardar", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
'Paqueterias guias
|
||||||
If RbEntregaInterna.Checked Then
|
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||||
AgregarNuevaGuia()
|
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero()
|
||||||
|
Dim Fecha As String = TxtFechaPaqInterna.Text
|
||||||
|
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||||
|
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||||
|
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||||
|
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||||
|
|
||||||
|
If CvePaqueteriaGuia > 0 Then
|
||||||
|
|
||||||
|
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||||
|
ErrorMovInv = Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1)
|
||||||
|
End If
|
||||||
|
If ErrorMovInv Then
|
||||||
|
Alert("Error en el paqueteria guia detalle", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
Alert("Error en el paqueteria guia", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
|
ObjGeneral.Dispose()
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
|
|
||||||
@@ -2447,10 +2470,15 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If RbEntregaInterna.Checked Then
|
||||||
|
Msg.AppendFormat("<br/><br/>Se agregó una guía de paquetería interna")
|
||||||
|
End If
|
||||||
|
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Limpia()
|
Limpia()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
|
LimpiaCampos()
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
Alert(TextoError.ToString, TipoMensaje.MsgError)
|
Alert(TextoError.ToString, TipoMensaje.MsgError)
|
||||||
@@ -2494,6 +2522,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios : ObjInventario.IniciaTransacSQL()
|
Dim ObjInventario As New ClsInventarios : ObjInventario.IniciaTransacSQL()
|
||||||
|
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||||
Dim CveMovimientoSalida As Integer
|
Dim CveMovimientoSalida As Integer
|
||||||
Dim ConceptoMovimiento = 0
|
Dim ConceptoMovimiento = 0
|
||||||
Dim FolioSalida As Integer
|
Dim FolioSalida As Integer
|
||||||
@@ -2670,12 +2699,32 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Paqueterias Guias
|
||||||
|
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||||
|
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero()
|
||||||
|
Dim Fecha As String = TxtFechaPaqInterna.Text
|
||||||
|
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||||
|
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||||
|
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||||
|
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||||
|
|
||||||
|
If CvePaqueteriaGuia > 0 Then
|
||||||
|
|
||||||
|
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||||
|
ErrorMovInv = Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1)
|
||||||
|
End If
|
||||||
|
If ErrorMovInv Then
|
||||||
|
Alert("Error en el paqueteria guia detalle", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
Alert("Error en el paqueteria guia", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
If RbEntregaInterna.Checked Then
|
|
||||||
AgregarNuevaGuia()
|
|
||||||
End If
|
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
|
ObjGeneral.Dispose()
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
@@ -2685,9 +2734,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||||
Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||||
|
|
||||||
|
If RbEntregaInterna.Checked Then
|
||||||
|
Msg.AppendFormat("<br/><br/>Se agregó una guía de paquetería interna")
|
||||||
|
End If
|
||||||
|
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Limpia()
|
Limpia()
|
||||||
|
LimpiaCampos()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
Else
|
Else
|
||||||
Alert(TextoError, TipoMensaje.MsgError)
|
Alert(TextoError, TipoMensaje.MsgError)
|
||||||
@@ -3126,37 +3180,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub AgregarNuevaGuia()
|
|
||||||
Dim ObjGeneral As ClsGenerales = New ClsGenerales()
|
|
||||||
Dim TieneError As Boolean = False
|
|
||||||
ObjGeneral.IniciaTransacSQL()
|
|
||||||
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero()
|
|
||||||
Dim Fecha As String = TxtFechaPaqInterna.Text
|
|
||||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
|
||||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
|
||||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
|
||||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
|
||||||
|
|
||||||
If CvePaqueteriaGuia > 0 Then
|
|
||||||
|
|
||||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
|
||||||
TieneError = Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveSubProyecto, -1)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TieneError Then
|
|
||||||
ObjGeneral.RollBack()
|
|
||||||
Else
|
|
||||||
ObjGeneral.Commit()
|
|
||||||
LimpiaCampos()
|
|
||||||
Alert("Se agrego la paquetería guía correctamente")
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjGeneral.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LimpiaCampos()
|
Protected Sub LimpiaCampos()
|
||||||
DdlEstatus.SelectedValue = "1"
|
DdlEstatus.SelectedValue = "1"
|
||||||
TxtFechaPaqInterna.Text = ""
|
TxtFechaPaqInterna.Text = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user