Qty and totals are displaying wrong when selected same item from multiple batches

Hi all,
I am facing these 2 issues on the POS page while adding an item that has multiple batches.

  1. Quantity and totals are displaying wrong when selected the same item which has multiple batches.

  2. When the discount is selected line-wise for batch 1, Discount is also getting applied for the same item with another batch when added to the cart

Please help me in resolving these issues.
Thanks