mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
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>
19 lines
674 B
AL
19 lines
674 B
AL
namespace BCQuality.SCM.Samples;
|
|
|
|
using Microsoft.Inventory.Tracking;
|
|
using Microsoft.Sales.Document;
|
|
|
|
codeunit 50107 "SCM Cancel Reservation Good"
|
|
{
|
|
procedure CancelSalesReservation(ReservationEntryNo: Integer)
|
|
var
|
|
ReservationEntry: Record "Reservation Entry";
|
|
ReservationEngineMgt: Codeunit "Reservation Engine Mgt.";
|
|
begin
|
|
ReservationEntry.Get(ReservationEntryNo, false);
|
|
ReservationEntry.TestField("Source Type", Database::"Sales Line");
|
|
ReservationEntry.TestField("Reservation Status", ReservationEntry."Reservation Status"::Reservation);
|
|
|
|
ReservationEngineMgt.CancelReservation(ReservationEntry);
|
|
end;
|
|
}
|