How to release excess stock linked to Production Plan

I have existing stock of 40 units of raw material item.

I process a Production Plan that requires 50 units

The Minimum Order Qty for purchasing is 100 units.

When the Material Request is created from the PP it correctly respects the 100 unit MOQ and 100 units are purchased.

Upon completion of all work orders and despatch, my Projected Quantity Report looks like this.

Actual Qty is correct (90) but Reserved for Production Plan still shows 50 units and consequently Project Qty is showing 40.

It appears that the purchase receipt of 100 units is linked to the PP even though the WO only required 50, leaving 50 “Reserved for Production Plan”.

How can I release these units?

Can you provide steps using which we can reproduce the problem?

A follow up question. We have Stock Reservation turned off in Stock Settings.

With Stock Reservation OFF, how does “Reserved for Production Plan” work?

I can’t see any reservation entries. Are there hidden reservation entries?

Steps to reproduce. (Stock reservation is OFF. Auto reorder is OFF)

Set starting stock on Item to A

Set purchase MOQ on Item to amount B

Create Sales order for Item for amount C, where C > A and (C-A) < B

Process Production Plan (created Purchase request for amount B)

Complete work order for amount C.

In Project Qty report, “Reserved for Production Plan” will show B-C. It should show 0.

OK I understand what happens.

The Purchase Request generated by the Production Plan holds the link for the item to the Production Plan.

I realise I could cancel all the downstream transactions (Purchase Order > Purchase Receipt) but this would be painful.

Can I post a new separate transaction / ledger entry that releases the surplus units from the Production Plan to open (unreserved) inventory?

Can you tell me if your Production Plan and Work Order status field value? Are they both Completed?

Yes PP is completed

And all WOs complete

The issue is that the MOQ setting on the Item causes purchase of more units than strictly required for fulfilment of the PP (when Purchase of RM is initiated by the PP), and these “surplus” units are then stuck “Reserved for Production Plan” and cannot be used or reallocated.

Do you have any other Production Plan with the same item code and warehouse in the Material Request child table that is not Completed or Closed?

I ask because any Production Plan that is Completed or Closed cannot influence the Reserved Qty for Production Plan field in the Bin.

All previous production plans were complete or closed and we checked the Projected Qty report before starting this test. Before starting the item in question had 40 Actual, 0 Reserved for PP and 40 Projected Qty, which was correct.

I believe the issue is caused by the Purchase Request (PR) generated by the Production Plan. The PR correctly respects the Minimum Order Quantity (MOQ) setting on the Item. When I examine this row in the PR I can see it hold links to the Sales Order and Production Plan under the More Information section.

It appears that if under a Production Plan you directly purchase more raw materials (RM) than you consume in the production, then that remaining stock of RM stays reserved because of the link in the Purchase Request.

My question is, is there any transaction or transactions I can post now eg a Stock Entry or Material Transfer or Material Issue to change those units to become unreserved?

I am working on a fix for this and was partially able to replicate it.

The problem I am facing is that once the Production Plan completes then the effect of that plan becomes 0 which for some reason isn’t happening on your site.

Are you on Frappe Cloud? If so, can you open a support ticket and give me the ticket link? I need access to your site.

Thanks, Mihir. Yes we are on Frappe Cloud and I have opened a ticket. Messaged you the number.

This was resolved by Mihir.

Using the “Recalculate Bin Qty” button on the stock bin for the affected item fixed it.

1 Like