diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 1a081cf99..a4eb2d97a 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -2021,7 +2021,7 @@ Public Class ClsClientes Return Retorno End Function - Public Function UpdateEstatusPedido(CveVenta As Integer, CveEstatusFactura As Integer, Dias As Integer, CveUsuario As Integer) As Boolean + Public Function UpdateEstatusPedido(CveVenta As Integer, CveEstatusFactura As Integer, Dias As Integer, CveUsuario As Integer, Optional CveRemision As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ClienteVentasPedidoEstatusUpdate") With SqlAdapter.SelectCommand.Parameters @@ -2029,6 +2029,7 @@ Public Class ClsClientes .Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura .Add("@Dias", SqlDbType.Int).Value = Dias .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveRemision", SqlDbType.Int).Value = CveRemision End With Try SqlAdapter.Fill(Data) @@ -2037,28 +2038,28 @@ Public Class ClsClientes OnError("Ocurrió un error al actualizar el pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - - 'Public Function UpdateFechaPedido(CveVenta As Integer, DiasCredito As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_Vta_ClienteVentasPedidoFechaUpdate") - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta - ' .Add("@DiasCredito", SqlDbType.Int).Value = DiasCredito - ' End With - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al actualizar la fecha del pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - ' Return Retorno - 'End Function - - - + End Function + + 'Public Function UpdateFechaPedido(CveVenta As Integer, DiasCredito As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Vta_ClienteVentasPedidoFechaUpdate") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + ' .Add("@DiasCredito", SqlDbType.Int).Value = DiasCredito + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al actualizar la fecha del pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' Return Retorno + 'End Function + + + #End Region - + #Region "A P L I C A C I O N" Public Function AddClienteApp(Cliente As MCliente) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index a3e36c05a..64f7f20dc 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -68,6 +68,11 @@ Public Class ClsContabilidad Public Property ValorPolizaDescuadre As Integer Public Property MensajePolizaDescuadre As String Public Property ValorDiferencia As String + + Public Property SeUnifico As Boolean = False + Public Property YaEstabaUnifida As Boolean = False + Public Property EstaContabilizada As Boolean = False + #End Region Public Function IniciaTransacSQL() As SqlTransaction @@ -756,16 +761,30 @@ Public Class ClsContabilidad Dim Retorno As Boolean = False + SeUnifico = False + YaEstabaUnifida = False + EstaContabilizada = False + DataAdapter("PA_Conta_PrePolizaUnificacion") With SqlAdapter.SelectCommand.Parameters .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza .Add("@CvePrePolizaVieja", SqlDbType.Int).Value = CvePrePolizaVieja + .Add("@SeUnifico", SqlDbType.Bit).Direction = ParameterDirection.Output + .Add("@YaEstabaUnifida", SqlDbType.Bit).Direction = ParameterDirection.Output + .Add("@EstaContabilizada", SqlDbType.Bit).Direction = ParameterDirection.Output End With Try + SqlAdapter.Fill(Data) + + SeUnifico = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@SeUnifico").Value.ToString) + YaEstabaUnifida = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@YaEstabaUnifida").Value.ToString) + EstaContabilizada = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@EstaContabilizada").Value.ToString) + Retorno = True + Catch ex1 As SqlException OnError("Ocurrió un error al actualizar la Poliza Original", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Catch ex As Exception @@ -773,6 +792,7 @@ Public Class ClsContabilidad End Try Return Retorno + End Function Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 28ddfee29..699faf04e 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1308,7 +1308,11 @@ Public Class ClsInventarios If Ex1.Message.Contains("50019") Then Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Else - Me.OnError("Ocurrió un error al guardar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + If Ex1.Message.Contains("50021") Then + Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + Me.OnError("Ocurrió un error al guardar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If End If Catch ex As Exception @@ -1480,7 +1484,9 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional Orden As Integer = -1, Optional Marcas As String = "-1") As Boolean + Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, + IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, + Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") @@ -1500,6 +1506,7 @@ Public Class ClsInventarios .Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@Marcas", SqlDbType.VarChar).Value = Marcas + .Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado End With Try diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index d64de3153..9d400ef08 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1355,13 +1355,15 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function RemovePSAlias(CvePS As Integer, PSAlias As String) As Boolean + Public Function RemovePSAlias(CvePS As Integer, PSAlias As String, CveUsuarioModifico As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAliasRemove") SqlAdapter.SelectCommand.Parameters.Add("@CvePS", SqlDbType.Int).Value = CvePS SqlAdapter.SelectCommand.Parameters.Add("@PSAlias", SqlDbType.VarChar).Value = PSAlias + SqlAdapter.SelectCommand.Parameters.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + Try SqlAdapter.Fill(Data) Retorno = True diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index ff7e79fa5..474a9d366 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1285,6 +1285,8 @@ Public Class ClsVentas With SqlAdapter.SelectCommand.Parameters .Add("@EstatusDevolucion", SqlDbType.TinyInt).Value = EstatusDevolucion .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + '.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + '.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 1a6d06c81..2f8750b96 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -3332,7 +3332,7 @@ Namespace Modelos 'SI ES FACTURACION DE UNA REMISION CANCELAMOS, TRASPASAMOS SALDOS Y AGREGAMOS EVENTO A LA BITACORA 'NO DEBE ENTRAR SI SE ESTA CANCELANDO UNA FACTURA - If ValorMultiplicador <> -1 AndAlso (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then + If ValorMultiplicador <> -1 AndAlso ((DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0) Then If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then ErrorPrepoliza = True @@ -7503,20 +7503,48 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value End Set End Property - Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable + Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjUsr As New ClsInventarios + If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados + ObjUsr.Dispose() End If + Dim Str As New StringBuilder + Str.Append("1=1 AND ") + If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTAlmacen = Dv.ToTable + Dv.Dispose() End Get Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAlmacen") = value + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value End Set + 'Get + + ' Dim Str As New StringBuilder + ' Str.Append("1=1 AND ") + ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacen = Dv.ToTable + ' Dv.Dispose() + + 'End Get + 'Set(value As DataTable) + ' Application("GlobalDTAlmacen") = value + 'End Set End Property Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable Get diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 7b397f53f..eb6cd7d95 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -509,7 +509,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'End If 'ObjClientes.Dispose() - Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros(String.Format("NombreComercial like '%{0}%' OR Nombre like '%{0}%' ", Name)) End If @@ -557,7 +557,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ' DtRetorno = ObjProveedores.DtResultados 'End If 'ObjProveedores.Dispose() - Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name)) End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7da8d0e62..15d95c293 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5385,6 +5385,7 @@ Partial Class Compras_Compras 'P R E P O L I Z A S Dim CveConceptoAfectacion As Integer = 5 'Proveedores + Dim CveConceptoOriginal As Integer If CveTipoConcepto = 2 Then CveConceptoAfectacion = 305 'cuando es acreedor If CveMoneda <> 1 Then Select Case CveConceptoAfectacion @@ -5782,7 +5783,7 @@ Partial Class Compras_Compras Dim CveSubProyectoInsertar As Integer = -1 - Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero + Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) Dim importeMovimiento As Decimal = 0 Dim IdCtaContable As Integer = 0 @@ -5792,7 +5793,7 @@ Partial Class Compras_Compras Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation Dim PorcentajeImpuesto As Decimal = 0 - + CveConceptoOriginal = ConceptoContable Select Case ConceptoContable @@ -7186,7 +7187,7 @@ Partial Class Compras_Compras importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMN = importeMovimiento If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then ErrorPrepoliza = True Exit For End If @@ -7632,8 +7633,8 @@ Partial Class Compras_Compras If ErrorPrepoliza Then Exit For End If - ', 305, 306, 311 - If importeMovimiento <> 0 Or (ConceptoContable.Contiene(5) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac", "Ant")) Or (ConceptoContable.Contiene(18) AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not GuardoConcepto18) Then + '5, 305, 306, 311 + If importeMovimiento <> 0 Or (CveConceptoOriginal = 5 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac", "Ant")) Or (ConceptoContable.Contiene(18) AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not GuardoConcepto18) Then 'Conta ContPAQ If IdCtaContable = 0 Then CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) @@ -9341,7 +9342,11 @@ Partial Class Compras_Compras ErrorMovtosCxP = 1 Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError) End If - CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva + + If ObjConta.SeUnifico Then + CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva + End If + End If 'Simplificacion de PrePolizas @@ -15490,11 +15495,11 @@ Partial Class Compras_Compras 'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub 'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub - If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then - If Not VerificarProductosCompraConOC() Then - Exit Sub - End If - End If + 'If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then + ' If Not VerificarProductosCompraConOC() Then + ' Exit Sub + ' End If + 'End If Dim SubTotalGV = 0.0D Dim Amortizacion As Decimal = TmpDT.SUMD("Total") diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index aadc8ad8e..8dd046ff6 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1281,10 +1281,10 @@ Partial Class PopUpVerFactura 'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero() - If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then + If CveConcepto.Contiene(2, 3, 26, 27) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") CveConceptoMovtoRelacionado = 37 - ElseIf CveConcepto = 37 Then + ElseIf CveConcepto.Contiene(36, 37) Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") CveConceptoMovtoRelacionado = 3 End If @@ -1413,7 +1413,7 @@ Partial Class PopUpVerFactura ImprimirPDF("Empresas/Grales/Formatos/Inicial.rdlc", DtMovimientos, params, String.Format("Inventario Inicial - {0}", Folio), RDSName:="DsInventarios") End If - Case 2, 32, 33 ' E N T R A D A S + Case 2, 32, 33, 36 ' E N T R A D A S Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -1501,7 +1501,39 @@ Partial Class PopUpVerFactura End If ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios") + ElseIf UsuarioActual.CveEmpresa = 140 Then + 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 + Dim concepto As String = "" + If CveConcepto.Contiene(2, 32, 33) Then + concepto = "ENTRADA DE ALMACÉN" + ElseIf CveConcepto.Contiene(36) Then + concepto = "ENTRADA VIRTUAL" + End If + + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("Concepto", concepto)) + 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("FacturadoA", NombreCliente)) + params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, ""))) + params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), ""))) + 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("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) + params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) + + ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else + params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen))) params.Add(New ReportParameter("Fecha", If(CveCompra > 0, dr("Fecha").ToString.ToDate.ToShortDateString, ""))) params.Add(New ReportParameter("Folio", Folio.ToString)) @@ -2255,7 +2287,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) + params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) End If diff --git a/Empresas/140/Formatos/Salidas.rdlc b/Empresas/140/Formatos/Salidas.rdlc index ff50a2ecb..595add00f 100644 --- a/Empresas/140/Formatos/Salidas.rdlc +++ b/Empresas/140/Formatos/Salidas.rdlc @@ -434,6 +434,9 @@ + + + @@ -465,8 +468,8 @@ Textbox2 - 1.39318cm - 0.25984cm + 1.99643cm + 0.22809cm 0.6cm 11.36782cm 1 @@ -480,8 +483,40 @@ 2pt + + true + true + + + + + = "Total: " & FormatNumber(Sum(Fields!Cantidad.Value, "DsInventarios"),0) + + + + + + 2pt + 2pt + 2pt + 2pt + + - 0.82291in + 1.05208in