mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
Seed a new breaking-changes (AL API stability) knowledge domain with six articles plus good/bad AL samples, a new al-breaking-changes-review leaf skill, and minimal wiring into al-code-review and the README. Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
26 lines
745 B
AL
26 lines
745 B
AL
codeunit 50315 "Pricing Api Good"
|
|
{
|
|
// Obsolete member left untouched — it only forwards to the replacement and
|
|
// gains no new logic.
|
|
[Obsolete('Use GetUnitPrice instead.', '25.0')]
|
|
procedure GetPrice(ItemNo: Code[20]): Decimal
|
|
begin
|
|
exit(GetUnitPrice(ItemNo));
|
|
end;
|
|
|
|
// New behaviour is built on the supported replacement, not on the obsolete member.
|
|
procedure GetUnitPrice(ItemNo: Code[20]): Decimal
|
|
begin
|
|
exit(CalculateBasePrice(ItemNo) + CalculateSurcharge(ItemNo));
|
|
end;
|
|
|
|
local procedure CalculateBasePrice(ItemNo: Code[20]): Decimal
|
|
begin
|
|
exit(100);
|
|
end;
|
|
|
|
local procedure CalculateSurcharge(ItemNo: Code[20]): Decimal
|
|
begin
|
|
exit(5);
|
|
end;
|
|
}
|