R Program - Loops through credit sales trades and identifies riskless trades