From 3cc819da7205659abff81a20e8bf343ff6343a78 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 18 Oct 2023 22:53:30 -0700 Subject: [PATCH] -- como para activar el ps en ecomerce --- App_Code/ClsProductosServicios.vb | 9 ++++++--- Ventas/ProductosServicios.aspx | 7 ++++--- Ventas/ProductosServicios.aspx.vb | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index bdd504361..70185ce97 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -412,7 +412,7 @@ Public Class ClsProductosServicios Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, - Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "") As Integer + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -513,6 +513,7 @@ Public Class ClsProductosServicios .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas + .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce End With @@ -638,7 +639,7 @@ Public Class ClsProductosServicios Return Retorno End Function Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, @@ -648,7 +649,7 @@ Public Class ClsProductosServicios Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, - Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "-") As Boolean + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -682,6 +683,7 @@ Public Class ClsProductosServicios .Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa 'Nuevo R: 26/09/2017' .Add("@Inventariable", SqlDbType.Bit).Value = Inventariable @@ -748,6 +750,7 @@ Public Class ClsProductosServicios .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas + .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce End With diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 091b4269b..d21635f06 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -536,10 +536,11 @@
- Ecommerce + Ecommerce   
+
@@ -554,7 +555,7 @@
- + @@ -562,7 +563,7 @@
- + diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 2ac66a252..13a1ba368 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -973,6 +973,8 @@ Partial Class ProductosyServicios DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString) DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString) TxtNombreComercial.Text = ObjProductosServicios.DtResultados.Rows(0)("NombreComercial").ToString + + ChkActivoEcommerce.Checked = ObjProductosServicios.DtResultados.Rows(0)("ActivoEcommerce").ToString = "True" TxtEcommerceNota.Text = ObjProductosServicios.DtResultados.Rows(0)("NotasAdicionales").ToString TxtEcommerceEtiquetas.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceEtiquetas").ToString @@ -1518,7 +1520,7 @@ Partial Class ProductosyServicios If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, + ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, @@ -1533,7 +1535,7 @@ Partial Class ProductosyServicios CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, - NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim) Then + NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True @@ -3131,7 +3133,7 @@ Partial Class ProductosyServicios Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero() If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, - EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, + EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,