I work as a cashier, to avoid this yeah you just have to treat each exchange of money as a single transaction.
Would the cashier have to pay the cash back to the business?
they would notice your till was short if you didn't realize what had happened, possibly firing you just for that. It would have to be an incredibly abusive employer to demand repayment for a mistake you made on the job, you didn't steal anything. Firing or disciplinary action leading up to firing would be more appropriate.
Edit: I stand corrected, I guess I should be glad I have a union job, they will in fact take it out of people's paychecks, but that is abusive as far as I'm concerned.
P.S. video game forums, weird place to talk about this but here I am I had to respond cause I have similar experiences at my work.