AX 2012 How Cash discount posting type work in system

Hi all,

We have Customer cash discount and vendor cash discount posting type being setup in Accounts for automatic transactions. If we create cash discount posting type under accounts for automatic transactions setup, does anyone know about how such posting type work in system? Thanks in advance.