Codeunit 5827 Invt. Post G/L Src. Curr. Sub.

Base Application, Microsoft.Inventory.Costing

Source AL, 23 lines

src/Layers/W1/BaseApp/Inventory/Costing/InvtPostGLSrcCurrSub.Codeunit.allines 11 to 23 of 23, Copyright (c) Microsoft Corporation. MIT

codeunit 5827 "Invt. Post G/L Src. Curr. Sub."{    EventSubscriberInstance = Manual;    // Bound by "Inventory Posting To G/L".PostGenJnlLine only. Gen. Journal Line carries Source Currency Code = ACY so Gen. Jnl.-Post Line.GLCalcAddCurrency forwards the pre-summed buffer ACY into G/L Entry."Additional-Currency Amount" (no FX-drift round-trip). G/L Entry must not, however, advertise a Source Currency for inventory-cost postings.    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnAfterInitGLEntry', '', false, false)]    local procedure SuppressSourceCurrencyOnGLEntry(var GLEntry: Record "G/L Entry"; GenJournalLine: Record "Gen. Journal Line"; Amount: Decimal; AddCurrAmount: Decimal; UseAddCurrAmount: Boolean; var CurrencyFactor: Decimal)    begin        GLEntry."Source Currency Code" := '';        GLEntry."Source Currency Amount" := 0;    end;}

All 23 lines