-- como para activar el ps en ecomerce

This commit is contained in:
2023-10-18 22:53:30 -07:00
parent 5d806e8728
commit 3cc819da72
3 changed files with 15 additions and 9 deletions

View File

@@ -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

View File

@@ -536,10 +536,11 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Ecommerce</span>
<span class="caption-subject bold uppercase">Ecommerce &nbsp;&nbsp;<asp:CheckBox ID="ChkActivoEcommerce" runat="server" CssClass="chksino" data-size="small" Text=" " /></span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
@@ -554,7 +555,7 @@
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" MaxLength="250" >
<asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="2" TextMode="MultiLine" >
</asp:TextBox>
<label for="<%= TxtEcommerceNota.ClientID.ToString()%>">Notas Adicionales:</label>
<i></i>
@@ -562,7 +563,7 @@
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommerceEtiquetas" CssClass="form-control input-sm" runat="server" MaxLength="200" >
<asp:TextBox ID="TxtEcommerceEtiquetas" CssClass="form-control input-sm" runat="server" MaxLength="200" >
</asp:TextBox>
<label for="<%= TxtEcommerceEtiquetas.ClientID.ToString()%>">Etiquetas:</label>
<i></i>

View File

@@ -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,