Invoices add up

Please help with attached file. I want to calculate with formula the red,yellow and green marked areas. What I need help with is written in each marked cell. Thanks in Advance!

AttachmentSize
invoices add up.xlsx10.86 KB