RE: General Ledger Entries View List - to display currency code and foreign currency amount
OOTB the option Renato mentioned is there. This is a modification I’ve seen on a few projects.
A codeunit like below will help you. Note that two fields have been added to the gl entry table to be populated at the point a journal is posted - that works for all transactions through to the gl where a currency is used and you want to store the value. You will need to add the new fields to the page as well.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnAfterInitGLEntry', '', false, false)]
local procedure OnAfterInitGLEntry(var GLEntry: Record "G/L Entry"; GenJournalLine: Record "Gen. Journal Line")
begin
if GenJournalLine."Source Currency Code" <> '' then begin
GLEntry."Document-Currency” := GenJournalLine."Source Currency Code";
if GLEntry.Amount = GenJournalLine."VAT Amount" then
GLEntry."Document-Currency Amount” := GenJournalLine."Source Curr. VAT Amount"
else
GLEntry."Document-Currency Amount” := GenJournalLine."Source Curr. VAT Base Amount";
if GLEntry."Document-Currency Amount” = 0 then
GLEntry."Document-Currency Amount” := GenJournalLine."Source Currency Amount";
end else begin
GLEntry."Document-Currency”:= GenJournalLine."Currency Code";
GLEntry."Document-Currency Amount” := GenJournalLine.Amount;
end;
if GLEntry."Document-Currency” = '' then begin
GetSetup();
GLEntry."Document-Currency”:= GLSetup."LCY Code";
end;
end;