mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-20 12:49:25 +00:00
Modificacion a los RMIs
This commit is contained in:
@@ -1095,10 +1095,10 @@ Private Sub lv_prodsPedido_ItemLongClick (Position As Int, Value As Object)
|
||||
End Sub
|
||||
|
||||
Private Sub clv_prods_ll_ItemLongClick (Index As Int, Value As Object)
|
||||
Log("LONGCLIC")
|
||||
kh.centraPanel(p_rmi, Root.Width)
|
||||
p_rmi.BringToFront
|
||||
p_rmi.Visible = True
|
||||
' Log("LONGCLIC")
|
||||
' kh.centraPanel(p_rmi, Root.Width)
|
||||
' p_rmi.BringToFront
|
||||
' p_rmi.Visible = True
|
||||
End Sub
|
||||
|
||||
Sub l_prodX_Click
|
||||
@@ -1158,7 +1158,13 @@ Private Sub l_prodX_LongClick
|
||||
' ToastMessageShow("¡¡En preventa NO hay cambios!!", True)
|
||||
' Return
|
||||
' End If
|
||||
If ventaT > 0 Then
|
||||
Private rmis As Cursor =Starter.skmt.ExecQuery($"select CAT_GP_DEV from ${Subs.traeTablaProds(Starter.tipov)} where CAT_GP_ID = '${pId}'"$)
|
||||
' If rmis.RowCount > 0 Then
|
||||
' rmis.Position = 0
|
||||
' Log(rmis.GetString("CAT_GP_DEV"))
|
||||
' End If
|
||||
rmis.Position = 0
|
||||
If rmis.RowCount > 0 And rmis.GetString("CAT_GP_DEV") = 1 Then
|
||||
t = Starter.skmt.ExecQuery($"select sum(PE_CANT) as totalRMI from pedido where PE_PROID = '${pId}' and PE_CEDIS = 'DUR' and PE_CLIENTE in (Select CUENTA from cuentaa)"$)
|
||||
t.Position = 0
|
||||
Private totalRMI As String = t.GetString("totalRMI")
|
||||
@@ -1169,12 +1175,12 @@ Private Sub l_prodX_LongClick
|
||||
Private pu0() As String = Regex.Split("\$", Sender.as(Label).Text)
|
||||
Private pu As String
|
||||
If pu0.Length > 1 Then pu = pu0(pu0.Length-1) Else pu = 0
|
||||
' Log(ventaT & ", " & totalRMI & ", " & Sender.as(Label).tag & ", " & pu)
|
||||
'Log(ventaT & ", " & totalRMI & ", " & Sender.as(Label).tag & ", " & pu)
|
||||
' l_rmi_usado.Text = $"RMI usado: $1.0{(ventaT - totalRMI)}"$
|
||||
l_montoDisponible.Text = $"Disponible para RMI: $1.0{(ventaT)}"$
|
||||
l_montoDisponible.Text = $"DEVOLUCIONES"$
|
||||
Private esteInv As Int = Subs.traeInventario(pId, Starter.tipov)
|
||||
If esteInv < ventaT Then ventaT = esteInv 'Si el inventario disponble es menor a los productos del pedido, entoncs tomamos ese valor.
|
||||
Private m As Map = CreateMap("disponible":(ventaT - totalRMI), "inv":ventaT, "totalRMI":totalRMI, "pu":pu, "id":pId, "nombre":pNombre)
|
||||
Private m As Map = CreateMap("disponible":clv_prods_ll.GetValue(index).As(Map).Get("almacen"), "inv":clv_prods_ll.GetValue(index).As(Map).Get("almacen"), "totalRMI":totalRMI, "pu":pu, "id":pId, "nombre":pNombre)
|
||||
rmiMap = m
|
||||
Log(rmiMap)
|
||||
' b_rmi_mas.Tag = m
|
||||
@@ -1186,7 +1192,7 @@ Private Sub l_prodX_LongClick
|
||||
p_rmi.BringToFront
|
||||
p_rmi.Visible = True
|
||||
Else
|
||||
ToastMessageShow("No hay venta suficiente para RMIs", True)
|
||||
ToastMessageShow("No hay devoluciones para este producto", True)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user