From 90577ead011e731ad6f47bf599457417ab35f3ea Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 Jun 2020 15:10:58 -0700 Subject: [PATCH 1/9] -- fecha parametro reembolso --- Compras/PopUpVerFactura.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 0ae95cb69..1141bf3d9 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3975,7 +3975,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString)) params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString)) params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString)) - params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString)) + params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString)) params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString)) From 28eba630e391756b8d96bd0ed2c22d816331fba6 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 Jun 2020 21:22:22 -0700 Subject: [PATCH 2/9] -globaldtcuentas depositos, cveempresa --- App_Code/ClsGenerales.vb | 11 ++++++----- App_Code/ClsPaginas.vb | 30 +++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index f2506fff7..8d999ba99 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1363,12 +1363,12 @@ Public Class ClsGenerales End Try Return Retorno - End Function + End Function #End Region - ' IDisposable - + ' IDisposable + #Region "G E N E R A L E S - C U E N T A S B A N C A R I A S " - Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean + Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_CuentasDepositosGet") With SqlAdapter.SelectCommand.Parameters @@ -1376,7 +1376,8 @@ Public Class ClsGenerales .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva - .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c856c52ed..479609e6b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -442,6 +442,34 @@ Public Class ClsPaginas Application("GlobalDTProveedoresCuentas") = value End Set End Property + + Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim P As New ClsGenerales + If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados + P.Dispose() + End If + + Dim Str As New StringBuilder + Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) + If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente) + If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ") + + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + + GlobalDTCuentasDepositosClientes = Dv.ToTable + Dv.Dispose() + + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa) + Application(AppNombre) = value + End Set + End Property Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion-{0}", CveEmpresa) @@ -7253,7 +7281,7 @@ Public Class ClsPaginas If UsuarioActual.CveEmpresa.Contiene(13, 83) Then Dim ObjCuentasBancos As New ClsGenerales() - If ObjCuentasBancos.GetCuentasDepositos(ObjOC.CveProveedor) Then + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'") Dim CuentasStr As New StringBuilder("") For Each CuentasBancarios As DataRow In CuentasActivas.Rows From 98e1d6f97fb28d9d3f8e08f25dcaba00b9bb0611 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 18 Jun 2020 21:25:32 -0700 Subject: [PATCH 3/9] -globaldtcuentas despostios --- Bancos/IE.aspx.vb | 2 +- Bancos/MovimientosBancarios.aspx.vb | 4 ++-- Ventas/Clientes.aspx.vb | 18 +++++++----------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index c8a70dd0d..bd81b0c7c 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -4742,7 +4742,7 @@ Partial Class Bancos_IE If CveProveedor > 0 Then Dim ObjCuentasBancos As New ClsGenerales - If ObjCuentasBancos.GetCuentasDepositos() Then + If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados End If ObjCuentasBancos.Dispose() diff --git a/Bancos/MovimientosBancarios.aspx.vb b/Bancos/MovimientosBancarios.aspx.vb index a750829c5..ff1c36c07 100644 --- a/Bancos/MovimientosBancarios.aspx.vb +++ b/Bancos/MovimientosBancarios.aspx.vb @@ -151,7 +151,7 @@ Partial Class Bancos_MovimientosBancarios If GvProveedores.Rows(i).FCCheckBox("CheckAgregar").Checked = True Then DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = {0}", GvProveedores.Rows(i).DataKey("CveProveedor"))) - If ObjCuentasBancos.GetCuentasDepositos(21109) Then + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21109) Then DTProveedorBancos = ObjCuentasBancos.DtResultados RowBanco = DTProveedorBancos.Rows(0) Else @@ -319,7 +319,7 @@ Partial Class Bancos_MovimientosBancarios DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = 21114")) - If ObjCuentasBancos.GetCuentasDepositos(21114) Then + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21114) Then DTProveedorBancos = ObjCuentasBancos.DtResultados RowBanco = DTProveedorBancos.Rows(0) Else diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index a08c794e6..882f36ef2 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -5983,7 +5983,7 @@ Partial Class Clientes #Region "C U E N T A S - B A N C A R I A S" - Private Sub CargaCuentasBancarias() + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6004,9 +6004,8 @@ Partial Class Clientes End If ObjCuentasBancos.Dispose() - CargaPSGridCuentasBancos() - - RecargaGlobalCuentasBancarias() + CargaPSGridCuentasBancos() + CargaMonedas() End Sub Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs) @@ -6208,13 +6207,10 @@ Partial Class Clientes RecargaGlobalCuentasBancarias() End Sub Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1) - If CveCliente > 0 Then - Dim ObjCuentasBancos As New ClsGenerales - - If ObjCuentasBancos.GetCuentasDepositos() Then - GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados - End If - ObjCuentasBancos.Dispose() + If CveCliente > 0 Then + + GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing + End If End Sub From b247d1c95730ecfd417a4e2352ee53c5f607a514 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 19 Jun 2020 09:59:27 -0700 Subject: [PATCH 4/9] =?UTF-8?q?las=20opciones=20de=20paqueter=C3=ADa=20sol?= =?UTF-8?q?o=20aparecen=20si=20la=20empresa=20tiene=20la=20funcionalidad?= =?UTF-8?q?=20de=20280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 1e6d4ba18..0788c929b 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3313,7 +3313,7 @@ - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 53404b0dc..27898d0ca 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -25708,7 +25708,7 @@ Partial Class Ventas End Sub Private Sub MostrarOpcioensPaqueteria() - Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") + Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1" trPaqueteriaOpciones.Visible = mostrarOpcionesPaq trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq End Sub From 001fae6a98dc61a48948f8dff5176f8de9046ab8 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 19 Jun 2020 10:01:10 -0700 Subject: [PATCH 5/9] se agregaron los campos de serie, lote,secciona almacen y fecha caducidad al formulario de producto servicio --- Inventarios/Consignaciones.aspx | 2 +- Inventarios/Consignaciones.aspx.vb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Inventarios/Consignaciones.aspx b/Inventarios/Consignaciones.aspx index 4cefc4db7..90a5bdc4d 100644 --- a/Inventarios/Consignaciones.aspx +++ b/Inventarios/Consignaciones.aspx @@ -431,7 +431,7 @@ - + diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index 9460db896..e414a0e36 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -100,6 +100,7 @@ Partial Class Inventarios_Consignaciones dt.Columns.Add("EstatusExistencia") dt.Columns.Add("CveMovimientoDetalle") + dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32")) dt.Columns.Add("SeccionAlmacen") dt.Columns.Add("Serie", Type.GetType("System.String")) dt.Columns.Add("Lote", Type.GetType("System.String")) @@ -158,6 +159,9 @@ Partial Class Inventarios_Consignaciones Else DdlProducto.Visible = False End If + + DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) + DdlSeccionAlmacen.DataBind() End Sub #End Region @@ -590,6 +594,7 @@ Partial Class Inventarios_Consignaciones Dim PSCodigo = "" Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero + Dim SeccionAlmacen As String = DdlSeccionAlmacen.SelectedItem.Text Dim Serie As String = If(TxtSerie.Text = "", "-1", TxtSerie.Text) Dim Lote As String = If(TxtLote.Text = "", "-1", TxtLote.Text) Dim Caducidad As String = If(TxtCaducidad.Text = "", "-1", TxtCaducidad.Text) @@ -617,6 +622,7 @@ Partial Class Inventarios_Consignaciones registro.Item("PU") = TxtPU.Text.ToDouble registro.Item("PUExtranjero") = TxtPU.Text.ToDouble registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen + registro.Item("SeccionAlmacen") = SeccionAlmacen registro.Item("Serie") = Serie registro.Item("Lote") = Lote registro.Item("FechaCaducidad") = Caducidad @@ -711,7 +717,7 @@ Partial Class Inventarios_Consignaciones 'AGREGAMOS MOVTOS DETALLE If CveMovimiento > 0 Then For Each Dr As DataRow In DtMovimientos.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 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:=TxtSerie.Text, Lote:=TxtLote.Text, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos" Exit For From 2ab8a8bdbba64db1793752b51721c82606bf95fc Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 19 Jun 2020 10:19:40 -0700 Subject: [PATCH 6/9] --variable de actualziar mal colocada --- Contabilidad/CatPeriodosBloqueo.aspx.vb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Contabilidad/CatPeriodosBloqueo.aspx.vb b/Contabilidad/CatPeriodosBloqueo.aspx.vb index 1b3707231..15234e936 100644 --- a/Contabilidad/CatPeriodosBloqueo.aspx.vb +++ b/Contabilidad/CatPeriodosBloqueo.aspx.vb @@ -122,7 +122,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo") UpGral.Update() - + Ejercicio = -1 Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion) Else Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError) @@ -138,15 +138,14 @@ Partial Class Contabilidad_CatPeriodosBloqueo UpGral.Update() Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion) + Ejercicio = -1 + Actualizar = False Else Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine) Alert(String.Format("No se puede bloquear el periodo por:
{0} ", mensajeAlerta), TipoMensaje.MsgError) End If End If - Ejercicio = -1 - Actualizar = False - ObjConta.Dispose() End Sub From 45073c763685012132dc11b7276ad2006216148e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 19 Jun 2020 10:20:04 -0700 Subject: [PATCH 7/9] -- estaba cargando databind, antes de dispose --- Inventarios/RepTraspasoAlmacen.aspx.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Inventarios/RepTraspasoAlmacen.aspx.vb b/Inventarios/RepTraspasoAlmacen.aspx.vb index 1a9d2d59c..56ec9a426 100644 --- a/Inventarios/RepTraspasoAlmacen.aspx.vb +++ b/Inventarios/RepTraspasoAlmacen.aspx.vb @@ -77,11 +77,12 @@ Partial Class RepTraspasoAlmacen If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then GvDatos.DataSource = ObjInventarios.DtResultados DtInventarios = ObjInventarios.DtResultados - GvDatos.DataBind() - UPDatos.Update() + End If ObjInventarios.Dispose() + GvDatos.DataBind() + UPDatos.Update() End Sub #End Region From 48b5a2184e42493d7e434c562ee9715e15483ad2 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 19 Jun 2020 15:27:19 -0700 Subject: [PATCH 8/9] campos del producto servicio actualizado --- App_Code/ClsInventarios.vb | 6 ++- Inventarios/InventarioFisicoDetalle.aspx | 26 ++++++++++- Inventarios/InventarioFisicoDetalle.aspx.vb | 51 +++++++++++++++++++-- 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index f05686a6c..0fe627061 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2421,7 +2421,8 @@ Public Class ClsInventarios Return Retorno End Function - Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer) As Boolean + Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer, + Optional CveSeccionAlmacen As Integer = -1, Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoDetalleAdd") @@ -2433,6 +2434,9 @@ Public Class ClsInventarios .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@Serie", SqlDbType.VarChar).Value = Serie .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen + .Add("@Lote", SqlDbType.NVarChar).Value = Lote + .Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad .Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output End With diff --git a/Inventarios/InventarioFisicoDetalle.aspx b/Inventarios/InventarioFisicoDetalle.aspx index 5499ab0b4..a1c069487 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx +++ b/Inventarios/InventarioFisicoDetalle.aspx @@ -229,7 +229,7 @@
- +
@@ -241,6 +241,24 @@
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
@@ -304,7 +322,10 @@ + + + @@ -325,7 +346,10 @@ + + + diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index 8e5e23634..f55810f53 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -89,6 +89,9 @@ Partial Class Inventarios_InventarioFisicoDetalle Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) Dim ObjInventario As New ClsInventarios + DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) + DdlSeccionAlmacen.DataBind() + DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") Select Case CveEstatus @@ -181,7 +184,11 @@ Partial Class Inventarios_InventarioFisicoDetalle If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then If ObjInventario.DtResultados.Rows.Count > 0 Then - GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable + GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable + + GvIFDUltimoRegistrado.Columns(4).Visible = ObjInventario.DtResultados.Rows(0)("CveSeccionAlmacen").ToString.ToEntero > 0 + GvIFDUltimoRegistrado.Columns(6).Visible = ObjInventario.DtResultados.Rows(0)("Lote").ToString <> "" + GvIFDUltimoRegistrado.Columns(7).Visible = ObjInventario.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate > MinFecha Else GvIFDUltimoRegistrado.DataSource = Nothing End If @@ -223,6 +230,9 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim Inventario As New ClsInventarios If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.DtResultados.Rows.Count > 0 Then + GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen") > 0 + GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> "" + GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable Else GvIFD.DataSource = Nothing @@ -248,8 +258,12 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim CveProducto As Integer = -1 Dim CveUnidadMedida As Integer Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes - Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes + Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes + Dim SeccionAlmacen As String = If(DdlSeccionAlmacen.SelectedValue.ToEntero > -1, DdlSeccionAlmacen.SelectedItem.Text, "") + Dim CveSeccionAlmacen As Integer = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1) Dim SerieLote As String = TxtCodigoSerie.Text.Trim + Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1") + Dim FechaCaducidad As String = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString) Dim CveMetodoInv As Integer = -1 Dim Cantidad = TxtCantidadProducto.Text.ToDouble @@ -283,14 +297,22 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim Consulto As Boolean = False Using Inventarios As New ClsInventarios - If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario) Then + If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario, + CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then If GvIFDUltimoRegistrado.Rows.Count > 0 Then + GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0 + GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1" + GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900" + GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString - GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = TxtCodigoSerie.Text.Trim - GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCantidadProducto.Text.Trim + GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen + GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim + GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote + GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad + GvIFDUltimoRegistrado.Rows(0).Cells(8).Text = TxtCantidadProducto.Text.Trim Else Consulto = True If Inventarios.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario) Then @@ -308,6 +330,9 @@ Partial Class Inventarios_InventarioFisicoDetalle TxtCodigoSerie.Text = "" TxtCodigo.Text = "" TxtCantidadProducto.Text = "1" + DdlSeccionAlmacen.SelectedValue = "-1" + TxtLote.Text = "" + TxtFechaCaducidad.Text = "" RegistraScript("playsonidito('beep-07.wav')") Else TxtCodigoSerie.Text = "" @@ -320,6 +345,9 @@ Partial Class Inventarios_InventarioFisicoDetalle TxtCodigoBarras.Text = "" TxtCodigoSerie.Text = "" TxtCodigo.Text = "" + DdlSeccionAlmacen.SelectedValue = "-1" + TxtLote.Text = "" + TxtFechaCaducidad.Text = "" Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") End If @@ -491,4 +519,17 @@ Partial Class Inventarios_InventarioFisicoDetalle ' UsuarioActual.CveUsuario ' End Sub + + Protected Sub TxtCodigoBarras_Change(sender As Object, e As EventArgs) + Dim Producto As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoBarras.Text}'") + + Dim AplicaSeccion As Boolean = Producto("AplicaSeccion") = "1" + Dim AplicaCaducidad As Boolean = Producto("AplicaCaducidad") = "1" + Dim AplicaLote As Boolean = Producto("AplicaLote") = "1" + + divSeccionAlmacen.Visible = AplicaSeccion + divLote.Visible = AplicaLote + divFechaCaducidad.Visible = AplicaCaducidad + UPAgregarPro.Update() + End Sub End Class From bd1523ab4b73b09aeedb7aa9062417ec8e794af5 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 19 Jun 2020 17:35:42 -0700 Subject: [PATCH 9/9] puntos 1 y 2 --- General/PopUpPaqueteriasGuias.aspx | 9 +++++---- Inventarios/EntregasPorRealizar.aspx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/General/PopUpPaqueteriasGuias.aspx b/General/PopUpPaqueteriasGuias.aspx index 2a677b59d..05fb07060 100644 --- a/General/PopUpPaqueteriasGuias.aspx +++ b/General/PopUpPaqueteriasGuias.aspx @@ -114,10 +114,11 @@ <%-- --%> - - + + - + + <%-- --%> @@ -200,7 +201,7 @@ - + Tipo: diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx index 7c71eac19..c15583329 100644 --- a/Inventarios/EntregasPorRealizar.aspx +++ b/Inventarios/EntregasPorRealizar.aspx @@ -89,7 +89,7 @@ - +