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..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" @@ -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/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/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index df81cf748..6a4739cf8 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -462,7 +462,7 @@ Public Class ClsVentas Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean + Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -493,6 +493,7 @@ Public Class ClsVentas .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje + .Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi End With Try 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 diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 8dd046ff6..b4fdc4a72 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1248,10 +1248,10 @@ Partial Class PopUpVerFactura Dim PuestoEnrego As String = ObjInventarios.PuestoEntrego Dim ResponsableCarga As String = ObjInventarios.ResponsableCarga Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio + Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo") If Recibio.Trim = "" Then Dim ObjRH As New ClsRH - If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then Recibio = ObjRH.DtResultados.Rows(0)("NombreCompleto").ToString End If @@ -1276,7 +1276,9 @@ Partial Class PopUpVerFactura Dim CveMovimientoRelacionado As Integer = -1 Dim FolioRelacionado As String = "" - Dim CveConceptoMovtoRelacionado As Integer = -1 + Dim CveConceptoMovtoRelacionado As Integer = -1 + + Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero 'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then @@ -1285,6 +1287,9 @@ Partial Class PopUpVerFactura FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") CveConceptoMovtoRelacionado = 37 ElseIf CveConcepto.Contiene(36, 37) Then + FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") + CveConceptoMovtoRelacionado = 3 + ElseIf CveConcepto.Contiene(2) AndAlso CveTipoAlmacen.Contiene(24, 25) Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") CveConceptoMovtoRelacionado = 3 End If @@ -1316,7 +1321,7 @@ Partial Class PopUpVerFactura Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero 'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION - If CveTipoAlmacenRelacionado = 24 Then + If CveTipoAlmacenRelacionado.Contiene(24, 25) Then If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy() CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal() @@ -1342,7 +1347,28 @@ Partial Class PopUpVerFactura End If End If - Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero + If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then + If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then + Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0") + If DtFaltante.Rows.Count > 0 Then + Dim SbPendientes As New StringBuilder + SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:") + For Each Row As DataRow In DtFaltante.Rows + SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF")) + Next + SbPendientes.Remove(SbPendientes.Length - 1, 1) + + SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total")) + + If Not String.IsNullOrEmpty(Observaciones) Then + Observaciones = SbPendientes.ToString() + ".
" + Observaciones + Else + Observaciones = SbPendientes.ToString() + End If + End If + DtFaltante.Dispose() + End If + End If If CveTipoAlmacen = 20 Then CveConcepto = 24 @@ -1359,7 +1385,7 @@ Partial Class PopUpVerFactura MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio, PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego, - CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado) + CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -1377,7 +1403,7 @@ Partial Class PopUpVerFactura EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String, EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, - Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "") + Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "") Select Case CveConcepto @@ -1527,6 +1553,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), ""))) params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), ""))) 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) @@ -1762,7 +1789,8 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) - params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) + params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) + params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro)) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else @@ -2550,19 +2578,19 @@ Partial Class PopUpVerFactura If (UsuarioActual.CveEmpresa = 72) Then params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) End If - ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios") - 'Else - ' params.Add(New ReportParameter("Folio", Folio)) - ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("Almacen", Almacen)) - ' params.Add(New ReportParameter("SubProyecto", SubProyecto)) - ' params.Add(New ReportParameter("Observaciones", Observaciones)) - ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) - ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) - ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") - 'End If - - + ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios") + 'Else + ' params.Add(New ReportParameter("Folio", Folio)) + ' params.Add(New ReportParameter("Fecha", Fecha)) + ' params.Add(New ReportParameter("Almacen", Almacen)) + ' params.Add(New ReportParameter("SubProyecto", SubProyecto)) + ' params.Add(New ReportParameter("Observaciones", Observaciones)) + ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") + 'End If + + Case 18 'D E V O L U C I O N D E L C L I E N T E Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -2739,36 +2767,36 @@ Partial Class PopUpVerFactura ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") ElseIf CveConcepto = 22 Then ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - End If - - 'Case 22 'ENTRADA POR PRESTAMO - ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - ' Dim params As New List(Of ReportParameter) - - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - ' If Imagen.Exists Then - ' params.Add(New ReportParameter("LogoPath", logouri)) - ' Else - ' params.Add(New ReportParameter("LogoPath", "")) - ' End If - - ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) - ' params.Add(New ReportParameter("Almacen", Almacen)) - ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - ' params.Add(New ReportParameter("Folio", Folio)) - ' params.Add(New ReportParameter("Descuentos", "")) - ' params.Add(New ReportParameter("IVA", "")) - ' params.Add(New ReportParameter("Total", "")) - ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) - ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) - ' params.Add(New ReportParameter("FacturadoA", NombreCliente)) - ' If (UsuarioActual.CveEmpresa = 72) Then - ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) - ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - + End If + + 'Case 22 'ENTRADA POR PRESTAMO + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim params As New List(Of ReportParameter) + + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + ' If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' params.Add(New ReportParameter("LogoPath", "")) + ' End If + + ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) + ' params.Add(New ReportParameter("Almacen", Almacen)) + ' params.Add(New ReportParameter("Fecha", Fecha)) + ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + ' params.Add(New ReportParameter("Folio", Folio)) + ' params.Add(New ReportParameter("Descuentos", "")) + ' params.Add(New ReportParameter("IVA", "")) + ' params.Add(New ReportParameter("Total", "")) + ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + ' params.Add(New ReportParameter("FacturadoA", NombreCliente)) + ' If (UsuarioActual.CveEmpresa = 72) Then + ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") + Case 24 'SALIDA POR RESGUARDO If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3251,11 +3279,11 @@ Partial Class PopUpVerFactura If CveConcepto = 2 Then ElseIf CveConcepto = 3 Then End If - End Sub - - + End Sub + + #End Region - + #Region "OP = 'OC' - IMPRIME PDF OC" Private Sub ImprimePDFOC(CveOrdenCompra As Integer) Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1")) @@ -3848,7 +3876,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 +3889,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) diff --git a/Empresas/140/Formatos/Salidas.rdlc b/Empresas/140/Formatos/Salidas.rdlc index 595add00f..54efe605a 100644 --- a/Empresas/140/Formatos/Salidas.rdlc +++ b/Empresas/140/Formatos/Salidas.rdlc @@ -1187,6 +1187,77 @@ 2pt + + true + true + + + + + Usuario Registró: + + + + + + + Textbox5 + 1.62251cm + 0.79137cm + 0.6cm + 2.90426cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioRegistro.Value + + + + + + + Textbox33 + 1.62251cm + 3.69563cm + 0.6cm + 5.93606cm + 7 + + + 2pt + 2pt + 2pt + 2pt + +