Early Payment Discount Custom Field Calculations (Invoice Date + 7 Days & Calculate 2%*-1 of Invoice Total) and then Feed Through to Adjustments

Early Payment Discount Custom Field Calculations (Invoice Date + 7 Days & Calculate 2%*-1 of Invoice Total) and then Feed Through to Adjustments

Hi,
I am wanting to incorporate some calculations for an Early Payment Discount on the invoice.

I am trying to add 2 x Custom Fields which both do calculations on the invoice and then update the adjustments field at the bottom of invoice

  1. I need to calculate 7 days after the invoice date (for the Early Payment Discount Date)
  2. I need another to calculate 2% of the total invoice 
  3. I also need to be able to feed the calculated -2% amount into the adjustments box in the totals section so that it reduces the invoice by that amount

Please can you help I have been trying to sort this for ages now

Thanks

Heidi