Fix invoices declaration.
Properly set coupon on new customers.
Fix discount bug.
Merge branch '2.0'