mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 07:36:54 +01:00
Add BC performance knowledge from OptimAL learnings
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
07e324ddbc
commit
af94c135ad
37 changed files with 881 additions and 36 deletions
|
|
@ -0,0 +1,39 @@
|
|||
// Caller supplies an unfiltered temporary buffer that does not change during this call.
|
||||
table 50373 "Perf Cell"
|
||||
{
|
||||
DataClassification = CustomerContent;
|
||||
|
||||
fields
|
||||
{
|
||||
field(1; "Cell No."; Integer) { }
|
||||
field(2; "Item No."; Code[20]) { }
|
||||
field(3; Quantity; Decimal) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Cell No.") { Clustered = true; }
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50374 "Perf Temp Totals Good"
|
||||
{
|
||||
procedure SumDisplayedItemTotals(var TempCells: Record "Perf Cell" temporary) DisplayedTotal: Decimal
|
||||
var
|
||||
TotalsByItem: Dictionary of [Code[20], Decimal];
|
||||
ItemTotal: Decimal;
|
||||
begin
|
||||
if TempCells.FindSet() then
|
||||
repeat
|
||||
if TotalsByItem.Get(TempCells."Item No.", ItemTotal) then
|
||||
TotalsByItem.Set(TempCells."Item No.", ItemTotal + TempCells.Quantity)
|
||||
else
|
||||
TotalsByItem.Add(TempCells."Item No.", TempCells.Quantity);
|
||||
until TempCells.Next() = 0;
|
||||
|
||||
if TempCells.FindSet() then
|
||||
repeat
|
||||
DisplayedTotal += TotalsByItem.Get(TempCells."Item No.");
|
||||
until TempCells.Next() = 0;
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue