performed testing in the console and updated the invoice model to connect to the purchase model