Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/BE/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}

Expand Down
28 changes: 28 additions & 0 deletions src/Layers/CZ/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,34 @@
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/ES/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/FR/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/IT/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/NA/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
SvcLvlCd := 'SEPA';
end;
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
SvcLvlCd := 'SEPA'
else
SvcLvlCd := 'NURG';
end;
}
}
}
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/NO/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
28 changes: 28 additions & 0 deletions src/Layers/RU/Tests/ERM/ERMTestSEPACreditTransfers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,34 @@ codeunit 134403 "ERM Test SEPA Credit Transfers"
UnbindSubscription(ERMTestSEPACreditTransfers);
end;

[Test]
procedure SvcLvlCodeIsNurgForNonEuroPayment()
var
GeneralLedgerSetup: Record "General Ledger Setup";
GenJournalLine: Record "Gen. Journal Line";
TempBlob: Codeunit "Temp Blob";
BlobOutStream: OutStream;
begin
// [SCENARIO 641065] Exporting a non-euro payment in SEPA format with charge bearer "SHAR" writes "NURG" into the "SvcLvl/Cd" tag instead of the invalid "SEPA".
Init();

// [GIVEN] "SEPA Non-Euro Export" is enabled in General Ledger Setup, so charge bearer is "SHAR".
GeneralLedgerSetup.Get();
GeneralLedgerSetup.Validate("SEPA Non-Euro Export", true);
GeneralLedgerSetup.Modify();

// [GIVEN] A payment journal line for vendor "V".
CreateGenJnlLine(GenJournalLine);

// [WHEN] Export the journal line using XmlPort "SEPA CT pain.001.001.09".
TempBlob.CreateOutStream(BlobOutStream);
Xmlport.Export(BankAccount.GetPaymentExportXMLPortID(), BlobOutStream, GenJournalLine);

// [THEN] The "PmtTpInf/SvcLvl/Cd" tag has value "NURG".
LibraryXPathXMLReader.InitializeWithBlob(TempBlob, NamespaceTxt);
LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'NURG');
end;

local procedure Init()
var
NoSeries: Record "No. Series";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ xmlport 1001 "SEPA CT pain.001.001.09"

trigger OnBeforePassVariable()
begin
Cd := 'SEPA';
if PaymentExportDataGroup."SEPA Charge Bearer Text" = 'SLEV' then
Cd := 'SEPA'
else
Cd := 'NURG';
end;
}
}
Expand Down
Loading
Loading