Error message :- Account number for transaction type Customer invoice discount does not exist.
Go to General Ledger module. Go the setup tab and locate Posting group there. Expand that tab and then click on account for automatic posting. In that form, you can define certain posting account and sales invoice discount is defined there only. Check whether record exists for customer invoice discount or not.
If that exists, define ledger account there and if the record is not there then create a new record and attach the ledger.