diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 34e86a88a..cf04e3794 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2258,6 +2258,25 @@ Public Class ClsInventarios Return Retorno End Function + Public Function GetExistenciasPSVenta(CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_ExistenciasVentaGET") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las existencias de los almacenes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False, Optional CveAlmacen As Integer = -1) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 837f097a5..60ced51bc 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5247,7 +5247,6 @@ Public Class ClsVentas .Add("@Importe", SqlDbType.Money).Value = Importe .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - End With Try @@ -5999,7 +5998,7 @@ Public Class ClsVentas #End Region - Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0, Optional CveVenta As Integer = -1) As Boolean + Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0, Optional CveVenta As Integer = -1, Optional CveIE As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_AutorizacionLimitesAdd") With SqlAdapter.SelectCommand.Parameters @@ -6015,6 +6014,7 @@ Public Class ClsVentas .Add("@PorcentajeDescuento", SqlDbType.Decimal).Value = PorcentajeDescuento .Add("@Motivo", SqlDbType.VarChar).Value = Motivo .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveIE", SqlDbType.Int).Value = CveIE End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index dc127b3c4..196c9b331 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1345,6 +1345,8 @@ Namespace Modelos ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero + + ObjFactura.CveMoneda = CveMoneda 'DETALLES ObjFactura.DtDetalle = CreaDTFactura() diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index cbce02343..9e51948cd 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1617,18 +1617,19 @@ Partial Class PopUpVerFactura DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveVenta={CveVenta}"), DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveIE={CveIE}")) - Folio = If(CveVenta > 0, - DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}"), - DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}")) + If CveIE > 0 Then CveVenta = DatosSaldoAntNCDev.FiltroPrimeroValor("CveVenta", $"CveIE={CveIE}").ToEntero + Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}") + Else + Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}") End If End If - If TipoDocto.Contiene("Egs", "Dev", "Ant") Then + If TipoDocto.Contiene("Egs", "Dev", "Ant", "NC") Then Dim AplicaAmortizacion As Boolean = False If TipoDocto.Contiene("Ant") Then AplicaAmortizacion = True @@ -1648,31 +1649,9 @@ Partial Class PopUpVerFactura Dim DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("") If DbRowVenta IsNot Nothing Then - 'Dim VentaActual As New Venta(UsuarioActual) - 'VentaActual.CveVenta = CveVentaAmortizada - 'VentaActual.TipoDocto = DbRowVenta("TipoDocto").ToString - 'VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate - 'VentaActual.CveCliente = DbRowVenta("CveCliente").ToString.ToEntero - 'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero - 'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString - 'VentaActual.ClienteNombre = DbRowVenta("ClienteNombre").ToString - 'VentaActual.TC = DbRowVenta("TipoCambio").ToString.ToDecimal - 'VentaActual.Total = DbRowVenta("Total").ToString.ToDecimal - 'VentaActual.IVA = DbRowVenta("IVA").ToString.ToDecimal - 'VentaActual.IEPS = DbRowVenta("IEPS").ToString.ToDecimal - 'VentaActual.RetIVA = DbRowVenta("RetIVA").ToString.ToDecimal - 'VentaActual.RetISR = DbRowVenta("RetISR").ToString.ToDecimal - - 'VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal - 'VentaActual.UsuarioActual = UsuarioActual - 'VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero - - 'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero - 'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString - params.Add(New ReportParameter("SerieFolio", DbRowVenta("SerieFolio").ToString)) params.Add(New ReportParameter("Moneda", DbRowVenta("Moneda").ToString)) - params.Add(New ReportParameter("Cliente", DbRowVenta("Cliente").ToString)) + params.Add(New ReportParameter("Cliente", DbRowVenta("ClienteNombre").ToString)) End If @@ -1685,26 +1664,23 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - 'params.Add(New ReportParameter("FechaInicio", FechaI)) - 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) - 'params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("SaldoAntNCDev", SaldoAntNCDev.ToString)) params.Add(New ReportParameter("Monto", Monto.ToString)) params.Add(New ReportParameter("Saldo", Saldo.ToString)) + params.Add(New ReportParameter("Folio", Folio)) Dim NombreArchivo As String = "SaldoAntNCDev.rdlc" Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)) If Archivo.Exists Then - ImprimirPDF(Archivo.FullName, DTNCVinculadas, params, "OrdenesdeCompraporvincular ", Opcion) + ImprimirPDF(Archivo.FullName, DTNCVinculadas, params, "Aplicaciones", "PDF") Else - ImprimirPDF($"Empresas/Grales/Formatos/{NombreArchivo}", DTNCVinculadas, params, "OrdenesdeCompraporvincular", Opcion) + ImprimirPDF($"Empresas/Grales/Formatos/{NombreArchivo}", DTNCVinculadas, params, "Aplicaciones", "PDF") End If End If diff --git a/Empresas/189/Formatos/SaldoAntNCDev.rdlc b/Empresas/189/Formatos/SaldoAntNCDev.rdlc new file mode 100644 index 000000000..11b0f7edc --- /dev/null +++ b/Empresas/189/Formatos/SaldoAntNCDev.rdlc @@ -0,0 +1,1156 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + f55ecc33-47ff-4fc5-a233-35ea9bb1f578 + + + + + + DataSet + /* Local Query */ + + + + SerieFolio + System.String + + + FechaAplicado + System.String + + + Importe + System.Double + + + Moneda + System.String + + + + DataSet + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DataSet.xsd + DataTable1 + + + + + + + + + + + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox28 + + + + + + #e36c09 + 1pt + + + + + + + + + + + 3.42604cm + + + 3.37313cm + + + 3.00271cm + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!FechaAplicado.Value + + + + + + + FechaAplicado + + + White + 0.5pt + + + + + + + + true + true + + + + + =Fields!Moneda.Value + + + + + + + Moneda + + + White + 0.5pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + White + 0.5pt + + + + + + + + + + + + + 0.44125cm + + + true + true + + + + + Fecha + + + + + + + Textbox19 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Moneda + + + + + + + Textbox21 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Importe + + + + + + + Textbox23 + + + #e36c09 + 1pt + + + + + + + + + + + + + 2.39924cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + + SerieFolio + + + White + 0.5pt + + + + + + + + true + true + DataSet1 + 0.12375cm + 0.06614cm + 0.8825cm + 12.20112cm + + + + + + 0.39616in + + + + + + + Textbox1 + 3.8144cm + 0.6cm + 13.0693cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Aplicaciones de facturas + + + + + + + Textbox2 + 0.63528cm + 3.77912cm + 0.52945cm + 13.0693cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 3.00743cm + 2 + + + + + + true + true + + + + + Cliente: + + + + + + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + true + true + + + + + Facura: + + + + + + + + + true + true + + + + + =Parameters!SerieFolio.Value + + + + + + true + true + + + + + Monto: + + + + + + + + + true + true + + + + + =Parameters!Monto.Value + + + + + + true + true + + + + + Saldo: + + + + + + + + + true + true + + + + + =Parameters!Saldo.Value + + + + + + true + true + + + + + Aplicaciones de facturas: + + + + + + + + + true + true + + + + + Folio: + + + + + + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + true + true + + + + + Fecha: + + + + + + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + + + true + true + + + + + Moneda: + + + + + + + + + true + true + + + + + =Parameters!Moneda.Value + + + + + + + + + + + 0.48291cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 18.6093cm + 0.4cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.1cm + 0.1cm + 1cm + 0.5cm + 0.13cm + + + + + + + Textbox28 + + + + + + LightGrey + 1pt + + + + + + + + + + + 3.42604cm + + + 3.37313cm + + + 3.00271cm + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!FechaAplicado.Value + + + + + + + FechaAplicado + + + White + 0.5pt + + + + + + + + true + true + + + + + =Fields!Moneda.Value + + + + + + + Moneda + + + White + 0.5pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + White + 0.5pt + + + + + + + + + + + + + 0.44125cm + + + true + true + + + + + Fecha + + + + + + + Textbox19 + + + LightGrey + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Moneda + + + + + + + Textbox21 + + + LightGrey + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Importe + + + + + + + Textbox23 + + + LightGrey + 1pt + + + + + + + + + + + + + 2.39924cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + + SerieFolio + + + White + 0.5pt + + + + + + + + true + true + DataSet1 + 0.12375cm + 0.06614cm + 0.8825cm + 12.20112cm + + + + + + 0.39616in + + + + + + + Textbox1 + 3.8144cm + 0.6cm + 13.0693cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Aplicaciones de facturas + + + + + + + Textbox2 + 0.63528cm + 3.77912cm + 0.52945cm + 13.0693cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 3.00743cm + 2 + + + + + + true + true + + + + + Cliente: + + + + + + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + true + true + + + + + Facura: + + + + + + + + + true + true + + + + + =Parameters!SerieFolio.Value + + + + + + true + true + + + + + Monto: + + + + + + + + + true + true + + + + + =Parameters!Monto.Value + + + + + + true + true + + + + + Saldo: + + + + + + + + + true + true + + + + + =Parameters!Saldo.Value + + + + + + true + true + + + + + Aplicaciones de facturas: + + + + + + + + + true + true + + + + + Folio: + + + + + + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + true + true + + + + + Fecha: + + + + + + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + + + true + true + + + + + Moneda: + + + + + + + + + true + true + + + + + =Parameters!Moneda.Value + + + + + + + + + + + 0.48291cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 18.6093cm + 0.4cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.1cm + 0.1cm + 1cm + 0.5cm + 0.13cm +