Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ report 2000008 "File FCY SEPA 001.001.09 Pmts"
AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild);
XMLNodeCurr := XMLNewChild;

AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, 9), '', XMLNewChild);
Comment thread
neeleshsinghal marked this conversation as resolved.
AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, '<Precision,2:2><Standard Format,9>'), '', XMLNewChild);
if PmtJnlLine."Currency Code" = '' then
ISOCurrCode := CopyStr(GLSetup."LCY Code", 1, 3)
else begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ report 2000006 "File Non Euro SEPA Payments"
AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild);
XMLNodeCurr := XMLNewChild;

AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, 9), '', XMLNewChild);
Comment thread
neeleshsinghal marked this conversation as resolved.
AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, '<Precision,2:2><Standard Format,9>'), '', XMLNewChild);
Comment thread
neeleshsinghal marked this conversation as resolved.
if PmtJnlLine."Currency Code" = '' then
ISOCurrCode := CopyStr(GLSetup."LCY Code", 1, 3)
else begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ report 2000007 "File SEPA 001.001.09 Pmts"
AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild);
XMLNodeCurr := XMLNewChild;

AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, 9), '', XMLNewChild);
AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, '<Precision,2:2><Standard Format,9>'), '', XMLNewChild);
AddAttribute(XMLDomDoc, XMLNewChild, 'Ccy', 'EUR');
XMLNodeCurr := XMLNodeCurr.ParentNode;
AddElement(XMLNodeCurr, 'CdtrAgt', '', '', XMLNewChild);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ report 2000005 "File SEPA Payments"
AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild);
XMLNodeCurr := XMLNewChild;

AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, 9), '', XMLNewChild);
AddElement(XMLNodeCurr, 'InstdAmt', Format(PmtJnlLine.Amount, 0, '<Precision,2:2><Standard Format,9>'), '', XMLNewChild);
Comment thread
neeleshsinghal marked this conversation as resolved.
AddAttribute(XMLDomDoc, XMLNewChild, 'Ccy', 'EUR');
XMLNodeCurr := XMLNodeCurr.ParentNode;
AddElement(XMLNodeCurr, 'CdtrAgt', '', '', XMLNewChild);
Expand Down
21 changes: 21 additions & 0 deletions src/Layers/BE/Tests/Local/EBPaymentJournalExport.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1221,15 +1221,18 @@ codeunit 144008 "EB - Payment Journal Export"
Initialize();

// Preparation: create settings
SetShowCurrencyToFCYSymbolOnly();
CountryCode := FindCountryRegion();
Comment thread
neeleshsinghal marked this conversation as resolved.
ExportProtocol := CreateSEPAExportProtocol(false);

// Create payments
SetCurrencySymbol(ForeignCurrencyCode);
VendorSwift := GenerateBankAccSwiftCode();
VendorNo := CreateVendor(CountryCode, ExportProtocol, VendorSwift, VendorIbanTxt);
InvAmount1 := CreateAndPostPurchInv(VendorNo, false);
FirstForeignCurrencyCodeIso := ForeignCurrencyIso;
CreateForeignCurrency(SecondForeignCurrencyCode, SecondForeignCurrencyCodeIso);
SetCurrencySymbol(SecondForeignCurrencyCode);
ForeignCurrencyCode := SecondForeignCurrencyCode;
ForeignCurrencyIso := SecondForeignCurrencyCodeIso;
InvAmount2 := CreateAndPostPurchInv(VendorNo, false);
Comment thread
neeleshsinghal marked this conversation as resolved.
Expand Down Expand Up @@ -1999,6 +2002,24 @@ codeunit 144008 "EB - Payment Journal Export"
ForeignCurrency.Modify(true);
end;

local procedure SetShowCurrencyToFCYSymbolOnly()
var
GeneralLedgerSetup: Record "General Ledger Setup";
begin
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("Show Currency", GeneralLedgerSetup."Show Currency"::"FCY Symbol Only");
GeneralLedgerSetup.Modify(true);
end;
Comment thread
neeleshsinghal marked this conversation as resolved.

local procedure SetCurrencySymbol(CurrencyCode: Code[10])
var
Currency: Record Currency;
begin
Currency.Get(CurrencyCode);
Currency.Validate(Symbol, '$');
Currency.Modify(true);
end;

local procedure CreateSEPAExportProtocol(UseEuro: Boolean): Code[20]
var
ExportProtocol: Record "Export Protocol";
Expand Down
Loading