From 62d1c1fbde3adcae671f2fa7c2a322a47d02fd79 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 23 Oct 2020 14:40:00 -0700 Subject: [PATCH 01/11] -- que seleccione el vendedor, si ya lo tiene asignado --- Inventarios/RepApartados.aspx.vb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Inventarios/RepApartados.aspx.vb b/Inventarios/RepApartados.aspx.vb index d2d984085..c6e777e22 100644 --- a/Inventarios/RepApartados.aspx.vb +++ b/Inventarios/RepApartados.aspx.vb @@ -35,7 +35,7 @@ Partial Class Inventarios_RepApartados DdlSubProyectos.DataBind() DdlSubProyectos.Items.Insert(0, New ListItem(" Todas ", "-1")) - If UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then DdlClientesWS.setEsWebService(True) Else DdlClientesWS.setEsWebService(False) @@ -44,15 +44,9 @@ Partial Class Inventarios_RepApartados DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If - If UsuarioActual.CveEmpresa = 119 Then - DdlClienteTraspasar.setEsWebService(True) - Else - DdlClienteTraspasar.setEsWebService(False) - DdlClienteTraspasar.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) - DdlClienteTraspasar.DataBind() - DdlClienteTraspasar.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - End If - + + DdlClienteTraspasar.setEsWebService(True) + Dim DTVendedores As New DataTable DTVendedores = GlobalDTVendedores(UsuarioActual.CveEmpresa, True) DTVendedores.Merge(GlobalDTVendedores(UsuarioActual.CveEmpresa, False)) @@ -139,7 +133,13 @@ Partial Class Inventarios_RepApartados End If DdlClienteTraspasar.SelectedValue = "-1" - DdlClienteTraspasar.SelectedText = "Seleccione" + DdlClienteTraspasar.SelectedText = "Seleccione" + + + If UsuarioActual.CveVendedor > 0 AndAlso CveVendedor.ToEntero <= 0 Then + CveVendedor = UsuarioActual.CveVendedor.ToString + End If + DdlVendedor.SelectedValueExist(CveVendedor) DdlSubProyectos.SelectedValueExist(CveSucursal) From d7a7004d2cc6fdf05e2a28bfb1af958bf5b97726 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 23 Oct 2020 14:40:26 -0700 Subject: [PATCH 02/11] - comentar un segundo mensaje de error --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 284b693e4..74ddb3d8c 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -3258,7 +3258,7 @@ Partial Class Bancos_ProveedoresAbonar ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) + 'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" End If From 61da15c530375686fda3091f41fdbe87b9ff05b8 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 26 Oct 2020 13:54:23 -0700 Subject: [PATCH 03/11] haciendo pull --- App_Code/ClsInventarios.vb | 52 ++++++++++++++ App_Code/ClsPaginas.vb | 1 + Inventarios/Kardex.aspx | 40 +++++++++++ Inventarios/Kardex.aspx.vb | 21 ++++++ Inventarios/RepProductosPorCaducar.aspx | 83 ++++++++++++++++++++++ Inventarios/RepProductosPorCaducar.aspx.cs | 63 ++++++++++++++++ Inventarios/TraspasoAlmacen.aspx.vb | 1 + 7 files changed, 261 insertions(+) create mode 100644 Inventarios/RepProductosPorCaducar.aspx create mode 100644 Inventarios/RepProductosPorCaducar.aspx.cs diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 699faf04e..24520e128 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1588,6 +1588,58 @@ Public Class ClsInventarios End Function + Public Function GetExistenciasCaducidad(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1") As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Inv_ExistenciaCaducidadGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + + Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + Catch ex As Exception + OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + + End Function + + Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Inv_ProductosCaducidadGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el listo de caducidad de productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + + End Function + #End Region #Region " INVENTARIOS - REPORTES " diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8fe10c062..b48153412 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3783,6 +3783,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1) PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1) PaginaDict.Add("/Inventarios/PaqueteDetalles.aspx".ToUpper(), -1) + PaginaDict.Add("/Inventarios/RepProductosPorCaducar.aspx".ToUpper(), 693) diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index d3d08e46b..b8f4344fc 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -127,6 +127,9 @@
  • Series Disponibles
  • +
  • + Caducidad de producto +
  •  
  • @@ -538,6 +541,43 @@ + + + diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index f2f961c3b..039649bac 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -205,7 +205,9 @@ Partial Class Inventarios_Kardex If AplicaCaducidad Then GvM.Columns(10).Visible = True Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" + Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True" LnkSeries.Visible = AuxAplicaSerie + LnkCaducidad.Visible = AuxAplicaCad 'CARGA INDICADORES If UsuarioActual.TienePermisoProceso(201) Then DivIndicadores.Visible = True @@ -324,6 +326,19 @@ Partial Class Inventarios_Kardex ObjInventarios.Dispose() GvSeries.DataBind() End Sub + + Private Sub CargarCaducidadProducto() + Dim almacenes As String = ddlAlmacen.GetSelectedValues() + If almacenes = "" Then + almacenes = "-1" + End If + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then + GvProductoCaducidad.DataSource = ObjInventarios.DtResultados + End If + ObjInventarios.Dispose() + GvProductoCaducidad.DataBind() + End Sub #End Region #Region " IMPRIMIR " @@ -440,6 +455,12 @@ Partial Class Inventarios_Kardex UpGridSeries.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalSerie")) End Sub + + Protected Sub LnkCaducidad_OnClick(sender As Object, e As EventArgs) Handles LnkCaducidad.Click + CargarCaducidadProducto() + UpProductoCaducidad.Update() + RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalCaducidad")) + End Sub #End Region diff --git a/Inventarios/RepProductosPorCaducar.aspx b/Inventarios/RepProductosPorCaducar.aspx new file mode 100644 index 000000000..eb7484e0d --- /dev/null +++ b/Inventarios/RepProductosPorCaducar.aspx @@ -0,0 +1,83 @@ +<%@ Page Title="Compras - Reporte de Productos por Caducar" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepProductosPorCaducar.aspx.cs" Inherits="Inventarios_RepProductosPorCaducar" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + Reporte de Productos por Caducar + + + + + + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    + + diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs new file mode 100644 index 000000000..a25961a9d --- /dev/null +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; + +public partial class Inventarios_RepProductosPorCaducar : ClsPaginas +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //CargaFiltros(); + } + } + + private void CargaFiltros() + { + CargarProveedores(); + CargarSucursales(); + CargarClasificaciones(); + + } + + private void CargarProveedores() + { + DdlProveedor.setEsWebService(true); + DdlProveedor.Attributes.Add("data-metodo", "getproveedores"); + DdlProveedor.SelectedValue = "-1"; + DdlProveedor.SelectedText = "Todos"; + } + + private void CargarSucursales() + { + ClsSubProyectos ObjSubProyectos = new ClsSubProyectos(); + if (ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa)) + { + DdlSucursal.DataSource = ObjSubProyectos.DtResultados; + } + ObjSubProyectos.Dispose(); + DdlSucursal.DataBind(); + } + + private void CargarClasificaciones() + { + ClsClasificaciones ObjClasificacion = new ClsClasificaciones(); + if (ObjClasificacion.GetClasificaciones(UsuarioActual.CveEmpresa)) + { + DdlClasificacion.DataSource = ObjClasificacion.DtResultados; + } + ObjClasificacion.Dispose(); + DdlClasificacion.DataBind(); + DdlClasificacion.Items.Insert(0,new ListItem("Todos","-1")); + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 84853dda9..11c12d868 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1310,6 +1310,7 @@ Partial Class Inventarios_TraspasoAlmacen GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> "" GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> "" + GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad") GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 From 4edcc49351f0147ff1fff8e745f4604aa26f656e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 26 Oct 2020 21:56:23 -0700 Subject: [PATCH 04/11] nuevo reporte de caducidad --- App_Code/ClsProductosServicios.vb | 70 +++++++++--------- Inventarios/EntregaAlmacen.aspx.vb | 3 + Inventarios/RecepcionAlmacen.aspx.vb | 1 + Inventarios/RepProductosPorCaducar.aspx | 65 +++++++++++------ Inventarios/RepProductosPorCaducar.aspx.cs | 82 +++++++++++++++++++++- 5 files changed, 162 insertions(+), 59 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 159317562..f809ab9d8 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -56,8 +56,8 @@ Public Class ClsProductosServicios Public Property CveMetodoInventario As Integer Public Property CveTipoPS As Integer Public Property Estado2 As Integer - Public Property CveMarca As Integer - + Public Property CveMarca As Integer + Public Property IEPSPorcentaje As Double Public Property AplicaIEPS As Boolean @@ -202,11 +202,11 @@ Public Class ClsProductosServicios CveConexion = 0 End If - End Sub + End Sub #End Region - Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", - Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, - Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, + Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", + Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, + Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False @@ -1685,10 +1685,10 @@ Public Class ClsProductosServicios End Try Return Retorno - End Function + End Function #End Region - - + + #Region "Precios Lista" Public Function GetPSPreciosLista(CveEmpresa As Integer, CvePrecioLista As Integer, Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1, Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1) As Boolean @@ -1846,7 +1846,7 @@ Public Class ClsProductosServicios End Try Return Retorno - End Function + End Function Public Function GetPSExistenciasWS(CvePS As Integer, CvePrecioLista As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional FechaMovto As String = "-1", Optional Serie As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, @@ -1855,38 +1855,38 @@ Public Class ClsProductosServicios Dim Retorno As Boolean = False DataAdapter("PA_Vta_ProductosExistenciasWSGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista - .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen - .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen - .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing) - .Add("@Serie", SqlDbType.VarChar).Value = Serie - .Add("@Lote", SqlDbType.VarChar).Value = Lote - .Add("@Batch", SqlDbType.VarChar).Value = Batch - .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor - .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - .Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado - .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir - .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados - .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes - End With + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista + .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen + .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen + .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing) + .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@Lote", SqlDbType.VarChar).Value = Lote + .Add("@Batch", SqlDbType.VarChar).Value = Batch + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado + .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir + .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados + .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes + End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener las productos y sus existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - + End Try + Return Retorno - End Function - + End Function + #End Region - + #Region "Porcentaje Productos" Public Function GetPorcentajeProductos(CveCliente As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index ae40df21d..3f8e54856 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1026,6 +1026,8 @@ Partial Class Inventarios_EntregaAlmacen AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False) End If + GvSerie.Columns(1).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad") + If AplicaCaducidad Then GvSerie.Columns(1).Visible = True TdCaducidad1.Visible = True @@ -1229,6 +1231,7 @@ Partial Class Inventarios_EntregaAlmacen Private Sub CargaLote(Optional CerrarCompletado As Boolean = False) RegistraScript("$('#DivLote').modal('show')") + GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad") GvLote.DataSource = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC") GvLote.DataBind() diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 44ca59990..06d4fbfe7 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1824,6 +1824,7 @@ Partial Class Inventarios_RecepcionAlmacen End Sub Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False) RegistraScript("$('#DivLote').modal();", "ModalLote") + GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad") GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC") GvLote.DataBind() diff --git a/Inventarios/RepProductosPorCaducar.aspx b/Inventarios/RepProductosPorCaducar.aspx index eb7484e0d..14b1fe232 100644 --- a/Inventarios/RepProductosPorCaducar.aspx +++ b/Inventarios/RepProductosPorCaducar.aspx @@ -11,6 +11,20 @@ Reporte de Productos por Caducar + + +
  • + PDF +
  • +
  • + Excel +
  • +
    + + + + +
    @@ -23,42 +37,49 @@
    -
    +
    + +
    +
    -
    -
    +
    + +
    +
    +
    - - - - - -
    + +
    -
    -
    +
    + +
    +
    +
    - - - - - -
    + +
    -
    +
    + +
    +
    -
    - +
    + +
    +
    +
    @@ -70,10 +91,10 @@ - + - + diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index a25961a9d..aed1cd91b 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -6,25 +6,62 @@ using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; using System.Data; +using Microsoft.Reporting.WebForms; +using System.Text; public partial class Inventarios_RepProductosPorCaducar : ClsPaginas { + private DataTable DTDatos + { + get + { + return (DataTable)ViewState["DTDatos"]; + } + + set + { + ViewState["DTDatos"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { - //CargaFiltros(); + CargaFiltros(); + CargarDatos(); } } + private void CargarDatos() + { + ClsInventarios ObjInventarios = new ClsInventarios(); + if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), + DdlClasificacion.SelectedValue.ToEntero())) + { + GvDatos.DataSource = ObjInventarios.DtResultados; + DTDatos = ObjInventarios.DtResultados; + } + ObjInventarios.Dispose(); + GvDatos.DataBind(); + } + private void CargaFiltros() { + CargarFechaText(); CargarProveedores(); CargarSucursales(); CargarClasificaciones(); } + private void CargarFechaText() + { + DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1); + TxtFechaInicio.Text = date.ToString("dd/MM/yyyy"); + TxtFechaFin.Text = date.AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy"); + } + private void CargarProveedores() { DdlProveedor.setEsWebService(true); @@ -42,6 +79,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas } ObjSubProyectos.Dispose(); DdlSucursal.DataBind(); + DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1")); } private void CargarClasificaciones() @@ -53,11 +91,51 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas } ObjClasificacion.Dispose(); DdlClasificacion.DataBind(); - DdlClasificacion.Items.Insert(0,new ListItem("Todos","-1")); + DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1")); } protected void BtnConsultar_Click(object sender, EventArgs e) { + CargarDatos(); + UpDatos.Update(); + } + protected void LnkImprimirPDF_Click(object sender, EventArgs e) + { + ImprimirReporte("PDF"); + } + + protected void LnkImprimirExcel_Click(object sender, EventArgs e) + { + ImprimirReporte("Excel"); + } + + private void ImprimirReporte(string formato) + { + StringBuilder Filtros = new StringBuilder(); + Filtros.AppendFormat("Proveedor: {0}    ", DdlProveedor.SelectedText); + Filtros.AppendFormat("Fecha Inicio: {0}    ", TxtFechaInicio.Text); + Filtros.AppendFormat("Fecha Fin: {0}    ", TxtFechaFin.Text); + Filtros.AppendFormat("Sucursal: {0}    ", DdlSucursal.SelectedItem.Text); + Filtros.AppendFormat("Clasificación: {0}    ", DdlClasificacion.SelectedItem.Text); + List @params = new List(); + + @params.Add(new ReportParameter("Filtros", Filtros.ToString())); + @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); + @params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); + + var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa); + System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); + if (Imagen.Exists) + { + @params.Add(new ReportParameter("LogoPath", logouri)); + } + else + { + @params.Add(new ReportParameter("LogoPath", "")); + } + @params.Add(new ReportParameter("FechaCaducidadHeader", (UsuarioActual.Empresa.Funcionalidad(147) == "Fecha Elaboración" ? "Fecha Elaboración" : "Fecha Caducidad"))); + + ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato); } } \ No newline at end of file From 17af0de0b416c7eff0981f960db0c86b9344f3eb Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 27 Oct 2020 12:44:41 -0700 Subject: [PATCH 05/11] aplicando retro sobre sobre el tiempo caducidad --- App_Code/ClsPaginas.vb | 16 ++++++++-------- Inventarios/Kardex.aspx | 4 ++-- Ventas/ProductosServicios.aspx | 2 +- Ventas/ProductosServicios.aspx.vb | 4 ++++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b48153412..82bb1cb39 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -38,14 +38,14 @@ Public Class ClsPaginas - Public ReadOnly Property EsProduccion As Boolean - Get - If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then - Return False - Else - Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") - End If - End Get + Public ReadOnly Property EsProduccion As Boolean + Get + If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then + Return False + Else + Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") + End If + End Get End Property #Region "Propiedades" diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index b8f4344fc..08a6d22d6 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -560,8 +560,8 @@ DataKeyNames="Almacen,Cantidad,FechaCaducidad"> - - + + diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 9ce597ef4..91b9fb262 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -876,7 +876,7 @@
    - +
    diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 09381fd6c..7f2285a55 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -876,6 +876,10 @@ Partial Class ProductosyServicios ChkLote.Checked = ObjProductosServicios.AplicaLote ChkCaducidad.Checked = ObjProductosServicios.AplicaCaducidad ChkSeccion.Checked = ObjProductosServicios.AplicaSeccion + If ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad") IsNot Nothing Then + TxtTiempoCaducidad.Text = ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad").ToString() + DivTiempoCaducidad.Visible = ChkCaducidad.Checked + End If If ObjProductosServicios.AplicaSeccion Then CargaGvSeccionAlmacen() From 1f2682a218057591e18d45db26158e9de70348e3 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 19:30:06 -0700 Subject: [PATCH 06/11] filtro por entradas y salidas --- Inventarios/KardexAlmacenHorizontal.aspx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 3ccaa1725..5a7f0a38e 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -200,7 +200,8 @@
    - + +
    From 5b761fad6c401d647d1201f110d964529b0716c8 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 19:30:48 -0700 Subject: [PATCH 07/11] --acomodo de calendario en caducidad --- Inventarios/RecepcionAlmacen.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index 44dbb2eb4..592ecfc4d 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -489,7 +489,7 @@ - +
    From a0019c52fcd737f2f00add6c2fd897b667744abe Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 19:31:42 -0700 Subject: [PATCH 08/11] -- en cheque que se visualice la poliza contable en E141, y que tome las cuentas de conta sig --- Compras/PopUpVerFactura.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 8dd046ff6..20159e06d 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3848,7 +3848,7 @@ Partial Class PopUpVerFactura Dr("Abono") = 0 DtMovimientosPoliza.Rows.Add(Dr) End If - ElseIf UsuarioActual.CveEmpresa = 119 Then + ElseIf UsuarioActual.CveEmpresa.Contiene(119, 141) Then Dim PreP As New ClsContabilidad If PreP.GetPrePolizasDetalle(-1, CveIE) Then DtMovimientosPoliza = New DataTable @@ -3861,8 +3861,8 @@ Partial Class PopUpVerFactura For Each drt As DataRow In PreP.DtResultados.Rows Dim Dr = DtMovimientosPoliza.NewRow - Dr("CODIGO") = drt("ContpaqCodigo") - Dr("Cuenta") = drt("ContpaqCuenta") + Dr("CODIGO") = drt("CuentaCodigo") + Dr("Cuenta") = drt("CuentaNombre") Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0") Dr("Abono") = If(drt("TipoMovto").ToString = "True", drt("ImporteMN"), "0") DtMovimientosPoliza.Rows.Add(Dr) From a42bac72d58b679836306beec54bbfbcc026439c Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 19:44:26 -0700 Subject: [PATCH 09/11] - columna de folio relacionado --- Inventarios/Kardex.aspx | 5 +++++ Inventarios/Kardex.aspx.vb | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index d3d08e46b..bb4b9f445 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -378,6 +378,11 @@ + + + + + diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index f2f961c3b..efe5b9a3c 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -66,9 +66,9 @@ Partial Class Inventarios_Kardex Private Sub CargaPermisos() If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) - GvM.Columns(13).Visible = TienePermisoImportes ' costo - GvM.Columns(14).Visible = TienePermisoImportes ' importe - GvM.Columns(16).Visible = TienePermisoImportes ' valor + GvM.Columns(14).Visible = TienePermisoImportes ' costo + GvM.Columns(15).Visible = TienePermisoImportes ' importe + GvM.Columns(17).Visible = TienePermisoImportes ' valor End Sub Private Function isWithFamily() As Boolean @@ -87,7 +87,7 @@ Partial Class Inventarios_Kardex CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1) CBLTiposAlmacen.DataBind() For Each item As ListItem In CBLTiposAlmacen.Items - If item.Text = "Entrega Adelantado" Then + If item.Text.Contiene("Entrega Adelantado", "Transitorio") Then item.Selected = False Else item.Selected = True @@ -199,10 +199,10 @@ Partial Class Inventarios_Kardex AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> "" AplicaLote = DtTemp.MAX("Lote") <> "" AplicaCaducidad = DtTemp.MAX("FechaCaducidad") <> "" - If AplicaSeccion Then GvM.Columns(7).Visible = True - If AplicaSerie Then GvM.Columns(8).Visible = True - If AplicaLote Then GvM.Columns(9).Visible = True - If AplicaCaducidad Then GvM.Columns(10).Visible = True + If AplicaSeccion Then GvM.Columns(8).Visible = True + If AplicaSerie Then GvM.Columns(9).Visible = True + If AplicaLote Then GvM.Columns(10).Visible = True + If AplicaCaducidad Then GvM.Columns(11).Visible = True Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" LnkSeries.Visible = AuxAplicaSerie From 444e5efb8ad5ab8e3ebf41e23e2e55fc5c0d838f Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 23:52:14 -0700 Subject: [PATCH 10/11] -- columna de docto relacionado --- Inventarios/Kardex.aspx | 4 +-- Inventarios/Kardex.aspx.vb | 69 ++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index bb4b9f445..90756c028 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -378,9 +378,9 @@ - + - + diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index efe5b9a3c..15991bad4 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -199,51 +199,54 @@ Partial Class Inventarios_Kardex AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> "" AplicaLote = DtTemp.MAX("Lote") <> "" AplicaCaducidad = DtTemp.MAX("FechaCaducidad") <> "" + + GvM.Columns(6).Visible = DtTemp.MAX("FolioRelacionEntrada") <> "" + If AplicaSeccion Then GvM.Columns(8).Visible = True - If AplicaSerie Then GvM.Columns(9).Visible = True - If AplicaLote Then GvM.Columns(10).Visible = True - If AplicaCaducidad Then GvM.Columns(11).Visible = True + If AplicaSerie Then GvM.Columns(9).Visible = True + If AplicaLote Then GvM.Columns(10).Visible = True + If AplicaCaducidad Then GvM.Columns(11).Visible = True - Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" - LnkSeries.Visible = AuxAplicaSerie - 'CARGA INDICADORES - If UsuarioActual.TienePermisoProceso(201) Then - DivIndicadores.Visible = True + Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" + LnkSeries.Visible = AuxAplicaSerie + 'CARGA INDICADORES + If UsuarioActual.TienePermisoProceso(201) Then + DivIndicadores.Visible = True - Dim Dr = DtTemp.FiltroUltimo("") - Dim TC = If(GlobalTipoCambio(Now) > 0, GlobalTipoCambio(Now), 1) + Dim Dr = DtTemp.FiltroUltimo("") + Dim TC = If(GlobalTipoCambio(Now) > 0, GlobalTipoCambio(Now), 1) - LtIndicador_Existencia.Text = Dr("Existencias").ToString.FormatoNumero() + LtIndicador_Existencia.Text = Dr("Existencias").ToString.FormatoNumero() - LtIndicador_ValorPesos.Text = Dr("ValorInventario").ToString.FormatoNumero() - LtIndicador_ValorDolares.Text = (Dr("ValorInventario").ToString.ToDouble / TC).FormatoNumero() + LtIndicador_ValorPesos.Text = Dr("ValorInventario").ToString.FormatoNumero() + LtIndicador_ValorDolares.Text = (Dr("ValorInventario").ToString.ToDouble / TC).FormatoNumero() - Dim CostoPromedio = If(Dr("Existencias").ToString.ToDouble > 0, Dr("ValorInventario").ToString.ToDouble / Dr("Existencias").ToString.ToDouble, 0) - LtIndicador_CPPesos.Text = CostoPromedio.FormatoNumero() - LtIndicador_CPDolares.Text = (CostoPromedio / TC).FormatoNumero() + Dim CostoPromedio = If(Dr("Existencias").ToString.ToDouble > 0, Dr("ValorInventario").ToString.ToDouble / Dr("Existencias").ToString.ToDouble, 0) + LtIndicador_CPPesos.Text = CostoPromedio.FormatoNumero() + LtIndicador_CPDolares.Text = (CostoPromedio / TC).FormatoNumero() - LtIndicador_UCPesos.Text = Dr("UltimoCosto").ToString.FormatoNumero() - LtIndicador_UCDolares.Text = Dr("UltimoCostoUSD").ToString.FormatoNumero() + LtIndicador_UCPesos.Text = Dr("UltimoCosto").ToString.FormatoNumero() + LtIndicador_UCDolares.Text = Dr("UltimoCostoUSD").ToString.FormatoNumero() - LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del dia $ {TC.FormatoNumero(4)} " + LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del dia $ {TC.FormatoNumero(4)} " - If TxtSerie.Text <> "" Then - LtIndicador_MensajeSerie.Text = $"* Existencia y costos calculada por numero de serie: {TxtSerie.Text} " + If TxtSerie.Text <> "" Then + LtIndicador_MensajeSerie.Text = $"* Existencia y costos calculada por numero de serie: {TxtSerie.Text} " + Else + LtIndicador_MensajeSerie.Text = "" + End If + + UpIndicadores.Update() + + GvM.Attributes.Add("data-heighterror", "430") Else - LtIndicador_MensajeSerie.Text = "" + GvM.Attributes.Add("data-heighterror", "270") End If - - UpIndicadores.Update() - - GvM.Attributes.Add("data-heighterror", "430") - Else - GvM.Attributes.Add("data-heighterror", "270") + GvM.DataSource = DtTemp + GvM.DataBind() + UpAcciones.Update() End If - GvM.DataSource = DtTemp - GvM.DataBind() - UpAcciones.Update() - End If - Else + Else Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia) End If End Sub From 9f9c018797c7f5f187fb50469a81e731ba1d6cb3 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 27 Oct 2020 23:52:59 -0700 Subject: [PATCH 11/11] -- cambios en la afectacion contable --- Inventarios/TraspasoAlmacen.aspx.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 84853dda9..b84c1475c 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1010,7 +1010,7 @@ Partial Class Inventarios_TraspasoAlmacen ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If End If @@ -1725,7 +1725,7 @@ Partial Class Inventarios_TraspasoAlmacen Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then ErrorMovInv = True TextoError = "Ocurrió un erro al cancelar el traspaso" @@ -1817,7 +1817,7 @@ Partial Class Inventarios_TraspasoAlmacen Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate Dim CveAlmacenEntrada As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero - Dim CveAlmacenSalida As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero + Dim CveAlmacenSalida As Integer = DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero Dim TipoAlmacenDestino As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenEntrada}").ToEntero() @@ -1887,11 +1887,11 @@ Partial Class Inventarios_TraspasoAlmacen Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If End If @@ -2012,8 +2012,8 @@ Partial Class Inventarios_TraspasoAlmacen TxtObservacionesRecepcion.Text = "" Dim Mensaje As StringBuilder = New StringBuilder - Mensaje.AppendFormat("Se realizo correctamente la recepción.
    Folio de Entrada: {0}", Folio, CveMovimientoSalida) - Mensaje.AppendFormat("
    Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) 'onclick='ImprimirTraslado()' + Mensaje.AppendFormat("Se realizo correctamente la recepción.
    Folio de Entrada: {0}", Folio, CveMovimientoEntrada) + Mensaje.AppendFormat("
    Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()' If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("


    Folio Virtual {2}
    Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'