Purchase Order - Partial Receipt Bug

Please help with the below errors/bugs with purchase order cycle. Appreciate someone look into this, as this is business critical day today purchase cycle.

To replicate the issue follow the below steps:

Scenario 1:

  1. New Purchase Order > Submit (eg., Quantity 100)
  2. Make > Receive > Accepted Quantity (eg., Quantity 40) > Submit
  3. Open Purchase Order → Still it shows 100 quanity and there is no notification stating yet to receive 60 quanity.

Scenario 2:

  1. New Purchase Order > Submit (eg., Quantity 100)
  2. Make > Receive > Accepted Quantity (eg., Quantity 100) > Submit
  3. Purchase Receipt > Make > Return > Accepted Quanity (eg., less than 100, lets say -10) > Submit
    Error: Item XXXX has already been returned

Scenario 3:

  1. New Purchase Order > Submit (eg., Quantity 100)
  2. Make > Receive > Accepted Quantity (eg., Quantity 100) > Submit
  3. Purchase Receipt > Make > Return > Accepted Quanity (eg., Quantity 100) > Submit
    Issue1: It still shows " to bill " for the returned purchase receipt (refer Scenario 3 Screenshot 1)
    Issue2: It is still showing the option “Return, invoice” (refer Scenario 3 Screenshot 2)

Scenario 3 Screenshot 1:

Scenario 3 Screenshot 2:

Someone has already mentioned a very similar behavior in github issues Duplicate Items in Purchase Order · Issue #7401 · frappe/erpnext · GitHub

I’m sure someone will fix it soon, but for now just changing received quantity instead of changing accepted quantity would solve most (if not all) of your issues.

The point is when you change accepted quantity from 100 to 40 the system consider the rest 60 as rejected quantity (but you still receive them in your rejected warehouse), I think this isn’t what you want to do.