You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Swapnil Shah (Jira)" <ji...@apache.org> on 2026/06/29 09:20:00 UTC

[jira] [Created] (OFBIZ-13451) Apache OFBiz MRP — Procurement Lead Time Not Applied to Purchase Requirements

Swapnil Shah created OFBIZ-13451:
------------------------------------

             Summary: Apache OFBiz MRP — Procurement Lead Time Not Applied to Purchase Requirements
                 Key: OFBIZ-13451
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13451
             Project: OFBiz
          Issue Type: Task
            Reporter: Swapnil Shah
         Attachments: 06_supplier_leadtime.png, tc1_baseline_requirements.png, tc3_finishedgood_requirements.png

_Feature gap / enhancement request · verified on trunk (commit 18109c9fe7), Java 17, demo data_
h3. Use case

When MRP plans a purchased item, the proposed purchase requirement's start date should fall early enough for the component to arrive by the date it is needed — i.e. the supplier's procurement lead time should offset the requirement start date from its required-by date. This lets planners know when each PO must be placed.
h3. Feature gap

MRP currently does not factor procurement lead time into purchase requirements. Every proposed PRODUCT_REQUIREMENT is created with {*}requirementStartDate = requiredByDate{*}, so the "place the PO by" signal is lost. With any non-zero supplier lead time, a PO created from such a requirement is placed too late and the component arrives late by exactly the lead time.
 * *SupplierProduct.standardLeadTimeDays* is not read by MRP (only by order-entry display screens).
 * *ProductFacility.daysToShip* is honored only for demand originating from the confirmed sales order and is forced to 0 for purchased item demand, so setting it on components has no effect.

h3. Verification (skateboard two-level BOM, 7 purchased leaf components, 15-day supplier lead time)
||Scenario||Purchase requirement dates||Result||
|Baseline (no daysToShip)|start = required-by|No lead-time offset|
|daysToShip = 15 on components|start = required-by|Setting ignored for components|
|daysToShip = 15 on sales-order product|whole tree shifts as one block; start still = required-by|Still no procurement offset|

Manufactured items are correctly back-scheduled through their routings; only purchased requirements lack the procurement offset. Example — Glue needed Jun 1: proposed start Jun 1, expected start ≈ May 17 (Jun 1 − 15 days).
h3. Expected behavior
{code:java}
Requirement Start Date = Required-by date − procurement lead time{code}
The procurement lead time should determine when a purchase requirement must be initiated so the component is available when needed.
h3. Evidence

!06_supplier_leadtime.png!
_Supplier record for Glue — standardLeadTimeDays = 15. This value is configured but does not get factored/honored by MRP._

!tc1_baseline_requirements.png!
_Baseline MRP run — every purchased PRODUCT_REQUIREMENT has requirementStartDate equal to requiredByDate (no procurement offset); only manufactured items are back-scheduled._

!tc3_finishedgood_requirements.png!
_Even with delivery days set, the proposed purchase requirements still have requirementStartDate equal to requiredByDate — the supplier's delivery time is not factored into the dates._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)