You can check the previous sales rate at which the goods were sold, while recording sales transaction.
After selecting the customer ledger and the stock item press Alt+S to view Stock Query
This report displays the information of the selected party for the stock item along with the previous sales details.
For example, on 1/4/2020, Item A was sold to Party-X at the rate of Rs. 150, and subsequently Item A has been transacted (purchased/sold) with many customers/suppliers.
Now if you want to see the information on previously sold Quantity and Rate for Party-X from sales invoice, you can select Party-X and Item A, and press Alt+S to view Stock Query report. In the Stock Query report, you can get the details of previously sold Quantity and Rate.