mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-08 18:31:36 +01:00
Refactor CMFRTAQFSResolveItemToGLAcc to pass IsHandled to DoCMFRTAQFSResolveItemToGLAcc and update documentation for clarity on event handling structure
This commit is contained in:
parent
a63a3614a9
commit
4f74b884d8
2 changed files with 7 additions and 9 deletions
|
|
@ -6,20 +6,18 @@ codeunit 55043 "CMFRT AQ FS ProForma Meth"
|
|||
begin
|
||||
IsHandled := false;
|
||||
OnBeforeCMFRTAQFSResolveItemToGLAcc(SalesLine, IsHandled);
|
||||
if IsHandled then
|
||||
exit;
|
||||
|
||||
DoCMFRTAQFSResolveItemToGLAcc(SalesLine);
|
||||
|
||||
DoCMFRTAQFSResolveItemToGLAcc(SalesLine, IsHandled);
|
||||
OnAfterCMFRTAQFSResolveItemToGLAcc(SalesLine);
|
||||
end;
|
||||
|
||||
local procedure DoCMFRTAQFSResolveItemToGLAcc(var SalesLine: Record "Sales Line")
|
||||
local procedure DoCMFRTAQFSResolveItemToGLAcc(var SalesLine: Record "Sales Line"; IsHandled: Boolean)
|
||||
var
|
||||
Item: Record Item;
|
||||
GeneralPostingSetup: Record "General Posting Setup";
|
||||
ItemNotFoundErr: Label 'Item %1 was not found.', Comment = '%1 = Item No.';
|
||||
begin
|
||||
if IsHandled then
|
||||
exit;
|
||||
Item.SetLoadFields("No.", "Gen. Prod. Posting Group", Description);
|
||||
if not Item.Get(SalesLine."CMFRT AQ FS Item No.") then
|
||||
Error(ItemNotFoundErr, SalesLine."CMFRT AQ FS Item No.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue