diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 977f91881..3cea95cdf 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -270,6 +270,15 @@ Partial Class Inventarios_EntradasSalidas
End Set
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
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
PermisoVerImportes()
End If
+ FechaCaducidadAux = MinFecha.ToString
End If
End Sub
@@ -1154,7 +1164,9 @@ Partial Class Inventarios_EntradasSalidas
Exit Sub
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()
txtCantidad.Text = ""
@@ -3916,7 +3928,7 @@ Partial Class Inventarios_EntradasSalidas
End If
dt.TableName = "Datos"
-
+ Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
If Not ErrorArchivo Then
NumRow = 0
Dim RowNoEncontrados As String = ""
@@ -3928,12 +3940,21 @@ Partial Class Inventarios_EntradasSalidas
'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
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 CveUM As Integer = 0
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
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
If StrArray.Length > 0 Then
@@ -3974,10 +3995,16 @@ Partial Class Inventarios_EntradasSalidas
txtPrecio.Text = PrecioUnitario.ToString
ElProductoChange()
-
+ TxtnSerie.Text = Serie
+ TxtnLote.Text = Lote
+ DdlSeccionAlmacen.SelectedValue = CveSeccionAlmacen.ToString
+ FechaCaducidadAux = If(Caducidad = "", MinFecha.ToString, Caducidad)
AgregarPS()
txtPrecio.Text = ""
DdlUnidad.SelectedItem.Text = ""
+ TxtnSerie.Text = ""
+ TxtnLote.Text = ""
+ DdlSeccionAlmacen.SelectedValue = "-1"
NumAgregados = NumAgregados + 1
End If
@@ -4017,7 +4044,8 @@ Partial Class Inventarios_EntradasSalidas
Private Function GetPS(Opt As String, Valor As String) As String
Dim StrReturn As String = String.Empty
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
StrReturn = "True|" & CvePS.ToString
Else
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 33e83e5ed..757984d7c 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -2429,24 +2429,29 @@ Partial Class Inventarios_EntregaAlmacen
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
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 CvePaqueteriaGuia > 0 Then
-
- If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
- If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
- ''manda correo
- MandaCorreoEntrega(CveVentaSurtir)
- Else
- ErrorMovInv = True
- End If
- 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)
+ 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 CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
+ If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
+ ''manda correo
+ MandaCorreoEntrega(CveVentaSurtir)
+ Else
+ ErrorMovInv = True
+ End If
+ 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
+ Else
+ Alert("Hace falta indicar un Sub Proyecto", TipoMensaje.MsgAdvertencia)
+ ErrorMovInv = True
End If
End If
diff --git a/Inventarios/ResguardoMaterial.aspx b/Inventarios/ResguardoMaterial.aspx
index a543fe7b5..c53ce3ca7 100644
--- a/Inventarios/ResguardoMaterial.aspx
+++ b/Inventarios/ResguardoMaterial.aspx
@@ -208,7 +208,8 @@
Clasificación
Producto |
U.M. |
- Serie |
+ Seccion almacen |
+ Serie |
Observaciones |
|
@@ -238,6 +239,11 @@
+
+
+
+
+ |
|
@@ -263,19 +269,22 @@
-
+
-
+
+
-
+ <%--
ss
-
+ --%>
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index debb185dc..c384fe179 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -187,6 +187,8 @@ Partial Class Inventarios_ResguardoMaterial
dt.Columns.Add("Observaciones")
dt.Columns.Add("CvePersonal", Type.GetType("System.Int32"))
dt.Columns.Add("Checado", Type.GetType("System.Boolean"))
+ dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
+ dt.Columns.Add("SeccionAlmacen")
DtMovimientos = dt
@@ -272,14 +274,17 @@ Partial Class Inventarios_ResguardoMaterial
DdlAlmacenDestinoLiberacion.DataBind()
DdlAlmacenDestinoLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
+ DdlSeccionAlmacen.DataBind()
+
CargaPS()
End Sub
Private Sub CargaPS()
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If DdlProducto2.UsaWebService Then
- DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
- DdlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue.ToString)
+ 'DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
+ 'DdlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue.ToString)
End If
If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
@@ -333,6 +338,10 @@ Partial Class Inventarios_ResguardoMaterial
ThSerie.Visible = True
TrSerie.Visible = True
TxtnSerie.Visible = True
+
+ ThSeccion.Visible = True
+ TrSeccion.Visible = True
+
GvM.Columns(4).Visible = True
Else
TxtnSerie.Visible = False
@@ -415,10 +424,12 @@ Partial Class Inventarios_ResguardoMaterial
registro.Item("PS") = DdlProducto2.SelectedText
registro.Item("Estatus") = ""
registro.Item("Serie") = TxtnSerie.Text
+ registro.Item("SeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedItem.Text, "")
+ registro.Item("CveSeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
registro.Item("Observaciones") = TxtObservacionesdetalle.Text
DtMovimientos.Rows.Add(registro)
CargaGvM()
-
+ UPDatos.Update()
txtCantidad.Text = ""
txtCantidad.Focus()
@@ -439,15 +450,37 @@ Partial Class Inventarios_ResguardoMaterial
ThSerie.Visible = False
TrSerie.Visible = False
TxtnSerie.Visible = False
+ GvM.Columns(5).Visible = False
GvM.Columns(4).Visible = False
- For Each Dr As DataRow In DtMovimientos.Rows
- If Dr("Serie").ToString <> "" Then
- ThSerie.Visible = True
- TrSerie.Visible = True
- GvM.Columns(4).Visible = True
- Exit For
- End If
- Next
+
+ Dim Contador As Integer = 0
+ Dim UltimoRenglon As Integer = DtMovimientos.Rows.Count - 1
+ Dim MostrarSerie As Boolean = False
+ Dim MostrarSeccion As Boolean = False
+ While Contador <= UltimoRenglon And (Not MostrarSerie And Not MostrarSeccion)
+ Dim Dr As DataRow = DtMovimientos.Rows(Contador)
+ MostrarSerie = If(Not MostrarSerie, Dr("Serie").ToString <> "", True)
+ MostrarSeccion = If(Not MostrarSerie, Dr("SeccionAlmacen").ToString <> "", True)
+ Contador += 1
+ End While
+
+ ThSerie.Visible = MostrarSerie
+ TrSerie.Visible = MostrarSerie
+ GvM.Columns(5).Visible = MostrarSerie
+
+ GvM.Columns(4).Visible = MostrarSeccion
+
+ 'For Each Dr As DataRow In DtMovimientos.Rows
+ ' If Dr("Serie").ToString <> "" Then
+ ' ThSerie.Visible = True
+ ' TrSerie.Visible = True
+ ' GvM.Columns(5).Visible = True
+ ' Exit For
+ ' End If
+ ' If Dr("SeccionAlmacen").ToString <> "" Then
+ ' GvM.Columns(4).Visible = True
+ ' End If
+ 'Next
GvM.DataSource = DtMovimientos
GvM.DataBind()
@@ -460,6 +493,7 @@ Partial Class Inventarios_ResguardoMaterial
GvM.EditIndex = -1
CargaGvM()
+ UPDatos.Update()
End Sub
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
@@ -740,7 +774,8 @@ Partial Class Inventarios_ResguardoMaterial
Dim Cont As Integer = 0
For Each Dr As DataRow In DtMovimientos.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, -1, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0,
+ -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -759,7 +794,9 @@ Partial Class Inventarios_ResguardoMaterial
Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
+ Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero,
+ Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
TieneError = True
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx
index 376ee22cf..09ea53ad9 100644
--- a/Ventas/Clientes.aspx
+++ b/Ventas/Clientes.aspx
@@ -3776,9 +3776,6 @@
-
-
-
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 4073e4a4e..fa4738baa 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -6922,7 +6922,15 @@ Partial Class Clientes
Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Adjunto As String = GvRow.DataKey("Adjunto")
- linkDescargaPagare = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
+
+ Dim stringDescargaDocumento As String = ""
+ If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
+ stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\Formatos\Pagaré.docx", UsuarioActual.CveEmpresa)
+ Else
+ stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
+ End If
+ linkDescargaPagare = stringDescargaDocumento
+
TxtDireccionAval.Text = ""
TxtAval.Text = ""
RegistraScript("$('#ModalDivPagare').modal('show')")
@@ -7054,14 +7062,13 @@ Partial Class Clientes
LnkDownLoadDoc.Visible = True
End If
- txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
+ txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
- If Adjunto.Trim.Length > 0 Then
+ If Adjunto.Trim.Length > 0 Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
-
- If File.Exists(linkDescargaArchivo) Then
+ If File.Exists(linkDescargaArchivo) Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
LnkDownLoadDoc.Visible = True
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)