Discount accounts

What is the difference between the Vendor invoice discount ( Automatic posting transactions setup ) and Purchase discount in Item posting setup ?

When these accounts will effect ?

One is invoice discount for settlement and total discount (i think) where the discount is not item related in the process, one is discount off an agreed price so item specific. Set two items up, process one with line discount, one with total discount, receive and verify the financial entries, invoice and verify the financial entries - then you will know.