Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MRP calculation bug
05-23-2014, 02:33 AM,
#1
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
Reply
05-23-2014, 05:39 PM,
#2
RE: MRP calculation bug
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)