diff --git a/iso20022-generator/generator-test/GeneratorTest.cs b/iso20022-generator/generator-test/GeneratorTest.cs
index bc1ddd2..e1790b5 100644
--- a/iso20022-generator/generator-test/GeneratorTest.cs
+++ b/iso20022-generator/generator-test/GeneratorTest.cs
@@ -15,7 +15,7 @@ public void InitGenerator()
{
UniqueDocumentId = Guid.NewGuid().ToString().Substring(0, 34), // Must be unique for the bank within 90 days
ContactDetailsName = "enio AG",
- ContactDetailsOther = "3.0.1",
+ ContactDetailsOther = "3.0.2",
AutoCalculateControlSum = true
// SenderBic = "ZKBKCHZZ80A" //ZKB
},
@@ -93,7 +93,7 @@ public void InitGenerator()
{
UniqueDocumentId = Guid.NewGuid().ToString().Substring(0, 34), // Must be unique for the bank within 90 days
ContactDetailsName = "enio AG",
- ContactDetailsOther = "3.0.1",
+ ContactDetailsOther = "3.0.2",
AutoCalculateControlSum = true
// SenderBic = "ZKBKCHZZ80A" //ZKB
},
@@ -132,7 +132,7 @@ public void InitGenerator()
{
UniqueDocumentId = Guid.NewGuid().ToString().Substring(0, 34), // Must be unique for the bank within 90 days
ContactDetailsName = "enio AG",
- ContactDetailsOther = "3.0.1",
+ ContactDetailsOther = "3.0.2",
AutoCalculateControlSum = true
},
new Sender()
diff --git a/iso20022-generator/iso20022-generator/Pain001Generator.cs b/iso20022-generator/iso20022-generator/Pain001Generator.cs
index c9381ea..14e56c5 100644
--- a/iso20022-generator/iso20022-generator/Pain001Generator.cs
+++ b/iso20022-generator/iso20022-generator/Pain001Generator.cs
@@ -132,20 +132,33 @@ public void AddTransaction(PaymentInstructionInformation3CH pmtInf, Receiver rec
cdtr.Nm = receiver.Name; // Index 2.79 / Name
if (!string.IsNullOrWhiteSpace(receiver.City))
{
- PostalAddress6CH pstlAdr = new PostalAddress6CH(); // Index 2.79 / Postal Address
+ PostalAddress6CH pstlAdr = new PostalAddress6CH(); // Index 2.77 / Postal Address
cdtr.PstlAdr = pstlAdr;
+
+ if (!string.IsNullOrWhiteSpace(receiver.StreetName))
+ {
+ pstlAdr.StrtNm = receiver.StreetName; // Index 2.77 / Street Name
+ }
+ if (!string.IsNullOrWhiteSpace(receiver.StreetNumber))
+ {
+ pstlAdr.BldgNb = receiver.StreetNumber; // Index 2.77 / Building Number
+ }
- pstlAdr.StrtNm = receiver.StreetName; // Index 2.79 / Street Name
+ if (!string.IsNullOrWhiteSpace(receiver.Zip))
+ {
+ pstlAdr.PstCd = receiver.Zip; // Index 2.77 / Post Code
+ }
- if (!string.IsNullOrWhiteSpace(receiver.StreetNumber))
+ if (!string.IsNullOrWhiteSpace(receiver.City))
{
- pstlAdr.StrtNm = receiver.StreetName + " " + receiver.StreetNumber; // Index 2.79 / Building Number
+ pstlAdr.TwnNm = receiver.City; // Index 2.77 / Town Name
}
- pstlAdr.PstCd = receiver.Zip; // Index 2.79 / Post Code
- pstlAdr.TwnNm = receiver.City; // Index 2.79 / Town Name
- pstlAdr.Ctry = receiver.CountryCode; // Index 2.79 / Country
+ if (!string.IsNullOrWhiteSpace(receiver.CountryCode))
+ {
+ pstlAdr.Ctry = receiver.CountryCode; // Index 2.77 / Country
+ }
}
}
@@ -242,7 +255,10 @@ public void AddTransaction(PaymentInstructionInformation3CH pmtInf, Receiver rec
}
}
- cdtTrfTxInf.InstrForDbtrAgt = transaction.InstructionForDebtorAgent; // Index 2.85
+ if (!string.IsNullOrWhiteSpace(transaction.InstructionForDebtorAgent))
+ {
+ cdtTrfTxInf.InstrForDbtrAgt = transaction.InstructionForDebtorAgent; // Index 2.85
+ }
AddNewCreditTransferTransactionInformation(pmtInf, cdtTrfTxInf);
}
diff --git a/iso20022-generator/iso20022-generator/README.md b/iso20022-generator/iso20022-generator/README.md
index da6b2de..278fa03 100644
--- a/iso20022-generator/iso20022-generator/README.md
+++ b/iso20022-generator/iso20022-generator/README.md
@@ -68,6 +68,11 @@ https://www.six-group.com/dam/download/banking-services/interbank-clearing/de/st
# Version Information
+## 3.0.2 (2023-04-13)
+- Split Street and StreetNumber into two properties
+- Don't export postal adress properties if empty
+- Don't export InstructionForDebtorAgent if empty
+
## 3.0.1 (2023-04-03)
- Corrected issue with unintentionally overriding of sender information
diff --git a/iso20022-generator/iso20022-generator/entity/Initialization.cs b/iso20022-generator/iso20022-generator/entity/Initialization.cs
index 0ff5a00..7a32fef 100644
--- a/iso20022-generator/iso20022-generator/entity/Initialization.cs
+++ b/iso20022-generator/iso20022-generator/entity/Initialization.cs
@@ -7,7 +7,7 @@ public class Initialization
private decimal _controlSum;
private string _contactDetailsName = "iso20022-Generator / enio AG";
- private string _contactDetailsOther = "3.0.1";
+ private string _contactDetailsOther = "3.0.2";
public decimal ControlSum
{
diff --git a/iso20022-generator/iso20022-generator/iso20022-generator.csproj b/iso20022-generator/iso20022-generator/iso20022-generator.csproj
index fc38f94..6b78025 100644
--- a/iso20022-generator/iso20022-generator/iso20022-generator.csproj
+++ b/iso20022-generator/iso20022-generator/iso20022-generator.csproj
@@ -10,11 +10,11 @@
iso20022Generator
iso20022Generator
- 3.0.1
+ 3.0.2
enio AG
This generator library helps you building iso 20022 artifacts with the minimum amount of information you need to set up valid documents. Currently pain.001 files are only supported.
- 3.0.1.0
- 3.0.1.0
+ 3.0.2.0
+ 3.0.2.0
LICENSE.md
README.md