The context of the following conversation is Robin was certain she was going to make the sale and spent her commission before she had it.  The sale fell though so Robin had put the cart before the horse.:
Robin says I'm so mad at myself. I spent a bunch of money that I shouldn't have..
The friend responds Why did you spend it if you didn't have it?.
Robin responds I thought I was going to get a big commission from a sale but it fell through at the last minute..
The friend responds Ahhh, yeah it would have been safer to delay the purchase until you knew you had it for sure..
Robin responds I'm definitely going to do that next time..