Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reorder Level - Ignore completed orders
01-25-2018, 08:04 AM,
Reorder Level - Ignore completed orders
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.
01-25-2018, 11:19 AM, (This post was last modified: 01-25-2018, 11:25 AM by TurboPT.)
RE: Reorder Level - Ignore completed orders
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 "',
$_SESSION['PO'.$identifier]->LineItems[$OrderLine->LineNo]->StandardCost "',
                WHERE podetailitem = '" 
$OrderLine->PODetailRec "'";

...or could there be some other aspect to this "picture" that I might not be aware?
01-25-2018, 10:42 PM,
RE: Reorder Level - Ignore completed orders
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.

01-26-2018, 03:29 AM,
RE: Reorder Level - Ignore completed orders
Change committed to SVN.

Forum Jump:

Users browsing this thread: 1 Guest(s)