--FIX producto alterno

This commit is contained in:
JPerez
2025-07-16 17:30:28 -07:00
parent 8f79b5ab83
commit a58cc319a7

View File

@@ -2373,6 +2373,15 @@ Partial Class Ventas
ViewState("EsNCDevolucionEfectivo") = value ViewState("EsNCDevolucionEfectivo") = value
End Set End Set
End Property End Property
Private Property UsaProductoAlterno As Boolean
Get
Return CBool(IfNull(ViewState("UsaProductoAlterno"), False, ViewState("UsaProductoAlterno")))
End Get
Set(value As Boolean)
ViewState("UsaProductoAlterno") = value
End Set
End Property
#End Region #End Region
#Region " A C U M U L A D O R E S" #Region " A C U M U L A D O R E S"
@@ -7155,6 +7164,7 @@ Partial Class Ventas
DdlMetodoPago33.Enabled = True DdlMetodoPago33.Enabled = True
End If End If
Me.UsaProductoAlterno = ObjCliente.UsaProductoAlterno
Me.CveMetodoPago33Cliente = ObjCliente.CveMetodoPago Me.CveMetodoPago33Cliente = ObjCliente.CveMetodoPago
Me.CveFormaPago33Cliente = ObjCliente.CveFormaPago Me.CveFormaPago33Cliente = ObjCliente.CveFormaPago
@@ -21279,6 +21289,21 @@ Partial Class Ventas
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
Dim Codigo As String = ""
If UsaProductoAlterno Then
Codigo = DrPS("CodigoAlterno").ToString().Trim()
PS = DrPS("PSAlterno").ToString().Trim()
Else
Codigo = DrPS("Codigo").ToString().Trim()
PS = DrPS("PS").ToString().Trim()
End If
If UsaProductoAlterno AndAlso String.IsNullOrEmpty(Codigo) OrElse String.IsNullOrEmpty(PS) Then
Alert("El producto y/o servicio no tiene especificado el código alterno.", TipoMensaje.ToastAdventencia, timeout:=30)
End If
If DrPS Is Nothing Then If DrPS Is Nothing Then
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
Return False Return False
@@ -21373,9 +21398,9 @@ Partial Class Ventas
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
Row("PU") = PU Row("PU") = PU
Row("Codigo") = DrPS("Codigo") Row("Codigo") = Codigo
Row("NumeroParte") = DrPS("NumeroParte") Row("NumeroParte") = DrPS("NumeroParte")
Row("NoIdentificacion") = DrPS("Codigo") Row("NoIdentificacion") = Codigo
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria") Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana") Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion") Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
@@ -21396,8 +21421,8 @@ Partial Class Ventas
End If End If
Row("PS") = DrPS("PS") Row("PS") = PS
Row("CodigoPS") = DrPS("PSCodigo").ToString() Row("CodigoPS") = If(UsaProductoAlterno, String.Format("{0}-{1}", Codigo, PS), DrPS("PSCodigo")).ToString()
Row("CveTipoPS") = DrPS("CveTipoPS") Row("CveTipoPS") = DrPS("CveTipoPS")
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
Row("AplicaSerie") = DrPS("AplicaSerie") Row("AplicaSerie") = DrPS("AplicaSerie")