I need to set sales rep ID for a recall to original sales rep??

At our store, we have run into some problems when people return an item in exchange for another item. When the transaction is recalled for return, the salesrepID from the original transaction appears on the returned items, which is what we want. However, the new items added to the transaction have the sales rep ID of the current POS session. In our particular circumstance we want the sales rep ID for the exchanged items to match the sales rep ID for the original transaction. We do not want to different rep IDs on the transaction.

I tried to solve this with a customization, here is a the piece of code that was supposed to make this happen:

With posSession.Transaction itemCount = .Entries.Count If .RecallType = RecallTransactionForReturn Then For x = 1 To .Entries.Count If .Entries(x).Quantity < 0 Then MyRep = .Entries(x).SalesRep End If Next x .LoadSalesRep (MyRep) End If End WIth

the code when triggered is supposed to check and see if the transaction is a return. if it is, then it loops through each entry on the transaction, looking for a quantity less then zero. If it finds one, it sets the value of the variable 'MyRep' equal to the salesrepID on that entry. Then I am trying to use LoadSalesRep to set the sales rep ID for the entire transaction equal to 'MyRep'.

this code is not working, because .Entries(x).SalesRep is not returning the salesrep for the entry (???) I'm not sure why. If I insert a msgbox into the code to see what it returns for this value during the loop, all it returns is a zero instead of a rep ID. i know there is a rep ID assigned to the recalled items, I can see it on screen.

can anyone see what is wrong with the above code, and why it wouldn't work correctly using .Entries(x).SalesRep?

thank you, kevin

Reply to
kskinne
Loading thread data ...

fyi

i tried placing the following msgbox's into my code as a test to see what it would return for the the following:

MsgBox .RecallType = RecallTransactionForReturn MsgBox "salesrep on this entry is " & .Entries(1).SalesRep MsgBox "salesrep for the entire transaction is " & .SalesRep MsgBox "number of entries is " & .Entries.Count

when I run my code, the first messages box correctly returns 'True' if the transaction is recall for return

it skips the next two msgboxes, it doesn't even give a blank message, it just skips them altogether and goes directly to the fourth msgbox

then the fourth msgbox correctly returns the number of entries on the transaction

hopefully someone can give me a hand w/ this

thanks, kevin

Reply to
kskinne

Arrow over to the Sales Rep column of the particular item on the POS screen and press F2 to assign a sales rep to that one item only.

Good luck, Matt

Reply to
Matt

Hi Matt, that's basically what we're doing now and that's the obvious manual solution - however, the problem we are running into is our cashiers do not conistently do this 100% of the time. The reason for my original post was I need help with an automated solution I'm trying to implement to avoid completely the problems that arise for us when cashiers don't manually make the change.

Thanks, Kevin

Reply to
kskinne

i was using salesrep.number instead of using salesrep.id - switched to ID and it works fine

thanks 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.