Add SCM functional knowledge domain

Introduce nine source-backed rules with original AL sample pairs, bounded SCM review routing, and complete positive/clean evaluation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-09-17 15:54:23 +02:00
parent b91443beec
commit 9ac62e3967
34 changed files with 1244 additions and 10 deletions

View file

@ -0,0 +1,25 @@
namespace BCQuality.SCM.Samples;
using Microsoft.Inventory.Item;
codeunit 50114 "SCM Additional Promise Bad"
{
procedure CanPromiseAdditionalDemand(ItemNo: Code[20]; LocationCode: Code[10]; VariantCode: Code[10]; ShipmentDate: Date; RequestedAdditionalQuantityBase: Decimal; LookaheadDateFormula: DateFormula): Boolean
var
Item: Record Item;
begin
if (ShipmentDate = 0D) or (RequestedAdditionalQuantityBase <= 0) then
Error(DemandInputErr);
Item.Get(ItemNo);
Item.TestField(Type, Item.Type::Inventory);
Item.SetRange("Location Filter", LocationCode);
Item.SetRange("Variant Filter", VariantCode);
Item.SetRange("Date Filter", 0D, ShipmentDate);
Item.CalcFields(Inventory);
exit(Item.Inventory >= RequestedAdditionalQuantityBase);
end;
var
DemandInputErr: Label 'Enter a shipment date and a positive additional base quantity.';
}