I am trying to use a public property as describle in the RMS help file .....
Public Property Set DiscountReasonCode(Value As ReasonCode) ...
End Property
I wrote some code that based on some criteria will discount some items on the POS screen, but looks like I also need to set the Discount Code, hence I am trying to use the above property.. Any ideas or example would be great
TIA
Chuck
Didn't find your answer? Ask the community — no account required.
A
Alias
Not sure if I am using it correctly,
This is the line where I am trying to set the reason code, but the program error's out here.
E.DiscountReasonCode = "16"
J
Jason Hunt
What's the problem?
F
Fisher
Could you post all of the relevant Public Property code that you used and how it returned the value 16? I had difficulty in calling the public property myself, maybe with a little more context, we can help each other.
Thanks! Kev> Not sure if I am using it correctly,
A
Antonio Mazzeo
azz ... quanto so cretino ... (please don't translate this words from italian to english :P)
This is a private mail.. but I think that the example can be useful for someone...
/************************ email ****************************/ Hi Chuck,
I looked into documentation, and the property DiscountReasonCode is a property that require an ReasonCode object.. The ReasonCode is a wrapper of the record 'ReasonCode' from database.. and for work correctly with property you must to assign the value to a reasoncodeclass instance..
Example: Set E.DiscountReasonCode = 16
replace with..
Set E.DiscountReasonCode = LookReasonCode("16")
and the code of 'LookReasonCode'
Function LookReasonCode(ByVal code as String) as ReasonCode Dim x as Session.ReasonCode
For Each x in Session.ReasonCodes if x.Code = code then begin Set LookReasonCode = x Exit Function endif
Next x
Set LookReasonCode = Nothing 'Exit with error! End Function
bye Antonio
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.