Unbundling is the process of redistributing discounts across a bundle. Given the following sales, calculate the new discount amount and the adjustment on the orignal discount per sale.

The way to do unbundling is to get the Total Discount Percent for that Bundle then apply that percentage to each transaction.

ID Bundle FullPrice DiscountedPrice Discount Units
1  A      100       80              20       1
2  A      200       180             20       2
3  A      400       300             100      4
4  B      100       90              20       1
5  B      100       92              20       1

Result 

ID Bundle FullPrice NewDiscountedPrice NewDiscount Adjustment
1  A      100       ???                ???         ???
2  A      200       ???                ???         ???
3  A      400       ???                ???         ???
4  B      100       ???                ???         ???
5  B      100       ???                ???         ???