After 26B Substitute item is substituting the original item even if it has sufficient quantity
Hi experts,
We enabled "Substitute Item" and it was working perfectly, for manual orders and orders created by integration (REST API), it worked only when the original item did not have sufficient quantity to fulfill the total requested quantity in the sales order.
After 26B, the substitute item process is substituting the original item even if it has sufficient on-hand quantity for reserve and transact.
This is the OM extension that we defined to make the "Allow Substitute Item" flag as Yes at Sales order level:
import oracle.apps.scm.doo.common.extensions.ValidationException;
def buname = header.getAttribute("BusinessUnitName");
def srcSubstituteAllowedFlag = header.getAttribute('SubstituteAllowedFlag');
0