Try ERPNext Buy Support Partners Foundation

Item rate in sales invoice return takes the latest item price not the reference sales invoice item rate

imagine the following scenario:

  1. create item price for e.g. item1 in price list e.g. price_list1
  2. create sales invoice for item1 using price_list1
  3. create new item price for the same item in the same price list
  4. create return from that sales invoice

the problem is that the returned invoice item rate takes the new rate instead of the rate of the returned against sales invoice, where it should take the reference invoice item rate

*I use erpnext 12.7