webERP Forum
Reorder Level - Ignore completed orders - 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: Reorder Level - Ignore completed orders (/showthread.php?tid=8060)



Reorder Level - Ignore completed orders - briantmg - 01-25-2018

I had an issue when generating a reorder report that on one of my purchase orders orders, I had received more parts than were ordered. so for example I ordered 20 pens, however, I received 24. I invoiced the parts and completed the order. However, when I run the ReorderLevel.php report, it shows I have -4 of the pens "on order".

I looked in the code and on around line 83 is shows the calculation for this, it shows not to include purchase orders that have the status Cancelled, Rejected, or Pending. Should this also include "Completed"? I added
AND purchorders.status !='Completed'
to the code and seemed to solve the problem.


RE: Reorder Level - Ignore completed orders - TurboPT - 01-25-2018

Hmmm, that's interesting, I thought I had seen some way to handle excess/overages, when received? I'll double-check, but I could be thinking about some other "receive-related overage" setting, or likely another system.

Tim/Phil, any thoughts on the proposed handling change? The change seems plausible, as the handling that sets 'Completed' at GoodReceived.php, line 483, is:

PHP Code:
    if ($OrderLine->ReceiveQty >= ($OrderLine->Quantity $OrderLine->QtyReceived)){
        
$SQL "UPDATE purchorderdetails SET quantityrecd = quantityrecd + '" $OrderLine->ReceiveQty "',
                            stdcostunit='" 
$_SESSION['PO'.$identifier]->LineItems[$OrderLine->LineNo]->StandardCost "',
                            completed=1
                WHERE podetailitem = '" 
$OrderLine->PODetailRec "'";
    } 

...or could there be some other aspect to this "picture" that I might not be aware?


RE: Reorder Level - Ignore completed orders - TimSchofield - 01-25-2018

I agree with the changes Brian proposes, if the order is completed it shouldn't be included regardless of whether it was over or uner received.

Tim


RE: Reorder Level - Ignore completed orders - TurboPT - 01-26-2018

Change committed to SVN.