Sub conrtacting does not work for batch track raw material when backflush setting is set to BOM

Business case :
I supply raw material in bulk to the supplier. The raw material is batch tracked. The finished goods manufactured by the supplier is batch tracked.

Periodically i receive finished items from the supplier which uses up the raw material have bulk sent .

To accomplish this

  1. I created 2 items FG1 (finished goods sub contracted to supplier ) and RM1 ( sent to supplier by me)
  2. Both FG1 and RM1 are set as batch tracked.
  3. Create a BOM for FG1 with RM1 as the raw material.
  4. Create a PO for purchase of RM1. Upon receipt of PO, RM1 quantity increases and the batch number is updated.
    4)Create a PO for the FG1 and set supply raw material as Yes and also set the supplier warehouse
  5. During the stock entry transfer (send to subcontractor stock tyep) i send the supplier a bulk quantity of lets say 50 Kgs.
  6. During subsequent PO receipts of FG1 item , i expect the system to take raw material RM1 from the previously transfered quantity.

The system somehow does not recognise the existing inventory at the supplier warehouse and expects a “transfer to supplier” to be done for every PO.

Pratically we bulk send the item to the supplier and expect a weekly delivery of certain quantity of finished goods.

The system works ok if the Raw material RM1 is not batch tracked item and if the buying settings->sub contract-> Backflush Raw Materials of Subcontract Based On->BOM

For batch tracked raw material RM1, the system gives an error " Batch number is mandatory" although there exists a valid batch number for the raw material supplied.
It seems like the system is unable to find the batch number of the Raw material RM1, although the stock entry screen correctly reflects the batch number.
Somehow this batch number does not show up in the purchase receipt → Material supplied screen