mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 07:36:54 +01:00
Add SCM functional knowledge domain (#192)
* 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> * Normalize SCM knowledge and review ownership Align article and AL sample conventions, keep BC facts separate from review mechanics, and clarify reciprocal Finance ownership without bespoke shared test assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d38377b85e
commit
bec8890b7e
34 changed files with 1030 additions and 10 deletions
|
|
@ -0,0 +1,32 @@
|
|||
codeunit 50100 "SCM Stock Adjustment Bad"
|
||||
{
|
||||
procedure PostPreparedPositiveAdjustment(ItemJournalLine: Record "Item Journal Line"; NewEntryNo: Integer)
|
||||
var
|
||||
ItemLedgerEntry: Record "Item Ledger Entry";
|
||||
begin
|
||||
ItemJournalLine.TestField("Entry Type", ItemJournalLine."Entry Type"::"Positive Adjmt.");
|
||||
ItemJournalLine.TestField("Value Entry Type", ItemJournalLine."Value Entry Type"::"Direct Cost");
|
||||
ItemJournalLine.TestField("Item No.");
|
||||
ItemJournalLine.TestField("Posting Date");
|
||||
ItemJournalLine.TestField("Quantity (Base)");
|
||||
if ItemJournalLine."Quantity (Base)" < 0 then
|
||||
Error(PositiveQuantityErr);
|
||||
|
||||
ItemLedgerEntry.Init();
|
||||
ItemLedgerEntry."Entry No." := NewEntryNo;
|
||||
ItemLedgerEntry."Item No." := ItemJournalLine."Item No.";
|
||||
ItemLedgerEntry."Entry Type" := ItemJournalLine."Entry Type";
|
||||
ItemLedgerEntry."Posting Date" := ItemJournalLine."Posting Date";
|
||||
ItemLedgerEntry."Document No." := ItemJournalLine."Document No.";
|
||||
ItemLedgerEntry."Location Code" := ItemJournalLine."Location Code";
|
||||
ItemLedgerEntry."Variant Code" := ItemJournalLine."Variant Code";
|
||||
ItemLedgerEntry.Quantity := ItemJournalLine."Quantity (Base)";
|
||||
ItemLedgerEntry."Remaining Quantity" := ItemLedgerEntry.Quantity;
|
||||
ItemLedgerEntry.Positive := true;
|
||||
ItemLedgerEntry.Open := true;
|
||||
ItemLedgerEntry.Insert(true);
|
||||
end;
|
||||
|
||||
var
|
||||
PositiveQuantityErr: Label 'The prepared adjustment must increase inventory.';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue