mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 667c64a8-eb36-4440-bc41-6a97d8fb5542 Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
17 lines
652 B
AL
17 lines
652 B
AL
codeunit 50253 "Perf Sample NPlus1 Bad"
|
|
{
|
|
procedure SumStdCost(BOMNo: Code[20]; BOMVersionCode: Code[20]) TotalCost: Decimal
|
|
var
|
|
BOMLine: Record "Production BOM Line";
|
|
Item: Record Item;
|
|
begin
|
|
BOMLine.SetRange("Production BOM No.", BOMNo);
|
|
BOMLine.SetRange("Version Code", BOMVersionCode);
|
|
if BOMLine.FindSet() then
|
|
repeat
|
|
if Item.Get(BOMLine."No.") then
|
|
if Item."Costing Method" = Item."Costing Method"::Standard then
|
|
TotalCost += Item."Standard Cost" * BOMLine."Quantity per";
|
|
until BOMLine.Next() = 0;
|
|
end;
|
|
}
|