Compare commits
46 Commits
6bcb2fb406
...
v0.6.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 9172222307 | |||
| 05a75a52cc | |||
| 8732141e6b | |||
| 99ca12b276 | |||
| 7ff069d068 | |||
| 583d5b4e3e | |||
| 3f2b5b684c | |||
| 5db14c09ad | |||
| 791eaddf58 | |||
| 5cb29aa75f | |||
| 3c0fea30f5 | |||
| f2df121435 | |||
| 7f4cfdc1b5 | |||
| f4eb6456be | |||
| f13fb3aaf0 | |||
| 9a39879804 | |||
| 11be424c38 | |||
| 1b9064a97c | |||
| 805f782c83 | |||
| 912206f52d | |||
| 825bd6f304 | |||
| 9ecad6aa79 | |||
| 68f1a2c091 | |||
| 59cd69ddaf | |||
| 7c23f9bdae | |||
| 6d53e35399 | |||
| 42eb68d431 | |||
| 0591d91f49 | |||
| befe6a753b | |||
| 4daa6deb26 | |||
| c07a6b450c | |||
| 6fdd72e28b | |||
| 6af33c591f | |||
| f850fd08ff | |||
| b063b201e3 | |||
| 60b624b009 | |||
| 71a234ca60 | |||
| 38abfb0edd | |||
| 05a037db70 | |||
| b9287f8260 | |||
| 50ac757067 | |||
| c6cd9d7c73 | |||
| 1b28752f4c | |||
| e0bdbee2ae | |||
| ff3bd5cea5 | |||
| 116d88d3d6 |
@@ -0,0 +1,55 @@
|
|||||||
|
name: Deploy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Build and Deploy
|
||||||
|
runs-on: windows-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Set APP_VERSION variable from tag
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$APP_VERSION = $env:GITHUB_REF -replace '^refs/tags/v', ''
|
||||||
|
Add-Content -Path $env:GITHUB_ENV -Value "APP_VERSION=$APP_VERSION"
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Check version in project
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Select-String Elwig/Elwig.csproj -Pattern "<Version>"
|
||||||
|
$res = Select-String Elwig/Elwig.csproj -Pattern "<Version>${{ env.APP_VERSION }}</Version>"
|
||||||
|
if ($res -eq $null) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
- name: Setup NuGet
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
- name: Restore NuGet packages
|
||||||
|
shell: powershell
|
||||||
|
run: $(& nuget restore Elwig.sln; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Build Setup
|
||||||
|
shell: powershell
|
||||||
|
run: $(& msbuild -verbosity:quiet Setup/Setup.wixproj -property:Configuration=Release -property:Platform=x64; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Rename artifact
|
||||||
|
shell: powershell
|
||||||
|
run: Move-Item Setup/bin/x64/Release/Elwig.exe Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe
|
||||||
|
- name: Create release
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
name: Elwig ${{ env.APP_VERSION }}
|
||||||
|
files: |-
|
||||||
|
Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe
|
||||||
|
- name: Upload to website
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$content = [System.IO.File]::ReadAllBytes("Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe")
|
||||||
|
Invoke-WebRequest `
|
||||||
|
-Uri "https://www.necronda.net/elwig/files/Elwig-${{ env.APP_VERSION }}.exe" `
|
||||||
|
-Method PUT `
|
||||||
|
-Body $content `
|
||||||
|
-Headers @{ Authorization = "${{ secrets.API_AUTHORIZATION }}" } `
|
||||||
|
-ContentType "application/octet-stream"
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: Test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["**"]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Run tests
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
- name: Setup NuGet
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
- name: Restore NuGet packages
|
||||||
|
shell: powershell
|
||||||
|
run: $(& nuget restore Elwig.sln; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Build Elwig
|
||||||
|
shell: powershell
|
||||||
|
run: $(& msbuild -verbosity:quiet Elwig/Elwig.csproj -property:Configuration=Debug; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Build Tests
|
||||||
|
shell: powershell
|
||||||
|
run: $(& dotnet build Tests; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
|
- name: Run Tests
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH += ";$(pwd)\Installer\Files"
|
||||||
|
$(& dotnet test Tests; $a=$lastexitcode) | findstr x*; exit $a
|
||||||
+3
-1
@@ -3,4 +3,6 @@ bin/
|
|||||||
*.user
|
*.user
|
||||||
.vs
|
.vs
|
||||||
.idea
|
.idea
|
||||||
Tests/Resources/Create.sql
|
Tests/Resources/Sql/Create.sql
|
||||||
|
*.exe
|
||||||
|
!WinziPrint.exe
|
||||||
|
|||||||
+23
-36
@@ -53,7 +53,7 @@ namespace Elwig {
|
|||||||
public static string? BranchFaxNr { get; private set; }
|
public static string? BranchFaxNr { get; private set; }
|
||||||
public static string? BranchMobileNr { get; private set; }
|
public static string? BranchMobileNr { get; private set; }
|
||||||
public static IList<IScale> Scales { get; private set; }
|
public static IList<IScale> Scales { get; private set; }
|
||||||
public static ClientParameters Client { get; private set; }
|
public static ClientParameters Client { get; set; }
|
||||||
|
|
||||||
public static bool IsPrintingReady => Html.IsReady && Pdf.IsReady;
|
public static bool IsPrintingReady => Html.IsReady && Pdf.IsReady;
|
||||||
public static Dispatcher MainDispatcher { get; private set; }
|
public static Dispatcher MainDispatcher { get; private set; }
|
||||||
@@ -63,7 +63,7 @@ namespace Elwig {
|
|||||||
Directory.CreateDirectory(TempPath);
|
Directory.CreateDirectory(TempPath);
|
||||||
Directory.CreateDirectory(DataPath);
|
Directory.CreateDirectory(DataPath);
|
||||||
MainDispatcher = Dispatcher;
|
MainDispatcher = Dispatcher;
|
||||||
Scales = Array.Empty<IScale>();
|
Scales = [];
|
||||||
CurrentApp = this;
|
CurrentApp = this;
|
||||||
OverrideCulture();
|
OverrideCulture();
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ namespace Elwig {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, (string, string, int?, string?, string?, string?, string?, string?)> branches = new();
|
Dictionary<string, (string, string, int?, string?, string?, string?, string?, string?)> branches = [];
|
||||||
using (var ctx = new AppDbContext()) {
|
using (var ctx = new AppDbContext()) {
|
||||||
branches = ctx.Branches.ToDictionary(b => b.Name.ToLower(), b => (b.ZwstId, b.Name, b.PostalDest?.AtPlz?.Plz, b.PostalDest?.AtPlz?.Ort.Name, b.Address, b.PhoneNr, b.FaxNr, b.MobileNr));
|
branches = ctx.Branches.ToDictionary(b => b.Name.ToLower(), b => (b.ZwstId, b.Name, b.PostalDest?.AtPlz?.Plz, b.PostalDest?.AtPlz?.Ort.Name, b.Address, b.PhoneNr, b.FaxNr, b.MobileNr));
|
||||||
try {
|
try {
|
||||||
@@ -115,23 +115,11 @@ namespace Elwig {
|
|||||||
|
|
||||||
var list = new List<IScale>();
|
var list = new List<IScale>();
|
||||||
foreach (var s in Config.Scales) {
|
foreach (var s in Config.Scales) {
|
||||||
var id = s[0];
|
|
||||||
try {
|
try {
|
||||||
var type = s[1]?.ToLower();
|
list.Add(Scale.FromConfig(s));
|
||||||
var model = s[2];
|
|
||||||
var cnx = s[3];
|
|
||||||
var empty = s[4];
|
|
||||||
var filling = s[5];
|
|
||||||
int? limit = s[6] == null ? null : int.Parse(s[6]);
|
|
||||||
var log = s[7];
|
|
||||||
if (type == "systec") {
|
|
||||||
list.Add(new SystecScale(id, model, cnx, empty, filling, limit, log));
|
|
||||||
} else {
|
|
||||||
throw new ArgumentException($"Invalid scale type: \"{type}\"");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
list.Add(new InvalidScale(id));
|
list.Add(new InvalidScale(s.Id));
|
||||||
MessageBox.Show($"Unable to create scale {s[0]}:\n\n{e.Message}", "Scale Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show($"Unable to create scale {s.Id}:\n\n{e.Message}", "Scale Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Scales = list;
|
Scales = list;
|
||||||
@@ -141,26 +129,10 @@ namespace Elwig {
|
|||||||
MessageBox.Show("Invalid branch name in config!", "Invalid Branch Config", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Invalid branch name in config!", "Invalid Branch Config", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
Shutdown();
|
Shutdown();
|
||||||
} else {
|
} else {
|
||||||
var entry = branches[Config.Branch.ToLower()];
|
SetBranch(branches[Config.Branch.ToLower()]);
|
||||||
ZwstId = entry.Item1;
|
|
||||||
BranchName = entry.Item2;
|
|
||||||
BranchPlz = entry.Item3;
|
|
||||||
BranchLocation = entry.Item4?.Split(" im ")[0].Split(" an ")[0].Split(" bei ")[0]; // FIXME
|
|
||||||
BranchAddress = entry.Item5;
|
|
||||||
BranchPhoneNr = entry.Item6;
|
|
||||||
BranchFaxNr = entry.Item7;
|
|
||||||
BranchMobileNr = entry.Item8;
|
|
||||||
}
|
}
|
||||||
} else if (branches.Count == 1) {
|
} else if (branches.Count == 1) {
|
||||||
var entry = branches.First().Value;
|
SetBranch(branches.First().Value);
|
||||||
ZwstId = entry.Item1;
|
|
||||||
BranchName = entry.Item2;
|
|
||||||
BranchPlz = entry.Item3;
|
|
||||||
BranchLocation = entry.Item4?.Split(" im ")[0].Split(" an ")[0].Split(" bei ")[0]; // FIXME
|
|
||||||
BranchAddress = entry.Item5;
|
|
||||||
BranchPhoneNr = entry.Item6;
|
|
||||||
BranchFaxNr = entry.Item7;
|
|
||||||
BranchMobileNr = entry.Item8;
|
|
||||||
} else {
|
} else {
|
||||||
MessageBox.Show("Unable to determine local branch!", "Invalid Branch Config", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Unable to determine local branch!", "Invalid Branch Config", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
Shutdown();
|
Shutdown();
|
||||||
@@ -169,6 +141,21 @@ namespace Elwig {
|
|||||||
base.OnStartup(evt);
|
base.OnStartup(evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SetBranch(Branch b) {
|
||||||
|
SetBranch((b.ZwstId, b.Name, b.PostalDest?.AtPlz?.Plz, b.PostalDest?.AtPlz?.Ort.Name, b.Address, b.PhoneNr, b.FaxNr, b.MobileNr));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SetBranch((string, string, int?, string?, string?, string?, string?, string?) entry) {
|
||||||
|
ZwstId = entry.Item1;
|
||||||
|
BranchName = entry.Item2;
|
||||||
|
BranchPlz = entry.Item3;
|
||||||
|
BranchLocation = entry.Item4?.Split(" im ")[0].Split(" an ")[0].Split(" bei ")[0]; // FIXME
|
||||||
|
BranchAddress = entry.Item5;
|
||||||
|
BranchPhoneNr = entry.Item6;
|
||||||
|
BranchFaxNr = entry.Item7;
|
||||||
|
BranchMobileNr = entry.Item8;
|
||||||
|
}
|
||||||
|
|
||||||
private void PrintingReadyChanged() {
|
private void PrintingReadyChanged() {
|
||||||
Dispatcher.BeginInvoke(OnPrintingReadyChanged, new EventArgs());
|
Dispatcher.BeginInvoke(OnPrintingReadyChanged, new EventArgs());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,15 @@ namespace Elwig.Documents {
|
|||||||
public decimal MemberTotalUnderDelivery;
|
public decimal MemberTotalUnderDelivery;
|
||||||
public decimal MemberAutoBusinessShares;
|
public decimal MemberAutoBusinessShares;
|
||||||
|
|
||||||
public CreditNote(AppDbContext ctx, PaymentMember p, CreditNoteDeliveryData data, Dictionary<string, UnderDelivery>? underDeliveries = null) :
|
public CreditNote(
|
||||||
|
AppDbContext ctx,
|
||||||
|
PaymentMember p,
|
||||||
|
CreditNoteDeliveryData data,
|
||||||
|
bool considerContractPenalties,
|
||||||
|
bool considerTotalPenalty,
|
||||||
|
bool considerAutoBusinessShares,
|
||||||
|
Dictionary<string, UnderDelivery>? underDeliveries = null
|
||||||
|
) :
|
||||||
base($"{Name} {(p.Credit != null ? $"Nr. {p.Credit.Year}/{p.Credit.TgNr:000}" : p.Member.Name)} – {p.Variant.Name}", p.Member) {
|
base($"{Name} {(p.Credit != null ? $"Nr. {p.Credit.Year}/{p.Credit.TgNr:000}" : p.Member.Name)} – {p.Variant.Name}", p.Member) {
|
||||||
UseBillingAddress = true;
|
UseBillingAddress = true;
|
||||||
ShowDateAndLocation = true;
|
ShowDateAndLocation = true;
|
||||||
@@ -34,16 +42,6 @@ namespace Elwig.Documents {
|
|||||||
} else {
|
} else {
|
||||||
MemberModifier = "Sonstige Zu-/Abschläge";
|
MemberModifier = "Sonstige Zu-/Abschläge";
|
||||||
}
|
}
|
||||||
var total = data.Rows.SelectMany(r => r.Buckets).Sum(b => b.Value);
|
|
||||||
var totalUnderDelivery = total - p.Member.BusinessShares * season.MinKgPerBusinessShare;
|
|
||||||
MemberTotalUnderDelivery = totalUnderDelivery < 0 ? totalUnderDelivery * (season.PenaltyPerKg ?? 0) - (season.PenaltyAmount ?? 0) : 0;
|
|
||||||
var fromDate = $"{season.Year}-06-01";
|
|
||||||
var toDate = $"{season.Year + 1}-06-01";
|
|
||||||
MemberAutoBusinessShares = ctx.MemberHistory
|
|
||||||
.Where(h => h.MgNr == p.Member.MgNr && h.Type == "auto")
|
|
||||||
.Where(h => h.DateString.CompareTo(fromDate) >= 0 && h.DateString.CompareTo(toDate) < 0)
|
|
||||||
.Sum(h => h.BusinessShares) * (-season.BusinessShareValue ?? 0);
|
|
||||||
if (total == 0) MemberTotalUnderDelivery -= (season.PenaltyNone ?? 0);
|
|
||||||
Aside = Aside.Replace("</table>", "") +
|
Aside = Aside.Replace("</table>", "") +
|
||||||
$"<thead><tr><th colspan='2'>Gutschrift</th></tr></thead><tbody>" +
|
$"<thead><tr><th colspan='2'>Gutschrift</th></tr></thead><tbody>" +
|
||||||
$"<tr><th>TG-Nr.</th><td>{(p.Credit != null ? $"{p.Credit.Year}/{p.Credit.TgNr:000}" : "-")}</td></tr>" +
|
$"<tr><th>TG-Nr.</th><td>{(p.Credit != null ? $"{p.Credit.Year}/{p.Credit.TgNr:000}" : "-")}</td></tr>" +
|
||||||
@@ -55,18 +53,35 @@ namespace Elwig.Documents {
|
|||||||
CurrencySymbol = season.Currency.Symbol ?? season.Currency.Code;
|
CurrencySymbol = season.Currency.Symbol ?? season.Currency.Code;
|
||||||
Precision = season.Precision;
|
Precision = season.Precision;
|
||||||
|
|
||||||
var varieties = ctx.WineVarieties.ToDictionary(v => v.SortId, v => v);
|
if (considerTotalPenalty) {
|
||||||
var attributes = ctx.WineAttributes.ToDictionary(a => a.AttrId, a => a);
|
var total = data.Rows.SelectMany(r => r.Buckets).Sum(b => b.Value);
|
||||||
var comTypes = ctx.AreaCommitmentTypes.ToDictionary(t => t.VtrgId, t => t);
|
var totalUnderDelivery = total - p.Member.BusinessShares * season.MinKgPerBusinessShare;
|
||||||
MemberUnderDeliveries = underDeliveries?
|
MemberTotalUnderDelivery = totalUnderDelivery < 0 ? totalUnderDelivery * (season.PenaltyPerKg ?? 0) - (season.PenaltyAmount ?? 0) : 0;
|
||||||
.OrderBy(u => u.Key)
|
if (total == 0)
|
||||||
.Select(u => (
|
MemberTotalUnderDelivery -= (season.PenaltyNone ?? 0);
|
||||||
varieties[u.Key[..2]].Name + (u.Key.Length > 2 ? " " + attributes[u.Key[2..]].Name : ""),
|
}
|
||||||
u.Value.Diff,
|
if (considerAutoBusinessShares) {
|
||||||
u.Value.Diff * (comTypes[u.Key].PenaltyPerKg ?? 0)
|
var fromDate = $"{season.Year}-01-01";
|
||||||
- (comTypes[u.Key].PenaltyAmount ?? 0)
|
var toDate = $"{season.Year}-12-31";
|
||||||
- ((u.Value.Weight == 0 ? comTypes[u.Key].PenaltyNone : null) ?? 0)))
|
MemberAutoBusinessShares = ctx.MemberHistory
|
||||||
.Where(u => u.Item3 != 0)
|
.Where(h => h.MgNr == p.Member.MgNr && h.Type == "auto")
|
||||||
.ToList();
|
.Where(h => h.DateString.CompareTo(fromDate) >= 0 && h.DateString.CompareTo(toDate) <= 0)
|
||||||
|
.Sum(h => h.BusinessShares) * (-season.BusinessShareValue ?? 0);
|
||||||
|
}
|
||||||
|
if (considerContractPenalties) {
|
||||||
|
var varieties = ctx.WineVarieties.ToDictionary(v => v.SortId, v => v);
|
||||||
|
var attributes = ctx.WineAttributes.ToDictionary(a => a.AttrId, a => a);
|
||||||
|
var comTypes = ctx.AreaCommitmentTypes.ToDictionary(t => t.VtrgId, t => t);
|
||||||
|
MemberUnderDeliveries = underDeliveries?
|
||||||
|
.OrderBy(u => u.Key)
|
||||||
|
.Select(u => (
|
||||||
|
varieties[u.Key[..2]].Name + (u.Key.Length > 2 ? " " + attributes[u.Key[2..]].Name : ""),
|
||||||
|
u.Value.Diff,
|
||||||
|
u.Value.Diff * (comTypes[u.Key].PenaltyPerKg ?? 0)
|
||||||
|
- (comTypes[u.Key].PenaltyAmount ?? 0)
|
||||||
|
- ((u.Value.Weight == 0 ? comTypes[u.Key].PenaltyNone : null) ?? 0)))
|
||||||
|
.Where(u => u.Item3 != 0)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -81,15 +81,20 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="hint">
|
<div class="hint">
|
||||||
Hinweis:<br/>
|
Hinweis:<br/>
|
||||||
Die Summe der Lieferungen und die Summe der anfallenden Pönalen werden mit
|
Die Summe der Lieferungen und die Summe der anfal­lenden Pönalen werden mit
|
||||||
@Model.Payment?.Variant.Season.Precision Nachkommastellen berechnent,
|
@Model.Payment?.Variant.Season.Precision Nach­komma­stellen berechnent,
|
||||||
erst das Ergebnis wird kaufmännisch auf 2 Nachkommastellen gerundet.
|
erst das Ergebnis wird kauf­männisch auf 2 Nach­komma­stellen gerundet.
|
||||||
</div>
|
</div>
|
||||||
<table class="credit-sum">
|
<table class="credit-sum">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: auto;"/>
|
||||||
|
<col style="width: 5mm;"/>
|
||||||
|
<col style="width: 30mm;"/>
|
||||||
|
</colgroup>
|
||||||
@{
|
@{
|
||||||
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
||||||
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : !add ? "large" : "")} {(bold ? "large bold" : "")}\">"
|
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : !add ? "large" : "")} {(bold ? "large bold" : "")}\">"
|
||||||
+ $"<td class=\"{(subCat ? "small" : "")}\" style=\"overflow: visible;\">{name}:</td>"
|
+ $"<td class=\"{(subCat ? "small" : "")}\">{name}:</td>"
|
||||||
+ $"<td class=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
||||||
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
||||||
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
||||||
@@ -148,8 +153,9 @@
|
|||||||
@if (Model.Credit == null) {
|
@if (Model.Credit == null) {
|
||||||
@Raw(FormatRow("Auszahlungsbetrag", (Model.Payment?.Amount + penalty) ?? (sum + penalty), bold: true))
|
@Raw(FormatRow("Auszahlungsbetrag", (Model.Payment?.Amount + penalty) ?? (sum + penalty), bold: true))
|
||||||
} else {
|
} else {
|
||||||
if (Model.Credit.Modifiers - penalty != 0) {
|
var diff = Model.Credit.Modifiers - penalty;
|
||||||
@Raw(FormatRow("Weitere Abzüge", Model.Credit.Modifiers - penalty, add: true))
|
if (diff != 0) {
|
||||||
|
@Raw(FormatRow(diff < 0 ? "Weitere Abzüge" : "Weitere Zuschläge", diff, add: true))
|
||||||
}
|
}
|
||||||
if (Model.Credit.PrevModifiers != null && Model.Credit.PrevModifiers != 0) {
|
if (Model.Credit.PrevModifiers != null && Model.Credit.PrevModifiers != 0) {
|
||||||
@Raw(FormatRow("Bereits berücksichtigte Abzüge", -Model.Credit.PrevModifiers, add: true))
|
@Raw(FormatRow("Bereits berücksichtigte Abzüge", -Model.Credit.PrevModifiers, add: true))
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ table.credit tr.last td {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.credit-sum {
|
table.credit-sum {
|
||||||
width: 50%;
|
width: 60%;
|
||||||
margin-left: 50%;
|
margin-left: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.credit-sum tr.sum,
|
table.credit-sum tr.sum,
|
||||||
@@ -41,7 +41,7 @@ table.credit-sum td.sum {
|
|||||||
.hint {
|
.hint {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
width: 74mm;
|
width: 56mm;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: 2mm 4mm;
|
margin: 2mm 4mm;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Elwig.Documents {
|
|||||||
// 3 - full
|
// 3 - full
|
||||||
public int DisplayStats = App.Client.ModeDeliveryNoteStats;
|
public int DisplayStats = App.Client.ModeDeliveryNoteStats;
|
||||||
|
|
||||||
public DeliveryNote(Delivery d, AppDbContext ctx) : base($"Traubenübernahmeschein Nr. {d.LsNr}", d.Member) {
|
public DeliveryNote(Delivery d, AppDbContext? ctx = null) : base($"Traubenübernahmeschein Nr. {d.LsNr}", d.Member) {
|
||||||
UseBillingAddress = true;
|
UseBillingAddress = true;
|
||||||
ShowDateAndLocation = true;
|
ShowDateAndLocation = true;
|
||||||
Delivery = d;
|
Delivery = d;
|
||||||
@@ -27,7 +27,7 @@ namespace Elwig.Documents {
|
|||||||
$"</tbody></table>";
|
$"</tbody></table>";
|
||||||
Text = App.Client.TextDeliveryNote;
|
Text = App.Client.TextDeliveryNote;
|
||||||
DocumentId = d.LsNr;
|
DocumentId = d.LsNr;
|
||||||
MemberBuckets = ctx.GetMemberBuckets(d.Year, d.Member.MgNr).GetAwaiter().GetResult();
|
MemberBuckets = ctx?.GetMemberBuckets(d.Year, d.Member.MgNr).GetAwaiter().GetResult() ?? [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Elwig.Documents {
|
|||||||
public MemberDataSheet(Member m, AppDbContext ctx) : base($"{Name} {m.AdministrativeName}", m) {
|
public MemberDataSheet(Member m, AppDbContext ctx) : base($"{Name} {m.AdministrativeName}", m) {
|
||||||
DocumentId = $"{Name} {m.MgNr}";
|
DocumentId = $"{Name} {m.MgNr}";
|
||||||
Season = ctx.Seasons.ToList().MaxBy(s => s.Year) ?? throw new ArgumentException("invalid season");
|
Season = ctx.Seasons.ToList().MaxBy(s => s.Year) ?? throw new ArgumentException("invalid season");
|
||||||
MemberBuckets = ctx.GetMemberBuckets(Season.Year, m.MgNr).GetAwaiter().GetResult();
|
MemberBuckets = ctx.GetMemberBuckets(Utils.CurrentYear, m.MgNr).GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
@if (Model.Member.BillingAddress != null) {
|
@if (Model.Member.BillingAddress != null) {
|
||||||
@Model.Member.BillingAddress.PostalDest.AtPlz?.Plz
|
@Model.Member.BillingAddress.PostalDest.AtPlz?.Plz
|
||||||
@Model.Member.BillingAddress.PostalDest.AtPlz?.Dest
|
@(" ")@Model.Member.BillingAddress.PostalDest.AtPlz?.Dest
|
||||||
@("(")@Model.Member.BillingAddress.PostalDest.AtPlz?.Ort.Name@(")")
|
@(" (")@Model.Member.BillingAddress.PostalDest.AtPlz?.Ort.Name@(")")
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||||
<Version>0.6.1</Version>
|
<Version>0.6.7</Version>
|
||||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ namespace Elwig.Helpers {
|
|||||||
public DbSet<OverUnderDeliveryRow> OverUnderDeliveryRows { get; private set; }
|
public DbSet<OverUnderDeliveryRow> OverUnderDeliveryRows { get; private set; }
|
||||||
public DbSet<AreaComUnderDeliveryRowSingle> AreaComUnderDeliveryRows { get; private set; }
|
public DbSet<AreaComUnderDeliveryRowSingle> AreaComUnderDeliveryRows { get; private set; }
|
||||||
public DbSet<MemberDeliveryPerVariantRowSingle> MemberDeliveryPerVariantRows { get; private set; }
|
public DbSet<MemberDeliveryPerVariantRowSingle> MemberDeliveryPerVariantRows { get; private set; }
|
||||||
|
public DbSet<CreditNoteDeliveryRowSingle> CreditNoteDeliveryRows { get; private set; }
|
||||||
public DbSet<CreditNoteRowSingle> CreditNoteRows { get; private set; }
|
public DbSet<CreditNoteRowSingle> CreditNoteRows { get; private set; }
|
||||||
|
|
||||||
private readonly StreamWriter? LogFile = null;
|
private readonly StreamWriter? LogFile = null;
|
||||||
@@ -159,16 +160,16 @@ namespace Elwig.Helpers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> NextMgNr() {
|
public async Task<int> NextMgNr() {
|
||||||
int c = await Members.Select(m => m.MgNr).MinAsync();
|
int c = 0;
|
||||||
(await Members.OrderBy(m => m.MgNr).Select(m => m.MgNr).ToListAsync())
|
(await Members.OrderBy(m => m.MgNr).Select(m => m.MgNr).ToListAsync())
|
||||||
.ForEach(a => { if (a <= c + 1000) c = a; });
|
.ForEach(a => { if (a <= c + 1000) c = a; });
|
||||||
return c + 1;
|
return c + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> NextFbNr() {
|
public async Task<int> NextFbNr() {
|
||||||
int c = await AreaCommitments.Select(ac => ac.FbNr).MinAsync();
|
int c = 0;
|
||||||
(await AreaCommitments.OrderBy(ac => ac.FbNr).Select(ac => ac.FbNr).ToListAsync())
|
(await AreaCommitments.OrderBy(ac => ac.FbNr).Select(ac => ac.FbNr).ToListAsync())
|
||||||
.ForEach(a => { if (a <= c + 1000) c = a; });
|
.ForEach(a => { if (a <= c + 10000) c = a; });
|
||||||
return c + 1;
|
return c + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Elwig.Helpers {
|
|||||||
public static class AppDbUpdater {
|
public static class AppDbUpdater {
|
||||||
|
|
||||||
// Don't forget to update value in Tests/fetch-resources.bat!
|
// Don't forget to update value in Tests/fetch-resources.bat!
|
||||||
public static readonly int RequiredSchemaVersion = 13;
|
public static readonly int RequiredSchemaVersion = 17;
|
||||||
|
|
||||||
private static int VersionOffset = 0;
|
private static int VersionOffset = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Elwig.Models.Entities;
|
||||||
|
using Microsoft.Data.Sqlite;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -8,6 +10,7 @@ namespace Elwig.Helpers.Billing {
|
|||||||
|
|
||||||
protected readonly int Year;
|
protected readonly int Year;
|
||||||
protected readonly AppDbContext Context;
|
protected readonly AppDbContext Context;
|
||||||
|
protected readonly Season Season;
|
||||||
protected readonly Dictionary<string, string> Attributes;
|
protected readonly Dictionary<string, string> Attributes;
|
||||||
protected readonly Dictionary<string, (decimal?, decimal?)> Modifiers;
|
protected readonly Dictionary<string, (decimal?, decimal?)> Modifiers;
|
||||||
protected readonly Dictionary<string, (string, string?, string?, int?, decimal?)> AreaComTypes;
|
protected readonly Dictionary<string, (string, string?, string?, int?, decimal?)> AreaComTypes;
|
||||||
@@ -15,6 +18,7 @@ namespace Elwig.Helpers.Billing {
|
|||||||
public Billing(int year) {
|
public Billing(int year) {
|
||||||
Year = year;
|
Year = year;
|
||||||
Context = new AppDbContext();
|
Context = new AppDbContext();
|
||||||
|
Season = Context.Seasons.Find(Year)!;
|
||||||
Attributes = Context.WineAttributes.ToDictionary(a => a.AttrId, a => a.Name);
|
Attributes = Context.WineAttributes.ToDictionary(a => a.AttrId, a => a.Name);
|
||||||
Modifiers = Context.Modifiers.Where(m => m.Year == Year).ToDictionary(m => m.ModId, m => (m.Abs, m.Rel));
|
Modifiers = Context.Modifiers.Where(m => m.Year == Year).ToDictionary(m => m.ModId, m => (m.Abs, m.Rel));
|
||||||
AreaComTypes = Context.AreaCommitmentTypes.ToDictionary(v => v.VtrgId, v => (v.SortId, v.AttrId, v.Discriminator, v.MinKgPerHa, v.PenaltyAmount));
|
AreaComTypes = Context.AreaCommitmentTypes.ToDictionary(v => v.VtrgId, v => (v.SortId, v.AttrId, v.Discriminator, v.MinKgPerHa, v.PenaltyAmount));
|
||||||
@@ -26,8 +30,6 @@ namespace Elwig.Helpers.Billing {
|
|||||||
UPDATE season
|
UPDATE season
|
||||||
SET (start_date, end_date) = (SELECT MIN(date), MAX(date) FROM delivery WHERE year = {Year})
|
SET (start_date, end_date) = (SELECT MIN(date), MAX(date) FROM delivery WHERE year = {Year})
|
||||||
WHERE year = {Year};
|
WHERE year = {Year};
|
||||||
|
|
||||||
DELETE FROM delivery_part_bucket WHERE year = {Year};
|
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,10 +45,19 @@ namespace Elwig.Helpers.Billing {
|
|||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task CalculateBuckets(bool allowAttrsIntoLower, bool avoidUnderDeliveries, bool honorGebunden) {
|
public async Task CalculateBuckets(
|
||||||
|
bool? honorGebundenField = null,
|
||||||
|
bool? allowAttributesIntoLower = null,
|
||||||
|
bool? avoidUnderDeliveries = null,
|
||||||
|
SqliteConnection? cnx = null
|
||||||
|
) {
|
||||||
|
var honorGebunden = honorGebundenField ?? Season.Billing_HonorGebunden;
|
||||||
|
var allowAttrsIntoLower = allowAttributesIntoLower ?? Season.Billing_AllowAttrsIntoLower;
|
||||||
|
var avoidUnderDlvrs = avoidUnderDeliveries ?? Season.Billing_AvoidUnderDeliveries;
|
||||||
var attrVals = Context.WineAttributes.ToDictionary(a => a.AttrId, a => (a.IsStrict, a.FillLower));
|
var attrVals = Context.WineAttributes.ToDictionary(a => a.AttrId, a => (a.IsStrict, a.FillLower));
|
||||||
var attrForced = attrVals.Where(a => a.Value.IsStrict && a.Value.FillLower == 0).Select(a => a.Key).ToArray();
|
var attrForced = attrVals.Where(a => a.Value.IsStrict && a.Value.FillLower == 0).Select(a => a.Key).ToArray();
|
||||||
using var cnx = await AppDbContext.ConnectAsync();
|
var ownCnx = cnx == null;
|
||||||
|
cnx ??= await AppDbContext.ConnectAsync();
|
||||||
await Context.GetMemberAreaCommitmentBuckets(Year, 0, cnx);
|
await Context.GetMemberAreaCommitmentBuckets(Year, 0, cnx);
|
||||||
var inserts = new List<(int, int, int, string, int)>();
|
var inserts = new List<(int, int, int, string, int)>();
|
||||||
|
|
||||||
@@ -65,7 +76,7 @@ namespace Elwig.Helpers.Billing {
|
|||||||
reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2), reader.GetString(3), reader.GetInt32(4),
|
reader.GetInt32(0), reader.GetInt32(1), reader.GetInt32(2), reader.GetString(3), reader.GetInt32(4),
|
||||||
reader.GetDouble(5), reader.GetString(6),
|
reader.GetDouble(5), reader.GetString(6),
|
||||||
reader.IsDBNull(7) ? null : reader.GetString(7),
|
reader.IsDBNull(7) ? null : reader.GetString(7),
|
||||||
reader.IsDBNull(8) ? Array.Empty<string>() : reader.GetString(8).Split(",").Order().ToArray(),
|
reader.IsDBNull(8) ? [] : reader.GetString(8).Split(",").Order().ToArray(),
|
||||||
reader.IsDBNull(9) ? null : reader.GetBoolean(9)
|
reader.IsDBNull(9) ? null : reader.GetBoolean(9)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -73,11 +84,11 @@ namespace Elwig.Helpers.Billing {
|
|||||||
|
|
||||||
int lastMgNr = 0;
|
int lastMgNr = 0;
|
||||||
Dictionary<string, AreaComBucket>? rightsAndObligations = null;
|
Dictionary<string, AreaComBucket>? rightsAndObligations = null;
|
||||||
Dictionary<string, int> used = new();
|
Dictionary<string, int> used = [];
|
||||||
foreach (var (mgnr, did, dpnr, sortid, weight, kmw, qualid, attrid, modifiers, gebunden) in deliveries) {
|
foreach (var (mgnr, did, dpnr, sortid, weight, kmw, qualid, attrid, modifiers, gebunden) in deliveries) {
|
||||||
if (lastMgNr != mgnr) {
|
if (lastMgNr != mgnr) {
|
||||||
rightsAndObligations = await Context.GetMemberAreaCommitmentBuckets(Year, mgnr);
|
rightsAndObligations = await Context.GetMemberAreaCommitmentBuckets(Year, mgnr);
|
||||||
used = new();
|
used = [];
|
||||||
}
|
}
|
||||||
if ((honorGebunden && gebunden == false) ||
|
if ((honorGebunden && gebunden == false) ||
|
||||||
rightsAndObligations == null || rightsAndObligations.Count == 0 ||
|
rightsAndObligations == null || rightsAndObligations.Count == 0 ||
|
||||||
@@ -92,16 +103,16 @@ namespace Elwig.Helpers.Billing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int w = weight;
|
int w = weight;
|
||||||
var attributes = attrid == null ? Array.Empty<string>() : new string[] { attrid };
|
var attributes = attrid == null ? [] : new string[] { attrid };
|
||||||
var isStrict = attrid != null && attrVals[attrid].IsStrict;
|
var isStrict = attrid != null && attrVals[attrid].IsStrict;
|
||||||
foreach (var p in Utils.Permutate(attributes, attributes.Intersect(attrForced))) {
|
foreach (var p in Utils.Permutate(attributes, attributes.Intersect(attrForced))) {
|
||||||
var c = p.Count();
|
var c = p.Count();
|
||||||
var key = sortid + string.Join("", p);
|
var key = sortid + string.Join("", p);
|
||||||
if (rightsAndObligations.ContainsKey(key)) {
|
if (rightsAndObligations.TryGetValue(key, out AreaComBucket value)) {
|
||||||
int i = (c == 0) ? 1 : 2;
|
int i = (c == 0) ? 1 : 2;
|
||||||
var u = used.GetValueOrDefault(key, 0);
|
var u = used.GetValueOrDefault(key, 0);
|
||||||
var vr = Math.Max(0, Math.Min(rightsAndObligations[key].Right - u, w));
|
var vr = Math.Max(0, Math.Min(value.Right - u, w));
|
||||||
var vo = Math.Max(0, Math.Min(rightsAndObligations[key].Obligation - u, w));
|
var vo = Math.Max(0, Math.Min(value.Obligation - u, w));
|
||||||
var v = (attributes.Length == c || attributes.Select(a => !attrVals[a].IsStrict ? 2 : attrVals[a].FillLower).Min() == 2) ? vr : vo;
|
var v = (attributes.Length == c || attributes.Select(a => !attrVals[a].IsStrict ? 2 : attrVals[a].FillLower).Min() == 2) ? vr : vo;
|
||||||
used[key] = u + v;
|
used[key] = u + v;
|
||||||
if (key.Length > 2 && !isStrict) used[key[..2]] = used.GetValueOrDefault(key[..2], 0) + v;
|
if (key.Length > 2 && !isStrict) used[key[..2]] = used.GetValueOrDefault(key[..2], 0) + v;
|
||||||
@@ -115,14 +126,17 @@ namespace Elwig.Helpers.Billing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await AppDbContext.ExecuteBatch(cnx, $"""
|
await AppDbContext.ExecuteBatch(cnx, $"""
|
||||||
|
UPDATE delivery_part_bucket SET value = 0 WHERE year = {Year};
|
||||||
INSERT INTO delivery_part_bucket (year, did, dpnr, bktnr, discr, value)
|
INSERT INTO delivery_part_bucket (year, did, dpnr, bktnr, discr, value)
|
||||||
VALUES {string.Join(",\n ", inserts.Select(i => $"({Year}, {i.Item1}, {i.Item2}, {i.Item3}, '{i.Item4}', {i.Item5})"))}
|
VALUES {string.Join(",\n ", inserts.Select(i => $"({Year}, {i.Item1}, {i.Item2}, {i.Item3}, '{i.Item4}', {i.Item5})"))}
|
||||||
ON CONFLICT DO UPDATE
|
ON CONFLICT DO UPDATE
|
||||||
SET discr = excluded.discr, value = value + excluded.value;
|
SET discr = excluded.discr, value = value + excluded.value;
|
||||||
""");
|
""");
|
||||||
|
|
||||||
if (!avoidUnderDeliveries)
|
if (!avoidUnderDlvrs) {
|
||||||
|
if (ownCnx) await cnx.DisposeAsync();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME avoidUnderDelivery-calculations not always right!
|
// FIXME avoidUnderDelivery-calculations not always right!
|
||||||
|
|
||||||
@@ -200,6 +214,8 @@ namespace Elwig.Helpers.Billing {
|
|||||||
ON CONFLICT DO UPDATE
|
ON CONFLICT DO UPDATE
|
||||||
SET value = excluded.value;
|
SET value = excluded.value;
|
||||||
""");
|
""");
|
||||||
|
|
||||||
|
if (ownCnx) await cnx.DisposeAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,10 @@ namespace Elwig.Helpers.Billing {
|
|||||||
Data = PaymentBillingData.FromJson(PaymentVariant.Data, Utils.GetVaributes(Context, Year, onlyDelivered: false));
|
Data = PaymentBillingData.FromJson(PaymentVariant.Data, Utils.GetVaributes(Context, Year, onlyDelivered: false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Calculate() {
|
public async Task Calculate(bool? honorGebunden = null, bool ? allowAttrsIntoLower = null, bool? avoidUnderDeliveries = null) {
|
||||||
using var cnx = await AppDbContext.ConnectAsync();
|
using var cnx = await AppDbContext.ConnectAsync();
|
||||||
using var tx = await cnx.BeginTransactionAsync();
|
using var tx = await cnx.BeginTransactionAsync();
|
||||||
|
await CalculateBuckets(honorGebunden, allowAttrsIntoLower, avoidUnderDeliveries, cnx);
|
||||||
await DeleteInDb(cnx);
|
await DeleteInDb(cnx);
|
||||||
await SetCalcTime(cnx);
|
await SetCalcTime(cnx);
|
||||||
await CalculatePrices(cnx);
|
await CalculatePrices(cnx);
|
||||||
@@ -43,11 +44,10 @@ namespace Elwig.Helpers.Billing {
|
|||||||
ROUND(p.amount / POW(10, s.precision - 2)) AS net_amount,
|
ROUND(p.amount / POW(10, s.precision - 2)) AS net_amount,
|
||||||
ROUND(lp.amount / POW(10, s.precision - 2)) AS prev_amount,
|
ROUND(lp.amount / POW(10, s.precision - 2)) AS prev_amount,
|
||||||
IIF(m.buchführend, s.vat_normal, s.vat_flatrate) AS vat,
|
IIF(m.buchführend, s.vat_normal, s.vat_flatrate) AS vat,
|
||||||
ROUND(
|
ROUND(IIF({Data.ConsiderContractPenalties}, COALESCE(u.total_penalty, 0), 0) / POW(10, 4 - 2)) +
|
||||||
IIF({Data.ConsiderContractPenalties}, COALESCE(u.total_penalty, 0) / POW(10, 4 - 2), 0) +
|
ROUND(IIF({Data.ConsiderTotalPenalty}, COALESCE(b.total_penalty, 0), 0) / POW(10, s.precision - 2)) +
|
||||||
IIF({Data.ConsiderTotalPenalty}, COALESCE(b.total_penalty, 0), 0) +
|
ROUND(IIF({Data.ConsiderAutoBusinessShares}, -COALESCE(a.total_amount, 0), 0) / POW(10, s.precision - 2))
|
||||||
IIF({Data.ConsiderAutoBusinessShares}, -COALESCE(a.business_shares * s.bs_value, 0), 0) / POW(10, s.precision - 2)
|
AS modifiers,
|
||||||
) AS modifiers,
|
|
||||||
lc.modifiers AS prev_modifiers
|
lc.modifiers AS prev_modifiers
|
||||||
FROM season s
|
FROM season s
|
||||||
JOIN payment_variant v ON v.year = s.year
|
JOIN payment_variant v ON v.year = s.year
|
||||||
@@ -63,26 +63,9 @@ namespace Elwig.Helpers.Billing {
|
|||||||
LEFT JOIN payment_member lp ON (lp.year, lp.avnr, lp.mgnr) = (l.year, l.avnr, m.mgnr)
|
LEFT JOIN payment_member lp ON (lp.year, lp.avnr, lp.mgnr) = (l.year, l.avnr, m.mgnr)
|
||||||
LEFT JOIN payment_member p ON (p.year, p.avnr, p.mgnr) = (v.year, v.avnr, m.mgnr)
|
LEFT JOIN payment_member p ON (p.year, p.avnr, p.mgnr) = (v.year, v.avnr, m.mgnr)
|
||||||
LEFT JOIN credit lc ON (lc.year, lc.avnr, lc.mgnr) = (l.year, l.avnr, m.mgnr)
|
LEFT JOIN credit lc ON (lc.year, lc.avnr, lc.mgnr) = (l.year, l.avnr, m.mgnr)
|
||||||
LEFT JOIN (SELECT year, mgnr,
|
LEFT JOIN v_penalty_area_commitments u ON (u.year, u.mgnr) = (s.year, m.mgnr)
|
||||||
SUM(COALESCE(IIF(u.weight = 0, -t.penalty_none, 0), 0) +
|
LEFT JOIN v_penalty_business_shares b ON (b.year, b.mgnr) = (s.year, m.mgnr)
|
||||||
COALESCE(IIF(u.diff < 0, -t.penalty_amount, 0), 0) +
|
LEFT JOIN v_auto_business_shares a ON (a.year, a.mgnr) = (s.year, m.mgnr)
|
||||||
COALESCE(u.diff * t.penalty_per_kg, 0)) AS total_penalty
|
|
||||||
FROM v_under_delivery u
|
|
||||||
JOIN area_commitment_type t ON t.vtrgid = u.bucket
|
|
||||||
GROUP BY year, mgnr) u ON (u.year, u.mgnr) = (s.year, m.mgnr)
|
|
||||||
LEFT JOIN (SELECT s.year, u.mgnr,
|
|
||||||
(COALESCE(IIF(u.weight = 0, -s.penalty_none, 0), 0) +
|
|
||||||
COALESCE(IIF(u.diff < 0, -s.penalty_amount, 0), 0) +
|
|
||||||
COALESCE(u.diff * s.penalty_per_kg, 0)
|
|
||||||
) / POW(10, s.precision - 2) AS total_penalty
|
|
||||||
FROM v_total_under_delivery u
|
|
||||||
JOIN season s ON s.year = u.year
|
|
||||||
WHERE u.diff < 0) b ON (b.year, b.mgnr) = (s.year, m.mgnr)
|
|
||||||
LEFT JOIN (SELECT h.mgnr, h.business_shares
|
|
||||||
FROM member_history h
|
|
||||||
WHERE type = 'auto' AND
|
|
||||||
date >= '{Year}-06-01' AND
|
|
||||||
date < '{Year + 1}-06-01') a ON a.mgnr = m.mgnr
|
|
||||||
WHERE s.year = {Year} AND v.avnr = {AvNr};
|
WHERE s.year = {Year} AND v.avnr = {AvNr};
|
||||||
|
|
||||||
UPDATE payment_variant SET test_variant = FALSE WHERE (year, avnr) = ({Year}, {AvNr});
|
UPDATE payment_variant SET test_variant = FALSE WHERE (year, avnr) = ({Year}, {AvNr});
|
||||||
@@ -162,8 +145,9 @@ namespace Elwig.Helpers.Billing {
|
|||||||
foreach (var part in parts) {
|
foreach (var part in parts) {
|
||||||
var ungeb = part.Discr == "_";
|
var ungeb = part.Discr == "_";
|
||||||
var payAttrId = (part.Discr is "" or "_") ? null : part.Discr;
|
var payAttrId = (part.Discr is "" or "_") ? null : part.Discr;
|
||||||
var geb = !ungeb && payAttrId == part.AttrId;
|
var attrId = part.AttrId == "B" ? "B" : payAttrId; // FIXME
|
||||||
var price = Data.CalculatePrice(part.SortId, part.AttrId, part.QualId, geb, part.Oe, part.Kmw);
|
var geb = !ungeb; // FIXME && payAttrId == part.AttrId;
|
||||||
|
var price = Data.CalculatePrice(part.SortId, attrId, part.QualId, geb, part.Oe, part.Kmw);
|
||||||
var priceL = PaymentVariant.Season.DecToDb(price);
|
var priceL = PaymentVariant.Season.DecToDb(price);
|
||||||
inserts.Add((part.Year, part.DId, part.DPNr, part.BktNr, priceL, priceL * part.Value));
|
inserts.Add((part.Year, part.DId, part.DPNr, part.BktNr, priceL, priceL * part.Value));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,20 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Helpers {
|
namespace Elwig.Helpers {
|
||||||
public class ClientParameters {
|
public class ClientParameters {
|
||||||
|
|
||||||
public enum Type { Matzen, Winzerkeller };
|
public enum Type { Matzen, Winzerkeller, Weinland, Baden };
|
||||||
|
|
||||||
public bool IsMatzen => Client == Type.Matzen;
|
public bool IsMatzen => Client == Type.Matzen;
|
||||||
public bool IsWinzerkeller => Client == Type.Winzerkeller;
|
public bool IsWinzerkeller => Client == Type.Winzerkeller;
|
||||||
public bool IsWolkersdorf => Client == Type.Winzerkeller && App.ZwstId == "W";
|
public bool IsWeinland => Client == Type.Weinland;
|
||||||
public bool IsHaugsdorf => Client == Type.Winzerkeller && App.ZwstId == "H";
|
public bool IsBaden => Client == Type.Baden;
|
||||||
public bool IsSitzendorf => Client == Type.Winzerkeller && App.ZwstId == "S";
|
public bool IsWolkersdorf => IsWinzerkeller && App.ZwstId == "W";
|
||||||
|
public bool IsHaugsdorf => IsWinzerkeller && App.ZwstId == "H";
|
||||||
|
public bool IsSitzendorf => IsWinzerkeller && App.ZwstId == "S";
|
||||||
|
public bool IsGrInzersdorf => IsWeinland;
|
||||||
|
|
||||||
public bool HasRebler(string? zwstId) => IsMatzen || (IsWinzerkeller && zwstId == "W");
|
public bool HasNetWeighing(string? zwstId) => IsMatzen || (IsWinzerkeller && zwstId == "W");
|
||||||
public bool HasRebler(Branch? b) => HasRebler(b?.ZwstId);
|
public bool HasNetWeighing(Branch? b) => HasNetWeighing(b?.ZwstId);
|
||||||
public bool HasRebler() => HasRebler(App.ZwstId);
|
public bool HasNetWeighing() => HasNetWeighing(App.ZwstId);
|
||||||
public bool HasKisten(string? zwstId) => IsWinzerkeller && (zwstId == "H" || zwstId == "S");
|
|
||||||
public bool HasKisten(Branch? b) => HasKisten(b?.ZwstId);
|
|
||||||
public bool HasKisten() => HasKisten(App.ZwstId);
|
|
||||||
|
|
||||||
public string NameToken;
|
public string NameToken;
|
||||||
public string NameShort;
|
public string NameShort;
|
||||||
@@ -36,8 +36,8 @@ namespace Elwig.Helpers {
|
|||||||
|
|
||||||
public PostalDest PostalDest {
|
public PostalDest PostalDest {
|
||||||
set {
|
set {
|
||||||
Plz = value.AtPlz.Plz;
|
Plz = value.AtPlz!.Plz;
|
||||||
Ort = value.AtPlz.Ort.Name;
|
Ort = value.AtPlz!.Ort.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public int Plz;
|
public int Plz;
|
||||||
@@ -72,8 +72,14 @@ namespace Elwig.Helpers {
|
|||||||
NameSuffix = parameters.GetValueOrDefault("CLIENT_NAME_SUFFIX");
|
NameSuffix = parameters.GetValueOrDefault("CLIENT_NAME_SUFFIX");
|
||||||
NameType = parameters["CLIENT_NAME_TYPE"] ?? throw new KeyNotFoundException();
|
NameType = parameters["CLIENT_NAME_TYPE"] ?? throw new KeyNotFoundException();
|
||||||
switch (Name) {
|
switch (Name) {
|
||||||
case "Winzergenossenschaft für Matzen und Umgebung": Client = Type.Matzen; break;
|
case "Winzergenossenschaft für Matzen und Umgebung":
|
||||||
case "Winzerkeller im Weinviertel": Client = Type.Winzerkeller; break;
|
Client = Type.Matzen; break;
|
||||||
|
case "Winzerkeller im Weinviertel":
|
||||||
|
Client = Type.Winzerkeller; break;
|
||||||
|
case "Winzergenossenschaft Weinland":
|
||||||
|
Client = Type.Weinland; break;
|
||||||
|
case "Winzergenossenschaft Baden - Bad Vöslau":
|
||||||
|
Client = Type.Baden; break;
|
||||||
};
|
};
|
||||||
|
|
||||||
Plz = int.Parse(parameters["CLIENT_PLZ"] ?? "");
|
Plz = int.Parse(parameters["CLIENT_PLZ"] ?? "");
|
||||||
@@ -115,7 +121,7 @@ namespace Elwig.Helpers {
|
|||||||
case 2: deliveryNoteStats = "SHORT"; break;
|
case 2: deliveryNoteStats = "SHORT"; break;
|
||||||
case 3: deliveryNoteStats = "FULL"; break;
|
case 3: deliveryNoteStats = "FULL"; break;
|
||||||
}
|
}
|
||||||
return new (string, string?)[] {
|
return [
|
||||||
("CLIENT_NAME_TOKEN", NameToken),
|
("CLIENT_NAME_TOKEN", NameToken),
|
||||||
("CLIENT_NAME_SHORT", NameShort),
|
("CLIENT_NAME_SHORT", NameShort),
|
||||||
("CLIENT_NAME", Name),
|
("CLIENT_NAME", Name),
|
||||||
@@ -137,7 +143,7 @@ namespace Elwig.Helpers {
|
|||||||
("TEXT_DELIVERYNOTE", TextDeliveryNote),
|
("TEXT_DELIVERYNOTE", TextDeliveryNote),
|
||||||
("TEXT_DELIVERYCONFIRMATION", TextDeliveryConfirmation),
|
("TEXT_DELIVERYCONFIRMATION", TextDeliveryConfirmation),
|
||||||
("TEXT_CREDITNOTE", TextCreditNote),
|
("TEXT_CREDITNOTE", TextCreditNote),
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UpdateValues() {
|
public async Task UpdateValues() {
|
||||||
|
|||||||
+35
-12
@@ -4,6 +4,31 @@ using System.Linq;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
namespace Elwig.Helpers {
|
namespace Elwig.Helpers {
|
||||||
|
|
||||||
|
public record struct ScaleConfig {
|
||||||
|
public string Id;
|
||||||
|
public string? Type;
|
||||||
|
public string? Model;
|
||||||
|
public string? Connection;
|
||||||
|
public string? Empty;
|
||||||
|
public string? Filling;
|
||||||
|
public string? Limit;
|
||||||
|
public string? Log;
|
||||||
|
public string? _Log;
|
||||||
|
|
||||||
|
public ScaleConfig(string id, string? type, string? model, string? cnx, string? empty, string? filling, string? limit, string? log) {
|
||||||
|
Id = id;
|
||||||
|
Type = type;
|
||||||
|
Model = model;
|
||||||
|
Connection = cnx;
|
||||||
|
Empty = empty;
|
||||||
|
Filling = filling;
|
||||||
|
Limit = limit;
|
||||||
|
_Log = log;
|
||||||
|
Log = log != null ? Path.Combine(App.DataPath, log) : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
|
|
||||||
private readonly string FileName;
|
private readonly string FileName;
|
||||||
@@ -11,8 +36,8 @@ namespace Elwig.Helpers {
|
|||||||
public string DatabaseFile = App.DataPath + "database.sqlite3";
|
public string DatabaseFile = App.DataPath + "database.sqlite3";
|
||||||
public string? DatabaseLog = null;
|
public string? DatabaseLog = null;
|
||||||
public string? Branch = null;
|
public string? Branch = null;
|
||||||
public IList<string?[]> Scales;
|
public IList<ScaleConfig> Scales;
|
||||||
private readonly List<string?[]> ScaleList = [];
|
private readonly List<ScaleConfig> ScaleList = [];
|
||||||
private static readonly string[] trueValues = ["1", "true", "yes", "on"];
|
private static readonly string[] trueValues = ["1", "true", "yes", "on"];
|
||||||
|
|
||||||
public Config(string filename) {
|
public Config(string filename) {
|
||||||
@@ -34,12 +59,10 @@ namespace Elwig.Helpers {
|
|||||||
ScaleList.Clear();
|
ScaleList.Clear();
|
||||||
Scales = ScaleList;
|
Scales = ScaleList;
|
||||||
foreach (var s in scales) {
|
foreach (var s in scales) {
|
||||||
string? scaleLog = config[$"scale.{s}:log"];
|
ScaleList.Add(new(
|
||||||
if (scaleLog != null) scaleLog = Path.Combine(App.DataPath, scaleLog);
|
|
||||||
ScaleList.Add([
|
|
||||||
s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
|
s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
|
||||||
config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"], scaleLog
|
config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"], config[$"scale.{s}:log"]
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,11 +74,11 @@ namespace Elwig.Helpers {
|
|||||||
file.Write($"\r\n[database]\r\nfile = {DatabaseFile}\r\n");
|
file.Write($"\r\n[database]\r\nfile = {DatabaseFile}\r\n");
|
||||||
if (DatabaseLog != null) file.Write($"log = {DatabaseLog}\r\n");
|
if (DatabaseLog != null) file.Write($"log = {DatabaseLog}\r\n");
|
||||||
foreach (var s in ScaleList) {
|
foreach (var s in ScaleList) {
|
||||||
file.Write($"\r\n[scale.{s[0]}]\r\ntype = {s[1]}\r\nmodel = {s[2]}\r\nconnection = {s[3]}\r\n");
|
file.Write($"\r\n[scale.{s.Id}]\r\ntype = {s.Type}\r\nmodel = {s.Model}\r\nconnection = {s.Connection}\r\n");
|
||||||
if (s[4] != null) file.Write($"empty = {s[4]}\r\n");
|
if (s.Empty != null) file.Write($"empty = {s.Empty}\r\n");
|
||||||
if (s[5] != null) file.Write($"filling = {s[5]}\r\n");
|
if (s.Filling != null) file.Write($"filling = {s.Filling}\r\n");
|
||||||
if (s[6] != null) file.Write($"limit = {s[6]}\r\n");
|
if (s.Limit != null) file.Write($"limit = {s.Limit}\r\n");
|
||||||
if (s[7] != null) file.Write($"log = {s[7]}\r\n");
|
if (s._Log != null) file.Write($"log = {s._Log}\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ using Elwig.Models.Dtos;
|
|||||||
using Elwig.Models.Entities;
|
using Elwig.Models.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Elwig.Helpers.Export {
|
namespace Elwig.Helpers.Export {
|
||||||
public class Ebics(PaymentVar variant, string filename) : IBankingExporter {
|
public class Ebics(PaymentVar variant, string filename, int version) : IBankingExporter {
|
||||||
|
|
||||||
public static string FileExtension => "xml";
|
public static string FileExtension => "xml";
|
||||||
|
|
||||||
@@ -16,6 +18,7 @@ namespace Elwig.Helpers.Export {
|
|||||||
private readonly int Year = variant.Year;
|
private readonly int Year = variant.Year;
|
||||||
private readonly string Name = variant.Name;
|
private readonly string Name = variant.Name;
|
||||||
private readonly int AvNr = variant.AvNr;
|
private readonly int AvNr = variant.AvNr;
|
||||||
|
private readonly int Version = version;
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
@@ -32,6 +35,8 @@ namespace Elwig.Helpers.Export {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task ExportAsync(IEnumerable<Transaction> transactions, IProgress<double>? progress = null) {
|
public async Task ExportAsync(IEnumerable<Transaction> transactions, IProgress<double>? progress = null) {
|
||||||
|
if (transactions.Any(tx => tx.Amount < 0))
|
||||||
|
throw new ArgumentException("Tranaction amount may not be negative");
|
||||||
progress?.Report(0.0);
|
progress?.Report(0.0);
|
||||||
var nbOfTxs = transactions.Count();
|
var nbOfTxs = transactions.Count();
|
||||||
int count = nbOfTxs + 2, i = 0;
|
int count = nbOfTxs + 2, i = 0;
|
||||||
@@ -41,26 +46,24 @@ namespace Elwig.Helpers.Export {
|
|||||||
|
|
||||||
await Writer.WriteLineAsync($"""
|
await Writer.WriteLineAsync($"""
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09"
|
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.{Version:00}">
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 pain.001.001.09.xsd">
|
|
||||||
<CstmrCdtTrfInitn>
|
<CstmrCdtTrfInitn>
|
||||||
<GrpHdr>
|
<GrpHdr>
|
||||||
<MsgId>{msgId}</MsgId>
|
<MsgId>{msgId}</MsgId>
|
||||||
<CreDtTm>{DateTime.UtcNow:o}</CreDtTm>
|
<CreDtTm>{DateTime.UtcNow:o}</CreDtTm>
|
||||||
<NbOfTxs>{nbOfTxs}</NbOfTxs>
|
<NbOfTxs>{nbOfTxs}</NbOfTxs>
|
||||||
<CtrlSum>{Transaction.FormatAmount(ctrlSum)}</CtrlSum>
|
<CtrlSum>{Transaction.FormatAmount(ctrlSum)}</CtrlSum>
|
||||||
<InitgPty><Nm>{App.Client.NameFull}</Nm></InitgPty>
|
<InitgPty><Nm>{SecurityElement.Escape(App.Client.NameFull)}</Nm></InitgPty>
|
||||||
</GrpHdr>
|
</GrpHdr>
|
||||||
<PmtInf>
|
<PmtInf>
|
||||||
<PmtInfId>{pmtInfId}</PmtInfId>
|
<PmtInfId>{pmtInfId}</PmtInfId>
|
||||||
<PmtMtd>TRF</PmtMtd>
|
<PmtMtd>TRF</PmtMtd>
|
||||||
<NbOfTxs>{nbOfTxs}</NbOfTxs>
|
<NbOfTxs>{nbOfTxs}</NbOfTxs>
|
||||||
<CtrlSum>{Transaction.FormatAmount(ctrlSum)}</CtrlSum>
|
<CtrlSum>{Transaction.FormatAmount(ctrlSum)}</CtrlSum>
|
||||||
<ReqdExctnDt><Dt>{Date:yyyy-MM-dd}</Dt></ReqdExctnDt>
|
<ReqdExctnDt>{(Version >= 8 ? "<Dt>" : "")}{Date:yyyy-MM-dd}{(Version >= 8 ? "</Dt>" : "")}</ReqdExctnDt>
|
||||||
<Dbtr><Nm>{App.Client.NameFull}</Nm></Dbtr>
|
<Dbtr><Nm>{SecurityElement.Escape(App.Client.NameFull)}</Nm></Dbtr>
|
||||||
<DbtrAcct><Id><IBAN>{App.Client.Iban?.Replace(" ", "")}</IBAN></Id></DbtrAcct>
|
<DbtrAcct><Id><IBAN>{App.Client.Iban!.Replace(" ", "")}</IBAN></Id></DbtrAcct>
|
||||||
<DbtrAgt><FinInstnId><BICFI>{App.Client.Bic ?? "NOTPROVIDED"}</BICFI></FinInstnId></DbtrAgt>
|
<DbtrAgt><FinInstnId>{(Version >= 4 ? "<BICFI>" : "<BIC>")}{App.Client.Bic ?? "NOTPROVIDED"}{(Version >= 4 ? "</BICFI>" : "</BIC>")}</FinInstnId></DbtrAgt>
|
||||||
""");
|
""");
|
||||||
progress?.Report(100.0 * ++i / count);
|
progress?.Report(100.0 * ++i / count);
|
||||||
|
|
||||||
@@ -74,16 +77,15 @@ namespace Elwig.Helpers.Export {
|
|||||||
<PmtId><EndToEndId>{id}</EndToEndId></PmtId>
|
<PmtId><EndToEndId>{id}</EndToEndId></PmtId>
|
||||||
<Amt><InstdAmt Ccy="{tx.Currency}">{Transaction.FormatAmount(tx.Amount)}</InstdAmt></Amt>
|
<Amt><InstdAmt Ccy="{tx.Currency}">{Transaction.FormatAmount(tx.Amount)}</InstdAmt></Amt>
|
||||||
<Cdtr>
|
<Cdtr>
|
||||||
<Nm>{a.Name}</Nm>
|
<Nm>{SecurityElement.Escape(a.Name[..Math.Min(140, a.Name.Length)])}</Nm>
|
||||||
<PstlAdr>
|
<PstlAdr>
|
||||||
<StrtNm>{a1}</StrtNm><BldgNb>{a2}</BldgNb>
|
<StrtNm>{a1?[..Math.Min(70, a1.Length)]}</StrtNm><BldgNb>{SecurityElement.Escape(a2?[..Math.Min(16, a2.Length)])}</BldgNb>
|
||||||
<PstCd>{a.PostalDest.AtPlz?.Plz}</PstCd><TwnNm>{a.PostalDest.AtPlz?.Ort.Name}</TwnNm>
|
<PstCd>{a.PostalDest.AtPlz?.Plz}</PstCd><TwnNm>{SecurityElement.Escape(a.PostalDest.AtPlz?.Ort.Name)}</TwnNm>
|
||||||
<Ctry>{a.PostalDest.Country.Alpha2}</Ctry>
|
<Ctry>{a.PostalDest.Country.Alpha2}</Ctry>
|
||||||
</PstlAdr>
|
</PstlAdr>
|
||||||
</Cdtr>
|
</Cdtr>
|
||||||
<CdtrAcct><Id><IBAN>{tx.Member.Iban}</IBAN></Id></CdtrAcct>
|
<CdtrAcct><Id><IBAN>{tx.Member.Iban!}</IBAN></Id></CdtrAcct>
|
||||||
<CdtrAgt><FinInstnId><BICFI>{tx.Member.Bic ?? "NOTPROVIDED"}</BICFI></FinInstnId></CdtrAgt>
|
<RmtInf><Ustrd>{SecurityElement.Escape(info)}</Ustrd></RmtInf>
|
||||||
<RmtInf><Ustrd>{info}</Ustrd></RmtInf>
|
|
||||||
</CdtTrfTxInf>
|
</CdtTrfTxInf>
|
||||||
""");
|
""");
|
||||||
progress?.Report(100.0 * ++i / count);
|
progress?.Report(100.0 * ++i / count);
|
||||||
|
|||||||
@@ -108,19 +108,19 @@ namespace Elwig.Helpers.Export {
|
|||||||
<style:paragraph-properties fo:text-align="center"/>
|
<style:paragraph-properties fo:text-align="center"/>
|
||||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||||
</style:style>
|
</style:style>
|
||||||
<number:number-style style:name="NN0"><number:number number:decimal-places="0" number:min-decimal-places="0" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN0"><number:number number:decimal-places="0" number:min-decimal-places="0" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N0" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN0"/>
|
<style:style style:name="N0" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN0"/>
|
||||||
<number:number-style style:name="NN1"><number:number number:decimal-places="1" number:min-decimal-places="1" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN1"><number:number number:decimal-places="1" number:min-decimal-places="1" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N1" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN1"/>
|
<style:style style:name="N1" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN1"/>
|
||||||
<number:number-style style:name="NN2"><number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN2"><number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N2" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN2"/>
|
<style:style style:name="N2" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN2"/>
|
||||||
<number:number-style style:name="NN3"><number:number number:decimal-places="3" number:min-decimal-places="3" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN3"><number:number number:decimal-places="3" number:min-decimal-places="3" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N3" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN3"/>
|
<style:style style:name="N3" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN3"/>
|
||||||
<number:number-style style:name="NN4"><number:number number:decimal-places="4" number:min-decimal-places="4" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN4"><number:number number:decimal-places="4" number:min-decimal-places="4" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N4" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN4"/>
|
<style:style style:name="N4" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN4"/>
|
||||||
<number:number-style style:name="NN5"><number:number number:decimal-places="5" number:min-decimal-places="5" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN5"><number:number number:decimal-places="5" number:min-decimal-places="5" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N5" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN5"/>
|
<style:style style:name="N5" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN5"/>
|
||||||
<number:number-style style:name="NN6"><number:number number:decimal-places="6" number:min-decimal-places="6" number:min-integer-digits="1"/></number:number-style>
|
<number:number-style style:name="NN6"><number:number number:decimal-places="6" number:min-decimal-places="6" number:min-integer-digits="1" number:grouping="true"/></number:number-style>
|
||||||
<style:style style:name="N6" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN6"/>
|
<style:style style:name="N6" style:family="table-cell" style:parent-style-name="default" style:data-style-name="NN6"/>
|
||||||
</office:automatic-styles>
|
</office:automatic-styles>
|
||||||
<office:body>
|
<office:body>
|
||||||
@@ -262,13 +262,14 @@ namespace Elwig.Helpers.Export {
|
|||||||
string c;
|
string c;
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
c = $"<{ct}{add}/>";
|
c = $"<{ct}{add}/>";
|
||||||
} else if (data is float || data is double || data is byte || data is char ||
|
} else if (data is decimal || data is float || data is double || data is byte || data is char ||
|
||||||
data is short || data is ushort || data is int || data is uint || data is long || data is ulong) {
|
data is short || data is ushort || data is int || data is uint || data is long || data is ulong) {
|
||||||
double v = double.Parse(data?.ToString() ?? "0"); // use default culture for ToString and Parse()!
|
double v = double.Parse(data?.ToString() ?? "0"); // use default culture for ToString and Parse()!
|
||||||
if (units != null && units.Length > 0) {
|
if (units != null && units.Length > 0) {
|
||||||
int n = -1;
|
int n = -1;
|
||||||
switch (units[0]) {
|
switch (units[0]) {
|
||||||
case "%": n = 1; data = $"{v:N1}"; break;
|
case "%": n = 1; data = $"{v:N1}"; break;
|
||||||
|
case "€": n = 2; data = $"{v:N2}"; break;
|
||||||
case "°KMW": n = 1; data = $"{v:N1}"; break;
|
case "°KMW": n = 1; data = $"{v:N1}"; break;
|
||||||
case "°Oe": n = 0; data = $"{v:N0}"; break;
|
case "°Oe": n = 0; data = $"{v:N0}"; break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Elwig.Helpers.Printing {
|
|||||||
private static RazorLightEngine? Engine = null;
|
private static RazorLightEngine? Engine = null;
|
||||||
public static bool IsReady => Engine != null;
|
public static bool IsReady => Engine != null;
|
||||||
|
|
||||||
public static async Task Init(Action evtHandler) {
|
public static async Task Init(Action? evtHandler = null) {
|
||||||
var e = new RazorLightEngineBuilder()
|
var e = new RazorLightEngineBuilder()
|
||||||
.UseFileSystemProject(App.DataPath + "resources")
|
.UseFileSystemProject(App.DataPath + "resources")
|
||||||
.UseMemoryCachingProvider()
|
.UseMemoryCachingProvider()
|
||||||
@@ -24,7 +24,7 @@ namespace Elwig.Helpers.Printing {
|
|||||||
await e.CompileTemplateAsync("DeliveryConfirmation");
|
await e.CompileTemplateAsync("DeliveryConfirmation");
|
||||||
|
|
||||||
Engine = e;
|
Engine = e;
|
||||||
evtHandler();
|
evtHandler?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<string> CompileRenderAsync(string key, object model) {
|
public static async Task<string> CompileRenderAsync(string key, object model) {
|
||||||
|
|||||||
@@ -11,13 +11,20 @@ using System.Linq;
|
|||||||
namespace Elwig.Helpers.Printing {
|
namespace Elwig.Helpers.Printing {
|
||||||
public static class Pdf {
|
public static class Pdf {
|
||||||
|
|
||||||
private static readonly string PdfToPrinter = App.ExePath + "PDFtoPrinter.exe";
|
private static readonly string PdfToPrinter = new string[] { App.ExePath }
|
||||||
private static readonly string WinziPrint = App.ExePath + "WinziPrint.exe";
|
.Union(Environment.GetEnvironmentVariable("PATH")?.Split(';') ?? [])
|
||||||
|
.Select(x => Path.Combine(x, "PDFtoPrinter.exe"))
|
||||||
|
.Where(x => File.Exists(x))
|
||||||
|
.FirstOrDefault() ?? throw new FileNotFoundException("PDFtoPrinter executable not found");
|
||||||
|
private static readonly string WinziPrint = new string[] { App.ExePath }
|
||||||
|
.Union(Environment.GetEnvironmentVariable("PATH")?.Split(';') ?? [])
|
||||||
|
.Select(x => Path.Combine(x, "WinziPrint.exe"))
|
||||||
|
.Where(x => File.Exists(x))
|
||||||
|
.FirstOrDefault() ?? throw new FileNotFoundException("WiniPrint executable not found");
|
||||||
private static Process? WinziPrintProc;
|
private static Process? WinziPrintProc;
|
||||||
public static bool IsReady => WinziPrintProc != null;
|
public static bool IsReady => WinziPrintProc != null;
|
||||||
|
|
||||||
|
public static async Task Init(Action? evtHandler = null) {
|
||||||
public static async Task Init(Action evtHandler) {
|
|
||||||
var p = new Process() { StartInfo = new() {
|
var p = new Process() { StartInfo = new() {
|
||||||
FileName = WinziPrint,
|
FileName = WinziPrint,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
@@ -33,7 +40,7 @@ namespace Elwig.Helpers.Printing {
|
|||||||
p.StartInfo.ArgumentList.Add("-");
|
p.StartInfo.ArgumentList.Add("-");
|
||||||
p.Start();
|
p.Start();
|
||||||
WinziPrintProc = p;
|
WinziPrintProc = p;
|
||||||
evtHandler();
|
evtHandler?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<IEnumerable<int>> Convert(string htmlPath, string pdfPath, bool doubleSided = false, IProgress<double>? progress = null) {
|
public static async Task<IEnumerable<int>> Convert(string htmlPath, string pdfPath, bool doubleSided = false, IProgress<double>? progress = null) {
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.IO.Ports;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
|
||||||
public class GassnerScale : IScale {
|
|
||||||
|
|
||||||
protected SerialPort Serial = null;
|
|
||||||
protected StreamReader Reader;
|
|
||||||
protected StreamWriter Writer;
|
|
||||||
|
|
||||||
public string Manufacturer => "Gassner";
|
|
||||||
public int InternalScaleNr => 1;
|
|
||||||
public string Model { get; private set; }
|
|
||||||
public string ScaleId { get; private set; }
|
|
||||||
public bool IsReady { get; private set; }
|
|
||||||
public bool HasFillingClearance { get; private set; }
|
|
||||||
public int? WeightLimit { get; private set; }
|
|
||||||
public string? LogPath { get; private set; }
|
|
||||||
|
|
||||||
public GassnerScale(string id, string model, string connection) {
|
|
||||||
ScaleId = id;
|
|
||||||
Model = model;
|
|
||||||
IsReady = true;
|
|
||||||
HasFillingClearance = false;
|
|
||||||
|
|
||||||
if (!connection.StartsWith("serial:"))
|
|
||||||
throw new ArgumentException("Unsupported scheme");
|
|
||||||
|
|
||||||
Serial = Utils.OpenSerialConnection(connection);
|
|
||||||
Writer = new(Serial.BaseStream, Encoding.ASCII, -1, true);
|
|
||||||
Reader = new(Serial.BaseStream, Encoding.ASCII, false, -1, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() {
|
|
||||||
Writer.Close();
|
|
||||||
Reader.Close();
|
|
||||||
Serial.Close();
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<WeighingResult> Weigh(bool incIdentNr) {
|
|
||||||
await Writer.WriteAsync(incIdentNr ? "\x05" : "?");
|
|
||||||
// TODO receive response
|
|
||||||
return new();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<WeighingResult> GetCurrentWeight() {
|
|
||||||
return await Weigh(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<WeighingResult> Weigh() {
|
|
||||||
return await Weigh(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task Empty() { }
|
|
||||||
|
|
||||||
public async Task GrantFillingClearance() { }
|
|
||||||
|
|
||||||
public async Task RevokeFillingClearance() { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Elwig.Helpers.Weighing {
|
||||||
|
/// <summary>
|
||||||
|
/// Interface for controlling a a scale which responds to commands sent to it
|
||||||
|
/// </summary>
|
||||||
|
public interface ICommandScale : IScale {
|
||||||
|
/// <summary>
|
||||||
|
/// Get the current weight on the scale without performing a weighing process
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Result of the weighing process (probably without a weighing id)</returns>
|
||||||
|
Task<WeighingResult> GetCurrentWeight();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Perform a weighing process
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Result of the weighing process (including a weighing id)</returns>
|
||||||
|
Task<WeighingResult> Weigh();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Empty the scale container or grant clearance to do so
|
||||||
|
/// </summary>
|
||||||
|
Task Empty();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grant clearance to fill the scale container
|
||||||
|
/// </summary>
|
||||||
|
Task GrantFillingClearance();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Revoke clearance to fill the scale container
|
||||||
|
/// </summary>
|
||||||
|
Task RevokeFillingClearance();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Elwig.Helpers.Weighing {
|
||||||
|
/// <summary>
|
||||||
|
/// Interface for controlling a a scale which automatically sends weighing updates
|
||||||
|
/// </summary>
|
||||||
|
public interface IEventScale : IScale {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
namespace Elwig.Helpers.Weighing {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for controlling a industrial scale
|
/// Interface for controlling a industrial scale (industrial terminal, "IT")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IScale : IDisposable {
|
public interface IScale : IDisposable {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -45,32 +44,5 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
/// Where to log the requests and responses from the scale to
|
/// Where to log the requests and responses from the scale to
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string? LogPath { get; }
|
string? LogPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get the current weight on the scale without performing a weighing process
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Result of the weighing process (probably without a weighing id)</returns>
|
|
||||||
Task<WeighingResult> GetCurrentWeight();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Perform a weighing process
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Result of the weighing process (including a weighing id)</returns>
|
|
||||||
Task<WeighingResult> Weigh();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Empty the scale container or grant clearance to do so
|
|
||||||
/// </summary>
|
|
||||||
Task Empty();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Grant clearance to fill the scale container
|
|
||||||
/// </summary>
|
|
||||||
Task GrantFillingClearance();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Revoke clearance to fill the scale container
|
|
||||||
/// </summary>
|
|
||||||
Task RevokeFillingClearance();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +1,19 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
namespace Elwig.Helpers.Weighing {
|
||||||
public class InvalidScale : IScale {
|
public class InvalidScale(string id) : IScale {
|
||||||
|
|
||||||
public string Manufacturer => "NONE";
|
public string Manufacturer => "NONE";
|
||||||
public string Model => "NONE";
|
public string Model => "NONE";
|
||||||
public string ScaleId { get; private set; }
|
public string ScaleId => id;
|
||||||
public int InternalScaleNr => 0;
|
public int InternalScaleNr => 0;
|
||||||
public bool IsReady => false;
|
public bool IsReady => false;
|
||||||
public bool HasFillingClearance => false;
|
public bool HasFillingClearance => false;
|
||||||
public int? WeightLimit => null;
|
public int? WeightLimit => null;
|
||||||
public string? LogPath => null;
|
public string? LogPath => null;
|
||||||
|
|
||||||
public InvalidScale(string id) {
|
|
||||||
ScaleId = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<WeighingResult> Weigh() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<WeighingResult> GetCurrentWeight() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task Empty() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task GrantFillingClearance() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task RevokeFillingClearance() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
using System.IO.Ports;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Elwig.Helpers.Weighing {
|
||||||
|
public abstract class Scale : IDisposable {
|
||||||
|
|
||||||
|
protected enum Output { RTS, DTR, OUT1, OUT2 };
|
||||||
|
|
||||||
|
protected SerialPort? Serial = null;
|
||||||
|
protected SerialPort? ControlSerialEmpty = null, ControlSerialFilling = null;
|
||||||
|
protected TcpClient? Tcp = null;
|
||||||
|
protected Stream Stream;
|
||||||
|
|
||||||
|
protected readonly Output? EmptyMode = null;
|
||||||
|
protected readonly Output? FillingClearanceMode = null;
|
||||||
|
protected readonly int EmptyDelay;
|
||||||
|
|
||||||
|
public int? WeightLimit { get; private set; }
|
||||||
|
public string? LogPath { get; private set; }
|
||||||
|
|
||||||
|
public static IScale FromConfig(ScaleConfig config) {
|
||||||
|
int? limit = config.Limit != null ? int.Parse(config.Limit) : null;
|
||||||
|
if (config.Type == "SysTec-IT") {
|
||||||
|
return new SysTecITScale(config.Id, config.Model!, config.Connection!, config.Empty, config.Filling, limit, config.Log);
|
||||||
|
} else if (config.Type == "Schember-evt") {
|
||||||
|
return new SchemberEventScale(config.Id, config.Model!, config.Connection!, config.Empty, config.Filling, limit, config.Log);
|
||||||
|
} else {
|
||||||
|
throw new ArgumentException($"Invalid scale type: \"{config.Type}\"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Scale(string cnx, string? empty, string? filling, int? limit, string? log) {
|
||||||
|
if (cnx.StartsWith("serial:")) {
|
||||||
|
Serial = Utils.OpenSerialConnection(cnx);
|
||||||
|
Stream = Serial.BaseStream;
|
||||||
|
} else if (cnx.StartsWith("tcp:")) {
|
||||||
|
Tcp = Utils.OpenTcpConnection(cnx);
|
||||||
|
Stream = Tcp.GetStream();
|
||||||
|
} else {
|
||||||
|
throw new ArgumentException("Unsupported scheme");
|
||||||
|
}
|
||||||
|
|
||||||
|
LogPath = log;
|
||||||
|
|
||||||
|
if (empty != null) {
|
||||||
|
var parts = empty.Split(':');
|
||||||
|
if (parts.Length == 3) {
|
||||||
|
if (parts[0] != Serial?.PortName)
|
||||||
|
ControlSerialEmpty = Utils.OpenSerialConnection($"serial://{parts[0]}:9600");
|
||||||
|
} else if (parts.Length != 2) {
|
||||||
|
throw new ArgumentException("Invalid value for 'empty'");
|
||||||
|
}
|
||||||
|
EmptyMode = ConvertOutput(parts[^2]);
|
||||||
|
EmptyDelay = int.Parse(parts[^1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
WeightLimit = limit;
|
||||||
|
if (filling != null) {
|
||||||
|
var parts = filling.Split(':');
|
||||||
|
if (parts.Length == 2) {
|
||||||
|
if (parts[0] != Serial?.PortName)
|
||||||
|
ControlSerialFilling = parts[0] != ControlSerialEmpty?.PortName ? Utils.OpenSerialConnection($"serial://{parts[0]}:9600") : ControlSerialEmpty;
|
||||||
|
} else if (parts.Length != 1) {
|
||||||
|
throw new ArgumentException("Invalid value for 'filling'");
|
||||||
|
}
|
||||||
|
FillingClearanceMode = ConvertOutput(parts[^1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FillingClearanceMode != null && WeightLimit == null)
|
||||||
|
throw new ArgumentException("Weight limit has to be set, if filling clearance supervision is enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose() {
|
||||||
|
Stream.Close();
|
||||||
|
Serial?.Close();
|
||||||
|
ControlSerialEmpty?.Close();
|
||||||
|
ControlSerialFilling?.Close();
|
||||||
|
Tcp?.Close();
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static Output? ConvertOutput(string? value) {
|
||||||
|
return value switch {
|
||||||
|
null => null,
|
||||||
|
"RTS" => Output.RTS,
|
||||||
|
"DTR" => Output.DTR,
|
||||||
|
"OUT1" => Output.OUT1,
|
||||||
|
"OUT2" => Output.OUT2,
|
||||||
|
_ => throw new ArgumentException($"Invalid value for argument: '{value}'"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace Elwig.Helpers.Weighing {
|
||||||
|
public class SchemberEventScale : Scale, IEventScale {
|
||||||
|
|
||||||
|
public string Manufacturer => "Schember";
|
||||||
|
public int InternalScaleNr => 1;
|
||||||
|
public string Model { get; private set; }
|
||||||
|
public string ScaleId { get; private set; }
|
||||||
|
public bool IsReady { get; private set; }
|
||||||
|
public bool HasFillingClearance { get; private set; }
|
||||||
|
|
||||||
|
public SchemberEventScale(string id, string model, string cnx, string? empty = null, string? filling = null, int? limit = null, string? log = null) :
|
||||||
|
base(cnx, empty, filling, limit, log) {
|
||||||
|
ScaleId = id;
|
||||||
|
Model = model;
|
||||||
|
IsReady = true;
|
||||||
|
HasFillingClearance = false;
|
||||||
|
Stream.WriteTimeout = 250;
|
||||||
|
Stream.ReadTimeout = 6000;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
|
||||||
// TODO implement SchemberScale
|
|
||||||
public class SchemberScale : IScale {
|
|
||||||
|
|
||||||
public string Manufacturer => "Schember";
|
|
||||||
public string Model => throw new NotImplementedException();
|
|
||||||
public string ScaleId => throw new NotImplementedException();
|
|
||||||
public int InternalScaleNr => throw new NotImplementedException();
|
|
||||||
public bool IsReady => throw new NotImplementedException();
|
|
||||||
public bool HasFillingClearance => throw new NotImplementedException();
|
|
||||||
public int? WeightLimit => throw new NotImplementedException();
|
|
||||||
public string? LogPath => throw new NotImplementedException();
|
|
||||||
|
|
||||||
public void Dispose() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task Empty() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<WeighingResult> GetCurrentWeight() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task GrantFillingClearance() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task RevokeFillingClearance() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<WeighingResult> Weigh() {
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
namespace Elwig.Helpers.Weighing {
|
||||||
public class SystecScale : IScale {
|
public class SysTecITScale : Scale, ICommandScale {
|
||||||
|
|
||||||
protected enum Output { RTS, DTR, OUT1, OUT2 };
|
|
||||||
|
|
||||||
protected SerialPort? Serial = null;
|
|
||||||
protected SerialPort? ControlSerialEmpty = null, ControlSerialFilling = null;
|
|
||||||
protected TcpClient? Tcp = null;
|
|
||||||
protected Stream Stream;
|
|
||||||
|
|
||||||
protected readonly Output? EmptyMode = null;
|
|
||||||
protected readonly Output? FillingClearanceMode = null;
|
|
||||||
protected readonly int EmptyDelay;
|
|
||||||
|
|
||||||
public string Manufacturer => "SysTec";
|
public string Manufacturer => "SysTec";
|
||||||
public int InternalScaleNr => 1;
|
public int InternalScaleNr => 1;
|
||||||
@@ -25,72 +13,15 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
public string ScaleId { get; private set; }
|
public string ScaleId { get; private set; }
|
||||||
public bool IsReady { get; private set; }
|
public bool IsReady { get; private set; }
|
||||||
public bool HasFillingClearance { get; private set; }
|
public bool HasFillingClearance { get; private set; }
|
||||||
public int? WeightLimit { get; private set; }
|
|
||||||
public string? LogPath { get; private set; }
|
|
||||||
|
|
||||||
public SystecScale(string id, string model, string connection, string? empty = null, string? filling = null, int? limit = null, string? log = null) {
|
public SysTecITScale(string id, string model, string cnx, string? empty = null, string? filling = null, int? limit = null, string? log = null) :
|
||||||
|
base(cnx, empty, filling, limit, log) {
|
||||||
ScaleId = id;
|
ScaleId = id;
|
||||||
Model = model;
|
Model = model;
|
||||||
IsReady = true;
|
IsReady = true;
|
||||||
HasFillingClearance = false;
|
HasFillingClearance = false;
|
||||||
LogPath = log;
|
Stream.WriteTimeout = 250;
|
||||||
|
Stream.ReadTimeout = 11000;
|
||||||
if (connection.StartsWith("serial:")) {
|
|
||||||
Serial = Utils.OpenSerialConnection(connection);
|
|
||||||
Stream = Serial.BaseStream;
|
|
||||||
} else if (connection.StartsWith("tcp:")) {
|
|
||||||
Tcp = Utils.OpenTcpConnection(connection);
|
|
||||||
Stream = Tcp.GetStream();
|
|
||||||
} else {
|
|
||||||
throw new ArgumentException("Unsupported scheme");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty != null) {
|
|
||||||
var parts = empty.Split(':');
|
|
||||||
if (parts.Length == 3) {
|
|
||||||
if (parts[0] != Serial?.PortName)
|
|
||||||
ControlSerialEmpty = Utils.OpenSerialConnection($"serial://{parts[0]}:9600");
|
|
||||||
} else if (parts.Length != 2) {
|
|
||||||
throw new ArgumentException("Invalid value for 'empty'");
|
|
||||||
}
|
|
||||||
EmptyMode = ConvertOutput(parts[^2]);
|
|
||||||
EmptyDelay = int.Parse(parts[^1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
WeightLimit = limit;
|
|
||||||
if (filling != null) {
|
|
||||||
var parts = filling.Split(':');
|
|
||||||
if (parts.Length == 2) {
|
|
||||||
if (parts[0] != Serial?.PortName)
|
|
||||||
ControlSerialFilling = parts[0] != ControlSerialEmpty?.PortName ? Utils.OpenSerialConnection($"serial://{parts[0]}:9600") : ControlSerialEmpty;
|
|
||||||
} else if (parts.Length != 1) {
|
|
||||||
throw new ArgumentException("Invalid value for 'filling'");
|
|
||||||
}
|
|
||||||
FillingClearanceMode = ConvertOutput(parts[^1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FillingClearanceMode != null && WeightLimit == null)
|
|
||||||
throw new ArgumentException("Weight limit has to be set, if filling clearance supervision is enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose() {
|
|
||||||
Stream.Close();
|
|
||||||
Serial?.Close();
|
|
||||||
ControlSerialEmpty?.Close();
|
|
||||||
ControlSerialFilling?.Close();
|
|
||||||
Tcp?.Close();
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static Output? ConvertOutput(string? value) {
|
|
||||||
return value switch {
|
|
||||||
null => null,
|
|
||||||
"RTS" => Output.RTS,
|
|
||||||
"DTR" => Output.DTR,
|
|
||||||
"OUT1" => Output.OUT1,
|
|
||||||
"OUT2" => Output.OUT2,
|
|
||||||
_ => throw new ArgumentException($"Invalid value for argument: '{value}'"),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task SendCommand(string command) {
|
protected async Task SendCommand(string command) {
|
||||||
@@ -105,7 +36,7 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
line = await reader.ReadLineAsync();
|
line = await reader.ReadLineAsync();
|
||||||
if (LogPath != null) await File.AppendAllTextAsync(LogPath, $"{line}\r\n");
|
if (LogPath != null) await File.AppendAllTextAsync(LogPath, $"{line}\r\n");
|
||||||
}
|
}
|
||||||
if (line == null || line.Length < 4 || !line.StartsWith("<") || !line.EndsWith(">")) {
|
if (line == null || line.Length < 4 || !line.StartsWith('<') || !line.EndsWith('>')) {
|
||||||
throw new IOException("Invalid response from scale");
|
throw new IOException("Invalid response from scale");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +93,7 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
var crc16 = line[52..60].Trim();
|
var crc16 = line[52..60].Trim();
|
||||||
|
|
||||||
if (Utils.CalcCrc16Modbus(record[..54]) != ushort.Parse(crc16)) {
|
if (Utils.CalcCrc16Modbus(record[..54]) != ushort.Parse(crc16)) {
|
||||||
throw new IOException($"Invalid response from scale: Invalid CRC16 checksum ({crc16} != {Utils.CalcCrc16Modbus(record[..54]).ToString()})");
|
throw new IOException($"Invalid response from scale: Invalid CRC16 checksum ({crc16} != {Utils.CalcCrc16Modbus(record[..54])})");
|
||||||
} else if (unit != "kg") {
|
} else if (unit != "kg") {
|
||||||
throw new IOException($"Unsupported unit in weighing response: '{unit}'");
|
throw new IOException($"Unsupported unit in weighing response: '{unit}'");
|
||||||
}
|
}
|
||||||
@@ -4,36 +4,38 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Result of a weighing process on an industrial scale
|
/// Result of a weighing process on an industrial scale
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class WeighingResult {
|
public struct WeighingResult {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Measured net weight in kg
|
/// Measured net weight in kg
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Weight = null;
|
public int? Weight;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Weighing id (or IdentNr) provided by the scale
|
/// Weighing id (or IdentNr) provided by the scale
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? WeighingId = null;
|
public string? WeighingId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wheighing id (or IdentNr) provided by the scale optionally combined with the current date
|
/// Wheighing id (or IdentNr) provided by the scale optionally combined with the current date
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? FullWeighingId = null;
|
public string? FullWeighingId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Date string provided by the scale
|
/// Date string provided by the scale
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateOnly? Date = null;
|
public DateOnly? Date;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Time string provided by the scale
|
/// Time string provided by the scale
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TimeOnly? Time = null;
|
public TimeOnly? Time;
|
||||||
|
|
||||||
/// <returns><Weight/WeighingId/Date/Time></returns>
|
/// <returns><Weight/WeighingId/Date/Time></returns>
|
||||||
override public string ToString() {
|
public override readonly string ToString() {
|
||||||
var w = Weight != null ? $"{Weight}kg" : "";
|
var w = Weight != null ? $"{Weight}kg" : "";
|
||||||
return $"<{w}/{WeighingId}/{Date:yyyy-MM-dd}/{Time:HH:mm}>";
|
return $"<{w}/{WeighingId}/{Date:yyyy-MM-dd}/{Time:HH:mm}>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -8,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Models.Dtos {
|
namespace Elwig.Models.Dtos {
|
||||||
public class AreaComUnderDeliveryData : DataTable<AreaComUnderDeliveryRow> {
|
public class AreaComUnderDeliveryData : DataTable<AreaComUnderDeliveryRow> {
|
||||||
|
|
||||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||||
("MgNr", "MgNr.", null, 12),
|
("MgNr", "MgNr.", null, 12),
|
||||||
("Name", "Name", null, 40),
|
("Name", "Name", null, 40),
|
||||||
("GivenName", "Vorname", null, 40),
|
("GivenName", "Vorname", null, 40),
|
||||||
@@ -20,7 +19,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
("DeliveryObligations", "Lieferpflicht", "kg", 22),
|
("DeliveryObligations", "Lieferpflicht", "kg", 22),
|
||||||
("Weights", "Geliefert", "kg", 22),
|
("Weights", "Geliefert", "kg", 22),
|
||||||
("UnderDeliveries", "Unterliefert", "kg|%", 34),
|
("UnderDeliveries", "Unterliefert", "kg|%", 34),
|
||||||
};
|
];
|
||||||
|
|
||||||
public AreaComUnderDeliveryData(IEnumerable<AreaComUnderDeliveryRow> rows, int year) :
|
public AreaComUnderDeliveryData(IEnumerable<AreaComUnderDeliveryRow> rows, int year) :
|
||||||
base($"Unterlieferungen FB", $"Unterlieferungen laut Flächenbindungen {year}", rows, FieldNames) {
|
base($"Unterlieferungen FB", $"Unterlieferungen laut Flächenbindungen {year}", rows, FieldNames) {
|
||||||
|
|||||||
@@ -0,0 +1,180 @@
|
|||||||
|
using Elwig.Helpers;
|
||||||
|
using Elwig.Helpers.Billing;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Elwig.Models.Dtos {
|
||||||
|
public class CreditNoteData : DataTable<CreditNoteRow> {
|
||||||
|
|
||||||
|
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||||
|
("MgNr", "MgNr.", null, 12),
|
||||||
|
("Name", "Name", null, 40),
|
||||||
|
("GivenName", "Vorname", null, 40),
|
||||||
|
("Address", "Adresse", null, 60),
|
||||||
|
("Plz", "PLZ", null, 10),
|
||||||
|
("Locality", "Ort", null, 60),
|
||||||
|
("Iban", "IBAN", null, 45),
|
||||||
|
("TgNr", "TG-Nr.", null, 20),
|
||||||
|
("Sum", "Zwischens.", "€", 20),
|
||||||
|
("Surcharge", "Zuschlag", "€", 20),
|
||||||
|
("Total", "Gesamt", "€", 20),
|
||||||
|
("ConsideredSum", "Berückstgt.", "€", 20),
|
||||||
|
("Net", "Netto", "€", 20),
|
||||||
|
("Vat1", "10% MwSt.", "€", 20),
|
||||||
|
("Vat2", "13% MwSt.", "€", 20),
|
||||||
|
("Gross", "Brutto", "€", 20),
|
||||||
|
("Penalties", "Pönalen FB", "€", 20),
|
||||||
|
("Penalty", "Unterl. GA", "€", 20),
|
||||||
|
("AutoBs", "GA Nachz.", "€", 20),
|
||||||
|
("Others", "Sonstige", "€", 20),
|
||||||
|
("Considered", "Berückstgt.", "€", 20),
|
||||||
|
("Amount", "Betrag", "€", 20),
|
||||||
|
];
|
||||||
|
|
||||||
|
public CreditNoteData(IEnumerable<CreditNoteRow> rows, int year, string name) :
|
||||||
|
base($"Buchungsliste", $"Buchungsliste {name} {year}", rows, FieldNames) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<CreditNoteData> ForPaymentVariant(AppDbContext ctx, int year, int avnr) {
|
||||||
|
var variant = await ctx.PaymentVariants.FindAsync(year, avnr);
|
||||||
|
var name = variant!.Name;
|
||||||
|
var data = BillingData.FromJson(variant!.Data);
|
||||||
|
var rows = (await FromDbSet(ctx.CreditNoteRows, year, avnr)).Select(r => new CreditNoteRow(r, data)).ToList();
|
||||||
|
return new CreditNoteData(rows, year, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task<IEnumerable<CreditNoteRowSingle>> FromDbSet(DbSet<CreditNoteRowSingle> table, int year, int avnr) {
|
||||||
|
return await table.FromSql($"""
|
||||||
|
SELECT m.mgnr, m.family_name, m.given_name, p.plz, o.name AS ort, m.address, m.iban, c.tgnr, s.year, s.precision,
|
||||||
|
p.amount - p.net_amount AS surcharge,
|
||||||
|
c.net_amount, c.prev_net_amount, c.vat, c.vat_amount, c.gross_amount, c.modifiers, c.prev_modifiers, c.amount,
|
||||||
|
ROUND(COALESCE(u.total_penalty, 0) / POW(10, 4 - 2)) AS fb_penalty,
|
||||||
|
ROUND(COALESCE(b.total_penalty, 0) / POW(10, s.precision - 2)) AS bs_penalty,
|
||||||
|
ROUND(COALESCE(a.total_amount, 0) / POW(10, s.precision - 2)) AS auto_bs
|
||||||
|
FROM credit c
|
||||||
|
LEFT JOIN member m ON m.mgnr = c.mgnr
|
||||||
|
LEFT JOIN payment_member p ON (p.year, p.avnr, p.mgnr) = (c.year, c.avnr, c.mgnr)
|
||||||
|
LEFT JOIN AT_plz_dest p ON p.id = m.postal_dest
|
||||||
|
LEFT JOIN AT_ort o ON o.okz = p.okz
|
||||||
|
LEFT JOIN season s ON s.year = c.year
|
||||||
|
LEFT JOIN v_penalty_area_commitments u ON (u.year, u.mgnr) = (s.year, m.mgnr)
|
||||||
|
LEFT JOIN v_penalty_business_shares b ON (b.year, b.mgnr) = (s.year, m.mgnr)
|
||||||
|
LEFT JOIN v_auto_business_shares a ON (a.year, a.mgnr) = (s.year, m.mgnr)
|
||||||
|
WHERE c.year = {year} AND c.avnr = {avnr}
|
||||||
|
ORDER BY m.mgnr
|
||||||
|
""").ToListAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CreditNoteRow {
|
||||||
|
public int MgNr;
|
||||||
|
public string Name;
|
||||||
|
public string GivenName;
|
||||||
|
public string Address;
|
||||||
|
public int Plz;
|
||||||
|
public string Locality;
|
||||||
|
public string Iban;
|
||||||
|
public string TgNr;
|
||||||
|
public decimal Sum;
|
||||||
|
public decimal? Surcharge;
|
||||||
|
public decimal Total;
|
||||||
|
public decimal? ConsideredSum;
|
||||||
|
public decimal Net;
|
||||||
|
public decimal? Vat1, Vat2;
|
||||||
|
public decimal Gross;
|
||||||
|
public decimal? Penalties;
|
||||||
|
public decimal? Penalty;
|
||||||
|
public decimal? AutoBs;
|
||||||
|
public decimal? Others;
|
||||||
|
public decimal? Considered;
|
||||||
|
public decimal Amount;
|
||||||
|
|
||||||
|
public CreditNoteRow(CreditNoteRowSingle row, BillingData data) {
|
||||||
|
byte prec1 = 2, prec2 = row.Precision;
|
||||||
|
MgNr = row.MgNr;
|
||||||
|
Name = row.Name;
|
||||||
|
GivenName = row.GivenName;
|
||||||
|
Address = row.Address;
|
||||||
|
Plz = row.Plz;
|
||||||
|
Locality = row.Locality;
|
||||||
|
Iban = Utils.FormatIban(row.Iban);
|
||||||
|
TgNr = $"{row.Year}/{row.TgNr}";
|
||||||
|
Total = Utils.DecFromDb(row.NetAmount, prec1);
|
||||||
|
Surcharge = (row.Surcharge == null || row.Surcharge == 0) ? null : Utils.DecFromDb((long)row.Surcharge, prec2);
|
||||||
|
Sum = Total - (Surcharge ?? 0);
|
||||||
|
ConsideredSum = (row.PrevNetAmount == null ||row.PrevNetAmount == 0) ? null : -Utils.DecFromDb((long)row.PrevNetAmount, prec1);
|
||||||
|
Net = Total + (ConsideredSum ?? 0);
|
||||||
|
if (row.Vat == 0.10) {
|
||||||
|
Vat1 = Utils.DecFromDb(row.VatAmount, prec1);
|
||||||
|
} else if (row.Vat == 0.13) {
|
||||||
|
Vat2 = Utils.DecFromDb(row.VatAmount, prec1);
|
||||||
|
}
|
||||||
|
decimal mod = (row.Modifiers == null) ? 0 : Utils.DecFromDb((long)row.Modifiers, prec1);
|
||||||
|
if (data.ConsiderContractPenalties)
|
||||||
|
Penalties = (row.FbPenalty == null || row.FbPenalty == 0) ? null : Utils.DecFromDb((long)row.FbPenalty, prec1);
|
||||||
|
if (data.ConsiderTotalPenalty)
|
||||||
|
Penalty = (row.BsPealty == null || row.BsPealty == 0) ? null : Utils.DecFromDb((long)row.BsPealty, prec1);
|
||||||
|
if (data.ConsiderAutoBusinessShares)
|
||||||
|
AutoBs = (row.AutoBs == null || row.AutoBs == 0) ? null : -Utils.DecFromDb((long)row.AutoBs, prec1);
|
||||||
|
mod -= (Penalties ?? 0) + (Penalty ?? 0) + (AutoBs ?? 0);
|
||||||
|
Others = (mod == 0) ? null : mod;
|
||||||
|
Gross = Utils.DecFromDb(row.GrossAmount, prec1);
|
||||||
|
Considered = (row.PrevModifiers == null || row.PrevModifiers == 0) ? null : -Utils.DecFromDb((long)row.PrevModifiers, prec1);
|
||||||
|
Amount = Utils.DecFromDb(row.Amount, prec1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Keyless]
|
||||||
|
public class CreditNoteRowSingle {
|
||||||
|
[Column("mgnr")]
|
||||||
|
public int MgNr { get; set; }
|
||||||
|
[Column("family_name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
[Column("given_name")]
|
||||||
|
public string GivenName { get; set; }
|
||||||
|
[Column("address")]
|
||||||
|
public string Address { get; set; }
|
||||||
|
[Column("plz")]
|
||||||
|
public int Plz { get; set; }
|
||||||
|
[Column("ort")]
|
||||||
|
public string LocalityFull { get; set; }
|
||||||
|
[NotMapped]
|
||||||
|
public string Locality => LocalityFull.Split(",")[0];
|
||||||
|
[Column("iban")]
|
||||||
|
public string Iban { get; set; }
|
||||||
|
[Column("year")]
|
||||||
|
public int Year { get; set; }
|
||||||
|
[Column("precision")]
|
||||||
|
public byte Precision { get; set; }
|
||||||
|
[Column("tgnr")]
|
||||||
|
public string TgNr { get; set; }
|
||||||
|
[Column("surcharge")]
|
||||||
|
public long? Surcharge { get; set; }
|
||||||
|
[Column("net_amount")]
|
||||||
|
public long NetAmount { get; set; }
|
||||||
|
[Column("prev_net_amount")]
|
||||||
|
public long? PrevNetAmount { get; set; }
|
||||||
|
[Column("vat")]
|
||||||
|
public double Vat { get; set; }
|
||||||
|
[Column("vat_amount")]
|
||||||
|
public long VatAmount { get; set; }
|
||||||
|
[Column("gross_amount")]
|
||||||
|
public long GrossAmount { get; set; }
|
||||||
|
[Column("modifiers")]
|
||||||
|
public long? Modifiers { get; set; }
|
||||||
|
[Column("prev_modifiers")]
|
||||||
|
public long? PrevModifiers { get; set; }
|
||||||
|
[Column("amount")]
|
||||||
|
public long Amount { get; set; }
|
||||||
|
[Column("fb_penalty")]
|
||||||
|
public long? FbPenalty { get; set; }
|
||||||
|
[Column("bs_penalty")]
|
||||||
|
public long? BsPealty { get; set; }
|
||||||
|
[Column("auto_bs")]
|
||||||
|
public long? AutoBs { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Models.Dtos {
|
namespace Elwig.Models.Dtos {
|
||||||
public class CreditNoteDeliveryData : DataTable<CreditNoteDeliveryRow> {
|
public class CreditNoteDeliveryData : DataTable<CreditNoteDeliveryRow> {
|
||||||
|
|
||||||
private static readonly (string, string, string?)[] FieldNames = new[] {
|
private static readonly (string, string, string?)[] FieldNames = [
|
||||||
("", "", (string?)null), // TODO
|
("", "", null), // TODO
|
||||||
};
|
];
|
||||||
|
|
||||||
private readonly int Year;
|
private readonly int Year;
|
||||||
private readonly int? TgNr;
|
private readonly int? TgNr;
|
||||||
@@ -25,7 +25,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
MgNr = mgnr;
|
MgNr = mgnr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<IDictionary<int, CreditNoteDeliveryData>> ForPaymentVariant(DbSet<CreditNoteRowSingle> table, DbSet<Season> seasons, int year, int avnr) {
|
public static async Task<IDictionary<int, CreditNoteDeliveryData>> ForPaymentVariant(DbSet<CreditNoteDeliveryRowSingle> table, DbSet<Season> seasons, int year, int avnr) {
|
||||||
return (await FromDbSet(table, year, avnr))
|
return (await FromDbSet(table, year, avnr))
|
||||||
.GroupBy(
|
.GroupBy(
|
||||||
r => new { r.Year, r.AvNr, r.MgNr, r.TgNr, r.DId, r.DPNr },
|
r => new { r.Year, r.AvNr, r.MgNr, r.TgNr, r.DId, r.DPNr },
|
||||||
@@ -36,7 +36,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
.ToDictionary(d => d.MgNr ?? 0);
|
.ToDictionary(d => d.MgNr ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<IEnumerable<CreditNoteRowSingle>> FromDbSet(DbSet<CreditNoteRowSingle> table, int? year = null, int? avnr = null, int? mgnr = null) {
|
private static async Task<IEnumerable<CreditNoteDeliveryRowSingle>> FromDbSet(DbSet<CreditNoteDeliveryRowSingle> table, int? year = null, int? avnr = null, int? mgnr = null) {
|
||||||
var y = year?.ToString() ?? "NULL";
|
var y = year?.ToString() ?? "NULL";
|
||||||
var v = avnr?.ToString() ?? "NULL";
|
var v = avnr?.ToString() ?? "NULL";
|
||||||
var m = mgnr?.ToString() ?? "NULL";
|
var m = mgnr?.ToString() ?? "NULL";
|
||||||
@@ -77,7 +77,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
public decimal? TotalModifiers;
|
public decimal? TotalModifiers;
|
||||||
public decimal? Amount;
|
public decimal? Amount;
|
||||||
|
|
||||||
public CreditNoteDeliveryRow(IEnumerable<CreditNoteRowSingle> rows, DbSet<Season> seasons) {
|
public CreditNoteDeliveryRow(IEnumerable<CreditNoteDeliveryRowSingle> rows, DbSet<Season> seasons) {
|
||||||
var f = rows.First();
|
var f = rows.First();
|
||||||
Year = f.Year;
|
Year = f.Year;
|
||||||
TgNr = f.TgNr;
|
TgNr = f.TgNr;
|
||||||
@@ -110,7 +110,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Keyless]
|
[Keyless]
|
||||||
public class CreditNoteRowSingle {
|
public class CreditNoteDeliveryRowSingle {
|
||||||
[Column("year")]
|
[Column("year")]
|
||||||
public int Year { get; set; }
|
public int Year { get; set; }
|
||||||
[Column("tgnr")]
|
[Column("tgnr")]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Models.Dtos {
|
namespace Elwig.Models.Dtos {
|
||||||
public class DeliveryConfirmationDeliveryData : DataTable<DeliveryConfirmationDeliveryRow> {
|
public class DeliveryConfirmationDeliveryData : DataTable<DeliveryConfirmationDeliveryRow> {
|
||||||
|
|
||||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||||
("LsNr", "LsNr.", null, 26),
|
("LsNr", "LsNr.", null, 26),
|
||||||
("DPNr", "Pos.", null, 8),
|
("DPNr", "Pos.", null, 8),
|
||||||
("Variety", "Sorte", null, 40),
|
("Variety", "Sorte", null, 40),
|
||||||
@@ -17,7 +17,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
("Gradation", "Gradation", "°Oe|°KMW", 32),
|
("Gradation", "Gradation", "°Oe|°KMW", 32),
|
||||||
("Buckets", "Flächenbindung", "|kg", 36),
|
("Buckets", "Flächenbindung", "|kg", 36),
|
||||||
("Weight", "Gewicht", "kg", 16),
|
("Weight", "Gewicht", "kg", 16),
|
||||||
};
|
];
|
||||||
|
|
||||||
private readonly int MgNr;
|
private readonly int MgNr;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Models.Dtos {
|
namespace Elwig.Models.Dtos {
|
||||||
public class MemberDeliveryPerVariantData : DataTable<MemberDeliveryPerVariantRow> {
|
public class MemberDeliveryPerVariantData : DataTable<MemberDeliveryPerVariantRow> {
|
||||||
|
|
||||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||||
("MgNr", "MgNr.", null, 12),
|
("MgNr", "MgNr.", null, 12),
|
||||||
("Name", "Name", null, 40),
|
("Name", "Name", null, 40),
|
||||||
("GivenName", "Vorname", null, 40),
|
("GivenName", "Vorname", null, 40),
|
||||||
@@ -20,7 +20,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
("Weights", "Geliefert", "kg", 22),
|
("Weights", "Geliefert", "kg", 22),
|
||||||
("Areas", "Fläche", "m²", 22),
|
("Areas", "Fläche", "m²", 22),
|
||||||
("Yields", "Ertrag", "kg/ha", 22),
|
("Yields", "Ertrag", "kg/ha", 22),
|
||||||
};
|
];
|
||||||
|
|
||||||
|
|
||||||
public MemberDeliveryPerVariantData(IEnumerable<MemberDeliveryPerVariantRow> rows, int year) :
|
public MemberDeliveryPerVariantData(IEnumerable<MemberDeliveryPerVariantRow> rows, int year) :
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
namespace Elwig.Models.Dtos {
|
namespace Elwig.Models.Dtos {
|
||||||
public class OverUnderDeliveryData : DataTable<OverUnderDeliveryRow> {
|
public class OverUnderDeliveryData : DataTable<OverUnderDeliveryRow> {
|
||||||
|
|
||||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||||
("MgNr", "MgNr.", null, 12),
|
("MgNr", "MgNr.", null, 12),
|
||||||
("Name", "Name", null, 40),
|
("Name", "Name", null, 40),
|
||||||
("GivenName", "Vorname", null, 40),
|
("GivenName", "Vorname", null, 40),
|
||||||
@@ -19,7 +19,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
("DeliveryRight", "Lieferrecht", "kg", 22),
|
("DeliveryRight", "Lieferrecht", "kg", 22),
|
||||||
("Weight", "Geliefert", "kg", 22),
|
("Weight", "Geliefert", "kg", 22),
|
||||||
("OverUnderDelivery", "Über-/Unterliefert", "kg|%", 34),
|
("OverUnderDelivery", "Über-/Unterliefert", "kg|%", 34),
|
||||||
};
|
];
|
||||||
|
|
||||||
public OverUnderDeliveryData(IEnumerable<OverUnderDeliveryRow> rows, int year) :
|
public OverUnderDeliveryData(IEnumerable<OverUnderDeliveryRow> rows, int year) :
|
||||||
base($"Über-Unterlieferungen", $"Über- und Unterlieferungen laut gezeichneten Geschäftsanteilen {year}", rows, FieldNames) {
|
base($"Über-Unterlieferungen", $"Über- und Unterlieferungen laut gezeichneten Geschäftsanteilen {year}", rows, FieldNames) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Elwig.Models.Entities;
|
using Elwig.Models.Entities;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string FormatAmountCent(long cents) => $"{cents / 100}.{cents % 100:00}";
|
public static string FormatAmountCent(long cents) => $"{cents / 100}.{Math.Abs(cents % 100):00}";
|
||||||
|
|
||||||
public static string FormatAmount(decimal amount) => FormatAmountCent((int)(amount * 100));
|
public static string FormatAmount(decimal amount) => FormatAmountCent((int)(amount * 100));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ namespace Elwig.Models.Entities {
|
|||||||
|
|
||||||
[Column("start_date")]
|
[Column("start_date")]
|
||||||
public string? StartDateString { get; set; }
|
public string? StartDateString { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public DateOnly? StartDate {
|
public DateOnly? StartDate {
|
||||||
get => StartDateString != null ? DateOnly.ParseExact(StartDateString, "yyyy-MM-dd") : null;
|
get => StartDateString != null ? DateOnly.ParseExact(StartDateString, "yyyy-MM-dd") : null;
|
||||||
@@ -74,13 +73,30 @@ namespace Elwig.Models.Entities {
|
|||||||
|
|
||||||
[Column("end_date")]
|
[Column("end_date")]
|
||||||
public string? EndDateString { get; set; }
|
public string? EndDateString { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public DateOnly? EndDate {
|
public DateOnly? EndDate {
|
||||||
get => EndDateString != null ? DateOnly.ParseExact(EndDateString, "yyyy-MM-dd") : null;
|
get => EndDateString != null ? DateOnly.ParseExact(EndDateString, "yyyy-MM-dd") : null;
|
||||||
set => EndDateString = value?.ToString("yyyy-MM-dd");
|
set => EndDateString = value?.ToString("yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Column("calc_mode")]
|
||||||
|
public int CalcMode { get; set; }
|
||||||
|
[NotMapped]
|
||||||
|
public bool Billing_HonorGebunden {
|
||||||
|
get => (CalcMode & 0x1) != 0;
|
||||||
|
set => CalcMode = value ? CalcMode | 0x1 : CalcMode & ~0x1;
|
||||||
|
}
|
||||||
|
[NotMapped]
|
||||||
|
public bool Billing_AllowAttrsIntoLower {
|
||||||
|
get => (CalcMode & 0x4) != 0;
|
||||||
|
set => CalcMode = value ? CalcMode | 0x4 : CalcMode & ~0x4;
|
||||||
|
}
|
||||||
|
[NotMapped]
|
||||||
|
public bool Billing_AvoidUnderDeliveries {
|
||||||
|
get => (CalcMode & 0x2) != 0;
|
||||||
|
set => CalcMode = value ? CalcMode | 0x2 : CalcMode & ~0x2;
|
||||||
|
}
|
||||||
|
|
||||||
[ForeignKey("CurrencyCode")]
|
[ForeignKey("CurrencyCode")]
|
||||||
public virtual Currency Currency { get; private set; }
|
public virtual Currency Currency { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- schema version 11 to 12
|
-- schema version 12 to 13
|
||||||
|
|
||||||
ALTER TABLE season ADD COLUMN bs_value INTEGER;
|
ALTER TABLE season ADD COLUMN bs_value INTEGER;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
-- schema version 13 to 14
|
||||||
|
|
||||||
|
CREATE VIEW v_penalty_area_commitments AS
|
||||||
|
SELECT year, mgnr,
|
||||||
|
SUM(COALESCE(IIF(u.weight = 0, -t.penalty_none, 0), 0) +
|
||||||
|
COALESCE(IIF(u.diff < 0, -t.penalty_amount, 0), 0) +
|
||||||
|
COALESCE(u.diff * t.penalty_per_kg, 0)
|
||||||
|
) AS total_penalty
|
||||||
|
FROM v_under_delivery u
|
||||||
|
JOIN area_commitment_type t ON t.vtrgid = u.bucket
|
||||||
|
GROUP BY year, mgnr
|
||||||
|
HAVING total_penalty < 0
|
||||||
|
ORDER BY year, mgnr;
|
||||||
|
|
||||||
|
CREATE VIEW v_penalty_business_shares AS
|
||||||
|
SELECT s.year, u.mgnr,
|
||||||
|
(COALESCE(IIF(u.weight = 0, -s.penalty_none, 0), 0) +
|
||||||
|
COALESCE(IIF(u.diff < 0, -s.penalty_amount, 0), 0) +
|
||||||
|
COALESCE(u.diff * s.penalty_per_kg, 0)
|
||||||
|
) AS total_penalty
|
||||||
|
FROM v_total_under_delivery u
|
||||||
|
JOIN season s ON s.year = u.year
|
||||||
|
WHERE u.diff < 0 AND total_penalty < 0
|
||||||
|
ORDER BY s.year, u.mgnr;
|
||||||
|
|
||||||
|
CREATE VIEW v_auto_business_shares AS
|
||||||
|
SELECT s.year, h.mgnr,
|
||||||
|
SUM(h.business_shares) AS business_shares,
|
||||||
|
SUM(h.business_shares) * s.bs_value AS total_amount
|
||||||
|
FROM member_history h, season s
|
||||||
|
WHERE h.type = 'auto' AND h.date >= s.year || '-01-01' AND h.date <= s.year || '-12-31'
|
||||||
|
GROUP BY s.year, h.mgnr
|
||||||
|
ORDER BY s.year, h.mgnr;
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
-- schema version 14 to 15
|
||||||
|
|
||||||
|
ALTER TABLE season ADD COLUMN calc_mode INTEGER NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
|
DROP TRIGGER t_payment_delivery_part_u;
|
||||||
|
|
||||||
|
CREATE TRIGGER t_payment_delivery_part_u
|
||||||
|
AFTER UPDATE ON payment_delivery_part FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
UPDATE payment_member
|
||||||
|
SET net_amount = net_amount - OLD.amount
|
||||||
|
WHERE (year, avnr, mgnr) IN (SELECT year, OLD.avnr, mgnr FROM delivery WHERE (year, did) = (OLD.year, OLD.did));
|
||||||
|
INSERT INTO payment_member (year, avnr, mgnr, net_amount)
|
||||||
|
SELECT d.year, v.avnr, d.mgnr, NEW.amount
|
||||||
|
FROM delivery d, payment_variant v
|
||||||
|
WHERE (d.year, d.did) = (NEW.year, NEW.did) AND (v.year, v.avnr) = (NEW.year, NEW.avnr)
|
||||||
|
ON CONFLICT DO UPDATE SET net_amount = net_amount + excluded.net_amount;
|
||||||
|
END;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- schema version 15 to 16
|
||||||
|
|
||||||
|
INSERT INTO AT_plz_dest (plz, okz, dest)
|
||||||
|
VALUES (2560, 3388, 'Grillenberg');
|
||||||
|
|
||||||
|
DELETE FROM AT_plz_dest WHERE (plz, okz) = (2561, 3388);
|
||||||
|
|
||||||
|
UPDATE AT_ort SET kgnr = 23351 WHERE okz = 5280;
|
||||||
|
UPDATE AT_ort SET kgnr = 4311 WHERE okz = 3388;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
-- schema version 16 to 17
|
||||||
|
|
||||||
|
CREATE VIEW v_virtual_season AS
|
||||||
|
SELECT year, max_kg_per_ha
|
||||||
|
FROM season
|
||||||
|
UNION
|
||||||
|
SELECT strftime('%Y', date()) + 0, (SELECT max_kg_per_ha FROM season ORDER BY year DESC LIMIT 1);
|
||||||
|
|
||||||
|
PRAGMA writable_schema = ON;
|
||||||
|
UPDATE sqlite_schema SET sql = REPLACE(sql, 'season s', 'v_virtual_season s')
|
||||||
|
WHERE type = 'view' AND name = 'v_area_commitment_bucket_strict';
|
||||||
|
PRAGMA writable_schema = OFF;
|
||||||
@@ -16,21 +16,21 @@ namespace Elwig.Windows {
|
|||||||
public int MgNr => Member.MgNr;
|
public int MgNr => Member.MgNr;
|
||||||
|
|
||||||
private readonly Member Member;
|
private readonly Member Member;
|
||||||
private List<string> TextFilter = new();
|
private List<string> TextFilter = [];
|
||||||
|
|
||||||
public AreaComAdminWindow(int mgnr) {
|
public AreaComAdminWindow(int mgnr) {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Member = Context.Members.Find(mgnr) ?? throw new ArgumentException("MgNr argument has invalid value");
|
Member = Context.Members.Find(mgnr) ?? throw new ArgumentException("MgNr argument has invalid value");
|
||||||
Title = $"Flächenbindungen - {Member.AdministrativeName} - Elwig";
|
Title = $"Flächenbindungen - {Member.AdministrativeName} - Elwig";
|
||||||
ExemptInputs = new Control[] {
|
ExemptInputs = [
|
||||||
MgNrInput, AreaCommitmentList, NewAreaCommitmentButton,
|
MgNrInput, AreaCommitmentList, NewAreaCommitmentButton,
|
||||||
EditAreaCommitmentButton, DeleteAreaCommitmentButton, AreaCommitmentSaveButton,
|
EditAreaCommitmentButton, DeleteAreaCommitmentButton, AreaCommitmentSaveButton,
|
||||||
AreaCommitmentResetButton, AreaCommitmentCancelButton, SearchInput, ActiveAreaCommitmentInput
|
AreaCommitmentResetButton, AreaCommitmentCancelButton, SearchInput, ActiveAreaCommitmentInput
|
||||||
};
|
];
|
||||||
RequiredInputs = new Control[] {
|
RequiredInputs = [
|
||||||
FbNrInput, YearFromInput, KgInput, RdInput,
|
FbNrInput, YearFromInput, KgInput, RdInput,
|
||||||
GstNrInput, AreaInput.TextBox, AreaComTypeInput, WineCultivationInput
|
GstNrInput, AreaInput.TextBox, AreaComTypeInput, WineCultivationInput
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e) {
|
private void Window_Loaded(object sender, RoutedEventArgs e) {
|
||||||
@@ -76,10 +76,10 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async Task<(List<string>, IQueryable<AreaCom>, List<string>)> GetFilters() {
|
private async Task<(List<string>, IQueryable<AreaCom>, List<string>)> GetFilters() {
|
||||||
List<string> filterNames = new();
|
List<string> filterNames = [];
|
||||||
IQueryable<AreaCom> areaComQuery = Context.AreaCommitments.Where(a => a.MgNr == Member.MgNr).OrderBy(a => a.FbNr);
|
IQueryable<AreaCom> areaComQuery = Context.AreaCommitments.Where(a => a.MgNr == Member.MgNr).OrderBy(a => a.FbNr);
|
||||||
if (ActiveAreaCommitmentInput.IsChecked == true) {
|
if (ActiveAreaCommitmentInput.IsChecked == true) {
|
||||||
areaComQuery = areaComQuery.Where(a => (a.YearFrom <= Utils.CurrentNextSeason) && (a.YearTo == null || a.YearTo >= Utils.CurrentNextSeason));
|
areaComQuery = areaComQuery.Where(a => (a.YearFrom <= Utils.CurrentYear) && (a.YearTo == null || a.YearTo >= Utils.CurrentYear));
|
||||||
filterNames.Add("aktiv");
|
filterNames.Add("aktiv");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ namespace Elwig.Windows {
|
|||||||
YearToInput.Text = a.YearTo.ToString();
|
YearToInput.Text = a.YearTo.ToString();
|
||||||
|
|
||||||
KgInput.SelectedItem = a.Kg.AtKg;
|
KgInput.SelectedItem = a.Kg.AtKg;
|
||||||
RdInput.SelectedItem = a.Rd;
|
RdInput.SelectedItem = a.Rd ?? RdInput.Items[0];
|
||||||
GstNrInput.Text = a.GstNr;
|
GstNrInput.Text = a.GstNr;
|
||||||
AreaInput.Text = a.Area.ToString();
|
AreaInput.Text = a.Area.ToString();
|
||||||
|
|
||||||
@@ -230,8 +230,8 @@ namespace Elwig.Windows {
|
|||||||
a.RdNr = RdInput.SelectedItem.GetType() == typeof(NullItem) ? null : ((WbRd)RdInput.SelectedItem).RdNr;
|
a.RdNr = RdInput.SelectedItem.GetType() == typeof(NullItem) ? null : ((WbRd)RdInput.SelectedItem).RdNr;
|
||||||
a.GstNr = GstNrInput.Text;
|
a.GstNr = GstNrInput.Text;
|
||||||
a.Area = int.Parse(AreaInput.Text);
|
a.Area = int.Parse(AreaInput.Text);
|
||||||
a.VtrgId = (AreaComTypeInput.SelectedItem as AreaComType)?.VtrgId;
|
a.VtrgId = (AreaComTypeInput.SelectedItem as AreaComType)!.VtrgId;
|
||||||
a.CultId = (WineCultivationInput.SelectedItem as WineCult)?.CultId;
|
a.CultId = (WineCultivationInput.SelectedItem as WineCult)!.CultId;
|
||||||
a.Comment = (CommentInput.Text == "") ? null : CommentInput.Text;
|
a.Comment = (CommentInput.Text == "") ? null : CommentInput.Text;
|
||||||
|
|
||||||
EntityEntry<AreaCom>? tr = null;
|
EntityEntry<AreaCom>? tr = null;
|
||||||
@@ -275,7 +275,7 @@ namespace Elwig.Windows {
|
|||||||
MessageBox.Show(str, "Flächenbindung aktualisieren", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(str, "Flächenbindung aktualisieren", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return a;
|
return a!;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void AreaCommitmentSaveButton_Click(object sender, RoutedEventArgs evt) {
|
private async void AreaCommitmentSaveButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
@@ -287,7 +287,7 @@ namespace Elwig.Windows {
|
|||||||
ShowAreaCommitmentNewEditDeleteButtons();
|
ShowAreaCommitmentNewEditDeleteButtons();
|
||||||
LockInputs();
|
LockInputs();
|
||||||
UnlockSearchInputs();
|
UnlockSearchInputs();
|
||||||
await RefreshAreaCommitmentList();
|
await App.HintContextChange();
|
||||||
AreaCommitmentList.SelectedItem = a;
|
AreaCommitmentList.SelectedItem = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Elwig.Documents;
|
using Elwig.Documents;
|
||||||
using Elwig.Helpers;
|
using Elwig.Helpers;
|
||||||
using Elwig.Helpers.Export;
|
using Elwig.Helpers.Export;
|
||||||
|
using Elwig.Helpers.Weighing;
|
||||||
using Elwig.Models.Entities;
|
using Elwig.Models.Entities;
|
||||||
using LinqKit;
|
using LinqKit;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -217,7 +218,7 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void InitialDefaultInputs() {
|
private void InitialDefaultInputs() {
|
||||||
if (App.Client.HasRebler(BranchInput.SelectedValue as Branch)) {
|
if (App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch)) {
|
||||||
GerebeltGewogenInput.IsEnabled = false;
|
GerebeltGewogenInput.IsEnabled = false;
|
||||||
SetDefaultValue(GerebeltGewogenInput, true);
|
SetDefaultValue(GerebeltGewogenInput, true);
|
||||||
} else {
|
} else {
|
||||||
@@ -225,7 +226,7 @@ namespace Elwig.Windows {
|
|||||||
UnsetDefaultValue(GerebeltGewogenInput);
|
UnsetDefaultValue(GerebeltGewogenInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (App.Client.HasKisten(BranchInput.SelectedValue as Branch)) {
|
if (!App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch)) {
|
||||||
LesewagenInput.IsEnabled = false;
|
LesewagenInput.IsEnabled = false;
|
||||||
SetDefaultValue(LesewagenInput, false);
|
SetDefaultValue(LesewagenInput, false);
|
||||||
HandPickedInput.IsThreeState = false;
|
HandPickedInput.IsThreeState = false;
|
||||||
@@ -255,9 +256,9 @@ namespace Elwig.Windows {
|
|||||||
ClearOriginalValues();
|
ClearOriginalValues();
|
||||||
ClearDefaultValues();
|
ClearDefaultValues();
|
||||||
|
|
||||||
GerebeltGewogenInput.IsChecked = App.Client.HasRebler(BranchInput.SelectedValue as Branch);
|
GerebeltGewogenInput.IsChecked = App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch);
|
||||||
LesewagenInput.IsChecked = false;
|
LesewagenInput.IsChecked = false;
|
||||||
HandPickedInput.IsChecked = App.Client.HasKisten(BranchInput.SelectedValue as Branch) ? true : null;
|
HandPickedInput.IsChecked = !App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch) ? true : null;
|
||||||
GebundenInput.IsChecked = null;
|
GebundenInput.IsChecked = null;
|
||||||
InitialDefaultInputs();
|
InitialDefaultInputs();
|
||||||
|
|
||||||
@@ -862,7 +863,7 @@ namespace Elwig.Windows {
|
|||||||
var originalMemberKgNr = d?.Member?.DefaultKgNr;
|
var originalMemberKgNr = d?.Member?.DefaultKgNr;
|
||||||
if (d == null) {
|
if (d == null) {
|
||||||
d = Context.CreateProxy<Delivery>();
|
d = Context.CreateProxy<Delivery>();
|
||||||
year = Utils.CurrentNextSeason;
|
year = Utils.CurrentYear;
|
||||||
did = await Context.NextDId(year);
|
did = await Context.NextDId(year);
|
||||||
} else {
|
} else {
|
||||||
year = d.Year;
|
year = d.Year;
|
||||||
@@ -968,7 +969,8 @@ namespace Elwig.Windows {
|
|||||||
CancelCreatingButton.IsEnabled = false;
|
CancelCreatingButton.IsEnabled = false;
|
||||||
try {
|
try {
|
||||||
var s = App.Scales[index];
|
var s = App.Scales[index];
|
||||||
var res = await s.Weigh();
|
if (s is not ICommandScale cs) return;
|
||||||
|
var res = await cs.Weigh();
|
||||||
if ((res.Weight ?? 0) > 0 && res.FullWeighingId != null) {
|
if ((res.Weight ?? 0) > 0 && res.FullWeighingId != null) {
|
||||||
WeightInput.Text = $"{res.Weight:N0}";
|
WeightInput.Text = $"{res.Weight:N0}";
|
||||||
ScaleId = s.ScaleId;
|
ScaleId = s.ScaleId;
|
||||||
@@ -1080,8 +1082,8 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
private void EmptyScale() {
|
private void EmptyScale() {
|
||||||
var scale = App.Scales.Where(s => s.ScaleId == ScaleId).FirstOrDefault();
|
var scale = App.Scales.Where(s => s.ScaleId == ScaleId).FirstOrDefault();
|
||||||
if (scale == null) return;
|
if (scale is not ICommandScale cs) return;
|
||||||
scale.Empty();
|
cs.Empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void NewDeliveryPartButton_Click(object sender, RoutedEventArgs evt) {
|
private async void NewDeliveryPartButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
@@ -1729,14 +1731,14 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void GerebeltGewogenInput_Changed(object sender, RoutedEventArgs evt) {
|
private void GerebeltGewogenInput_Changed(object sender, RoutedEventArgs evt) {
|
||||||
if (App.Client.HasKisten(BranchInput.SelectedValue as Branch)) {
|
if (!App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch)) {
|
||||||
HandPickedInput.IsChecked = !GerebeltGewogenInput.IsChecked;
|
HandPickedInput.IsChecked = !GerebeltGewogenInput.IsChecked;
|
||||||
}
|
}
|
||||||
CheckBox_Changed(sender, evt);
|
CheckBox_Changed(sender, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandPickedInput_Changed(object sender, RoutedEventArgs evt) {
|
private void HandPickedInput_Changed(object sender, RoutedEventArgs evt) {
|
||||||
if (App.Client.HasKisten(BranchInput.SelectedValue as Branch)) {
|
if (!App.Client.HasNetWeighing(BranchInput.SelectedValue as Branch)) {
|
||||||
GerebeltGewogenInput.IsChecked = !HandPickedInput.IsChecked;
|
GerebeltGewogenInput.IsChecked = !HandPickedInput.IsChecked;
|
||||||
}
|
}
|
||||||
CheckBox_Changed(sender, evt);
|
CheckBox_Changed(sender, evt);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace Elwig.Windows {
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
var v = Assembly.GetExecutingAssembly().GetName().Version;
|
var v = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
VersionField.Text = "Version: " + (v == null ? "?" : $"{v.Major}.{v.Minor}.{v.Build}") + $" – {App.BranchName}";
|
VersionField.Text = "Version: " + (v == null ? "?" : $"{v.Major}.{v.Minor}.{v.Build}") + $" – {App.BranchName}";
|
||||||
|
if (App.Client.Client == null) VersionField.Text += " (Unbekannt)";
|
||||||
if (!App.Config.Debug) {
|
if (!App.Config.Debug) {
|
||||||
TestWindowButton.Visibility = Visibility.Hidden;
|
TestWindowButton.Visibility = Visibility.Hidden;
|
||||||
//QueryWindowButton.Visibility = Visibility.Hidden;
|
//QueryWindowButton.Visibility = Visibility.Hidden;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace Elwig.Windows {
|
|||||||
filter.RemoveAt(i--);
|
filter.RemoveAt(i--);
|
||||||
} else if (e.Length > 2 && e.StartsWith('"') && e.EndsWith('"')) {
|
} else if (e.Length > 2 && e.StartsWith('"') && e.EndsWith('"')) {
|
||||||
filter[i] = e[1..^1];
|
filter[i] = e[1..^1];
|
||||||
} else if (e.Length <= 2) {
|
} else if (e.Length < 2) {
|
||||||
filter.RemoveAt(i--);
|
filter.RemoveAt(i--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Elwig.Windows"
|
xmlns:local="clr-namespace:Elwig.Windows"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Auszahlungsvarianten - Elwig" Height="500" Width="820" MinHeight="500" MinWidth="820">
|
Title="Auszahlungsvarianten - Elwig" Height="510" Width="820" MinHeight="500" MinWidth="820">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style TargetType="Label">
|
<Style TargetType="Label">
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="200"/>
|
<RowDefinition Height="220"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ListBox x:Name="PaymentVariantList" Margin="10,10,35,10" Grid.RowSpan="2" SelectionChanged="PaymentVariantList_SelectionChanged">
|
<ListBox x:Name="PaymentVariantList" Margin="10,10,35,10" Grid.RowSpan="2" SelectionChanged="PaymentVariantList_SelectionChanged">
|
||||||
@@ -163,6 +163,9 @@
|
|||||||
<Button x:Name="ExportButton" Content="Exportieren" FontSize="14" Width="180" Margin="10,10,10,10" Height="27" IsEnabled="False"
|
<Button x:Name="ExportButton" Content="Exportieren" FontSize="14" Width="180" Margin="10,10,10,10" Height="27" IsEnabled="False"
|
||||||
Click="ExportButton_Click"
|
Click="ExportButton_Click"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
|
<Button x:Name="TransactionButton" Content="Buchungsliste" FontSize="14" Width="180" Margin="10,42,10,10" Height="27" IsEnabled="False"
|
||||||
|
Click="TransactionButton_Click"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
<ProgressBar x:Name="ProgressBar" Margin="10,10,10,74" Height="27" Width="180"
|
<ProgressBar x:Name="ProgressBar" Margin="10,10,10,74" Height="27" Width="180"
|
||||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ namespace Elwig.Windows {
|
|||||||
ShowButton.IsEnabled = true;
|
ShowButton.IsEnabled = true;
|
||||||
PrintButton.IsEnabled = true;
|
PrintButton.IsEnabled = true;
|
||||||
ExportButton.IsEnabled = locked;
|
ExportButton.IsEnabled = locked;
|
||||||
|
TransactionButton.IsEnabled = locked;
|
||||||
|
|
||||||
NameInput.Text = v.Name;
|
NameInput.Text = v.Name;
|
||||||
NameInput.IsReadOnly = false;
|
NameInput.IsReadOnly = false;
|
||||||
@@ -101,6 +102,7 @@ namespace Elwig.Windows {
|
|||||||
ShowButton.IsEnabled = false;
|
ShowButton.IsEnabled = false;
|
||||||
PrintButton.IsEnabled = false;
|
PrintButton.IsEnabled = false;
|
||||||
ExportButton.IsEnabled = false;
|
ExportButton.IsEnabled = false;
|
||||||
|
TransactionButton.IsEnabled = false;
|
||||||
|
|
||||||
BillingData = null;
|
BillingData = null;
|
||||||
NameInput.Text = "";
|
NameInput.Text = "";
|
||||||
@@ -135,6 +137,7 @@ namespace Elwig.Windows {
|
|||||||
(ConsiderPenaltyInput.IsChecked != BillingData?.ConsiderTotalPenalty) ||
|
(ConsiderPenaltyInput.IsChecked != BillingData?.ConsiderTotalPenalty) ||
|
||||||
(ConsiderAutoInput.IsChecked != BillingData?.ConsiderAutoBusinessShares));
|
(ConsiderAutoInput.IsChecked != BillingData?.ConsiderAutoBusinessShares));
|
||||||
CalculateButton.IsEnabled = !SaveButton.IsEnabled && PaymentVariantList.SelectedItem is PaymentVar { TestVariant: true };
|
CalculateButton.IsEnabled = !SaveButton.IsEnabled && PaymentVariantList.SelectedItem is PaymentVar { TestVariant: true };
|
||||||
|
CommitButton.IsEnabled = CalculateButton.IsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSums() {
|
private void UpdateSums() {
|
||||||
@@ -216,7 +219,7 @@ namespace Elwig.Windows {
|
|||||||
try {
|
try {
|
||||||
Context.Remove(v);
|
Context.Remove(v);
|
||||||
await Context.SaveChangesAsync();
|
await Context.SaveChangesAsync();
|
||||||
await HintContextChange();
|
await App.HintContextChange();
|
||||||
} catch (Exception exc) {
|
} catch (Exception exc) {
|
||||||
var str = "Der Eintrag konnte nicht in der Datenbank aktualisiert werden!\n\n" + exc.Message;
|
var str = "Der Eintrag konnte nicht in der Datenbank aktualisiert werden!\n\n" + exc.Message;
|
||||||
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
|
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
|
||||||
@@ -283,9 +286,9 @@ namespace Elwig.Windows {
|
|||||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
var b = new BillingVariant(v.Year, v.AvNr);
|
var b = new BillingVariant(v.Year, v.AvNr);
|
||||||
await b.Revert();
|
await b.Revert();
|
||||||
|
await App.HintContextChange();
|
||||||
Mouse.OverrideCursor = null;
|
Mouse.OverrideCursor = null;
|
||||||
CommitButton.IsEnabled = true;
|
CommitButton.IsEnabled = true;
|
||||||
await App.HintContextChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ExportButton_Click(object sender, RoutedEventArgs evt) {
|
private async void ExportButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
@@ -304,13 +307,42 @@ namespace Elwig.Windows {
|
|||||||
if (d.ShowDialog() == true) {
|
if (d.ShowDialog() == true) {
|
||||||
ExportButton.IsEnabled = false;
|
ExportButton.IsEnabled = false;
|
||||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
using var e = new Ebics(v, d.FileName);
|
try {
|
||||||
await e.ExportAsync(Transaction.FromPaymentVariant(v));
|
using var e = new Ebics(v, d.FileName, 9);
|
||||||
|
await e.ExportAsync(Transaction.FromPaymentVariant(v));
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
Mouse.OverrideCursor = null;
|
Mouse.OverrideCursor = null;
|
||||||
ExportButton.IsEnabled = true;
|
ExportButton.IsEnabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void TransactionButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
if (PaymentVariantList.SelectedValue is not PaymentVar v) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var d = new SaveFileDialog() {
|
||||||
|
FileName = $"{App.Client.NameToken}-Buchungsliste-{v.Year}-{v.Name.Trim().Replace(' ', '-')}.ods",
|
||||||
|
DefaultExt = "ods",
|
||||||
|
Filter = "OpenDocument Format Spreadsheet (*.ods)|*.ods",
|
||||||
|
Title = $"Buchungsliste speichern unter - Elwig"
|
||||||
|
};
|
||||||
|
if (d.ShowDialog() == true) {
|
||||||
|
TransactionButton.IsEnabled = false;
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
var tbl = await CreditNoteData.ForPaymentVariant(Context, v.Year, v.AvNr);
|
||||||
|
using var ods = new OdsFile(d.FileName);
|
||||||
|
await ods.AddTable(tbl);
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
TransactionButton.IsEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async void SaveButton_Click(object sender, RoutedEventArgs evt) {
|
private async void SaveButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
if (PaymentVariantList.SelectedItem is not PaymentVar v || BillingData == null) return;
|
if (PaymentVariantList.SelectedItem is not PaymentVar v || BillingData == null) return;
|
||||||
try {
|
try {
|
||||||
@@ -488,11 +520,19 @@ namespace Elwig.Windows {
|
|||||||
members = members.OrderBy(m => m.MgNr);
|
members = members.OrderBy(m => m.MgNr);
|
||||||
|
|
||||||
IEnumerable<Member> list = await members.ToListAsync();
|
IEnumerable<Member> list = await members.ToListAsync();
|
||||||
var data = await CreditNoteDeliveryData.ForPaymentVariant(Context.CreditNoteRows, Context.Seasons, v.Year, v.AvNr);
|
var data = await CreditNoteDeliveryData.ForPaymentVariant(Context.CreditNoteDeliveryRows, Context.Seasons, v.Year, v.AvNr);
|
||||||
var payments = await Context.MemberPayments.Where(p => p.Year == v.Year && p.AvNr == v.AvNr).ToDictionaryAsync(c => c.MgNr);
|
var payments = await Context.MemberPayments.Where(p => p.Year == v.Year && p.AvNr == v.AvNr).ToDictionaryAsync(c => c.MgNr);
|
||||||
await Context.GetMemberAreaCommitmentBuckets(Year, 0);
|
await Context.GetMemberAreaCommitmentBuckets(Year, 0);
|
||||||
using var doc = Document.Merge(list.Select(m =>
|
using var doc = Document.Merge(list.Select(m =>
|
||||||
new CreditNote(Context, payments[m.MgNr], data[m.MgNr], Context.GetMemberUnderDelivery(Year, m.MgNr).GetAwaiter().GetResult())
|
new CreditNote(
|
||||||
|
Context,
|
||||||
|
payments[m.MgNr],
|
||||||
|
data[m.MgNr],
|
||||||
|
BillingData?.ConsiderContractPenalties ?? false,
|
||||||
|
BillingData?.ConsiderTotalPenalty ?? false,
|
||||||
|
BillingData?.ConsiderAutoBusinessShares ?? false,
|
||||||
|
Context.GetMemberUnderDelivery(Year, m.MgNr).GetAwaiter().GetResult()
|
||||||
|
)
|
||||||
));
|
));
|
||||||
await doc.Generate(new Progress<double>(v => {
|
await doc.Generate(new Progress<double>(v => {
|
||||||
ProgressBar.Value = v;
|
ProgressBar.Value = v;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using Elwig.Dialogs;
|
|
||||||
using Elwig.Helpers;
|
using Elwig.Helpers;
|
||||||
using Elwig.Helpers.Billing;
|
using Elwig.Helpers.Billing;
|
||||||
using Elwig.Helpers.Export;
|
using Elwig.Helpers.Export;
|
||||||
using Elwig.Models.Dtos;
|
using Elwig.Models.Dtos;
|
||||||
|
using Elwig.Models.Entities;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -33,19 +33,31 @@ namespace Elwig.Windows {
|
|||||||
OverUnderDeliveryButton.IsEnabled = valid;
|
OverUnderDeliveryButton.IsEnabled = valid;
|
||||||
AutoBusinessSharesButton.IsEnabled = valid;
|
AutoBusinessSharesButton.IsEnabled = valid;
|
||||||
PaymentButton.IsEnabled = valid;
|
PaymentButton.IsEnabled = valid;
|
||||||
|
AllowAttrIntoLowerInput.IsEnabled = valid && last;
|
||||||
|
AvoidUnderDeliveriesInput.IsEnabled = valid && last;
|
||||||
|
HonorGebundenInput.IsEnabled = valid && last;
|
||||||
|
AllowAttrIntoLowerInput.IsChecked = s0?.Billing_AllowAttrsIntoLower;
|
||||||
|
AvoidUnderDeliveriesInput.IsChecked = s0?.Billing_AvoidUnderDeliveries;
|
||||||
|
HonorGebundenInput.IsChecked = s0?.Billing_HonorGebunden;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void CalculateBucketsButton_Click(object sender, RoutedEventArgs evt) {
|
private async void CalculateBucketsButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
if (SeasonInput.Value is not int year)
|
if (SeasonInput.Value is not int year || await Context.Seasons.FindAsync(year) is not Season s)
|
||||||
return;
|
return;
|
||||||
CalculateBucketsButton.IsEnabled = false;
|
CalculateBucketsButton.IsEnabled = false;
|
||||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
|
||||||
|
try {
|
||||||
|
s.Billing_AllowAttrsIntoLower = AllowAttrIntoLowerInput.IsChecked ?? false;
|
||||||
|
s.Billing_AvoidUnderDeliveries = AvoidUnderDeliveriesInput.IsChecked ?? false;
|
||||||
|
s.Billing_HonorGebunden = HonorGebundenInput.IsChecked ?? false;
|
||||||
|
Context.Update(s);
|
||||||
|
await Context.SaveChangesAsync();
|
||||||
|
} catch { }
|
||||||
|
|
||||||
var b = new Billing(year);
|
var b = new Billing(year);
|
||||||
await b.FinishSeason();
|
await b.FinishSeason();
|
||||||
await b.CalculateBuckets(
|
await b.CalculateBuckets();
|
||||||
AllowAttrIntoLowerInput.IsChecked ?? false,
|
|
||||||
AvoidUnderDeliveriesInput.IsChecked ?? false,
|
|
||||||
HonorGebundenInput.IsChecked ?? false);
|
|
||||||
Mouse.OverrideCursor = null;
|
Mouse.OverrideCursor = null;
|
||||||
CalculateBucketsButton.IsEnabled = true;
|
CalculateBucketsButton.IsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using Elwig.Documents;
|
|||||||
using Elwig.Helpers;
|
using Elwig.Helpers;
|
||||||
using Elwig.Helpers.Billing;
|
using Elwig.Helpers.Billing;
|
||||||
using Elwig.Helpers.Export;
|
using Elwig.Helpers.Export;
|
||||||
|
using Elwig.Helpers.Weighing;
|
||||||
using Elwig.Models.Dtos;
|
using Elwig.Models.Dtos;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System;
|
using System;
|
||||||
@@ -27,7 +28,8 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
private async void WeighingButton1_Click(object sender, RoutedEventArgs evt) {
|
private async void WeighingButton1_Click(object sender, RoutedEventArgs evt) {
|
||||||
try {
|
try {
|
||||||
var res = await App.Scales[0].GetCurrentWeight();
|
if (App.Scales[0] is not ICommandScale cs) return;
|
||||||
|
var res = await cs.GetCurrentWeight();
|
||||||
Output.Text = res.ToString();
|
Output.Text = res.ToString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MessageBox.Show($"Beim Wiegen ist ein Fehler aufgetreten:\n\n{e.Message}", "Waagenfehler",
|
MessageBox.Show($"Beim Wiegen ist ein Fehler aufgetreten:\n\n{e.Message}", "Waagenfehler",
|
||||||
@@ -37,7 +39,8 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
private async void WeighingButton2_Click(object sender, RoutedEventArgs evt) {
|
private async void WeighingButton2_Click(object sender, RoutedEventArgs evt) {
|
||||||
try {
|
try {
|
||||||
var res = await App.Scales[0].Weigh();
|
if (App.Scales[0] is not ICommandScale cs) return;
|
||||||
|
var res = await cs.Weigh();
|
||||||
Output.Text = res.ToString();
|
Output.Text = res.ToString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MessageBox.Show($"Beim Wiegen ist ein Fehler aufgetreten:\n\n{e.Message}", "Waagenfehler",
|
MessageBox.Show($"Beim Wiegen ist ein Fehler aufgetreten:\n\n{e.Message}", "Waagenfehler",
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
</Task>
|
</Task>
|
||||||
</UsingTask>
|
</UsingTask>
|
||||||
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
<Exec Command="curl -s -L "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(TargetDir)PDFtoPrinter.exe" -o "$(TargetDir)PDFtoPrinter.exe"" />
|
<Exec Command="curl -s -L "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(ProjectDir)\Files\PDFtoPrinter.exe" -o "$(ProjectDir)\Files\PDFtoPrinter.exe"" />
|
||||||
<Exec Command="dotnet publish "$(SolutionDir)Elwig\Elwig.csproj" "/p:PublishProfile=$(SolutionDir)\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
<Exec Command="dotnet publish "$(ProjectDir)\..\Elwig\Elwig.csproj" "/p:PublishProfile=$(ProjectDir)\..\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
||||||
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
||||||
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
||||||
</GetFileVersion>
|
</GetFileVersion>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<File Source="$(ProjectDir)\Files\WinziPrint.exe" Id="WinziPrint.exe"/>
|
<File Source="$(ProjectDir)\Files\WinziPrint.exe" Id="WinziPrint.exe"/>
|
||||||
</Component>
|
</Component>
|
||||||
<Component Directory="InstallFolder">
|
<Component Directory="InstallFolder">
|
||||||
<File Source="$(TargetDir)\PDFtoPrinter.exe" Id="PDFtoPrinter.exe"/>
|
<File Source="$(ProjectDir)\Files\PDFtoPrinter.exe" Id="PDFtoPrinter.exe"/>
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
+21
-18
@@ -1,25 +1,28 @@
|
|||||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
|
||||||
<Bundle Name="Elwig" Manufacturer="Elwig" Version="!(bind.packageVersion.ElwigMsi)" UpgradeCode="f3c8fcab-c37c-43aa-9ab8-e42f4bb518b7" IconSourceFile="$(var.ElwigProjectDir)\Resources\Images\Elwig.ico" >
|
<Bundle Name="Elwig" Manufacturer="Elwig" Version="!(bind.packageVersion.ElwigMsi)" UpgradeCode="f3c8fcab-c37c-43aa-9ab8-e42f4bb518b7"
|
||||||
<BootstrapperApplication>
|
IconSourceFile="$(var.ElwigProjectDir)\Resources\Images\Elwig.ico">
|
||||||
<bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" LogoFile="$(var.ElwigProjectDir)\Resources\Images\Elwig.png" SuppressOptionsUI="yes" ShowVersion="yes" />
|
<BootstrapperApplication>
|
||||||
</BootstrapperApplication>
|
<bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" LogoFile="$(var.ElwigProjectDir)\Resources\Images\Elwig.png"
|
||||||
|
SuppressOptionsUI="yes" ShowVersion="yes"/>
|
||||||
<util:RegistrySearch Id="VCredistx86" Variable="VCredistx86" Result="exists" Root="HKLM" Key="SOFTWARE\Classes\Installer\Dependencies\VC,redist.x86,x86,14.36,bundle" />
|
</BootstrapperApplication>
|
||||||
<util:RegistrySearch Id="Webview2Machine" Variable="Webview2Machine" Result="exists" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" />
|
|
||||||
<util:RegistrySearch Id="Webview2User" Variable="Webview2User" Result="exists" Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" />
|
<util:RegistrySearch Id="VCredistx86" Variable="VCredistx86" Result="exists"
|
||||||
|
Root="HKLM" Key="SOFTWARE\Classes\Installer\Dependencies\VC,redist.x86,x86,14.36,bundle"/>
|
||||||
|
<util:RegistrySearch Id="Webview2Machine" Variable="Webview2Machine" Result="exists"
|
||||||
|
Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"/>
|
||||||
|
<util:RegistrySearch Id="Webview2User" Variable="Webview2User" Result="exists"
|
||||||
|
Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"/>
|
||||||
|
|
||||||
<Chain>
|
<Chain>
|
||||||
<ExePackage Id="VCredistx86Installer" DisplayName="VC Redist x86 installer" Name="VC_redist.x86.exe" Cache="remove" Compressed="yes" PerMachine="yes"
|
<ExePackage Id="VCredistx86Installer" DisplayName="VC Redist x86 installer" Name="VC_redist.x86.exe"
|
||||||
Permanent="yes" Vital="yes" SourceFile="$(TargetDir)VC_redist.x86.exe" InstallArguments="/install /passive /norestart" DetectCondition="VCredistx86">
|
SourceFile="$(ProjectDir)\Files\VC_redist.x86.exe"
|
||||||
</ExePackage>
|
Cache="remove" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
|
||||||
|
InstallArguments="/install /passive /norestart" DetectCondition="VCredistx86"/>
|
||||||
<ExePackage Id="MicrosoftEdgeWebview2" DisplayName="Microsoft Edge Webview2 Runtime" Name="MicrosoftEdgeWebview2Setup.exe" Cache="remove"
|
<ExePackage Id="MicrosoftEdgeWebview2" DisplayName="Microsoft Edge Webview2 Runtime" Name="MicrosoftEdgeWebview2Setup.exe"
|
||||||
Compressed="yes" PerMachine="yes" Permanent ="yes" Vital ="no" SourceFile="$(TargetDir)MicrosoftEdgeWebview2Setup.exe" InstallArguments="/silent /install"
|
SourceFile="$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe"
|
||||||
UninstallArguments="/silent /uninstall" DetectCondition="Webview2Machine OR Webview2User" >
|
Cache="remove" Compressed="yes" PerMachine="yes" Permanent ="yes" Vital="no"
|
||||||
</ExePackage>
|
InstallArguments="/silent /install" UninstallArguments="/silent /uninstall" DetectCondition="Webview2Machine OR Webview2User"/>
|
||||||
|
|
||||||
<MsiPackage Id="ElwigMsi" SourceFile="$(var.Installer.TargetDir)\Elwig.msi" Permanent="no" Compressed="yes" Vital="yes"/>
|
<MsiPackage Id="ElwigMsi" SourceFile="$(var.Installer.TargetDir)\Elwig.msi" Permanent="no" Compressed="yes" Vital="yes"/>
|
||||||
</Chain>
|
</Chain>
|
||||||
|
|
||||||
</Bundle>
|
</Bundle>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
<Cultures>de-AT</Cultures>
|
<Cultures>de-AT</Cultures>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
<Exec Command='curl -s -L "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -z "$(TargetDir)MicrosoftEdgeWebview2Setup.exe" -o "$(TargetDir)MicrosoftEdgeWebview2Setup.exe"' />
|
<Exec Command='curl -s -L "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -z "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe" -o "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe"' />
|
||||||
<Exec Command='curl -s -L "https://aka.ms/vs/17/release/vc_redist.x86.exe" -z "$(TargetDir)VC_redist.x86.exe" -o "$(TargetDir)VC_redist.x86.exe"' />
|
<Exec Command='curl -s -L "https://aka.ms/vs/17/release/vc_redist.x86.exe" -z "$(ProjectDir)\Files\VC_redist.x86.exe" -o "$(ProjectDir)\Files\VC_redist.x86.exe"' />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DefineConstants>ElwigProjectDir=..\Elwig</DefineConstants>
|
<DefineConstants>ElwigProjectDir=..\Elwig</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
+13
-5
@@ -1,4 +1,5 @@
|
|||||||
using Elwig.Helpers;
|
using Elwig;
|
||||||
|
using Elwig.Helpers;
|
||||||
using Elwig.Helpers.Billing;
|
using Elwig.Helpers.Billing;
|
||||||
using Microsoft.Data.Sqlite;
|
using Microsoft.Data.Sqlite;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -10,15 +11,22 @@ namespace Tests {
|
|||||||
private SqliteConnection? Connection;
|
private SqliteConnection? Connection;
|
||||||
|
|
||||||
[OneTimeSetUp]
|
[OneTimeSetUp]
|
||||||
public async Task SetupDatabase() {
|
public async Task Setup_1_Database() {
|
||||||
AppDbContext.ConnectionStringOverride = $"Data Source=ElwigTestDB; Mode=Memory; Foreign Keys=True; Cache=Shared";
|
AppDbContext.ConnectionStringOverride = $"Data Source=ElwigTestDB; Mode=Memory; Foreign Keys=True; Cache=Shared";
|
||||||
Connection = await AppDbContext.ConnectAsync();
|
Connection = await AppDbContext.ConnectAsync();
|
||||||
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Create.sql");
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.Create.sql");
|
||||||
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Insert.sql");
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.Insert.sql");
|
||||||
}
|
}
|
||||||
|
|
||||||
[OneTimeSetUp]
|
[OneTimeSetUp]
|
||||||
public async Task SetupBillingData() {
|
public void Setup_2_Client() {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
App.Client = new ClientParameters(ctx);
|
||||||
|
App.SetBranch(ctx.Branches.Single());
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeSetUp]
|
||||||
|
public async Task Setup_3_BillingData() {
|
||||||
await BillingData.Init();
|
await BillingData.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using Elwig.Documents;
|
||||||
|
using Elwig.Helpers;
|
||||||
|
|
||||||
|
namespace Tests.DocumentTests {
|
||||||
|
[TestFixture]
|
||||||
|
public class DeliveryNoteTest {
|
||||||
|
|
||||||
|
private readonly AppDbContext Context = new();
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_01_OneDeliveryPart() {
|
||||||
|
var d = await Context.Deliveries.FindAsync(2020, 1);
|
||||||
|
using var doc = new DeliveryNote(d!, Context);
|
||||||
|
var text = await Utils.GeneratePdfText(doc);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(text, Contains.Substring("""
|
||||||
|
MUSTERMANN Max
|
||||||
|
Winzerstraße 1
|
||||||
|
2223 Hohenruppersdorf
|
||||||
|
"""));
|
||||||
|
Assert.That(text, Contains.Substring("1472583")); // Betriebsnummer
|
||||||
|
Assert.That(text, Contains.Substring("pauschaliert"));
|
||||||
|
Assert.That(text, Contains.Substring($"Wolkersdorf, am {DateTime.Now:dd.MM.yyyy}"));
|
||||||
|
Assert.That(text, Contains.Substring("Traubenübernahmeschein Nr. 20201001X001"));
|
||||||
|
// TODO
|
||||||
|
Assert.That(text, Contains.Substring("Ich bin der Text, der auf einem Traubenübernahmeschein steht!"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using Elwig.Helpers;
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.Data.Sqlite;
|
||||||
|
using Elwig.Helpers.Printing;
|
||||||
|
|
||||||
|
namespace Tests.DocumentTests {
|
||||||
|
[SetUpFixture]
|
||||||
|
public class Setup {
|
||||||
|
|
||||||
|
private SqliteConnection? Connection;
|
||||||
|
|
||||||
|
[OneTimeSetUp]
|
||||||
|
public async Task SetupDatabase() {
|
||||||
|
Connection = await AppDbContext.ConnectAsync();
|
||||||
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.DocumentInsert.sql");
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeTearDown]
|
||||||
|
public async Task TeardownDatabase() {
|
||||||
|
if (Connection == null) return;
|
||||||
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.DocumentDelete.sql");
|
||||||
|
await Connection.DisposeAsync();
|
||||||
|
Connection = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeSetUp]
|
||||||
|
public async Task SetupPrinting() {
|
||||||
|
await Html.Init();
|
||||||
|
await Pdf.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeTearDown]
|
||||||
|
public void TeardownPrinting() {
|
||||||
|
// no teardown needed yet
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using Elwig.Documents;
|
||||||
|
using NReco.PdfRenderer;
|
||||||
|
|
||||||
|
namespace Tests.DocumentTests {
|
||||||
|
public static class Utils {
|
||||||
|
|
||||||
|
private static readonly string FileName = Path.Combine(Path.GetTempPath(), "test_document.pdf");
|
||||||
|
|
||||||
|
public static async Task<string> GeneratePdfText(Document doc) {
|
||||||
|
await doc.Generate();
|
||||||
|
try {
|
||||||
|
doc.SaveTo(FileName);
|
||||||
|
var conv = new PdfToTextConverter { CustomArgs = "-raw " };
|
||||||
|
return conv.GenerateText(FileName);
|
||||||
|
} finally {
|
||||||
|
File.Delete(FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,81 +7,37 @@ namespace Tests.HelperTests {
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class BillingTest {
|
public class BillingTest {
|
||||||
|
|
||||||
private const int Year1 = 2020, Year2 = 2020;
|
private const int Year1 = 2020, Year2 = 2021;
|
||||||
private const int MgNr1 = 101, MgNr2 = 102, MgNr3 = 103, MgNr4 = 104;
|
private const int MgNr1 = 101, MgNr2 = 102, MgNr3 = 103, MgNr4 = 104;
|
||||||
|
|
||||||
|
private const decimal
|
||||||
|
GV_ungeb = 0.50m,
|
||||||
|
GV_geb = 0.60m,
|
||||||
|
GVB_ungeb = 0.54m,
|
||||||
|
GVB_geb = 0.64m,
|
||||||
|
GVK_ungeb = 0.61m,
|
||||||
|
GVK_geb = 0.71m,
|
||||||
|
WEI = 0.10m;
|
||||||
|
|
||||||
private SqliteConnection? Connection;
|
private SqliteConnection? Connection;
|
||||||
|
|
||||||
[OneTimeSetUp]
|
[OneTimeSetUp]
|
||||||
public async Task SetupDatabase() {
|
public async Task SetupDatabase() {
|
||||||
Connection = await AppDbContext.ConnectAsync();
|
Connection = await AppDbContext.ConnectAsync();
|
||||||
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.BillingInsert.sql");
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.BillingInsert.sql");
|
||||||
}
|
}
|
||||||
|
|
||||||
[OneTimeTearDown]
|
[OneTimeTearDown]
|
||||||
public async Task TeardownDatabase() {
|
public async Task TeardownDatabase() {
|
||||||
if (Connection == null) return;
|
if (Connection == null) return;
|
||||||
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.BillingDelete.sql");
|
await AppDbContext.ExecuteEmbeddedScript(Connection, Assembly.GetExecutingAssembly(), "Tests.Resources.Sql.BillingDelete.sql");
|
||||||
await Connection.DisposeAsync();
|
await Connection.DisposeAsync();
|
||||||
Connection = null;
|
Connection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[SetUp]
|
||||||
public async Task CleanupDatabasePayment() {
|
public async Task CreatePaymentVariant() {
|
||||||
if (Connection == null) return;
|
var json = """
|
||||||
await AppDbContext.ExecuteBatch(Connection, """
|
|
||||||
DELETE FROM credit;
|
|
||||||
DELETE FROM delivery_part_bucket;
|
|
||||||
DELETE FROM payment_variant;
|
|
||||||
""");
|
|
||||||
}
|
|
||||||
|
|
||||||
private Task<Dictionary<string, AreaComBucket>> GetMemberAreaCommitmentBuckets(int year, int mgnr) {
|
|
||||||
var ctx = new AppDbContext();
|
|
||||||
return ctx.GetMemberAreaCommitmentBuckets(year, mgnr, Connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Task<Dictionary<string, int>> GetMemberDeliveryBuckets(int year, int mgnr) {
|
|
||||||
var ctx = new AppDbContext();
|
|
||||||
return ctx.GetMemberDeliveryBuckets(year, mgnr, Connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Task<Dictionary<string, int>> GetMemberPaymentBuckets(int year, int mgnr) {
|
|
||||||
var ctx = new AppDbContext();
|
|
||||||
return ctx.GetMemberPaymentBuckets(year, mgnr, Connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<Dictionary<(string, string), int>> GetMemberDeliveryPrices(int year, int mgnr) {
|
|
||||||
var buckets = new Dictionary<(string, string), int>();
|
|
||||||
using (var cmd = Connection!.CreateCommand()) {
|
|
||||||
cmd.CommandText = $"""
|
|
||||||
SELECT lsnr || '/' || d.dpnr, d.sortid || b.discr, price
|
|
||||||
FROM v_delivery d
|
|
||||||
LEFT JOIN payment_delivery_part_bucket p ON (p.year, p.did, p.dpnr) = (d.year, d.did, d.dpnr)
|
|
||||||
LEFT JOIN delivery_part_bucket b ON (b.year, b.did, b.dpnr, b.bktnr) = (p.year, p.did, p.dpnr, p.bktnr)
|
|
||||||
WHERE d.year = {year} AND mgnr = {mgnr}
|
|
||||||
""";
|
|
||||||
using var reader = await cmd.ExecuteReaderAsync();
|
|
||||||
while (await reader.ReadAsync()) {
|
|
||||||
var lsnr = reader.GetString(0);
|
|
||||||
var bucket = reader.GetString(1);
|
|
||||||
buckets[(lsnr, bucket)] = reader.GetInt32(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return buckets;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Task InsertPaymentVariant(int year, int avnr, string data) {
|
|
||||||
return AppDbContext.ExecuteBatch(Connection!, $"""
|
|
||||||
INSERT INTO payment_variant (year, avnr, name, date, transfer_date, test_variant, calc_time, data)
|
|
||||||
VALUES ({year}, {avnr}, 'Test', '2021-01-15', NULL, TRUE, NULL, '{data}');
|
|
||||||
""");
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public async Task Test_01_NoActiveAreaCommitments() {
|
|
||||||
int mgnr = MgNr1, year = Year1;
|
|
||||||
await InsertPaymentVariant(year, 1, """
|
|
||||||
{
|
{
|
||||||
"mode": "elwig",
|
"mode": "elwig",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
@@ -108,7 +64,66 @@ namespace Tests.HelperTests {
|
|||||||
"geb": 0.1
|
"geb": 0.1
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
""";
|
||||||
|
await InsertPaymentVariant(Year1, 1, json);
|
||||||
|
await InsertPaymentVariant(Year2, 1, json);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TearDown]
|
||||||
|
public async Task CleanupDatabasePayment() {
|
||||||
|
if (Connection == null) return;
|
||||||
|
await AppDbContext.ExecuteBatch(Connection, """
|
||||||
|
DELETE FROM credit;
|
||||||
|
DELETE FROM payment_variant;
|
||||||
|
DELETE FROM delivery_part_bucket;
|
||||||
""");
|
""");
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task<Dictionary<string, AreaComBucket>> GetMemberAreaCommitmentBuckets(int year, int mgnr) {
|
||||||
|
var ctx = new AppDbContext();
|
||||||
|
return ctx.GetMemberAreaCommitmentBuckets(year, mgnr, Connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task<Dictionary<string, int>> GetMemberDeliveryBuckets(int year, int mgnr) {
|
||||||
|
var ctx = new AppDbContext();
|
||||||
|
return ctx.GetMemberDeliveryBuckets(year, mgnr, Connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task<Dictionary<string, int>> GetMemberPaymentBuckets(int year, int mgnr) {
|
||||||
|
var ctx = new AppDbContext();
|
||||||
|
return ctx.GetMemberPaymentBuckets(year, mgnr, Connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<Dictionary<(string, string), (int, decimal)>> GetMemberDeliveryPrices(int year, int mgnr) {
|
||||||
|
var buckets = new Dictionary<(string, string), (int, decimal)>();
|
||||||
|
using (var cmd = Connection!.CreateCommand()) {
|
||||||
|
cmd.CommandText = $"""
|
||||||
|
SELECT lsnr || '/' || d.dpnr, d.sortid || b.discr, b.value, p.price
|
||||||
|
FROM v_delivery d
|
||||||
|
LEFT JOIN payment_delivery_part_bucket p ON (p.year, p.did, p.dpnr) = (d.year, d.did, d.dpnr)
|
||||||
|
LEFT JOIN delivery_part_bucket b ON (b.year, b.did, b.dpnr, b.bktnr) = (p.year, p.did, p.dpnr, p.bktnr)
|
||||||
|
WHERE d.year = {year} AND mgnr = {mgnr}
|
||||||
|
""";
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
while (await reader.ReadAsync()) {
|
||||||
|
var lsnr = reader.GetString(0);
|
||||||
|
var bucket = reader.GetString(1);
|
||||||
|
buckets[(lsnr, bucket)] = (reader.GetInt32(2), Utils.DecFromDb(reader.GetInt32(3), 4));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return buckets;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task InsertPaymentVariant(int year, int avnr, string data) {
|
||||||
|
return AppDbContext.ExecuteBatch(Connection!, $"""
|
||||||
|
INSERT INTO payment_variant (year, avnr, name, date, transfer_date, test_variant, calc_time, data)
|
||||||
|
VALUES ({year}, {avnr}, 'Test', '2021-01-15', NULL, TRUE, NULL, '{data}');
|
||||||
|
""");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_01_NoActiveAreaComs() {
|
||||||
|
int mgnr = MgNr1, year = Year1;
|
||||||
|
|
||||||
var areaCom = await GetMemberAreaCommitmentBuckets(year, mgnr);
|
var areaCom = await GetMemberAreaCommitmentBuckets(year, mgnr);
|
||||||
Assert.That(areaCom, Is.Empty);
|
Assert.That(areaCom, Is.Empty);
|
||||||
@@ -133,13 +148,202 @@ namespace Tests.HelperTests {
|
|||||||
var prices = await GetMemberDeliveryPrices(year, mgnr);
|
var prices = await GetMemberDeliveryPrices(year, mgnr);
|
||||||
Assert.Multiple(() => {
|
Assert.Multiple(() => {
|
||||||
Assert.That(prices, Has.Count.EqualTo(6));
|
Assert.That(prices, Has.Count.EqualTo(6));
|
||||||
Assert.That(prices[("20201001X001/1", "GV_")], Is.EqualTo(0_6100));
|
// Kabinett
|
||||||
Assert.That(prices[("20201001X001/2", "GV_")], Is.EqualTo(0_5000));
|
Assert.That(prices[("20201001X001/1", "GV_")], Is.EqualTo((4_000, GV_ungeb)));
|
||||||
Assert.That(prices[("20201001X002/1", "GV_")], Is.EqualTo(0_5400));
|
// ohne Attribut
|
||||||
Assert.That(prices[("20201001X002/2", "GV_")], Is.EqualTo(0_5400));
|
Assert.That(prices[("20201001X001/2", "GV_")], Is.EqualTo((4_000, GV_ungeb)));
|
||||||
Assert.That(prices[("20201001X003/1", "GV_")], Is.EqualTo(0_1000));
|
// Bio
|
||||||
Assert.That(prices[("20201001X003/2", "GV_")], Is.EqualTo(0_5000));
|
Assert.That(prices[("20201001X002/1", "GV_")], Is.EqualTo((4_000, GVB_ungeb)));
|
||||||
|
// Bio
|
||||||
|
Assert.That(prices[("20201001X002/2", "GV_")], Is.EqualTo((4_000, GVB_ungeb)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20201001X003/1", "GV_")], Is.EqualTo(( 500, WEI)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20201001X003/2", "GV_")], Is.EqualTo(( 500, GV_ungeb)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_02_SimpleNotStrictAreaComs() {
|
||||||
|
int mgnr = MgNr1, year = Year2;
|
||||||
|
|
||||||
|
var areaCom = await GetMemberAreaCommitmentBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(areaCom, Has.Count.EqualTo(1));
|
||||||
|
Assert.That(areaCom["GV"], Is.EqualTo(new AreaComBucket(10_000, 5_000, 10_000)));
|
||||||
|
});
|
||||||
|
var delivery = await GetMemberDeliveryBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(delivery, Has.Count.EqualTo(4));
|
||||||
|
Assert.That(delivery["GV"], Is.EqualTo(16_000));
|
||||||
|
Assert.That(delivery["GV_"], Is.EqualTo( 1_000));
|
||||||
|
Assert.That(delivery["GVB"], Is.EqualTo( 8_000));
|
||||||
|
Assert.That(delivery["GVK"], Is.EqualTo( 4_000));
|
||||||
|
});
|
||||||
|
|
||||||
|
BillingVariant b = new(year, 1);
|
||||||
|
await b.CalculateBuckets(false, false, false, Connection);
|
||||||
|
var payment = await GetMemberPaymentBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(payment, Has.Count.EqualTo(2));
|
||||||
|
Assert.That(payment["GV_"], Is.EqualTo( 7_000));
|
||||||
|
Assert.That(payment["GV"], Is.EqualTo(10_000));
|
||||||
|
});
|
||||||
|
|
||||||
|
await b.Calculate(false, false, false);
|
||||||
|
var prices = await GetMemberDeliveryPrices(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(prices, Has.Count.EqualTo(10));
|
||||||
|
// Kabinett
|
||||||
|
Assert.That(prices[("20211001X001/1", "GV_")], Is.EqualTo((2_000, GV_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X001/1", "GV")] , Is.EqualTo((2_000, GV_geb)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X001/2", "GV_")], Is.EqualTo((4_000, GV_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X001/2", "GV")], Is.EqualTo(( 0, GV_geb)));
|
||||||
|
// Bio
|
||||||
|
Assert.That(prices[("20211001X002/1", "GV_")], Is.EqualTo(( 0, GVB_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X002/1", "GV")], Is.EqualTo((4_000, GVB_geb)));
|
||||||
|
// Bio
|
||||||
|
Assert.That(prices[("20211001X002/2", "GV_")], Is.EqualTo(( 0, GVB_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X002/2", "GV")], Is.EqualTo((4_000, GVB_geb)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X003/1", "GV_")], Is.EqualTo(( 500, WEI)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X003/2", "GV_")], Is.EqualTo(( 500, GV_ungeb)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_03_SimpleNotStrictAreaComs_HonorGebunden() {
|
||||||
|
int mgnr = MgNr1, year = Year2;
|
||||||
|
|
||||||
|
var areaCom = await GetMemberAreaCommitmentBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(areaCom, Has.Count.EqualTo(1));
|
||||||
|
Assert.That(areaCom["GV"], Is.EqualTo(new AreaComBucket(10_000, 5_000, 10_000)));
|
||||||
|
});
|
||||||
|
var delivery = await GetMemberDeliveryBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(delivery, Has.Count.EqualTo(4));
|
||||||
|
Assert.That(delivery["GV"], Is.EqualTo(16_000));
|
||||||
|
Assert.That(delivery["GV_"], Is.EqualTo( 1_000));
|
||||||
|
Assert.That(delivery["GVB"], Is.EqualTo( 8_000));
|
||||||
|
Assert.That(delivery["GVK"], Is.EqualTo( 4_000));
|
||||||
|
});
|
||||||
|
|
||||||
|
BillingVariant b = new(year, 1);
|
||||||
|
await b.CalculateBuckets(true, false, false, Connection);
|
||||||
|
var payment = await GetMemberPaymentBuckets(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(payment, Has.Count.EqualTo(2));
|
||||||
|
Assert.That(payment["GV_"], Is.EqualTo(9_000));
|
||||||
|
Assert.That(payment["GV"], Is.EqualTo(8_000));
|
||||||
|
});
|
||||||
|
|
||||||
|
await b.Calculate(true, false, false);
|
||||||
|
var prices = await GetMemberDeliveryPrices(year, mgnr);
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(prices, Has.Count.EqualTo(8));
|
||||||
|
// Kabinett
|
||||||
|
Assert.That(prices[("20211001X001/1", "GV_")], Is.EqualTo(( 0, GV_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X001/1", "GV")], Is.EqualTo((4_000, GV_geb)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X001/2", "GV_")], Is.EqualTo((4_000, GV_ungeb)));
|
||||||
|
// Bio
|
||||||
|
Assert.That(prices[("20211001X002/1", "GV_")], Is.EqualTo(( 0, GVB_ungeb)));
|
||||||
|
Assert.That(prices[("20211001X002/1", "GV")], Is.EqualTo((4_000, GVB_geb)));
|
||||||
|
// Bio
|
||||||
|
Assert.That(prices[("20211001X002/2", "GV_")], Is.EqualTo((4_000, GVB_ungeb)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X003/1", "GV_")], Is.EqualTo(( 500, WEI)));
|
||||||
|
// ohne Attribut
|
||||||
|
Assert.That(prices[("20211001X003/2", "GV_")], Is.EqualTo(( 500, GV_ungeb)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_04_ComplexNotStrictAreaComs() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_05_ComplexNotStrictAreaComs_HonorGebunden() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_06_StrictAreaComs_NoFillLower_NotAllowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_07_StrictAreaComs_NoFillLower_Allowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_08_StrictAreaComs_NoFillLower_Allowed_AvoidUnderDeliveries() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_09_StrictAreaComs_FillLowerUntilObligation_NotAllowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_10_StrictAreaComs_FillLowerUntilObligation_Allowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_11_StrictAreaComs_FillLowerUntilObligation_Allowed_AvoidUnderDeliveries() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_12_StrictAreaComs_FillLowerUntilObligation_NotAllowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_13_StrictAreaComs_FillLowerUntilObligation_Allowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_14_StrictAreaComs_FillLowerUntilObligation_Allowed_AvoidUnderDeliveries() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_15_StrictAreaComs_FillLowerUntilRight_NotAllowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_16_StrictAreaComs_FillLowerUntilRight_Allowed() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Not implemented yet")]
|
||||||
|
public async Task Test_17_StrictAreaComs_FillLowerUntilRight_Allowed_AvoidUnderDeliveries() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
using Elwig.Helpers;
|
||||||
|
using Elwig.Helpers.Export;
|
||||||
|
using Elwig.Models.Dtos;
|
||||||
|
using Elwig.Models.Entities;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace Tests.HelperTests {
|
||||||
|
// see https://www.iso20022.org/iso-20022-message-definitions
|
||||||
|
// and https://www.iso20022.org/catalogue-messages/iso-20022-messages-archive?search=pain
|
||||||
|
[TestFixture]
|
||||||
|
public class EbicsTest {
|
||||||
|
|
||||||
|
public static readonly string FileName = Path.Combine(Path.GetTempPath(), "test_ebics.xml");
|
||||||
|
public static readonly string Iban = "AT123456789012345678";
|
||||||
|
|
||||||
|
private static void ValidateSchema(string xmlPath, int version) {
|
||||||
|
XmlDocument xml = new();
|
||||||
|
xml.Load(xmlPath);
|
||||||
|
var schema = new XmlTextReader(Assembly.GetExecutingAssembly()
|
||||||
|
.GetManifestResourceStream($"Tests.Resources.Schemas.pain.001.001.{version:00}.xsd")!);
|
||||||
|
xml.Schemas.Add(null, schema);
|
||||||
|
xml.Validate(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task CreateXmlFile(int version) {
|
||||||
|
var v = new PaymentVar() {
|
||||||
|
Year = 2020,
|
||||||
|
AvNr = 1,
|
||||||
|
Name = "Endauszahlung",
|
||||||
|
TransferDate = new DateOnly(2021, 6, 15),
|
||||||
|
};
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
var members = ctx.Members.ToList();
|
||||||
|
Assert.That(members, Has.Count.GreaterThan(0));
|
||||||
|
using var exporter = new Ebics(v, FileName, version);
|
||||||
|
await exporter.ExportAsync(members.Select(m => new Transaction(m, 1234.56m, "EUR", m.MgNr % 100)));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TearDown]
|
||||||
|
public static void RemoveXmlFile() {
|
||||||
|
File.Delete(FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Version has no need to be supported")]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV01() {
|
||||||
|
await CreateXmlFile(1);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Version has no need to be supported")]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV02() {
|
||||||
|
await CreateXmlFile(2);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV03() {
|
||||||
|
await CreateXmlFile(3);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV04() {
|
||||||
|
await CreateXmlFile(4);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV05() {
|
||||||
|
await CreateXmlFile(5);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV06() {
|
||||||
|
await CreateXmlFile(6);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV07() {
|
||||||
|
await CreateXmlFile(7);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 7));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV08() {
|
||||||
|
await CreateXmlFile(8);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 8));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV09() {
|
||||||
|
await CreateXmlFile(9);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 9));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV10() {
|
||||||
|
await CreateXmlFile(10);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 10));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_CustomerCreditTransferInitiationV11() {
|
||||||
|
await CreateXmlFile(11);
|
||||||
|
Assert.DoesNotThrow(() => ValidateSchema(FileName, 11));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,5 +100,52 @@ namespace Tests.HelperTests {
|
|||||||
Assert.That(Utils.SplitName("ABC GesbR", "Bauer"), Is.EqualTo(((string, string?))("ABC GesbR", null)));
|
Assert.That(Utils.SplitName("ABC GesbR", "Bauer"), Is.EqualTo(((string, string?))("ABC GesbR", null)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_CalcCrc16Modbus() {
|
||||||
|
Assert.Multiple(() => {
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus(""), Is.EqualTo(0xFFFF));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("abcd"), Is.EqualTo(0x1D97));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("ABCD"), Is.EqualTo(0x0F85));
|
||||||
|
// Matzen (SysTec IT3000A)
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:03 01 0 0 0kg 1"), Is.EqualTo(43166));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:04 01 0 0 0kg 1"), Is.EqualTo(21615));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:05 01 0 0 0kg 1"), Is.EqualTo(40446));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:06 01 0 0 0kg 1"), Is.EqualTo(34638));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:07 01 0 0 0kg 1"), Is.EqualTo(20191));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:08 01 0 0 0kg 1"), Is.EqualTo(16047));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:09 01 0 0 0kg 1"), Is.EqualTo(63294));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:10 01 0 0 0kg 1"), Is.EqualTo(7718));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000011.08.2319:12 01 0 0 0kg 1"), Is.EqualTo(52487));
|
||||||
|
// Wolkersdorf, Waage 1 (SysTec IT6000E)
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:50 51 0 0 0kg A"), Is.EqualTo(10187));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:50 61 0 0 0kg A"), Is.EqualTo(20683));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:50 71 0 0 0kg A"), Is.EqualTo(48586));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:50 81 0 0 0kg A"), Is.EqualTo(22217));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:50 91 0 0 0kg A"), Is.EqualTo(48072));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 101 0 0 0kg A"), Is.EqualTo(30119));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 111 0 0 0kg A"), Is.EqualTo(39078));
|
||||||
|
// Wolkersdorf, Waage 2 (SysTec IT6000E)
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 41 0 0 0kg B"), Is.EqualTo(539));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 51 0 0 0kg B"), Is.EqualTo(61210));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 61 0 0 0kg B"), Is.EqualTo(38938));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 71 0 0 0kg B"), Is.EqualTo(29979));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 81 0 0 0kg B"), Is.EqualTo(40472));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 91 0 0 0kg B"), Is.EqualTo(29465));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000004.09.2315:51 101 0 0 0kg B"), Is.EqualTo(29927));
|
||||||
|
// Gr.Inzersdorf (L246/IT3)
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 11 0 0 0kg 001"), Is.EqualTo(27556));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 21 0 0 0kg 001"), Is.EqualTo(7332));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 31 0 0 0kg 001"), Is.EqualTo(61861));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 41 0 0 0kg 001"), Is.EqualTo(62116));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 51 0 0 0kg 001"), Is.EqualTo(8101));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 61 0 0 0kg 001"), Is.EqualTo(26789));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:49 71 50 0 50kg 001"), Is.EqualTo(16188));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:50 81 35 0 35kg 001"), Is.EqualTo(12015));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:50 91 40 0 40kg 001"), Is.EqualTo(60047));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:50 101 40 0 40kg 001"), Is.EqualTo(60785));
|
||||||
|
Assert.That(Utils.CalcCrc16Modbus("000019.02.2410:50 111 45 0 45kg 001"), Is.EqualTo(35918));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
-- inserts for DatabaseSetup
|
|
||||||
|
|
||||||
INSERT INTO branch (zwstid, name) VALUES
|
|
||||||
('X', 'Test');
|
|
||||||
|
|
||||||
INSERT INTO wb_gl (glnr, name) VALUES
|
|
||||||
(1, 'Matzner Hügel'),
|
|
||||||
(2, 'Wolkersdorfer Hochleithen');
|
|
||||||
|
|
||||||
INSERT INTO AT_gem (gkz, name) VALUES
|
|
||||||
(30828, 'Hohenruppersdorf'),
|
|
||||||
(31655, 'Wolkersdorf im Weinviertel');
|
|
||||||
|
|
||||||
INSERT INTO wb_gem (gkz, hkid) VALUES
|
|
||||||
(30828, 'WLWV'),
|
|
||||||
(31655, 'WLWV');
|
|
||||||
|
|
||||||
INSERT INTO AT_kg (kgnr, gkz, name) VALUES
|
|
||||||
(06109, 30828, 'Hohenruppersdorf'),
|
|
||||||
(15209, 31655, 'Münichsthal'),
|
|
||||||
(15211, 31655, 'Obersdorf'),
|
|
||||||
(15212, 31655, 'Pfösing'),
|
|
||||||
(15216, 31655, 'Riedentahl'),
|
|
||||||
(15224, 31655, 'Wolkersdorf');
|
|
||||||
|
|
||||||
INSERT INTO wb_kg (kgnr, glnr) VALUES
|
|
||||||
(06109, 1),
|
|
||||||
(15209, 2),
|
|
||||||
(15211, 2),
|
|
||||||
(15212, 2),
|
|
||||||
(15216, 2),
|
|
||||||
(15224, 2);
|
|
||||||
|
|
||||||
INSERT INTO AT_ort (okz, gkz, kgnr, name) VALUES
|
|
||||||
(03524, 30828, 06109, 'Hohenruppersdorf'),
|
|
||||||
(05092, 31655, 15211, 'Obersdorf'),
|
|
||||||
(05135, 31655, 15209, 'Münichsthal'),
|
|
||||||
(05136, 31655, 15212, 'Pfösing'),
|
|
||||||
(05137, 31655, 15216, 'Riedenthal'),
|
|
||||||
(05138, 31655, 15224, 'Wolkersdorf im Weinviertel');
|
|
||||||
|
|
||||||
INSERT INTO AT_plz (plz, ort, blnr, type, internal, addressable, po_box) VALUES
|
|
||||||
(2223, 'Hohenruppersdorf', 3, 'PLZ-Adressierung', FALSE, TRUE, FALSE),
|
|
||||||
(2120, 'Wolkersdorf im Weinviertel', 3, 'PLZ-Adressierung', FALSE, TRUE, TRUE ),
|
|
||||||
(2122, 'Ulrichskirchen', 3, 'PLZ-Adressierung', FALSE, TRUE, FALSE);
|
|
||||||
|
|
||||||
INSERT INTO AT_plz_dest (plz, okz, dest) VALUES
|
|
||||||
(2223, 03524, 'Hohenruppersdorf'),
|
|
||||||
(2120, 05092, 'Obersdorf'),
|
|
||||||
(2120, 05138, 'Wolkersdorf im Weinviertel'),
|
|
||||||
(2122, 05135, 'Münichsthal'),
|
|
||||||
(2122, 05136, 'Pfösing'),
|
|
||||||
(2122, 05137, 'Riedenthal');
|
|
||||||
@@ -0,0 +1,747 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generated by SWIFTStandards Workstation (build:R5.1.0.4) on 2005 Sep 13 16:04:25-->
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:iso:std:iso:20022:xsd:pain.001.001.01" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:xsd:pain.001.001.01">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBANIdentifier"/>
|
||||||
|
<xs:element name="BBAN" type="BBANIdentifier"/>
|
||||||
|
<xs:element name="UPIC" type="UPICIdentifier"/>
|
||||||
|
<xs:element name="DmstAcct" type="SimpleIdentificationInformation"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AustrianBankleitzahlIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="AT[0-9]{5,5}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BBANIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BEIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification1"/>
|
||||||
|
<xs:element name="BrnchId" type="BranchData" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CHIPSParticipantIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="CP[0-9]{4,4}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CHIPSUniversalIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="CH[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CanadianPaymentsARNIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="CA[0-9]{9,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CashAccount3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification1Choice"/>
|
||||||
|
<xs:element name="Tp" type="CashAccountType3Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Ccy" type="CurrencyCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CashAccountType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="CHAR"/>
|
||||||
|
<xs:enumeration value="SACC"/>
|
||||||
|
<xs:enumeration value="CACC"/>
|
||||||
|
<xs:enumeration value="SVGS"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CashClearingSystem2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RTG"/>
|
||||||
|
<xs:enumeration value="ACH"/>
|
||||||
|
<xs:enumeration value="CHI"/>
|
||||||
|
<xs:enumeration value="FDN"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ChargeBearer1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="OUR"/>
|
||||||
|
<xs:enumeration value="BEN"/>
|
||||||
|
<xs:enumeration value="SHA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="ChqTp" type="ChequeType2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqFr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DlvryMtd" type="ChequeDelivery1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DlvrTo" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqMtrtyDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="FrmsCd" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="MemoFld" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RgnlClrZone" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentificationChoice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="USCHU" type="CHIPSUniversalIdentifier"/>
|
||||||
|
<xs:element name="NZNCC" type="NewZealandNCCIdentifier"/>
|
||||||
|
<xs:element name="IENSC" type="IrishNSCIdentifier"/>
|
||||||
|
<xs:element name="GBSC" type="UKDomesticSortCodeIdentifier"/>
|
||||||
|
<xs:element name="USCH" type="CHIPSParticipantIdentifier"/>
|
||||||
|
<xs:element name="CHBC" type="SwissBCIdentifier"/>
|
||||||
|
<xs:element name="USFW" type="FedwireRoutingNumberIdentifier"/>
|
||||||
|
<xs:element name="PTNCC" type="PortugueseNCCIdentifier"/>
|
||||||
|
<xs:element name="RUCB" type="RussianCentralBankIdentificationCodeIdentifier"/>
|
||||||
|
<xs:element name="ITNCC" type="ItalianDomesticIdentifier"/>
|
||||||
|
<xs:element name="ATBLZ" type="AustrianBankleitzahlIdentifier"/>
|
||||||
|
<xs:element name="CACPA" type="CanadianPaymentsARNIdentifier"/>
|
||||||
|
<xs:element name="CHSIC" type="SwissSICIdentifier"/>
|
||||||
|
<xs:element name="DEBLZ" type="GermanBankleitzahlIdentifier"/>
|
||||||
|
<xs:element name="ESNCC" type="SpanishDomesticInterbankingIdentifier"/>
|
||||||
|
<xs:element name="ZANCC" type="SouthAfricanNCCIdentifier"/>
|
||||||
|
<xs:element name="HKNCC" type="HongKongBankIdentifier"/>
|
||||||
|
<xs:element name="AUBSBx" type="ExtensiveBranchNetworkIdentifier"/>
|
||||||
|
<xs:element name="AUBSBs" type="SmallNetworkIdentifier"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CreditTransferType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CORT"/>
|
||||||
|
<xs:enumeration value="SALA"/>
|
||||||
|
<xs:enumeration value="TREA"/>
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="DIVI"/>
|
||||||
|
<xs:enumeration value="GOVT"/>
|
||||||
|
<xs:enumeration value="INTE"/>
|
||||||
|
<xs:enumeration value="LOAN"/>
|
||||||
|
<xs:enumeration value="PENS"/>
|
||||||
|
<xs:enumeration value="SECU"/>
|
||||||
|
<xs:enumeration value="SSBE"/>
|
||||||
|
<xs:enumeration value="SUPP"/>
|
||||||
|
<xs:enumeration value="TAXS"/>
|
||||||
|
<xs:enumeration value="TRAD"/>
|
||||||
|
<xs:enumeration value="VATX"/>
|
||||||
|
<xs:enumeration value="HEDG"/>
|
||||||
|
<xs:enumeration value="INTC"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTypeIdentification">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="CreditTransferType2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="LclInstrm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="SttlmPrty" type="SettlementPriorityChoice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="CurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="CurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="pain.001.001.01" type="pain.001.001.01"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DunsIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{9,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="EANGLNIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{13,13}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="CurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExtensiveBranchNetworkIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="AU[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="FedwireRoutingNumberIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="FW[0-9]{9,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentificationChoice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericIdentification3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericIdentification4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element name="IdTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericPaymentTransaction3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification"/>
|
||||||
|
<xs:element name="Purp" type="PurposeChoice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="AmountType1Choice"/>
|
||||||
|
<xs:element name="ChqInstr" type="Cheque2" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="OrgtgPty" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Cdtr" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrAcct" type="CashAccount3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrCtryOfRes" type="CountryCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="FnlAgt" type="BranchAndFinancialInstitutionIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="FnlAgtAcct" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="FnlPty" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgBr" type="ChargeBearer1Code"/>
|
||||||
|
<xs:element name="XchgCtrctRef" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RgltryRptg" type="StructuredRegulatoryReporting2" minOccurs="0" maxOccurs="3"/>
|
||||||
|
<xs:element name="InstrForFnlAgt" type="InstructionForFinalAgent" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InstrForFrstAgt" type="InstructionForFirstAgent" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtInf" type="RemittanceInformation3Choice" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="GermanBankleitzahlIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="BL[0-9]{8,8}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="GroupInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element name="Authstn" type="Max128Text" minOccurs="0" maxOccurs="2"/>
|
||||||
|
<xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BtchBookg" type="BatchBookingIndicator" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Grpg" type="GroupingIndicator" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification1"/>
|
||||||
|
<xs:element name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="GroupingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="HongKongBankIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="HK[0-9]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="IBANIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[a-zA-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForFinalAgent">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Cd" type="Instruction3Code" minOccurs="0" maxOccurs="2"/>
|
||||||
|
<xs:element name="Prtry" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="InstructionForFirstAgent">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="RmtLctnMtd" type="RemittanceLocationMethod1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtLctnElctrncAdr" type="Max128Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtLctnPstlAdr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DbtPurp" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Prtry" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Tax" type="TaxInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="IrishNSCIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="IE[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ItalianDomesticIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="IT[0-9]{10,10}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max3Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="3"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max70Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="NewZealandNCCIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="NZ[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NonFinancialInstitutionIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BEI" type="BEIIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="EANGLN" type="EANGLNIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="USCHU" type="CHIPSUniversalIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DUNS" type="DunsIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BkPtyId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxIdNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="NonFinancialInstitutionIdentification1"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification2" minOccurs="1" maxOccurs="2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Id" type="Party1Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentIdentification">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="InstrId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
<xs:element name="PmtRmtId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInformation6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element name="PmtMtdByFrstAgt" type="PaymentMethod1Code"/>
|
||||||
|
<xs:element name="CdtTrfTpId" type="CreditTransferTypeIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DbtrCtryOfRes" type="CountryCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount3"/>
|
||||||
|
<xs:element name="FrstAgt" type="BranchAndFinancialInstitutionIdentification"/>
|
||||||
|
<xs:element name="ChrgsAcct" type="CashAccount3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PmtTx" type="GenericPaymentTransaction3" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="PaymentPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SALA"/>
|
||||||
|
<xs:enumeration value="TREA"/>
|
||||||
|
<xs:enumeration value="ADVA"/>
|
||||||
|
<xs:enumeration value="AGRT"/>
|
||||||
|
<xs:enumeration value="ALMY"/>
|
||||||
|
<xs:enumeration value="BECH"/>
|
||||||
|
<xs:enumeration value="BENE"/>
|
||||||
|
<xs:enumeration value="BONU"/>
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="CBFF"/>
|
||||||
|
<xs:enumeration value="CHAR"/>
|
||||||
|
<xs:enumeration value="COLL"/>
|
||||||
|
<xs:enumeration value="CMDT"/>
|
||||||
|
<xs:enumeration value="COMC"/>
|
||||||
|
<xs:enumeration value="COMM"/>
|
||||||
|
<xs:enumeration value="COST"/>
|
||||||
|
<xs:enumeration value="CPYR"/>
|
||||||
|
<xs:enumeration value="DIVI"/>
|
||||||
|
<xs:enumeration value="FREX"/>
|
||||||
|
<xs:enumeration value="GDDS"/>
|
||||||
|
<xs:enumeration value="GOVT"/>
|
||||||
|
<xs:enumeration value="IHRP"/>
|
||||||
|
<xs:enumeration value="INTC"/>
|
||||||
|
<xs:enumeration value="INSU"/>
|
||||||
|
<xs:enumeration value="INTE"/>
|
||||||
|
<xs:enumeration value="LICF"/>
|
||||||
|
<xs:enumeration value="LOAN"/>
|
||||||
|
<xs:enumeration value="LOAR"/>
|
||||||
|
<xs:enumeration value="NETT"/>
|
||||||
|
<xs:enumeration value="PAYR"/>
|
||||||
|
<xs:enumeration value="PENS"/>
|
||||||
|
<xs:enumeration value="REFU"/>
|
||||||
|
<xs:enumeration value="RENT"/>
|
||||||
|
<xs:enumeration value="ROYA"/>
|
||||||
|
<xs:enumeration value="SCVE"/>
|
||||||
|
<xs:enumeration value="SECU"/>
|
||||||
|
<xs:enumeration value="SSBE"/>
|
||||||
|
<xs:enumeration value="SUBS"/>
|
||||||
|
<xs:enumeration value="TAXS"/>
|
||||||
|
<xs:enumeration value="VATX"/>
|
||||||
|
<xs:enumeration value="COMT"/>
|
||||||
|
<xs:enumeration value="DBTC"/>
|
||||||
|
<xs:enumeration value="SUPP"/>
|
||||||
|
<xs:enumeration value="HEDG"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentSchemeChoice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="CashClearingSystem2Code"/>
|
||||||
|
<xs:element name="PrtryInf" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="DrvrsLicNb" type="Max35Text"/>
|
||||||
|
<xs:element name="SclSctyNb" type="Max35Text"/>
|
||||||
|
<xs:element name="AlnRegnNb" type="Max35Text"/>
|
||||||
|
<xs:element name="PsptNb" type="Max35Text"/>
|
||||||
|
<xs:element name="TaxIdNb" type="Max35Text"/>
|
||||||
|
<xs:element name="IdntyCardNb" type="Max35Text"/>
|
||||||
|
<xs:element name="MplyrIdNb" type="Max35Text"/>
|
||||||
|
<xs:element name="OthrId" type="GenericIdentification4"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PortugueseNCCIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="PT[0-9]{8,8}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PostalAddress1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="AdrTp" type="AddressType2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="AdrLine" type="Max70Text" minOccurs="0" maxOccurs="5"/>
|
||||||
|
<xs:element name="StrtNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BldgNb" type="Max16Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstCd" type="Max16Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TwnNm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CtrySubDvsn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PurposeChoice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
<xs:element name="Cd" type="PaymentPurpose1Code"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentAmount1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="DuePyblAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="DscntApldAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="RmtdAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="CdtNoteAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="TaxAmt" type="CurrencyAndAmount"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceInformation3Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Ustrd" type="Max140Text"/>
|
||||||
|
<xs:element name="Strd" type="StructuredRemittanceInformation2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="RussianCentralBankIdentificationCodeIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="RU[0-9]{9,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="SettlementPriorityChoice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Prty" type="Priority2Code"/>
|
||||||
|
<xs:element name="PmtSchme" type="PaymentSchemeChoice"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SimpleIdentificationInformation">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="SmallNetworkIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="AU[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="SouthAfricanNCCIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="ZA[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="SpanishDomesticInterbankingIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="ES[0-9]{8,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Cd" type="Max3Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Inf" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="RfrdDocTp" type="DocumentType1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RfrdDocRltdDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RfrdDocAmt" type="ReferredDocumentAmount1Choice" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
<xs:element name="DocRefNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrRef" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Invcr" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Invcee" type="PartyIdentification1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="SwissBCIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="SW[0-9]{3,5}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="SwissSICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="SW[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="TaxDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CertId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxTp" type="TaxType" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrTaxTp" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DbtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxRefNb" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TtlTaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TtlTaxAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxTpInf" type="TaxDetails" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CtgyDesc" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Rate" type="PercentageRate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="UKDomesticSortCodeIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="SC[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="UPICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{8,17}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="pain.001.001.01">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupInformation1"/>
|
||||||
|
<xs:element name="PmtInf" type="PaymentInformation6" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,784 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generated by SWIFTStandards Workstation (build:R5.1.0.4) on 2006 Sep 08 11:58:39-->
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification3Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBANIdentifier"/>
|
||||||
|
<xs:element name="BBAN" type="BBANIdentifier"/>
|
||||||
|
<xs:element name="UPIC" type="UPICIdentifier"/>
|
||||||
|
<xs:element name="PrtryAcct" type="SimpleIdentificationInformation2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="BBANIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BEIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BaseOneRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification5Choice"/>
|
||||||
|
<xs:element name="BrnchId" type="BranchData" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CHIPSUniversalIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="CH[0-9]{6,6}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CashAccount7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification3Choice"/>
|
||||||
|
<xs:element name="Tp" type="CashAccountType2" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Ccy" type="CurrencyCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccountType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="CashAccountType4Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CashAccountType4Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="CHAR"/>
|
||||||
|
<xs:enumeration value="COMM"/>
|
||||||
|
<xs:enumeration value="TAXE"/>
|
||||||
|
<xs:enumeration value="CISH"/>
|
||||||
|
<xs:enumeration value="TRAS"/>
|
||||||
|
<xs:enumeration value="SACC"/>
|
||||||
|
<xs:enumeration value="CACC"/>
|
||||||
|
<xs:enumeration value="SVGS"/>
|
||||||
|
<xs:enumeration value="ONDP"/>
|
||||||
|
<xs:enumeration value="MGLD"/>
|
||||||
|
<xs:enumeration value="NREX"/>
|
||||||
|
<xs:enumeration value="MOMA"/>
|
||||||
|
<xs:enumeration value="LOAN"/>
|
||||||
|
<xs:enumeration value="SLRY"/>
|
||||||
|
<xs:enumeration value="ODFT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ChargeBearerType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="SHAR"/>
|
||||||
|
<xs:enumeration value="SLEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="ChqTp" type="ChequeType2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqFr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DlvryMtd" type="ChequeDeliveryMethod1Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DlvrTo" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqMtrtyDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="FrmsCd" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="MemoFld" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RgnlClrZone" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PrtLctn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ChequeDeliveryMethod1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ChequeDelivery1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ClearingChannel2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RTGS"/>
|
||||||
|
<xs:enumeration value="RTNS"/>
|
||||||
|
<xs:enumeration value="MPNS"/>
|
||||||
|
<xs:enumeration value="BOOK"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentification3Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Id" type="ExternalClearingSystemMemberCode"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTransactionInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification1"/>
|
||||||
|
<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="AmountType2Choice"/>
|
||||||
|
<xs:element name="XchgRateInf" type="ExchangeRateInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChqInstr" type="Cheque5" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt1Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt2Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IntrmyAgt3Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Cdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="UltmtCdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InstrForCdtrAgt" type="InstructionForCreditorAgent1" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
<xs:element name="InstrForDbtrAgt" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Purp" type="Purpose1Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RgltryRptg" type="RegulatoryReporting2" minOccurs="0" maxOccurs="10"/>
|
||||||
|
<xs:element name="Tax" type="TaxInformation2" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RltdRmtInf" type="RemittanceLocation1" minOccurs="0" maxOccurs="10"/>
|
||||||
|
<xs:element name="RmtInf" type="RemittanceInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdtrRefTp" type="CreditorReferenceType1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrRef" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType3Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="CurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="CurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="DateAndPlaceOfBirth">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BirthDt" type="ISODate"/>
|
||||||
|
<xs:element name="PrvcOfBirth" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CityOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CtryOfBirth" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="pain.001.001.02" type="pain.001.001.02"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DocumentType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
<xs:enumeration value="SCOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DunsIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{9,9}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="EANGLNIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{13,13}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="CurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ExchangeRateInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="XchgRate" type="BaseOneRate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RateTp" type="ExchangeRateType1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CtrctId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExchangeRateType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SPOT"/>
|
||||||
|
<xs:enumeration value="SALE"/>
|
||||||
|
<xs:enumeration value="AGRD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalClearingSystemMemberCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalLocalInstrumentCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPurposeCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification5Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="BIC" type="BICIdentifier"/>
|
||||||
|
<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice"/>
|
||||||
|
<xs:element name="NmAndAdr" type="NameAndAddress7"/>
|
||||||
|
<xs:element name="PrtryId" type="GenericIdentification3"/>
|
||||||
|
<xs:element name="CmbndId" type="FinancialInstitutionIdentification3"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericIdentification3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericIdentification4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element name="IdTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GroupHeader1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="MsgId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element name="Authstn" type="Max128Text" minOccurs="0" maxOccurs="2"/>
|
||||||
|
<xs:element name="BtchBookg" type="BatchBookingIndicator" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Grpg" type="Grouping1Code"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification8"/>
|
||||||
|
<xs:element name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Grouping1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SNGL"/>
|
||||||
|
<xs:enumeration value="GRPD"/>
|
||||||
|
<xs:enumeration value="MIXD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="IBANIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[a-zA-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="IBEIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}[B-DF-HJ-NP-TV-XZ0-9]{7,7}[0-9]{1,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForCreditorAgent1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Cd" type="Instruction3Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="InstrInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="LocalInstrument1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalLocalInstrumentCode"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max256Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="256"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max34Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="34"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max3Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="3"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max70Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="NameAndAddress7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max70Text"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="OrganisationIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="IBEI" type="IBEIIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BEI" type="BEIIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="EANGLN" type="EANGLNIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="USCHU" type="CHIPSUniversalIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DUNS" type="DunsIdentifier" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BkPtyId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxIdNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="OrganisationIdentification2"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification3" minOccurs="1" maxOccurs="4"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Id" type="Party2Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CtryOfRes" type="CountryCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentCategoryPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CORT"/>
|
||||||
|
<xs:enumeration value="SALA"/>
|
||||||
|
<xs:enumeration value="TREA"/>
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="DIVI"/>
|
||||||
|
<xs:enumeration value="GOVT"/>
|
||||||
|
<xs:enumeration value="INTE"/>
|
||||||
|
<xs:enumeration value="LOAN"/>
|
||||||
|
<xs:enumeration value="PENS"/>
|
||||||
|
<xs:enumeration value="SECU"/>
|
||||||
|
<xs:enumeration value="SSBE"/>
|
||||||
|
<xs:enumeration value="SUPP"/>
|
||||||
|
<xs:enumeration value="TAXS"/>
|
||||||
|
<xs:enumeration value="TRAD"/>
|
||||||
|
<xs:enumeration value="VATX"/>
|
||||||
|
<xs:enumeration value="HEDG"/>
|
||||||
|
<xs:enumeration value="INTC"/>
|
||||||
|
<xs:enumeration value="WHLD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="InstrId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInstructionInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtInfId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
|
||||||
|
<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element name="PoolgAdjstmntDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification8"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount7"/>
|
||||||
|
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification3"/>
|
||||||
|
<xs:element name="DbtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgsAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtTrfTxInf" type="CreditTransferTransactionInformation1" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
<xs:enumeration value="TRA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentTypeInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="SvcLvl" type="ServiceLevel2Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="ClrChanl" type="ClearingChannel2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="LclInstrm" type="LocalInstrument1Choice" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CtgyPurp" type="PaymentCategoryPurpose1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="DrvrsLicNb" type="Max35Text"/>
|
||||||
|
<xs:element name="CstmrNb" type="Max35Text"/>
|
||||||
|
<xs:element name="SclSctyNb" type="Max35Text"/>
|
||||||
|
<xs:element name="AlnRegnNb" type="Max35Text"/>
|
||||||
|
<xs:element name="PsptNb" type="Max35Text"/>
|
||||||
|
<xs:element name="TaxIdNb" type="Max35Text"/>
|
||||||
|
<xs:element name="IdntyCardNb" type="Max35Text"/>
|
||||||
|
<xs:element name="MplyrIdNb" type="Max35Text"/>
|
||||||
|
<xs:element name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
|
||||||
|
<xs:element name="OthrId" type="GenericIdentification4"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PostalAddress1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="AdrTp" type="AddressType2Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="AdrLine" type="Max70Text" minOccurs="0" maxOccurs="5"/>
|
||||||
|
<xs:element name="StrtNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="BldgNb" type="Max16Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="PstCd" type="Max16Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TwnNm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CtrySubDvsn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Purpose1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPurposeCode"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentAmount1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="DuePyblAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="DscntApldAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="RmtdAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="CdtNoteAmt" type="CurrencyAndAmount"/>
|
||||||
|
<xs:element name="TaxAmt" type="CurrencyAndAmount"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="RfrdDocTp" type="ReferredDocumentType1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RfrdDocNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType2Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryAuthority">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="AuthrtyNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="AuthrtyCtry" type="CountryCode" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryReporting2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="DbtCdtRptgInd" type="RegulatoryReportingType1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Authrty" type="RegulatoryAuthority" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RgltryDtls" type="StructuredRegulatoryReporting2" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RegulatoryReportingType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="BOTH"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="RemittanceInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Ustrd" type="Max140Text" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
<xs:element name="Strd" type="StructuredRemittanceInformation6" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="RmtId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtLctnMtd" type="RemittanceLocationMethod1Code" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtLctnElctrncAdr" type="Max256Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RmtLctnPstlAdr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ServiceLevel1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SEPA"/>
|
||||||
|
<xs:enumeration value="SDVA"/>
|
||||||
|
<xs:enumeration value="PRPT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ServiceLevel2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ServiceLevel1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SimpleIdentificationInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max34Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Cd" type="Max3Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Inf" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="RfrdDocInf" type="ReferredDocumentInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RfrdDocRltdDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="RfrdDocAmt" type="ReferredDocumentAmount1Choice" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
<xs:element name="CdtrRefInf" type="CreditorReferenceInformation1" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Invcr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Invcee" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="AddtlRmtInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CertId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxTp" type="TaxType" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="CdtrTaxTp" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="DbtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxRefNb" type="Max140Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TtlTaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TtlTaxAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxTpInf" type="TaxDetails" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CtgyDesc" type="Max35Text" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Rate" type="PercentageRate" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="TaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="UPICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{8,17}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="pain.001.001.02">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupHeader1"/>
|
||||||
|
<xs:element name="PmtInf" type="PaymentInstructionInformation1" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,921 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
|
||||||
|
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification4Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBAN2007Identifier"/>
|
||||||
|
<xs:element name="Othr" type="GenericAccountIdentification1"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="AccountSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType3Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AnyBICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Authorisation1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="Authorisation1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max128Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Authorisation1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="AUTH"/>
|
||||||
|
<xs:enumeration value="FDET"/>
|
||||||
|
<xs:enumeration value="FSUM"/>
|
||||||
|
<xs:enumeration value="ILEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BaseOneRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccount16">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification4Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccountType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="CashAccountType4Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CashAccountType4Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CASH"/>
|
||||||
|
<xs:enumeration value="CHAR"/>
|
||||||
|
<xs:enumeration value="COMM"/>
|
||||||
|
<xs:enumeration value="TAXE"/>
|
||||||
|
<xs:enumeration value="CISH"/>
|
||||||
|
<xs:enumeration value="TRAS"/>
|
||||||
|
<xs:enumeration value="SACC"/>
|
||||||
|
<xs:enumeration value="CACC"/>
|
||||||
|
<xs:enumeration value="SVGS"/>
|
||||||
|
<xs:enumeration value="ONDP"/>
|
||||||
|
<xs:enumeration value="MGLD"/>
|
||||||
|
<xs:enumeration value="NREX"/>
|
||||||
|
<xs:enumeration value="MOMA"/>
|
||||||
|
<xs:enumeration value="LOAN"/>
|
||||||
|
<xs:enumeration value="SLRY"/>
|
||||||
|
<xs:enumeration value="ODFT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CategoryPurpose1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChargeBearerType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="SHAR"/>
|
||||||
|
<xs:enumeration value="SLEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ChequeDeliveryMethod1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ChequeDelivery1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemIdentification2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
|
||||||
|
<xs:element name="MmbId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ContactDetails2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CreditDebitCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRDT"/>
|
||||||
|
<xs:enumeration value="DBIT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTransactionInformation10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="Amt" type="AmountType3Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRateInformation1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType3Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CustomerCreditTransferInitiationV03">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupHeader32"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation3"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DateAndPlaceOfBirth">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BirthDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CityOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CtryOfBirth" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DatePeriodDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FrDt" type="ISODate"/>
|
||||||
|
<xs:element name="ToDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV03"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DocumentAdjustment1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
<xs:enumeration value="SCOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DocumentType5Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="BOLD"/>
|
||||||
|
<xs:enumeration value="VCHR"/>
|
||||||
|
<xs:enumeration value="AROI"/>
|
||||||
|
<xs:enumeration value="TSUT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ExchangeRateInformation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExchangeRateType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SPOT"/>
|
||||||
|
<xs:enumeration value="SALE"/>
|
||||||
|
<xs:enumeration value="AGRD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalAccountIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCategoryPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="5"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalLocalInstrument1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalOrganisationIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPersonIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalServiceLevel1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericAccountIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max34Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericFinancialIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericOrganisationIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericPersonIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GroupHeader32">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="MsgId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="IBAN2007Identifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForCreditorAgent1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="LocalInstrument2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Max10Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="10"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max2048Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="2048"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max34Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="34"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max4Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="NamePrefix1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DOCT"/>
|
||||||
|
<xs:enumeration value="MIST"/>
|
||||||
|
<xs:enumeration value="MISS"/>
|
||||||
|
<xs:enumeration value="MADM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Number">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="0"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="OrganisationIdentification4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party6Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="OrganisationIdentification4"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification5"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification32">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInstructionInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtInfId" type="Max35Text"/>
|
||||||
|
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification32"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount16"/>
|
||||||
|
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransactionInformation10"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
<xs:enumeration value="TRA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentTypeInformation19">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PersonIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PhoneNumber">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PostalAddress6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Purpose2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType5Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryAuthority2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RegulatoryReportingType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="BOTH"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="RemittanceAmount1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceInformation5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
<xs:enumeration value="SMSM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ServiceLevel8Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/>
|
||||||
|
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmount1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAuthorisation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxPeriod1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecord1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecordDetails1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="TaxRecordPeriod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MM01"/>
|
||||||
|
<xs:enumeration value="MM02"/>
|
||||||
|
<xs:enumeration value="MM03"/>
|
||||||
|
<xs:enumeration value="MM04"/>
|
||||||
|
<xs:enumeration value="MM05"/>
|
||||||
|
<xs:enumeration value="MM06"/>
|
||||||
|
<xs:enumeration value="MM07"/>
|
||||||
|
<xs:enumeration value="MM08"/>
|
||||||
|
<xs:enumeration value="MM09"/>
|
||||||
|
<xs:enumeration value="MM10"/>
|
||||||
|
<xs:enumeration value="MM11"/>
|
||||||
|
<xs:enumeration value="MM12"/>
|
||||||
|
<xs:enumeration value="QTR1"/>
|
||||||
|
<xs:enumeration value="QTR2"/>
|
||||||
|
<xs:enumeration value="QTR3"/>
|
||||||
|
<xs:enumeration value="QTR4"/>
|
||||||
|
<xs:enumeration value="HLF1"/>
|
||||||
|
<xs:enumeration value="HLF2"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,968 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generated by SWIFTStandards Workstation (build:R7.1.30.4) on 2012 Jun 07 20:47:19-->
|
||||||
|
<xs:schema elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.04" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.04" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification4Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBAN2007Identifier"/>
|
||||||
|
<xs:element name="Othr" type="GenericAccountIdentification1"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="AccountSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType3Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AnyBICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Authorisation1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="Authorisation1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max128Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Authorisation1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="AUTH"/>
|
||||||
|
<xs:enumeration value="FDET"/>
|
||||||
|
<xs:enumeration value="FSUM"/>
|
||||||
|
<xs:enumeration value="ILEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICFIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BaseOneRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccount24">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification4Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccountType2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCashAccountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CategoryPurpose1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChargeBearerType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="SHAR"/>
|
||||||
|
<xs:enumeration value="SLEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ChequeDeliveryMethod1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ChequeDelivery1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemIdentification2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
|
||||||
|
<xs:element name="MmbId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ContactDetails2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CreditDebitCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRDT"/>
|
||||||
|
<xs:enumeration value="DBIT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTransaction1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="Amt" type="AmountType3Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType3Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CustomerCreditTransferInitiationV04">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupHeader48"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction6"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DateAndPlaceOfBirth">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BirthDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CityOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CtryOfBirth" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DatePeriodDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FrDt" type="ISODate"/>
|
||||||
|
<xs:element name="ToDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="DiscountAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DiscountAmountType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV04"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DocumentAdjustment1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
<xs:enumeration value="SCOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DocumentType5Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="BOLD"/>
|
||||||
|
<xs:enumeration value="VCHR"/>
|
||||||
|
<xs:enumeration value="AROI"/>
|
||||||
|
<xs:enumeration value="TSUT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ExchangeRate1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExchangeRateType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SPOT"/>
|
||||||
|
<xs:enumeration value="SALE"/>
|
||||||
|
<xs:enumeration value="AGRD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalAccountIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCashAccountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCategoryPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="5"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalDiscountAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalLocalInstrument1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalOrganisationIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPersonIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalServiceLevel1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalTaxAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericAccountIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max34Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericFinancialIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericOrganisationIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericPersonIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GroupHeader48">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="MsgId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="IBAN2007Identifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForCreditorAgent1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="LocalInstrument2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Max10Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="10"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max2048Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="2048"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max34Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="34"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max350Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="350"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max4Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="NamePrefix1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DOCT"/>
|
||||||
|
<xs:enumeration value="MIST"/>
|
||||||
|
<xs:enumeration value="MISS"/>
|
||||||
|
<xs:enumeration value="MADM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Number">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="0"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="OrganisationIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party11Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="OrganisationIdentification8"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification5"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification43">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInstruction6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtInfId" type="Max35Text"/>
|
||||||
|
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
<xs:enumeration value="TRA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentTypeInformation19">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PersonIdentificationSchemeName1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PhoneNumber">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PostalAddress6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Purpose2Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType5Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryAuthority2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RegulatoryReportingType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="BOTH"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="RemittanceAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceInformation7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
<xs:enumeration value="SMSM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ServiceLevel8Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation9">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryData1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
|
||||||
|
<xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryDataEnvelope1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:any namespace="##any" processContents="lax"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmount1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountType1Choice">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAuthorisation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxPeriod1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecord1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecordDetails1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="TaxRecordPeriod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MM01"/>
|
||||||
|
<xs:enumeration value="MM02"/>
|
||||||
|
<xs:enumeration value="MM03"/>
|
||||||
|
<xs:enumeration value="MM04"/>
|
||||||
|
<xs:enumeration value="MM05"/>
|
||||||
|
<xs:enumeration value="MM06"/>
|
||||||
|
<xs:enumeration value="MM07"/>
|
||||||
|
<xs:enumeration value="MM08"/>
|
||||||
|
<xs:enumeration value="MM09"/>
|
||||||
|
<xs:enumeration value="MM10"/>
|
||||||
|
<xs:enumeration value="MM11"/>
|
||||||
|
<xs:enumeration value="MM12"/>
|
||||||
|
<xs:enumeration value="QTR1"/>
|
||||||
|
<xs:enumeration value="QTR2"/>
|
||||||
|
<xs:enumeration value="QTR3"/>
|
||||||
|
<xs:enumeration value="QTR4"/>
|
||||||
|
<xs:enumeration value="HLF1"/>
|
||||||
|
<xs:enumeration value="HLF2"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,931 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generated by Standards Editor (build:R1.0.41.3) on 2013 Mar 05 13:39:40, ISO 20022 version : 2013-->
|
||||||
|
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification4Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBAN2007Identifier"/>
|
||||||
|
<xs:element name="Othr" type="GenericAccountIdentification1"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="AccountSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType3Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AnyBICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Authorisation1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="Authorisation1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max128Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Authorisation1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="AUTH"/>
|
||||||
|
<xs:enumeration value="FDET"/>
|
||||||
|
<xs:enumeration value="FSUM"/>
|
||||||
|
<xs:enumeration value="ILEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICFIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BaseOneRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccount24">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification4Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccountType2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCashAccountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CategoryPurpose1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChargeBearerType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="SHAR"/>
|
||||||
|
<xs:enumeration value="SLEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ChequeDeliveryMethod1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ChequeDelivery1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemIdentification2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
|
||||||
|
<xs:element name="MmbId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ContactDetails2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CreditDebitCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRDT"/>
|
||||||
|
<xs:enumeration value="DBIT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTransaction6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="Amt" type="AmountType3Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType3Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CustomerCreditTransferInitiationV05">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupHeader48"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction9"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DateAndPlaceOfBirth">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BirthDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CityOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CtryOfBirth" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DatePeriodDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FrDt" type="ISODate"/>
|
||||||
|
<xs:element name="ToDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="DiscountAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DiscountAmountType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV05"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DocumentAdjustment1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
<xs:enumeration value="SCOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DocumentType5Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="BOLD"/>
|
||||||
|
<xs:enumeration value="VCHR"/>
|
||||||
|
<xs:enumeration value="AROI"/>
|
||||||
|
<xs:enumeration value="TSUT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ExchangeRate1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExchangeRateType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SPOT"/>
|
||||||
|
<xs:enumeration value="SALE"/>
|
||||||
|
<xs:enumeration value="AGRD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalAccountIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCashAccountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCategoryPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="5"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalDiscountAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalLocalInstrument1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalOrganisationIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPersonIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalServiceLevel1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalTaxAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericAccountIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max34Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericFinancialIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericOrganisationIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericPersonIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GroupHeader48">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="MsgId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="IBAN2007Identifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForCreditorAgent1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="LocalInstrument2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Max10Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="10"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max2048Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="2048"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max34Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="34"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max350Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="350"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max4Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="NamePrefix1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DOCT"/>
|
||||||
|
<xs:enumeration value="MIST"/>
|
||||||
|
<xs:enumeration value="MISS"/>
|
||||||
|
<xs:enumeration value="MADM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Number">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="0"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="OrganisationIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party11Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="OrganisationIdentification8"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification5"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification43">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInstruction9">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtInfId" type="Max35Text"/>
|
||||||
|
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
<xs:enumeration value="TRA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentTypeInformation19">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PersonIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PhoneNumber">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PostalAddress6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Purpose2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType5Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryAuthority2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RegulatoryReportingType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="BOTH"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="RemittanceAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceInformation7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
<xs:enumeration value="SMSM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ServiceLevel8Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation9">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryData1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
|
||||||
|
<xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryDataEnvelope1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:any namespace="##any" processContents="lax"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmount1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAuthorisation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxPeriod1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecord1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecordDetails1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="TaxRecordPeriod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MM01"/>
|
||||||
|
<xs:enumeration value="MM02"/>
|
||||||
|
<xs:enumeration value="MM03"/>
|
||||||
|
<xs:enumeration value="MM04"/>
|
||||||
|
<xs:enumeration value="MM05"/>
|
||||||
|
<xs:enumeration value="MM06"/>
|
||||||
|
<xs:enumeration value="MM07"/>
|
||||||
|
<xs:enumeration value="MM08"/>
|
||||||
|
<xs:enumeration value="MM09"/>
|
||||||
|
<xs:enumeration value="MM10"/>
|
||||||
|
<xs:enumeration value="MM11"/>
|
||||||
|
<xs:enumeration value="MM12"/>
|
||||||
|
<xs:enumeration value="QTR1"/>
|
||||||
|
<xs:enumeration value="QTR2"/>
|
||||||
|
<xs:enumeration value="QTR3"/>
|
||||||
|
<xs:enumeration value="QTR4"/>
|
||||||
|
<xs:enumeration value="HLF1"/>
|
||||||
|
<xs:enumeration value="HLF2"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
||||||
@@ -0,0 +1,987 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generated by Standards Editor (build:R1.6.5.2_DEV) on 2015 Feb 24 14:08:25, ISO 20022 version : 2013-->
|
||||||
|
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.06" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.06">
|
||||||
|
<xs:element name="Document" type="Document"/>
|
||||||
|
<xs:complexType name="AccountIdentification4Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="IBAN" type="IBAN2007Identifier"/>
|
||||||
|
<xs:element name="Othr" type="GenericAccountIdentification1"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="AccountSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="5"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
<xs:minInclusive value="0"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
|
||||||
|
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{3,3}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="AddressType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="ADDR"/>
|
||||||
|
<xs:enumeration value="PBOX"/>
|
||||||
|
<xs:enumeration value="HOME"/>
|
||||||
|
<xs:enumeration value="BIZZ"/>
|
||||||
|
<xs:enumeration value="MLTO"/>
|
||||||
|
<xs:enumeration value="DLVY"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="AmountType4Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="EqvtAmt" type="EquivalentAmount2"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="AnyBICIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Authorisation1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="Authorisation1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max128Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Authorisation1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="AUTH"/>
|
||||||
|
<xs:enumeration value="FDET"/>
|
||||||
|
<xs:enumeration value="FSUM"/>
|
||||||
|
<xs:enumeration value="ILEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BICFIIdentifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BaseOneRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="BatchBookingIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="BranchAndFinancialInstitutionIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="BranchData2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccount24">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="AccountIdentification4Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CashAccountType2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCashAccountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CategoryPurpose1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChargeBearerType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="SHAR"/>
|
||||||
|
<xs:enumeration value="SLEV"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Cheque7">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeDelivery1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MLDB"/>
|
||||||
|
<xs:enumeration value="MLCD"/>
|
||||||
|
<xs:enumeration value="MLFA"/>
|
||||||
|
<xs:enumeration value="CRDB"/>
|
||||||
|
<xs:enumeration value="CRCD"/>
|
||||||
|
<xs:enumeration value="CRFA"/>
|
||||||
|
<xs:enumeration value="PUDB"/>
|
||||||
|
<xs:enumeration value="PUCD"/>
|
||||||
|
<xs:enumeration value="PUFA"/>
|
||||||
|
<xs:enumeration value="RGDB"/>
|
||||||
|
<xs:enumeration value="RGCD"/>
|
||||||
|
<xs:enumeration value="RGFA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ChequeDeliveryMethod1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ChequeDelivery1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ChequeType2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CCHQ"/>
|
||||||
|
<xs:enumeration value="CCCH"/>
|
||||||
|
<xs:enumeration value="BCHQ"/>
|
||||||
|
<xs:enumeration value="DRFT"/>
|
||||||
|
<xs:enumeration value="ELDR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ClearingSystemIdentification2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ClearingSystemMemberIdentification2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
|
||||||
|
<xs:element name="MmbId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ContactDetails2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="CountryCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="CreditDebitCode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRDT"/>
|
||||||
|
<xs:enumeration value="DBIT"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="CreditTransferTransaction20">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtId" type="PaymentIdentification1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="Amt" type="AmountType4Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
|
||||||
|
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation10"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceInformation2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType3Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CreditorReferenceType2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="CustomerCreditTransferInitiationV06">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="GrpHdr" type="GroupHeader48"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction16"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DateAndPlaceOfBirth">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="BirthDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CityOfBirth" type="Max35Text"/>
|
||||||
|
<xs:element name="CtryOfBirth" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DatePeriodDetails">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="FrDt" type="ISODate"/>
|
||||||
|
<xs:element name="ToDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DecimalNumber">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="17"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="DiscountAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DiscountAmountType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Document">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV06"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="DocumentAdjustment1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="DocumentType3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="RADM"/>
|
||||||
|
<xs:enumeration value="RPIN"/>
|
||||||
|
<xs:enumeration value="FXDR"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
<xs:enumeration value="SCOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="DocumentType6Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MSIN"/>
|
||||||
|
<xs:enumeration value="CNFA"/>
|
||||||
|
<xs:enumeration value="DNFA"/>
|
||||||
|
<xs:enumeration value="CINV"/>
|
||||||
|
<xs:enumeration value="CREN"/>
|
||||||
|
<xs:enumeration value="DEBN"/>
|
||||||
|
<xs:enumeration value="HIRI"/>
|
||||||
|
<xs:enumeration value="SBIN"/>
|
||||||
|
<xs:enumeration value="CMCN"/>
|
||||||
|
<xs:enumeration value="SOAC"/>
|
||||||
|
<xs:enumeration value="DISP"/>
|
||||||
|
<xs:enumeration value="BOLD"/>
|
||||||
|
<xs:enumeration value="VCHR"/>
|
||||||
|
<xs:enumeration value="AROI"/>
|
||||||
|
<xs:enumeration value="TSUT"/>
|
||||||
|
<xs:enumeration value="PUOR"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="EquivalentAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ExchangeRate1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="ExchangeRateType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="SPOT"/>
|
||||||
|
<xs:enumeration value="SALE"/>
|
||||||
|
<xs:enumeration value="AGRD"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalAccountIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCashAccountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalCategoryPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="5"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalDiscountAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalGarnishmentType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalLocalInstrument1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalOrganisationIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPersonIdentification1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalPurpose1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalServiceLevel1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ExternalTaxAmountType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="FinancialInstitutionIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Garnishment1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Tp" type="GarnishmentType1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Grnshee" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtAdmstr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FmlyMdclInsrncInd" type="TrueFalseIndicator"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="MplyeeTermntnInd" type="TrueFalseIndicator"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GarnishmentType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="GarnishmentType1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GarnishmentType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalGarnishmentType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericAccountIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max34Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericFinancialIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericOrganisationIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GenericPersonIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Id" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="GroupHeader48">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="MsgId" type="Max35Text"/>
|
||||||
|
<xs:element name="CreDtTm" type="ISODateTime"/>
|
||||||
|
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
|
||||||
|
<xs:element name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element name="InitgPty" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="IBAN2007Identifier">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODate">
|
||||||
|
<xs:restriction base="xs:date"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="ISODateTime">
|
||||||
|
<xs:restriction base="xs:dateTime"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Instruction3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHQB"/>
|
||||||
|
<xs:enumeration value="HOLD"/>
|
||||||
|
<xs:enumeration value="PHOB"/>
|
||||||
|
<xs:enumeration value="TELB"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="InstructionForCreditorAgent1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="LocalInstrument2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Max10Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="10"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max128Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="128"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max140Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="140"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max15NumericText">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[0-9]{1,15}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max16Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="16"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max2048Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="2048"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max34Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="34"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max350Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="350"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max35Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="35"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max4Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="4"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Max70Text">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
<xs:maxLength value="70"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="NameAndAddress10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element name="Adr" type="PostalAddress6"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="NamePrefix1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="DOCT"/>
|
||||||
|
<xs:enumeration value="MIST"/>
|
||||||
|
<xs:enumeration value="MISS"/>
|
||||||
|
<xs:enumeration value="MADM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="Number">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="0"/>
|
||||||
|
<xs:totalDigits value="18"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="OrganisationIdentification8">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="Party11Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="OrgId" type="OrganisationIdentification8"/>
|
||||||
|
<xs:element name="PrvtId" type="PersonIdentification5"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PartyIdentification43">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentIdentification1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
|
||||||
|
<xs:element name="EndToEndId" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PaymentInstruction16">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="PmtInfId" type="Max35Text"/>
|
||||||
|
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
|
||||||
|
<xs:element name="ReqdExctnDt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
|
||||||
|
<xs:element name="Dbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element name="DbtrAcct" type="CashAccount24"/>
|
||||||
|
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction20"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PaymentMethod3Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CHK"/>
|
||||||
|
<xs:enumeration value="TRF"/>
|
||||||
|
<xs:enumeration value="TRA"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PaymentTypeInformation19">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PercentageRate">
|
||||||
|
<xs:restriction base="xs:decimal">
|
||||||
|
<xs:fractionDigits value="10"/>
|
||||||
|
<xs:totalDigits value="11"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PersonIdentification5">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="PersonIdentificationSchemeName1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="PhoneNumber">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="PostalAddress6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="Priority2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="HIGH"/>
|
||||||
|
<xs:enumeration value="NORM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="Purpose2Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalPurpose1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentInformation6">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType3Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="DocumentType6Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="ReferredDocumentType4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="CdOrPrtry" type="ReferredDocumentType3Choice"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryAuthority2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RegulatoryReportingType1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="CRED"/>
|
||||||
|
<xs:enumeration value="DEBT"/>
|
||||||
|
<xs:enumeration value="BOTH"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="RemittanceAmount2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceInformation10">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation12"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocation4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="RmtLctnDtls" type="RemittanceLocationDetails1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="RemittanceLocationDetails1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Mtd" type="RemittanceLocationMethod2Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="ElctrncAdr" type="Max2048Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="NameAndAddress10"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="RemittanceLocationMethod2Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="FAXI"/>
|
||||||
|
<xs:enumeration value="EDIC"/>
|
||||||
|
<xs:enumeration value="URID"/>
|
||||||
|
<xs:enumeration value="EMAL"/>
|
||||||
|
<xs:enumeration value="POST"/>
|
||||||
|
<xs:enumeration value="SMSM"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:complexType name="ServiceLevel8Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRegulatoryReporting3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="StructuredRemittanceInformation12">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation6"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxRmt" type="TaxInformation4"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtRmt" type="Garnishment1"/>
|
||||||
|
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryData1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
|
||||||
|
<xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="SupplementaryDataEnvelope1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:any namespace="##any" processContents="lax"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmount1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountAndType1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAmountType1Choice">
|
||||||
|
<xs:choice>
|
||||||
|
<xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
|
||||||
|
<xs:element name="Prtry" type="Max35Text"/>
|
||||||
|
</xs:choice>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxAuthorisation1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation3">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxInformation4">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="TaxParty2"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZone" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
|
||||||
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxParty2">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxPeriod1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecord1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="TaxRecordDetails1">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
|
||||||
|
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:simpleType name="TaxRecordPeriod1Code">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="MM01"/>
|
||||||
|
<xs:enumeration value="MM02"/>
|
||||||
|
<xs:enumeration value="MM03"/>
|
||||||
|
<xs:enumeration value="MM04"/>
|
||||||
|
<xs:enumeration value="MM05"/>
|
||||||
|
<xs:enumeration value="MM06"/>
|
||||||
|
<xs:enumeration value="MM07"/>
|
||||||
|
<xs:enumeration value="MM08"/>
|
||||||
|
<xs:enumeration value="MM09"/>
|
||||||
|
<xs:enumeration value="MM10"/>
|
||||||
|
<xs:enumeration value="MM11"/>
|
||||||
|
<xs:enumeration value="MM12"/>
|
||||||
|
<xs:enumeration value="QTR1"/>
|
||||||
|
<xs:enumeration value="QTR2"/>
|
||||||
|
<xs:enumeration value="QTR3"/>
|
||||||
|
<xs:enumeration value="QTR4"/>
|
||||||
|
<xs:enumeration value="HLF1"/>
|
||||||
|
<xs:enumeration value="HLF2"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="TrueFalseIndicator">
|
||||||
|
<xs:restriction base="xs:boolean"/>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,10 @@
|
|||||||
-- deletes for HelperTests.BillingTest
|
-- deletes for HelperTests.BillingTest
|
||||||
|
|
||||||
DELETE FROM credit;
|
DELETE FROM credit;
|
||||||
DELETE FROM payment_variant
|
DELETE FROM payment_variant;
|
||||||
DELETE FROM delivery;
|
DELETE FROM delivery;
|
||||||
DELETE FROM area_commitment;
|
DELETE FROM area_commitment;
|
||||||
DELETE FROM area_commitment_type;
|
DELETE FROM area_commitment_type;
|
||||||
DELETE FROM season;
|
DELETE FROM season;
|
||||||
DELETE FROM member;
|
|
||||||
DELETE FROM wine_attribute;
|
DELETE FROM wine_attribute;
|
||||||
DELETE FROM wine_cultivation;
|
DELETE FROM wine_cultivation;
|
||||||
@@ -16,23 +16,18 @@ INSERT INTO wine_attribute (attrid, name, active, max_kg_per_ha, strict, fill_lo
|
|||||||
('R', 'Vertrag R', TRUE, NULL, TRUE, 2);
|
('R', 'Vertrag R', TRUE, NULL, TRUE, 2);
|
||||||
|
|
||||||
INSERT INTO area_commitment_type (vtrgid, sortid, attrid, disc, min_kg_per_ha, penalty_per_kg, penalty_amount, penalty_none) VALUES
|
INSERT INTO area_commitment_type (vtrgid, sortid, attrid, disc, min_kg_per_ha, penalty_per_kg, penalty_amount, penalty_none) VALUES
|
||||||
('ZW', 'ZW', NULL, NULL, 2500, 600, NULL, NULL),
|
('ZW', 'ZW', NULL, NULL, 2500, 600, NULL, NULL),
|
||||||
('GV', 'GV', NULL, NULL, 5000, 500, NULL, NULL),
|
('GV', 'GV', NULL, NULL, 5000, 500, NULL, NULL),
|
||||||
('GVK', 'GV', 'K', NULL, 5000, 500, NULL, NULL),
|
('GVK', 'GV', 'K', NULL, 5000, 500, NULL, NULL),
|
||||||
('GVD', 'GV', 'D', NULL, 5000, 1000, NULL, NULL),
|
('GVD', 'GV', 'D', NULL, 5000, 1000, NULL, NULL),
|
||||||
('GVP', 'GV', 'P', NULL, 5000, 1000, 1000000, NULL),
|
('GVP', 'GV', 'P', NULL, 5000, 1000, 1000000, NULL),
|
||||||
('GVQ', 'GV', 'Q', NULL, 5000, 1000, 1000000, NULL),
|
('GVQ', 'GV', 'Q', NULL, 5000, 1000, 1000000, NULL),
|
||||||
('GVR', 'GV', 'R', NULL, 5000, 1000, 1000000, NULL);
|
('GVR', 'GV', 'R', NULL, 5000, 1000, 1000000, NULL);
|
||||||
|
|
||||||
INSERT INTO member (mgnr, given_name, family_name, zwstid, volllieferant, buchführend, country, postal_dest, address, default_kgnr) VALUES
|
|
||||||
(101, 'Max', 'Mustermann', 'X', FALSE, FALSE, 40, 222303524, 'Winzerstraße 1', 06109),
|
|
||||||
(102, 'Wernhardt', 'Weinbauer', 'X', FALSE, FALSE, 40, 222303524, 'Winzerstraße 2', 06109),
|
|
||||||
(103, 'Matthäus', 'Musterbauer', 'X', FALSE, FALSE, 40, 212005138, 'Brünner Straße 10', 15224),
|
|
||||||
(104, 'Waltraud', 'Winzer', 'X', FALSE, FALSE, 40, 212005138, 'Wiener Straße 15', 15224);
|
|
||||||
|
|
||||||
INSERT INTO area_commitment (fbnr, mgnr, vtrgid, cultid, area, kgnr, gstnr, rdnr, year_from, year_to) VALUES
|
INSERT INTO area_commitment (fbnr, mgnr, vtrgid, cultid, area, kgnr, gstnr, rdnr, year_from, year_to) VALUES
|
||||||
( 1, 101, 'GV', 'K', 10000, 06109, '123/4', NULL, 2000, 2019),
|
( 1, 101, 'GV', 'K', 10000, 06109, '123/4', NULL, 2000, 2019),
|
||||||
( 2, 101, 'GV', 'B', 10000, 06109, '123/5', NULL, 2025, 2030);
|
( 2, 101, 'GV', 'K', 10000, 06109, '123/5', NULL, 2025, 2030),
|
||||||
|
( 3, 101, 'GV', 'K', 10000, 06109, '123/6', NULL, 2021, 2031);
|
||||||
|
|
||||||
INSERT INTO season (year, currency, min_kg_per_bs, max_kg_per_bs, penalty_per_kg, penalty_amount, penalty_none, start_date, end_date) VALUES
|
INSERT INTO season (year, currency, min_kg_per_bs, max_kg_per_bs, penalty_per_kg, penalty_amount, penalty_none, start_date, end_date) VALUES
|
||||||
(2020, 'EUR', 1000, 2000, NULL, NULL, NULL, NULL, NULL),
|
(2020, 'EUR', 1000, 2000, NULL, NULL, NULL, NULL, NULL),
|
||||||
@@ -42,18 +37,30 @@ INSERT INTO modifier (year, modid, ordering, name, abs, rel, standard, quick_sel
|
|||||||
(2020, 'S', 0, 'Geschädigte Trauben', NULL, -0.1, FALSE, FALSE),
|
(2020, 'S', 0, 'Geschädigte Trauben', NULL, -0.1, FALSE, FALSE),
|
||||||
(2020, 'A', 0, 'Keine Voranmeldung', -1000, NULL, FALSE, FALSE);
|
(2020, 'A', 0, 'Keine Voranmeldung', -1000, NULL, FALSE, FALSE);
|
||||||
|
|
||||||
|
-- Test 01
|
||||||
INSERT INTO delivery (mgnr, year, did, date, time, zwstid, lnr) VALUES
|
INSERT INTO delivery (mgnr, year, did, date, time, zwstid, lnr) VALUES
|
||||||
(101, 2020, 1, '2020-10-01', NULL, 'X', 1),
|
(101, 2020, 1, '2020-10-01', NULL, 'X', 1),
|
||||||
(101, 2020, 2, '2020-10-01', NULL, 'X', 2),
|
(101, 2020, 2, '2020-10-01', NULL, 'X', 2),
|
||||||
(101, 2020, 3, '2020-10-01', NULL, 'X', 3);
|
(101, 2020, 3, '2020-10-01', NULL, 'X', 3);
|
||||||
|
|
||||||
INSERT INTO delivery_part (year, did, dpnr, sortid, attrid, weight, kmw, qualid, hkid, kgnr, gerebelt, manual_weighing, spl_check, scale_id, weighing_id, weighing_reason) VALUES
|
INSERT INTO delivery_part (year, did, dpnr, sortid, attrid, weight, kmw, qualid, hkid, kgnr, gerebelt, manual_weighing, spl_check, scale_id, weighing_id, weighing_reason) VALUES
|
||||||
(2020, 1, 1, 'GV', 'K', 4000, 17, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
(2020, 1, 1, 'GV', 'K', 4000, 17, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
(2020, 1, 2, 'GV', NULL, 4000, 16, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
(2020, 1, 2, 'GV', NULL, 4000, 16, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
(2020, 2, 1, 'GV', 'B', 4000, 15, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
(2020, 2, 1, 'GV', 'B', 4000, 15, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
(2020, 2, 2, 'GV', 'B', 4000, 16, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
(2020, 2, 2, 'GV', 'B', 4000, 16, 'QUW', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
(2020, 3, 1, 'GV', NULL, 500, 15, 'WEI', 'OEST', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
(2020, 3, 1, 'GV', NULL, 500, 15, 'WEI', 'OEST', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
(2020, 3, 2, 'GV', NULL, 500, 14, 'LDW', 'WLXX', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL);
|
(2020, 3, 2, 'GV', NULL, 500, 14, 'LDW', 'WLXX', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL);
|
||||||
|
|
||||||
INSERT INTO delivery_part_modifier (year, did, dpnr, modid) VALUES
|
INSERT INTO delivery_part_modifier (year, did, dpnr, modid) VALUES
|
||||||
(2020, 1, 2, 'S');
|
(2020, 1, 2, 'S');
|
||||||
|
|
||||||
|
-- Test 02 + 03
|
||||||
|
INSERT INTO delivery (mgnr, year, did, date, time, zwstid, lnr) VALUES
|
||||||
|
(101, 2021, 1, '2021-10-01', NULL, 'X', 1),
|
||||||
|
(101, 2021, 2, '2021-10-01', NULL, 'X', 2),
|
||||||
|
(101, 2021, 3, '2021-10-01', NULL, 'X', 3);
|
||||||
|
INSERT INTO delivery_part (year, did, dpnr, sortid, attrid, weight, kmw, qualid, hkid, kgnr, gebunden, gerebelt, manual_weighing, spl_check, scale_id, weighing_id, weighing_reason) VALUES
|
||||||
|
(2021, 1, 1, 'GV', 'K', 4000, 17, 'KAB', 'WLNO', 06109, TRUE, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
|
(2021, 1, 2, 'GV', NULL, 4000, 16, 'QUW', 'WLNO', 06109, FALSE, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
|
(2021, 2, 1, 'GV', 'B', 4000, 15, 'QUW', 'WLNO', 06109, TRUE, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
|
(2021, 2, 2, 'GV', 'B', 4000, 16, 'QUW', 'WLNO', 06109, FALSE, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
|
(2021, 3, 1, 'GV', NULL, 500, 15, 'WEI', 'OEST', 06109, NULL, TRUE, FALSE, FALSE, NULL, NULL, NULL),
|
||||||
|
(2021, 3, 2, 'GV', NULL, 500, 14, 'LDW', 'WLXX', 06109, NULL, TRUE, FALSE, FALSE, NULL, NULL, NULL);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- deletes for DocumentTests
|
||||||
|
|
||||||
|
DELETE FROM delivery;
|
||||||
|
DELETE FROM season;
|
||||||
|
DELETE FROM wine_attribute;
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
-- inserts for DocumentTests
|
||||||
|
|
||||||
|
INSERT INTO wine_attribute (attrid, name, active, max_kg_per_ha, strict, fill_lower) VALUES
|
||||||
|
('B', 'Bio', TRUE, NULL, FALSE, 0),
|
||||||
|
('K', 'Kabinett', TRUE, NULL, FALSE, 0);
|
||||||
|
|
||||||
|
INSERT INTO season (year, currency, min_kg_per_bs, max_kg_per_bs, penalty_per_kg, penalty_amount, penalty_none, start_date, end_date) VALUES
|
||||||
|
(2020, 'EUR', 1000, 2000, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
INSERT INTO modifier (year, modid, ordering, name, abs, rel, standard, quick_select) VALUES
|
||||||
|
(2020, 'S', 0, 'Geschädigte Trauben', NULL, -0.1, FALSE, FALSE),
|
||||||
|
(2020, 'A', 0, 'Keine Voranmeldung', -1000, NULL, FALSE, FALSE);
|
||||||
|
|
||||||
|
INSERT INTO delivery (mgnr, year, did, date, time, zwstid, lnr) VALUES
|
||||||
|
(101, 2020, 1, '2020-10-01', NULL, 'X', 1),
|
||||||
|
(101, 2020, 2, '2020-10-01', NULL, 'X', 2),
|
||||||
|
(101, 2020, 3, '2020-10-01', NULL, 'X', 3);
|
||||||
|
|
||||||
|
INSERT INTO delivery_part (year, did, dpnr, sortid, attrid, weight, kmw, qualid, hkid, kgnr, gerebelt, manual_weighing, spl_check, scale_id, weighing_id, weighing_reason) VALUES
|
||||||
|
(2020, 1, 1, 'GV', NULL, 4000, 17, 'KAB', 'WLNO', 06109, TRUE, FALSE, FALSE, NULL, NULL, NULL);
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
-- inserts for DatabaseSetup
|
||||||
|
|
||||||
|
INSERT INTO AT_gem (gkz, name) VALUES
|
||||||
|
(30828, 'Hohenruppersdorf'),
|
||||||
|
(31655, 'Wolkersdorf im Weinviertel');
|
||||||
|
|
||||||
|
INSERT INTO AT_kg (kgnr, gkz, name) VALUES
|
||||||
|
(06109, 30828, 'Hohenruppersdorf'),
|
||||||
|
(15209, 31655, 'Münichsthal'),
|
||||||
|
(15211, 31655, 'Obersdorf'),
|
||||||
|
(15212, 31655, 'Pfösing'),
|
||||||
|
(15216, 31655, 'Riedentahl'),
|
||||||
|
(15224, 31655, 'Wolkersdorf');
|
||||||
|
|
||||||
|
INSERT INTO AT_ort (okz, gkz, kgnr, name) VALUES
|
||||||
|
(03524, 30828, 06109, 'Hohenruppersdorf'),
|
||||||
|
(05092, 31655, 15211, 'Obersdorf'),
|
||||||
|
(05135, 31655, 15209, 'Münichsthal'),
|
||||||
|
(05136, 31655, 15212, 'Pfösing'),
|
||||||
|
(05137, 31655, 15216, 'Riedenthal'),
|
||||||
|
(05138, 31655, 15224, 'Wolkersdorf im Weinviertel');
|
||||||
|
|
||||||
|
INSERT INTO AT_plz (plz, ort, blnr, type, internal, addressable, po_box) VALUES
|
||||||
|
(2223, 'Hohenruppersdorf', 3, 'PLZ-Adressierung', FALSE, TRUE, FALSE),
|
||||||
|
(2120, 'Wolkersdorf im Weinviertel', 3, 'PLZ-Adressierung', FALSE, TRUE, TRUE ),
|
||||||
|
(2122, 'Ulrichskirchen', 3, 'PLZ-Adressierung', FALSE, TRUE, FALSE);
|
||||||
|
|
||||||
|
INSERT INTO AT_plz_dest (plz, okz, dest) VALUES
|
||||||
|
(2223, 03524, 'Hohenruppersdorf'),
|
||||||
|
(2120, 05092, 'Obersdorf'),
|
||||||
|
(2120, 05138, 'Wolkersdorf im Weinviertel'),
|
||||||
|
(2122, 05135, 'Münichsthal'),
|
||||||
|
(2122, 05136, 'Pfösing'),
|
||||||
|
(2122, 05137, 'Riedenthal');
|
||||||
|
|
||||||
|
INSERT INTO client_parameter (param, value) VALUES
|
||||||
|
('CLIENT_NAME_TOKEN', 'WGT'),
|
||||||
|
('CLIENT_NAME_SHORT', 'WG Test'),
|
||||||
|
('CLIENT_NAME', 'Winzergenossenschaft Test'),
|
||||||
|
('CLIENT_NAME_SUFFIX', NULL),
|
||||||
|
('CLIENT_NAME_TYPE', 'reg.Gen.m.b.H.'),
|
||||||
|
('CLIENT_PLZ', '2120'),
|
||||||
|
('CLIENT_ORT', 'Wolkersdorf'),
|
||||||
|
('CLIENT_ADDRESS', 'Genossenschaftsstraße 1'),
|
||||||
|
('CLIENT_IBAN', 'AT12 3456 7890 1234 5678'),
|
||||||
|
('TEXT_DELIVERYNOTE', 'Ich bin der Text, der auf einem Traubenübernahmeschein steht!');
|
||||||
|
|
||||||
|
INSERT INTO branch (zwstid, name, country, postal_dest, address) VALUES
|
||||||
|
('X', 'Test', 40, 212005138, 'Genossenschaftsstraße 1');
|
||||||
|
|
||||||
|
INSERT INTO wb_gl (glnr, name) VALUES
|
||||||
|
(1, 'Matzner Hügel'),
|
||||||
|
(2, 'Wolkersdorfer Hochleithen');
|
||||||
|
|
||||||
|
INSERT INTO wb_gem (gkz, hkid) VALUES
|
||||||
|
(30828, 'WLWV'),
|
||||||
|
(31655, 'WLWV');
|
||||||
|
|
||||||
|
INSERT INTO wb_kg (kgnr, glnr) VALUES
|
||||||
|
(06109, 1),
|
||||||
|
(15209, 2),
|
||||||
|
(15211, 2),
|
||||||
|
(15212, 2),
|
||||||
|
(15216, 2),
|
||||||
|
(15224, 2);
|
||||||
|
|
||||||
|
INSERT INTO member (mgnr, given_name, family_name, zwstid, volllieferant, buchführend, country, postal_dest, address, default_kgnr, iban, lfbis_nr) VALUES
|
||||||
|
(101, 'Max', 'Mustermann', 'X', FALSE, FALSE, 40, 222303524, 'Winzerstraße 1', 06109, 'AT123456789012345678', '1472583'),
|
||||||
|
(102, 'Wernhardt', 'Weinbauer', 'X', FALSE, FALSE, 40, 222303524, 'Winzerstraße 2', 06109, 'AT123456789012345678', '4725836'),
|
||||||
|
(103, 'Matthäus', 'Musterbauer', 'X', FALSE, FALSE, 40, 212005138, 'Brünner Straße 10', 15224, 'AT123456789012345678', '7258369'),
|
||||||
|
(104, 'Waltraud', 'Winzer', 'X', FALSE, FALSE, 40, 212005138, 'Wiener Straße 15', 15224, 'AT123456789012345678', '2583691');
|
||||||
|
|
||||||
|
INSERT INTO member_billing_address (mgnr, name, country, postal_dest, address) VALUES
|
||||||
|
(102, 'W&B Weinbauer GesbR', 40, 222303524, 'Winzerstraße 2'),
|
||||||
|
(104, 'Weinbau Waltraud Winzer GmbH', 40, 212205137, 'Hauptstraße 1');
|
||||||
+6
-4
@@ -4,13 +4,14 @@
|
|||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Resources\*.sql" />
|
<EmbeddedResource Include="Resources\Sql\*.sql" />
|
||||||
|
<EmbeddedResource Include="Resources\Schemas\*.xsd" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="FetchResources" BeforeTargets="BeforeBuild">
|
<Target Name="FetchResources" BeforeTargets="BeforeBuild">
|
||||||
@@ -18,10 +19,11 @@
|
|||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||||
|
<PackageReference Include="NReco.PdfRenderer" Version="1.5.3" />
|
||||||
<PackageReference Include="NUnit" Version="4.0.1" />
|
<PackageReference Include="NUnit" Version="4.0.1" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||||
<PackageReference Include="NUnit.Analyzers" Version="3.10.0">
|
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
using System.Net.Sockets;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Tests.WeighingTests {
|
||||||
|
public abstract class MockScale : IDisposable {
|
||||||
|
|
||||||
|
protected readonly TcpListener Server;
|
||||||
|
|
||||||
|
public int IdentNr { get; set; } = 0;
|
||||||
|
public int Weight { get; set; } = 0;
|
||||||
|
public string? Error { get; set; } = null;
|
||||||
|
|
||||||
|
protected MockScale(int port) {
|
||||||
|
Server = new TcpListener(IPAddress.Loopback, port);
|
||||||
|
Server.Start(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose() {
|
||||||
|
Server.Dispose();
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CommandMockScale : MockScale {
|
||||||
|
|
||||||
|
private readonly Func<string, int, string?, int, (string, bool)> Handler;
|
||||||
|
private readonly Thread ServerThread;
|
||||||
|
private bool IsRunning = true;
|
||||||
|
|
||||||
|
public CommandMockScale(int port, Func<string, int, string?, int, (string, bool)> handler) :
|
||||||
|
base(port) {
|
||||||
|
Handler = handler;
|
||||||
|
ServerThread = new Thread(new ParameterizedThreadStart(Serve));
|
||||||
|
ServerThread.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Serve(object? parameters) {
|
||||||
|
byte[] buffer = new byte[16];
|
||||||
|
while (IsRunning) {
|
||||||
|
try {
|
||||||
|
using var client = await Server.AcceptTcpClientAsync();
|
||||||
|
if (client == null) continue;
|
||||||
|
using var stream = client.GetStream();
|
||||||
|
while (true) {
|
||||||
|
int read = await stream.ReadAsync(buffer);
|
||||||
|
var (res, inc) = Handler(Encoding.ASCII.GetString(buffer, 0, read), Weight, Error, IdentNr + 1);
|
||||||
|
if (inc) IdentNr++;
|
||||||
|
await stream.WriteAsync(Encoding.ASCII.GetBytes(res));
|
||||||
|
}
|
||||||
|
} catch (Exception) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public new void Dispose() {
|
||||||
|
IsRunning = false;
|
||||||
|
ServerThread.Interrupt();
|
||||||
|
ServerThread.Join();
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class EventMockScale : MockScale {
|
||||||
|
public EventMockScale(int port, Func<int, string?, int, (string, bool)> handler) :
|
||||||
|
base(port) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Tests.WeighingTests {
|
||||||
|
[TestFixture]
|
||||||
|
public class ScaleTestGrInzersdorf {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
using Elwig.Helpers.Weighing;
|
||||||
|
|
||||||
|
namespace Tests.WeighingTests {
|
||||||
|
[TestFixture]
|
||||||
|
class ScaleTestMatzen {
|
||||||
|
|
||||||
|
private MockScale? Mock;
|
||||||
|
private SysTecITScale? Scale;
|
||||||
|
|
||||||
|
private static (string, bool) ScaleHandler(string req, int weight, string? error, int identNr) {
|
||||||
|
var modes = error?.Split(';') ?? [];
|
||||||
|
var overloaded = modes.Contains("overloaded");
|
||||||
|
var moving = modes.Contains("moving");
|
||||||
|
var invalid = modes.Contains("invalid");
|
||||||
|
var crc = modes.Contains("crc");
|
||||||
|
var unit = modes.Contains("unit");
|
||||||
|
|
||||||
|
if (invalid) {
|
||||||
|
return ("abcd\r\n", false);
|
||||||
|
} else if (!req.StartsWith('<') || !req.EndsWith('>')) {
|
||||||
|
return ("<31>\r\n", false);
|
||||||
|
}
|
||||||
|
req = req[1..^1];
|
||||||
|
|
||||||
|
bool incr;
|
||||||
|
if (req.Length > 3) {
|
||||||
|
return ("<32>\r\n", false);
|
||||||
|
} else if (req.StartsWith("RN")) {
|
||||||
|
incr = true;
|
||||||
|
} else if (req.StartsWith("RM")) {
|
||||||
|
incr = false;
|
||||||
|
} else {
|
||||||
|
return ("<32>\r\n", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overloaded) {
|
||||||
|
return ("<12>\r\n", false);
|
||||||
|
} else if (weight == 0) {
|
||||||
|
incr = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (moving && incr)
|
||||||
|
return ("<13>\r\n", false);
|
||||||
|
|
||||||
|
string data = $"00{(moving ? 1 : 0)}0{new DateTime(2020, 10, 15, 12, 34, 0):dd.MM.yyHH:mm}{(incr ? identNr : 0),4}1" +
|
||||||
|
$"{weight,8}{0,8}{weight,8}{(unit ? "lb" : "kg")} {1,3}";
|
||||||
|
ushort checksum = Elwig.Helpers.Utils.CalcCrc16Modbus(data);
|
||||||
|
if (crc) checksum += 10;
|
||||||
|
return ($"<{data}{checksum,8}>\r\n", incr);
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeSetUp]
|
||||||
|
public void SetupScale() {
|
||||||
|
Mock = new CommandMockScale(12345, ScaleHandler);
|
||||||
|
Scale = new("1", "IT3000A", "tcp://127.0.0.1:12345");
|
||||||
|
}
|
||||||
|
|
||||||
|
[OneTimeTearDown]
|
||||||
|
public void TeardownScale() {
|
||||||
|
Mock?.Dispose();
|
||||||
|
Scale?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void ResetScale() {
|
||||||
|
Mock!.IdentNr = 0;
|
||||||
|
Mock!.Weight = 0;
|
||||||
|
Mock!.Error = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_01_CurrentWeight() {
|
||||||
|
Mock!.Weight = 1234;
|
||||||
|
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 1234, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
Mock!.Weight = 1235;
|
||||||
|
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 1235, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
Mock!.Weight = 1236;
|
||||||
|
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 1236, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task Test_02_Normal() {
|
||||||
|
Mock!.Weight = 1234;
|
||||||
|
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 1234, WeighingId = "1",
|
||||||
|
FullWeighingId = $"2020-10-15/1",
|
||||||
|
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
Mock!.Weight = 3333;
|
||||||
|
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 3333, WeighingId = "2",
|
||||||
|
FullWeighingId = $"2020-10-15/2",
|
||||||
|
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
Mock!.Weight = 4321;
|
||||||
|
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||||
|
Weight = 4321, WeighingId = "3",
|
||||||
|
FullWeighingId = $"2020-10-15/3",
|
||||||
|
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_03_Moving() {
|
||||||
|
Mock!.Weight = 1_000;
|
||||||
|
Mock!.Error = "moving";
|
||||||
|
IOException ex = Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||||
|
Assert.That(ex.Message, Contains.Substring("Waage in Bewegung"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_04_Overloaded() {
|
||||||
|
Mock!.Weight = 10_000;
|
||||||
|
Mock!.Error = "overloaded";
|
||||||
|
IOException ex = Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||||
|
Assert.That(ex.Message, Contains.Substring("Waage in Überlast"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_05_InvalidResponse() {
|
||||||
|
Mock!.Weight = 1_000;
|
||||||
|
Mock!.Error = "invalid";
|
||||||
|
Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_06_InvalidCrc() {
|
||||||
|
Mock!.Weight = 1_000;
|
||||||
|
Mock!.Error = "crc";
|
||||||
|
IOException ex = Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||||
|
Assert.That(ex.Message, Contains.Substring("Invalid CRC16 checksum"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_07_InvalidUnit() {
|
||||||
|
Mock!.Weight = 1_000;
|
||||||
|
Mock!.Error = "unit";
|
||||||
|
IOException ex = Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Tests.WeighingTests {
|
||||||
|
[TestFixture]
|
||||||
|
public class ScaleTestWolkersdorf {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Tests.WeighingTests {
|
||||||
|
public static class Utils {
|
||||||
|
public static DateOnly Today => DateOnly.FromDateTime(DateTime.Now);
|
||||||
|
public static TimeOnly Time => new(DateTime.Now.Hour, DateTime.Now.Minute);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
curl -s -L "https://www.necronda.net/elwig/files/create.sql?v=13" -u "elwig:ganzGeheim123!" -o "Resources\Create.sql"
|
curl -s -L "https://www.necronda.net/elwig/files/create.sql?v=17" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
|
||||||
|
|||||||
Reference in New Issue
Block a user