Actual Lead time calculation in Purchase Advisor

Could you please help me understand the logic behind how the actual lead time is calculated in the Purchase Advisor? I believe this is particularly important when there are multiple releases on a purchase order line, to ensure that the lead time calculation is not impacted.

I’m pretty sure it’s just the number of days between Order Date on the Order Header and then the receipt date of the line/release. Here’s one we have with different Lines, but release should work the same.
image

Receipt date - PO Due date right or Receipt date - PO Promise date ?

it’s PO Header PO Date - Receipt Date technically.

I just wanted to check for PO lines with multiple scheduled releases, the method used to calculate lead time in the Min/Max update process.