Extends the operation of System Option #106 - "Auto lot assignment while adding invoice items" so that it will support System Option #103 - "Allow lots to be oversold".
If there is not enough inventory in the available lots to satisfy the requirements of the order then the lot received most recently will be oversold to cover the remaining requirement.
In determining the "most recent" lot, the system will rely mainly on "Received Date" and, where more than one lot was received on the same day, then "most recent" will be determined by the highest Lot Number (using alphanumeric sorting).
System Option #103 must be enabled because it allows empty and previously oversold lots to be visible to the assignment process. Otherwise those lots are hidden and will not be taken into account should an oversell be necessary.