Debit and Credit not equal for Sales Invoice #mm. Difference is -5.714. Error

“Debit and Credit not equal for Sales Invoice #mm. Difference is -5.714.” Got this error while entering a sales invoice, Below fields was true while entering the invoice. ‘Is this Tax included in Basic Rate?’ field in Sales taxes and charges template, and
‘Enable Discount Accounting for Selling’ field in selling settings.

Need both the fields to be enabled, how to overcome this issue.