Fix bug where entered coupons were applied to all invoices in a transaction