MRP calculation bug
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
|