emaduddeen
Programmer
Hi Everyone,
Can you tell me why the EIP Field Manager TakeAccepted embed fires 2 times and is there a way to make it fire only one time with the correct value in the column?
When I run the program I change the value of sell price from 450 to 400. The first time the code fires the message displays 450 even though I changed it to 400. The 2nd time it fires, the message displays 400. What did I do wrong?
Here is the code I have in the embed:
Thanks.
Truly,
Emad
Can you tell me why the EIP Field Manager TakeAccepted embed fires 2 times and is there a way to make it fire only one time with the correct value in the column?
When I run the program I change the value of sell price from 450 to 400. The first time the code fires the message displays 450 even though I changed it to 400. The 2nd time it fires, the message displays 400. What did I do wrong?
Here is the code I have in the embed:
Code:
! Calculate discount if sell price is < 0.
!-----------------------------------------
If Queue:TransactionDetailsList.TranDet:SellPrice < 0 |
Then
Queue:TransactionDetailsList.TranDet:DiscountPercent = |
0 - Queue:TransactionDetailsList.TranDet:SellPrice
Queue:TransactionDetailsList.TranDet:DiscountAmount = |
0 - ((Queue:TransactionDetailsList.TranDet:RegularPrice * Queue:TransactionDetailsList.TranDet:SellPrice) / 100)
Queue:TransactionDetailsList.TranDet:SellPrice = |
Queue:TransactionDetailsList.TranDet:RegularPrice - Queue:TransactionDetailsList.TranDet:DiscountAmount
Else
Queue:TransactionDetailsList.TranDet:DiscountPercent = |
100 - ((Queue:TransactionDetailsList.TranDet:SellPrice / Queue:TransactionDetailsList.TranDet:RegularPrice) * 100)
Queue:TransactionDetailsList.TranDet:DiscountAmount = |
(Queue:TransactionDetailsList.TranDet:RegularPrice - Queue:TransactionDetailsList.TranDet:SellPrice)
End
Queue:TransactionDetailsList.TranDet:LineTotal = |
Queue:TransactionDetailsList.TranDet:SellPrice * Queue:TransactionDetailsList.TranDet:Quantity
message(Queue:TransactionDetailsList.TranDet:SellPrice)
Display()
Thanks.
Truly,
Emad