having problem with LoadSalesRep

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

Reply to
kskinne
Loading thread data ...

LoadSalesRep require ID, not Number.. and TransactionEntry.LoadSalesRep require ID and Number

antonio

Reply to
Antonio Mazzeo

thanks for the tip Antonio, i changed the code to reflect the id instead, and it works perfectly

kevin

Reply to
kskinne

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.