In case where the rates are defined for an item, that is, the Standard Rates in the stock item and in the Price List, the rates in the voucher will get populated automatically.
Order of Priority
When the price list is selected in the stock item, and the same price list is selected in the invoice, then the rates will appear as per the price list.
When the price list is not selected in the stock item, but standard rates have been defined, then the standard rates will appear while recording the transaction.
When price list and standard rates are defined in the stock item, and the same price list is selected in the invoice, then the rates will appear as per the price list.