Agregando descuentos a la recepcion usados en base al cliente y la marca
This commit is contained in:
@@ -309,6 +309,14 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ViewState("TmpDTAjustes") = value
|
ViewState("TmpDTAjustes") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtPorcentajeMarcas As DataTable
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("DtPorcentajeMarcas")), Nothing, CType(ViewState("DtPorcentajeMarcas"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtPorcentajeMarcas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -2447,6 +2455,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DivAjuste.Visible = True
|
DivAjuste.Visible = True
|
||||||
'Llenar el dropdownlist de almacén
|
'Llenar el dropdownlist de almacén
|
||||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
|
||||||
|
CargarDescuento()
|
||||||
LnkAgregarUsado.Visible = False
|
LnkAgregarUsado.Visible = False
|
||||||
UppAcciones.Update()
|
UppAcciones.Update()
|
||||||
Else
|
Else
|
||||||
@@ -2549,6 +2558,13 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
||||||
|
If MarcaPorcentaje IsNot Nothing Then
|
||||||
|
Dim Descuento As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
||||||
|
Dim MontoDescuento As Decimal = PrecioSugerido * Descuento
|
||||||
|
PrecioSugerido -= MontoDescuento
|
||||||
|
End If
|
||||||
|
|
||||||
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
|
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
|
||||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
@@ -2717,6 +2733,14 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub CargarDescuento()
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetPorcentajeMarcas(DdlClientes.SelectedValue.ToEntero) Then
|
||||||
|
DtPorcentajeMarcas = ObjPS.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user