From 40a0c008fb11241dd3d4d57294476ebf5dd5cc92 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 26 Aug 2021 07:48:57 -0700 Subject: [PATCH] =?UTF-8?q?--parametros=20descuento=20al=20editar=20remisi?= =?UTF-8?q?=C3=B3n=20--=20parametro=20%=20impuesto=20local.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsVentas.vb | 11 ++++++----- Ventas/CatImpuestosLocales.aspx.vb | 6 +++--- Ventas/PV.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 5 +---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c0ca015c2..c8a9c42e7 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1273,7 +1273,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, IEPS As Decimal, PorcentajeIEPS As Decimal, IVA As Decimal, PorcentajeIVA As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean + Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, IEPS As Decimal, PorcentajeIEPS As Decimal, IVA As Decimal, PorcentajeIVA As Decimal, Descuento As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleRemisionUpdate") @@ -1286,6 +1286,7 @@ Public Class ClsVentas .Add("@PorcentajeIEPS", SqlDbType.Decimal).Value = PorcentajeIEPS .Add("@IVA", SqlDbType.Decimal).Value = IVA .Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA + .Add("@Descuento", SqlDbType.Decimal).Value = Descuento .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico End With @@ -2561,13 +2562,13 @@ Public Class ClsVentas #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 + Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Decimal, 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 DataAdapter("PA_Vta_ImpuestosLocalesAdd") With SqlAdapter.SelectCommand.Parameters .Add("@ImpuestoLocal", SqlDbType.VarChar).Value = ImpuestoLocal - .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje + .Add("@Porcentaje", SqlDbType.Decimal).Value = Porcentaje .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto .Add("@Estatus", SqlDbType.Bit).Value = Estatus @@ -2603,14 +2604,14 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Double, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer) As Boolean + Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ImpuestosLocalesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveImpuestoLocal", SqlDbType.Int).Value = CveImpuestoLocal .Add("@ImpuestoLocal", SqlDbType.VarChar).Value = ImpuestoLocal - .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje + .Add("@Porcentaje", SqlDbType.Decimal).Value = Porcentaje .Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@Estatus", SqlDbType.Bit).Value = Estatus diff --git a/Ventas/CatImpuestosLocales.aspx.vb b/Ventas/CatImpuestosLocales.aspx.vb index 88fafced9..b03199507 100644 --- a/Ventas/CatImpuestosLocales.aspx.vb +++ b/Ventas/CatImpuestosLocales.aspx.vb @@ -85,7 +85,7 @@ Partial Class Ventas_CatImpuestosLocales Dim TieneError = False Dim CveImpuestoLocal As Integer = GvImpuestos.Rows(e.RowIndex).DataKey("CveImpuestoLocal").ToEntero Dim Impuesto As String = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtImpuestoLocal").Text.Trim - Dim Porcentaje As Double = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtVentaPorcentaje").Text.ToDouble + Dim Porcentaje As Decimal = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtVentaPorcentaje").Text.ToDecimal Dim Orden = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtOrdenImpuesto").Text.ToEntero Dim TipoImpuesto = GvImpuestos.Rows(e.RowIndex).FCDropDownList("DdlTipoImpuestoEdit").SelectedValue.ToEntero Dim IdCtaContable = GvImpuestos.Rows(e.RowIndex).FCDropDownList("DdlCuentasContables").SelectedValue.ToEntero @@ -199,7 +199,7 @@ Partial Class Ventas_CatImpuestosLocales If CveImpuestoLocal = -1 Then If ChkEstatus.Checked Then Estatus = 1 - If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDouble, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, DdlCuentasContables.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDecimal, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, DdlCuentasContables.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then CargaDatos() End If TxtImpuesto.Text = "" @@ -210,7 +210,7 @@ Partial Class Ventas_CatImpuestosLocales If CveImpuestoLocal <> -1 Then Dim TieneError = False Dim Impuesto As String = TxtImpuesto.Text.Trim - Dim Porcentaje As Double = TxtPorcentaje.Text.ToDouble + Dim Porcentaje As Decimal = TxtPorcentaje.Text.ToDecimal Dim Orden = TxtOrden.Text.ToEntero Dim TipoImpuesto = DdlTipoImpuesto.SelectedValue.ToEntero Dim IdCtaContable = DdlCuentasContables.SelectedValue.ToEntero diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 39a95f414..2d19b88f7 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1922,7 +1922,7 @@ Partial Class PV For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero() If CveVentaDetalle > 0 Then - If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString.ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then + If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString.ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Descuento").ToString().ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then OcurrioError = True Exit For End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e0de4aa79..f64750c45 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13212,9 +13212,6 @@ Partial Class Ventas End If Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero() - If UsuarioActual.CveUsuario.Contiene(100, 1719) Then - ModalidadRefacturacion = 2 - End If 'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then @@ -20144,7 +20141,7 @@ Partial Class Ventas For Each Row As DataRow In TmpDT.Rows Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero() If CveVentaDetalle > 0 Then - If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString().ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then + If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString().ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Descuento").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then OcurrioError = True Exit For End If