[ExtensionOf(classStr(InventQualityManagementCreateHandler))]
final class DT_InventQualityManagementCreateHandler_Extension
{
public static void createInventoryRegistration(InventTransOriginId _inventTransOriginId,
InventReceiptForTestRegistrator _inventReceiptForTestRegistrator)
{
next createInventoryRegistration(_inventTransOriginId,_inventReceiptForTestRegistrator);
if (!InventParameters::find().UseQualityManagement)
{
return;
}
// This can happen when all transactions were updated from the statue Registered to the status Received
if (!_inventReceiptForTestRegistrator || _inventReceiptForTestRegistrator.parmTotalReceiptQuantity() == 0)
{
return;
}
InventTransOrigin inventTransOrigin = InventTransOrigin::find(_inventTransOriginId);
var set = InventQualityManagementCreateHandler::inventTransTypesSupportingInventoryRegistrationReCheck();
if (!set.in(inventTransOrigin.ReferenceCategory))
{
return;
}
InventQualityManagementCreate::createOnRegistration(
inventTransOrigin,
_inventReceiptForTestRegistrator);
}
private static Set inventTransTypesSupportingInventoryRegistrationReCheck()
{
Set inventTransTypeSet = new Set(Types::Enum);
inventTransTypeSet.add(InventTransType::Purch);
inventTransTypeSet.add(InventTransType::PmfProdCoBy);
inventTransTypeSet.add(InventTransType::Production);
inventTransTypeSet.add(InventTransType::BOMLine);
inventTransTypeSet.add(InventTransType::BOMMain);
//InventQualityManagementCreateHandler::inventTransTypesSupportingInventoryRegistrationDelegate(inventTransTypeSet);
return inventTransTypeSet;
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156