Issue:
While creating sales order with Canadian tax code and body level discount item, The error message is showing like this

Solution:
When transaction used a tax code as the tax item per lookup, system will throw “Invalid Canadian Tax Code: xxx-xx” notice since for Canada Tax, system required Tax Groups to be used instead of Tax Code.
For Canada Tax, ensure that the selected Tax Item on the below is a Tax Group and not a Tax Code.
The body level discount item is taken tax code from default tax code.
In the Set up taxes page, Default tax code is single tax code ( GST:CA_5). But we need to add the Tax group in default tax code field (Canada sub tab)
Setup → Accounting → Taxes → Set Up Taxes : Under Canada sub tab

Canadian Tax will accept only Tax group, Because of Canadian tax have two taxes (GST/HST and PST).