EntradasSalidas carga nuevas columnas del excel, entrega almacen valida el sub proyecto al agregar una paquetería interna
This commit is contained in:
@@ -270,6 +270,15 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property FechaCaducidadAux() As String
|
||||||
|
Get
|
||||||
|
Return ViewState("FechaCaducidadAux").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("FechaCaducidadAux") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -343,6 +352,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
PermisoVerImportes()
|
PermisoVerImportes()
|
||||||
End If
|
End If
|
||||||
|
FechaCaducidadAux = MinFecha.ToString
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1154,7 +1164,9 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, txtPrecio.Text.ToDouble, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text, TxtnLote.Text.Trim, MinFecha, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
|
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble,
|
||||||
|
txtPrecio.Text.ToDouble, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text,
|
||||||
|
TxtnLote.Text.Trim, FechaCaducidadAux.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
|
||||||
LimpiarAgregar()
|
LimpiarAgregar()
|
||||||
|
|
||||||
txtCantidad.Text = ""
|
txtCantidad.Text = ""
|
||||||
@@ -3916,7 +3928,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
dt.TableName = "Datos"
|
dt.TableName = "Datos"
|
||||||
|
Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
If Not ErrorArchivo Then
|
If Not ErrorArchivo Then
|
||||||
NumRow = 0
|
NumRow = 0
|
||||||
Dim RowNoEncontrados As String = ""
|
Dim RowNoEncontrados As String = ""
|
||||||
@@ -3928,12 +3940,21 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper
|
'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper
|
||||||
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
|
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
|
||||||
Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal
|
Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal
|
||||||
|
Dim Serie As String = Row("Serie").ToString
|
||||||
|
Dim Lote As String = Row("Lote").ToString
|
||||||
|
Dim Caducidad As String = Row("Caducidad").ToString
|
||||||
|
Dim SeccionAlmacen As String = Row("SeccionAlmacen").ToString
|
||||||
|
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
Dim CveUM As Integer = 0
|
Dim CveUM As Integer = 0
|
||||||
|
|
||||||
NumRow = NumRow + 1
|
NumRow = NumRow + 1
|
||||||
|
|
||||||
|
Dim CveSeccionAlmacen As Integer = -1
|
||||||
|
If SeccionAlmacen <> "" Then
|
||||||
|
CveSeccionAlmacen = DTSeccionesAlmacen.FiltroPrimeroValor("CveSeccion", String.Format("SeccionAlmacen = '{0}'", SeccionAlmacen)).ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
If Codigo <> "" Then
|
If Codigo <> "" Then
|
||||||
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
||||||
If StrArray.Length > 0 Then
|
If StrArray.Length > 0 Then
|
||||||
@@ -3974,10 +3995,16 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
txtPrecio.Text = PrecioUnitario.ToString
|
txtPrecio.Text = PrecioUnitario.ToString
|
||||||
|
|
||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
|
TxtnSerie.Text = Serie
|
||||||
|
TxtnLote.Text = Lote
|
||||||
|
DdlSeccionAlmacen.SelectedValue = CveSeccionAlmacen.ToString
|
||||||
|
FechaCaducidadAux = If(Caducidad = "", MinFecha.ToString, Caducidad)
|
||||||
AgregarPS()
|
AgregarPS()
|
||||||
txtPrecio.Text = ""
|
txtPrecio.Text = ""
|
||||||
DdlUnidad.SelectedItem.Text = ""
|
DdlUnidad.SelectedItem.Text = ""
|
||||||
|
TxtnSerie.Text = ""
|
||||||
|
TxtnLote.Text = ""
|
||||||
|
DdlSeccionAlmacen.SelectedValue = "-1"
|
||||||
NumAgregados = NumAgregados + 1
|
NumAgregados = NumAgregados + 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -4017,7 +4044,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Private Function GetPS(Opt As String, Valor As String) As String
|
Private Function GetPS(Opt As String, Valor As String) As String
|
||||||
Dim StrReturn As String = String.Empty
|
Dim StrReturn As String = String.Empty
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero
|
Dim Condicion As String = String.Format("{0} = '{1}'", Opt, Valor)
|
||||||
|
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Condicion).ToString.ToEntero
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
StrReturn = "True|" & CvePS.ToString
|
StrReturn = "True|" & CvePS.ToString
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -2423,24 +2423,29 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias().FiltroPrimeroValor("CvePaqueteria", String.Format("CveEmpresa={0} AND TipoPaqueteria = 0", UsuarioActual.CveEmpresa)).ToEntero
|
Dim CvePaqueteria As Integer = GlobalDTPaqueterias().FiltroPrimeroValor("CvePaqueteria", String.Format("CveEmpresa={0} AND TipoPaqueteria = 0", UsuarioActual.CveEmpresa)).ToEntero
|
||||||
|
|
||||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "", "", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
If CveSubProyecto > 0 Then
|
||||||
|
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "", "", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||||
|
|
||||||
If CvePaqueteriaGuia > 0 Then
|
If CvePaqueteriaGuia > 0 Then
|
||||||
|
|
||||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||||
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
|
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
|
||||||
''manda correo
|
''manda correo
|
||||||
MandaCorreoEntrega(CveVentaSurtir)
|
MandaCorreoEntrega(CveVentaSurtir)
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
If ErrorMovInv Then
|
||||||
If ErrorMovInv Then
|
Alert("Error en el paqueteria guia detalle", TipoMensaje.MsgError)
|
||||||
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
|
||||||
Else
|
Else
|
||||||
|
Alert("Hace falta indicar un Sub Proyecto", TipoMensaje.MsgAdvertencia)
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Alert("Error en el paqueteria guia", TipoMensaje.MsgError)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user