bug fix and added the credit invoices.