How do I set up discount payment terms for A/R invoice?

Hello,

Is there a way to set up automatic discount when customer pays early in A/R base on payment terms? Thanks.

Trang