From 80ab86114698b1134081e6a1c0ed4720555acf94 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Fri, 31 Jan 2020 13:26:15 -0700 Subject: [PATCH] - ventas relacionadas --- App_Code/ClsVentas.vb | 40 ++++++++++++++++++++++++++++- Contratos/Contrato.aspx | 1 + Inicio.aspx | 2 ++ Inicio.aspx.vb | 10 +++++--- Inventarios/RecepcionUsados.aspx.vb | 2 +- 5 files changed, 50 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 9a0fd3c83..0d8ac4700 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2262,6 +2262,43 @@ Public Class ClsVentas #End Region + + +#Region "Firmas" + + Public Function GetVentasRelacionadas(CveVenta As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasRelacionadasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .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 ventas relacionadas. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function AddVentasRelacionadas(CveVenta As Integer, CveVentaRelacionada As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasRelacionadasAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveVentaRelacionada", SqlDbType.Int).Value = CveVentaRelacionada + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar las ventas relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function +#End Region + #Region " I M P U E S T O S L O C A L E S" Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Double, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4233,7 +4270,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateVentaUsadoRecibido(CveVenta As Integer, CvePS As Integer, Recibido As Boolean) As Boolean + Public Function UpdateVentaUsadoRecibido(CveVenta As Integer, CvePS As Integer, Recibido As Boolean, CveMovimiento As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUsadosRecibidoUpdate", CommandType.StoredProcedure) @@ -4242,6 +4279,7 @@ Public Class ClsVentas .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@Recibido", SqlDbType.Bit).Value = Recibido + .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento End With Try diff --git a/Contratos/Contrato.aspx b/Contratos/Contrato.aspx index dbe3e9d5b..c75733b7f 100644 --- a/Contratos/Contrato.aspx +++ b/Contratos/Contrato.aspx @@ -2247,6 +2247,7 @@ + diff --git a/Inicio.aspx b/Inicio.aspx index f2f896e76..6ccfe6a7b 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -604,6 +604,7 @@