webERP Forum
Solved:Purchase Orders: Lead time not considered for Delivery Date - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (/forumdisplay.php?fid=8)
+--- Thread: Solved:Purchase Orders: Lead time not considered for Delivery Date (/showthread.php?tid=869)

Pages: 1 2


Solved:Purchase Orders: Lead time not considered for Delivery Date - MacPhotoBiker - 04-30-2013 02:26 AM

When creating a new Purchase Order, the suggested Delivery Date only shows the current date, it does not take into consideration the Lead Time for this article set up in Purchasing Details.
The Delivery Date should be estimated as Today + Lead Time.

(Nice to have but not too important: Delivery Date can only be a weekday, i. e. if "Today + Lead Time" is a Saturday or Sunday, then Delivery Date will be the following Monday. That´s not crucial though.)


RE: Purchase Orders: Lead time not considered for Delivery Date - phil - 04-30-2013 06:38 AM

The lead time is used for MRP calculations ... but not for purchase order entry.
It would be useful to have this default. However, lead times vary in practice depending on availability ex-stock or whether the item needs to be manufactured and the availability of raw materials for the manufacturer to make... so it may not be appropriate to code this and probably better to make the phone call.


RE: Purchase Orders: Lead time not considered for Delivery Date - MacPhotoBiker - 04-30-2013 06:52 AM

Thanks for your reply, Phil. Obviously I can only speak for myself and my particular situation, but for me Lead Time means how long it takes from the day I place an order with my supplier until I get the product delivered (I am not using the MRP module at all). My supplier gives me for every product an average Lead Time, e. g. 30 days. So when I place the order today, I know I will receive it quite precisely in 30 days. I. e. when I place the order, the Requested Date will always be Today + Lead Time. Of course the Lead Time can vary, but only if something unforeseen happens.

If a product would usually be sold ex stock, I'd put Lead Time one or two days. My products are all manufactured, so Lead Time is always 30 days. I am aware of that rule "Don't program exceptions" and I agree with it, but in this case, I'd say more often than not Requested Date should be Today + Lead Time.

But of course, that's not a "killer", it would just make webERP a bit smoother (for my purpose, though).

Cheers!


RE: Purchase Orders: Lead time not considered for Delivery Date - phil - 04-30-2013 07:11 AM

Probably right - I should code this as the default - good idea.


RE: Purchase Orders: Lead time not considered for Delivery Date - PakRicard - 04-30-2013 12:30 PM

Hi Phil:

I agree with him. It is not exact but (today + lead time) is much closer to reality than Today. In our case suppliers never get it on time :-( but it will show us when we should start pestering suppliers.


RE: Purchase Orders: Lead time not considered for Delivery Date - MacPhotoBiker - 04-30-2013 11:35 PM

PakRicard,
thanks for supporting and sharing your thoughts on that.


RE: Purchase Orders: Lead time not considered for Delivery Date - opto - 05-01-2013 04:40 AM

same for me. I think I brought this up a long time ago.
The lead time in purchasing order setup should be used as default. So I have at least a rough idea when it might arrive.

If the supplier is not just around the corner, today is nearly the most wrong entry that is possible, as this is nearly always impossible to achieve. (only yesterday would be worse... ;-) ).


thanks,

Klaus


RE: Purchase Orders: Lead time not considered for Delivery Date - phil - 05-01-2013 07:22 AM

Code:
                //...got the Purchasing Data for the supplier of the item  
                    
                          $LeadTime = $PurchRow['leadtime'];

                    } else { // no purchasing data setup
                        $PurchPrice = 0;
                        $ConversionFactor = 1;
                        $SupplierDescription =     $ItemRow['description'];
                        $SuppliersUnitOfMeasure = $ItemRow['units'];
                        $SuppliersPartNo = '';
                        $LeadTime = $ItemRow['leadtime'];
                    }
                    /* Work out the delivery date based on today + lead time
                     * if > header DeliveryDate then set DeliveryDate to today + leadtime
                        */
                                        $DeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$LeadTime);
                    if (! Date1GreaterThanDate2($DeliveryDate,$_SESSION['PO'.$identifier]->DeliveryDate)){
                        $DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate;
                    }

So the delivery date is defaulted to today + the lead time from the supplier purchasing data unless the header delivery date is later than this - in which case the header delivery date is defaulted for the line item delivery date.
The system was not using the stock item lead time (it was using the purchasing data lead time specific to the supplier). However, I have modified it as above to now use the stock master lead time if no supplier specific lead time is set up.

I also added the link to print the order after creation as suggested by MacPhotoBiker ... not sure why that was not there already!


RE: Purchase Orders: Lead time not considered for Delivery Date - MacPhotoBiker - 05-01-2013 12:22 PM

That´s great Phil, thank you very much. I will check out the information you provided in another thread (http://www.weberp.org/forum/showthread.php?tid=857&pid=2618#pid2618) to learn how to update the system.
Thank you for being so responsive.


RE: Solved:Purchase Orders: Lead time not considered for Delivery Date - opto - 05-01-2013 06:24 PM

thanks Phil, that is very good.

Klaus