Take authorisation query outside of loop so it only gets executed once per inquiry
Make the code more efficient
Fix errors caused by apostriphe in supplier code