Cambios ProductosServicios

This commit is contained in:
Luis Carlos Quijada
2025-06-24 16:37:00 -06:00
parent 641b038873
commit 99274e5346
3 changed files with 26 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ Public Class ClsProductosServicios
Public Property NumeroParte As String
Public Property CodigoBarras As String
Public Property PS As String
Public Property PSExtranjero As String
Public Property Precio As Double
Public Property PrecioMinimo As Double
Public Property Oferta As Double
@@ -203,7 +204,7 @@ Public Class ClsProductosServicios
End Sub
#End Region
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional NumeroParte As String = "-1",
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional PSExtranjero As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -216,6 +217,7 @@ Public Class ClsProductosServicios
.Add("@NumeroParte", SqlDbType.VarChar).Value = NumeroParte
.Add("@CodigoBarras", SqlDbType.VarChar).Value = CodigoBarras
.Add("@PS", SqlDbType.VarChar).Value = PS
.Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@EsPaquete", SqlDbType.SmallInt).Value = EsPaquete
.Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta
@@ -245,6 +247,7 @@ Public Class ClsProductosServicios
Me.NumeroParte = Data.Rows(0)("NumeroParte").ToString
Me.CodigoBarras = Data.Rows(0)("CodigoBarras").ToString
Me.PS = Data.Rows(0)("PS").ToString
Me.PSExtranjero = Data.Rows(0)("PSExtranjero").ToString
Precio = Data.Rows(0)("Precio").ToString.ToDouble
PrecioMinimo = Data.Rows(0)("PrecioMinimo").ToString.ToDouble
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
@@ -402,7 +405,7 @@ Public Class ClsProductosServicios
Return Retorno
End Function
Public Function AddPS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte 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, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer,
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, Optional PSExtranjero As String = "-1",
Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, 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 CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
@@ -438,6 +441,7 @@ Public Class ClsProductosServicios
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@EsPaquete", SqlDbType.Bit).Value = EsPaquete
.Add("@PSExtranjero", SqlDbType.VarChar).Value = If(PSExtranjero.Length > 845, PSExtranjero.Substring(0, 845), PSExtranjero)
.Add("@CveMetodoInventario", SqlDbType.Int).Value = CveMetodoInventario
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
@@ -687,7 +691,7 @@ Public Class ClsProductosServicios
End Function
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte 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, CveEmpresa 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 PSExtranjero As String = "-1", 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,
@@ -734,6 +738,7 @@ Public Class ClsProductosServicios
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero
'Nuevo R: 26/09/2017'
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable

View File

@@ -285,6 +285,17 @@
<label class="truncate" style="padding-left: 1px;" for="<%= TxtPorMinimoUtilidad.ClientID.ToString()%>">% Minimo de utilidad:</label>
<i></i>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPSExtranjero" TextMode="MultiLine" Rows="2" CssClass="form-control" runat="server" MaxLength="846"></asp:TextBox>
<label class="truncate" for="<%= TxtPSExtranjero.ClientID.ToString()%>">Producto Extranjero:</label>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class=" col-md-12">
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">

View File

@@ -983,6 +983,7 @@ Partial Class ProductosyServicios
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
TxtPS.Text = ObjProductosServicios.PS
TxtPSExtranjero.Text = ObjProductosServicios.PSExtranjero
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
TxtPrecioMinimo.Text = ObjProductosServicios.PrecioMinimo.ToString("F4")
@@ -1577,10 +1578,12 @@ Partial Class ProductosyServicios
End If
If CvePS = -1 Then
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "")
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper
If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS,
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero,
ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero,
FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
@@ -1650,11 +1653,12 @@ Partial Class ProductosyServicios
'End If
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "")
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper
If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.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, UsuarioActual.CveEmpresa,
ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PSSExtranjero,
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,