i'm trying to use the following code to set the salesrep for the current transaction:
Dim MySalesRep As Long MySalesRep = posSession.Cashier.Number posSession.Transaction.LoadSalesRep (MySalesRep)
I have the code triggered by the intitialize transaction hook. All of our cashier's ID numbers match their salesrep number. we have it set up so that POS forces login after each sale, and a sales rep ID is required for each transaction item in the configuration. Our cashiers never enter sales for another sales rep, only their own. So it only makes sense that we automate the setting of the sales rep ID, to reduce the chance of our cashiers selecting the wrong sales rep ID, which has happened to us several times unfortunately...
the code runs without an error, i can insert a msgbox line and see that the MySalesRep variable is equal to the cashier ID, however the loadsalesrep line is not setting the sales rep on the transaction correctly. after the transaction is initialized and an item is added, there is no sales rep assigned to the line item.
this seems simple enough, does anyone know why this isn't working?
thank you, kevin