Validaciones correctas como en PV.aspx

This commit is contained in:
2020-04-29 15:36:39 -07:00
parent eaa3cdcefb
commit a719d101cb
2 changed files with 81 additions and 35 deletions

View File

@@ -2563,12 +2563,17 @@ Partial Class Inventarios_RecepcionUsados
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim CveMarca As Integer = -1
Dim CveClasificacion As Integer = -1
Dim PrecioSugerido As Decimal = 0
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal
Dim PS As String = drPS("PS").ToString
CveMarca = drPS("CveMarca").ToString.ToEntero
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
Dim Arr = PS.Split("-"c)
If Arr.Count > 0 Then
If (DdlBCIAjuste.Items.FindByText(Arr(1).ToString) IsNot Nothing) Then
@@ -2578,6 +2583,10 @@ Partial Class Inventarios_RecepcionUsados
End If
End If
HdnPSAjusteMarca.Value = CveMarca.ToString()
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
If MarcaPorcentaje IsNot Nothing Then
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
@@ -2606,6 +2615,7 @@ Partial Class Inventarios_RecepcionUsados
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
End If
UpModalAgregar.Update()
End Sub
Private Sub CargaBCIAjuste()