MRP calculation bug - Printable Version +- webERP Forum (http://www.weberp.org/forum) +-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1) +--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8) +--- Thread: MRP calculation bug (/showthread.php?tid=2227) |
MRP calculation bug - newuser990 - 05-23-2014 Hi, I found this bug in MRP calculation when a Purchase order status is actually complete but if the received quantity is less than ordered quantity it was taking this quantity into account while calculating MRPsupplies. I changed the sql to as below at line 372 in MRP.php. $sql = "INSERT INTO mrpsupplies (id, part, duedate, supplyquantity, ordertype, orderno, mrpdate, updateflag) SELECT Null, purchorderdetails.itemcode, purchorderdetails.deliverydate, (quantityord - quantityrecd) AS netqty, 'PO', purchorderdetails.orderno, purchorderdetails.deliverydate, 0 FROM purchorderdetails, purchorders WHERE purchorderdetails.orderno = purchorders.orderno AND purchorders.status != 'Cancelled' AND purchorders.status != 'Rejected' AND purchorders.status != 'Completed' AND(quantityord - quantityrecd) > 0"; This may already have been done in the commit but if not, then somebody please commit this. Thanks RE: MRP calculation bug - Exsonqu_Qu - 05-23-2014 Hi, Thank you for your report. I commit your fix to the trunk and add a new lines check purchorderdetails.completed=0 to ensure same problem happen. Best regards! Exson |