Sum total of manufactured goods to different warehouses

Hi Devops,

I have seen that during validation of finished good during manufacturing, the validation compares the completed quantity and each row of the transfer quantity as per this commit by @nabinhait based on the conversation Manufactured goods valuation

I think that the completed quantity should be based on the sum of quantities to be transferred!

I have a scenario where I modified the stock entry form for manufactured goods and specified 2 target houses. When I specify the 2 different amounts for the different warehouses, which total the specified quantity, an error “Quantity in row 1 (32000) must be same as manufactured quantity 34000” which is evident it does not add the quantity in row 2 and from the source code itself it seems the case.

Attached screenshot

def validate_finished_goods(self):
“”“validation: finished good quantity should be same as manufacturing quantity”""
items_with_target_warehouse = []
for d in self.get(‘items’):
if d.bom_no and flt(d.transfer_qty) != flt(self.fg_completed_qty):
frappe.throw(_(“Quantity in row {0} ({1}) must be same as manufactured quantity {2}”).
format(d.idx, d.transfer_qty, self.fg_completed_qty))

If I am to modify the code to include the quantities in the other rows, what should I look out for? Am I correct to assume that this is a bug or this was the intended functionality.

I want to be sure I am on the correct path before opening an issue on github.

@nabinhait or @rmehta any comment on this?

Courtesy of Badili Innovations