Item was received in One Dimension and was sold from another

Hi ,
I am Facing a issue where in Item was received in X business segment(Dimension) and was sold in from another say Y .It is causing Mismatch in P&L at Business segment level.Now I am not sure its a bug or not.Accounts team feels its a bug.
If its not a bug how can I stop it from happening?
If its a bug what can I do to fix.

Kindly Help!!
Thanks,

If you always use same Code then open Item Card and go to Dimensions and set Dimension Code and Dimension values and Value Posting as “Same Code”

@Mohana

Thanks for reply

Same Item can received and sold under different Business segments.

@Mohana Thanks for reply

Same Item can received and sold under different Business segments.

It is not a bug, but human error.

As Mohana already explained, you could force “same code” IF it was always the same, but if in normal workflow there are different Dim values allowed, what Dim the user enters in SO that will be posted.