Here is the inventory and price list of a bookstore.

Item            Number    Cost_Per_Unit  Sale_Per_Unit

Binder             500          4            7
Bookbag            350          5           10
Calendar           300          3            8
Notebook           400          1            2
Shirt              800          4            6
Schedule           876          1            2

If the total sale of an item is over $3,000, there is $200 discount. 
You are requested to calculate the profit for each item and the total profit for all items. 
Show the abilities to write the program in functions.