Mysterious Numbers Appearing by JeffGrant » Thu Sep 05, 2019 12:54 pm
Hi, I am at a real loss here. Spent hours scratching my head.
I have this script that says:
Sub CreateHoldForm()
FormCreate()
FormAdd("Did the customer request this hold?", 1, {"Yes", "No"})
FormShow("Holding Facility ")
If FormResult(1) = 1
cSellPrice3:= Stock->C
Return
Else FormResult(1) = 2
cSellPrice3:= Stock->E
Return
Endif
Return
If FormResult is Yes, then UnitSell on the invoice form is updated and the subtotal is correct. No Drama :-)
If FormResult is No, then UnitSell on the invoice form is updated, but the subtotal shows a negative Stock->E. Therefore subtracting the value Stock->E from the invoice total instead of adding to it.
I have tried using cSellPrice3:= Abs(Stock->E), but the negative still appears.
This is happening on a few routines. So I must clearly be doing something wrong. I don't have any idea where the negative is coming from. The value of Stock->E is being picked up, but why is it negative ?????
I am really really stumped and bemused :-(.
Any guidance would be greatly appreciated.
