Supplier Rebate After Sales

Hi,
We buy from a supplier at Standard Price List, for example, item ABC has List Price of 100USD.
When we sell the product to specific customer we get rebates based on special pricing to each customer.
How can we do revaluation in Cost of Goods.
Sequence:
Purchase Order Item ABC Quantity 50 at price of 100 USD.
Purchase Receipt of total quantity 50 at price of 100 USD. (Valuation done at 100 USD)
Sell 7 units at a pre-agreed price of 60 USD and get a rebate of 40 USD - Total 280 USD
Sell 3 units at a pre-agreed price of 70 USD to another customer and get a rebate of 30 USD - Total of 90 USD.
Remaining stock/inventory of 40 pieces at original rate of 100 USD.
How can we do revaluation to reflect in DN/SI on the incoming rate value after the rebate prices.
In the LCV we can only apply rebate if we are considering the total quantity but for partial quantities at different rates, this is not possible.
Hope to have some help on this situation from the community. we have this process in almost everything we do.
We do create a debit note from supplier for the rebates but this is recorded in the PI return under the stock received but not billed and not reflected on the Cost of goods and the gross profit.
Final Note, items are Batch and SN controlled.
Thanks.
Mohamad

Hi Community, any help or ideas?