Error in computation of rate and amount in SI and SO, when items inserted using barcode

Hi there,
There is error in calculation of item’s rate and amount when inserting items using barcode for the firs entry as illustrated in the figure below:

A new UOM is defined, Dozen, and its price (for Cheese item) as below:

I noticed that when the item is scanned again the rate and amount in the record is successfully calculated.

Can you help please overcome this issue