Codeunit 6284 Sust. FA Post Subscriber

Sustainability, Microsoft.Sustainability.Posting

Source AL, 96 lines

src/Apps/W1/Sustainability/app/src/Posting/SustFAPostSubscriber.Codeunit.allines 14 to 29 of 96, Copyright (c) Microsoft Corporation. MIT

codeunit 6284 "Sust. FA Post Subscriber"{    [EventSubscriber(ObjectType::Codeunit, Codeunit::"FA Jnl.-Post Line", 'OnAfterPostFixedAsset', '', false, false)]    local procedure OnAfterPostFixedAsset(FALedgEntry: Record "FA Ledger Entry")    begin        if CanCreateSustValueEntry(FALedgEntry) then            PostSustainabilityValueEntry(FALedgEntry);    end;    local procedure CanCreateSustValueEntry(FALedgerEntry: Record "FA Ledger Entry"): Boolean    begin        if not SustainabilitySetup.IsValueChainTrackingEnabled() then            exit(false);        exit((FALedgerEntry."Sust. Account No." <> '') and (FALedgerEntry.IsSourcePurchase() or (FALedgerEntry.IsSourceSales())));    end;

All 96 lines

Procedures 1

ProcedureVersions
internal CheckSustainabilityFALine(AccountNo: Code[20]; AccountCategory: Code[20]; AccountSubCategory: Code[20]; FAPostingType: Enum "FA Journal Line FA Posting Type"; CO2eToPost: Decimal): Booleannew in 28