These 5 lines are duplicated in both createDebitMemo and createCreditMemo. Need to figure out a better way to push them up to the insert function.