MRP: add WO scheduling + fix
at the moment, MRP schedules all PO's and suggested WO's to be required for the end date of a WO (maybe minus vendor leadtime).
In many cases, this is not desirable.
If my BOM works on a component part, I need this part before the end date of the WO. So MRP must be able to suggest a correct purchasing date for this component.
The following fix allows to do this in a more detailed scheduling:
in BOM table, add a new field DaysRequiredBeforeEnd. Default=0, so no changes in behaviour if user does not set this.
One needs to be able to maintain this DaysRequiredBeforeEnd in the script adding/updating the BOM items.
In MRP, replace duedate=MRPDate= RequiredDate-leadtime with:
duedate=MRPDate= RequiredDate-leadtime - DaysRequiredBeforeEnd.
Now, MRP will schedule the planned purchase date or a proposed WO end date such that the items are available at the requested number of days before the primary WO end.
I just did a proof of concept, which works fine:
add new field to db BOM table, default = 0.
Manually set this field in the db for a few components to 5 or 10 days
Change CreateLowerLevelRequirements to take account of this field.
All purchase dates of lower level items are now adjusted accordingly.
Additional changes necessary:
add the same code for top level items
add code to set DaysRequiredBeforeEnd from the BOM maintenance scripts.
I am also willing to adapt the wiki doku on this and hope it can go into the core code.
Klaus
|