mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
Move Finance knowledge to the Microsoft-owned layer, add nine scoped rules with eighteen AL samples, and register bounded Finance review with complete paired evaluation coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
33 lines
1.1 KiB
AL
33 lines
1.1 KiB
AL
// Demonstration only; independently authored, not copied from BaseApp.
|
|
codeunit 50104 "Customer Settlement Actions"
|
|
{
|
|
procedure RequestApplication(CustomerEntryNo: Integer)
|
|
var
|
|
CustomerEntry: Record "Cust. Ledger Entry";
|
|
begin
|
|
RequireInteractiveSession();
|
|
CustomerEntry.Get(CustomerEntryNo);
|
|
CustomerEntry.TestField(Open, true);
|
|
CustomerEntry.Open := false;
|
|
CustomerEntry.Modify(true);
|
|
end;
|
|
|
|
procedure RequestUnapplication(CustomerEntryNo: Integer)
|
|
var
|
|
DetailedCustomerEntry: Record "Detailed Cust. Ledg. Entry";
|
|
begin
|
|
RequireInteractiveSession();
|
|
DetailedCustomerEntry.SetRange("Cust. Ledger Entry No.", CustomerEntryNo);
|
|
DetailedCustomerEntry.SetRange("Entry Type", DetailedCustomerEntry."Entry Type"::Application);
|
|
DetailedCustomerEntry.ModifyAll(Unapplied, true);
|
|
end;
|
|
|
|
local procedure RequireInteractiveSession()
|
|
begin
|
|
if not GuiAllowed() then
|
|
Error(InteractiveSessionErr);
|
|
end;
|
|
|
|
var
|
|
InteractiveSessionErr: Label 'Request settlement from an interactive session.';
|
|
}
|