13/01/24 - Correcciones en editText de promos y mostrar inv de abordo en productos.

- Se corrigio un error que se daba cuando se editaba la cantidad de prductos varaiables en promociones y quedaba en blanco.
- Se agegó el inventario de abordo a la descripcion del producto cuando se estan seleciconando productos para el Abordo.
This commit is contained in:
2024-01-13 23:07:39 -06:00
parent fb268b062c
commit 1451af86ec
9 changed files with 98 additions and 61 deletions

View File

@@ -262,7 +262,7 @@ Sub b_prodMas_Click
' Log($"precio|stock:${laCant.tag}"$)
' Log($"Indice: ${index}, cant:${laCant.Text+1}, precioU: ${laCant.tag}"$)
Dim esteTag As List = Regex.Split("\|", laCant.Tag)
' Log(esteTag)
' Log(">>>>> " & esteTag)
If laCant.Text + 1 <= esteTag.get(1) Then
laCant.Text = $"$1.0{laCant.Text+1}"$
cuentaProds
@@ -282,8 +282,12 @@ Sub b_prodMas_Click
End Sub
Private Sub et_pCant_TextChanged (Old As String, New As String)
' If New = "" Then
' et_pCant.Text = 0
' l_pCant.Text = 0
' End If
' LogColor($"txt changed - ${Starter.cp_running}"$,Colors.Magenta)
cuentaProds
If New <> "" Then cuentaProds
' Starter.cp_running = False
End Sub
@@ -311,10 +315,11 @@ Sub cuentaProds
Private p0 As B4XView = clv_prodsVariabes.GetPanel(i)
Private p As B4XView = p0.GetView(0)
Private cant1 As B4XView = p.GetView(2).GetView(4)
' If cant1.Text = "" Then cant1.Text = 0
If cant1.Text = "" Then cant1.Text = 0
totalProds = totalProds + cant1.Text
Private esteTag As List = Regex.Split("\|", cant1.Tag)
If cant1.Text > esteTag.Get(1) Then cant1.Text = esteTag.Get(1)
' Log("****** " & esteTag.Get(1) & "|" & cant1.Text)
If cant1.Text > 0 Then
' Log(esteTag.Get(2) & "|" & cant1.Text)
totalCompra = totalCompra + (esteTag.get(0) * cant1.text)
@@ -342,6 +347,16 @@ Sub cuentaProds
If thisLog Then LogColor($"${prodsIds2}${CRLF}${prodsCants2}${CRLF}${prodsPrecios2}"$, Colors.Magenta)
' LogColor($"Total Prods: ${totalProds}, Total: $$1.2{totalCompra}"$, Colors.Blue)
' Log($"Termina cuentaProds - ${Starter.cp_running}"$)
'Si la cantidad es mayor que los productos requeridos, entonces ponemos todos en CERO.
If totalProds > prodsVarReq + tpf Then
For i = 0 To clv_prodsVariabes.GetSize - 1
Private p0 As B4XView = clv_prodsVariabes.GetPanel(i)
Private p As B4XView = p0.GetView(0)
Private cant1 As B4XView = p.GetView(2).GetView(4)
cant1.Text = 0
Next
End If
End Sub
Private Sub et_pCant_FocusChanged (HasFocus As Boolean)