We can apply into two ways, please check below Steps:
FIle-> Code Tables - > Misc Codes - > Invoice Misc Code
Automatic discount applied using the terms.
Please note that the terms have to be filled in before entering the detail lines. or You can select the particular terms in SO and pick, then create invoice automatic discounts will apply.