This commit is contained in:
Javier
2026-01-15 08:47:44 -06:00
parent e3614c5fcf
commit 86c0d1f273
5 changed files with 180 additions and 16 deletions

View File

@@ -606,9 +606,20 @@ Sub b_prodMenos_Click
B4XPage_Appear
End If
Else
If laCant.Text = "" Then laCant.Text = 0
laCant.Text = $"$1.0{laCant.Text-1}"$
If laCant.Text < 0 Then laCant.Text = 0
' If laCant.Text = "" Then laCant.Text = 0
' laCant.Text = NumberFormat2(($"$1.0{laCant.Text-1}"$),0,0,0,False)
If laCant.Text = "" Then laCant.Text = 0
' Realizamos la resta de forma segura
Dim valorActual As Double = laCant.Text
Dim resultado As Double = valorActual - 1
If resultado < 0 Then resultado = 0
' Asignamos al Label/EditText sin comas de miles
laCant.Text = NumberFormat2(resultado, 1, 0, 0, False)
If laCant.Text < 0 Then laCant.Text = 0
Log("NO ES promo")
Starter.skmt.ExecNonQuery($"update HIST_VENTAS set HVD_RECHAZO = 1, HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) + (1*'${minimoadesc}'), BCAJAS = 0, CANTC = 0 WHERE HVD_PROID = '${esteTag.Get(2)}' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '${esteTag.Get(8)}'"$)
Starter.skmt.ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?", Array As Object(esteTag.Get(2)))