Two separate errors: Sales Order Batch Authorization (oScript.UIObj error, and 'Referenced statement invalid')

SOLVED

Hello, 

We have been having issues with Sales Order Batch Authorization. Nothing errors out until the final step where accounting actually tries to process the credit cards

.Here is the first, which I'm unfamiliar with: 

The second one, I have seen before. However, only when a script is present. I've disabled all of the scripts on AR_Customer but we still get this error. Are there other tables I should check? I've looked in so_salesorderheader / so_salesorderdetail but haven't seen anything there either.

 

Any insight would be very much appreciated!