Based on the surfpro.dll example, I have roughed out a prospective function that I hope will allow me to initiate a membership style control over POS transactions. I'm not 100% sure how to call a QSBridge FireEvent -- ClearCustomer as the POS requires a Customer to complete a sale, so I figure no customer, or take away the customer, no sale... right?
In VB6 this morning, the Date function, literally returned 6/28/2005. Great! If the Customer Expiration Date is stored in CustomDate1, then a quick subtraction and a few conditionals should do it. The subtraction returned an integer calc of the difference. Perfect! Could someone enlighten me as to how to call one of those QSBridge events. Even if it's not totally clean, or requires a tweak and recompilation down the road in the event of RMS changes, that's fine, I just need to introduce this tweak.
Oh yeah, can it be called in the status.htm at the start of transaction? I don't want to have to rely on a cashier to push or enable a macro to get this going. I want it loaded at transaction runtime. I thought if maybe I put it before the TimerID, it'd guarantee a once-only load-up.
Thanks! Kevin
Public Function Profess(Session As Object) As Boolean Dim MembershipEnd As Date 'Session is a QSRules.Session Object
If Session.Transaction.Customer.Loaded Then MembershipEnd = Date - Session.Transaction.Customer.CustomDate1
If Session.Transaction.Customer.CustomDate1 = "" Then MsgBox "Attention! This membership needs an expiration date!", vbCritical
'This is a call to QSBridge FireEvent ClearCustomer, to prevent null dates from continuing Call ClearCustomer End If
If MembershipEnd