-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
intf.ZUGFeRDParty.pas
135 lines (116 loc) · 4.16 KB
/
intf.ZUGFeRDParty.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.}
unit intf.ZUGFeRDParty;
interface
uses
intf.ZUGFeRDGlobalID,
intf.ZUGFeRDCountryCodes,
intf.ZUGFeRDLegalOrganization
;
type
/// <summary>
/// Detailed information about a party that has a certain role within an invoice
/// </summary>
TZUGFeRDParty = class
private
FID: TZUGFeRDGlobalID;
FName: string;
FDescription: string;
FContactName: string;
FCity: string;
FPostcode: string;
FCountry: TZUGFeRDCountryCodes;
FStreet: string;
FGlobalID: TZUGFeRDGlobalID;
FAddressLine3: string;
FCountrySubdivisionName: string;
FSpecifiedLegalOrganization: TZUGFeRDLegalOrganization;
public
constructor Create;
destructor Destroy; override;
public
/// <summary>
/// Party identifier
/// </summary>
property ID: TZUGFeRDGlobalID read FID write FID;
/// <summary>
/// The full formal name by which the party is registered in the national
/// registry of legal entities or as a Taxable person or otherwise trades
/// as a person or persons.
/// </summary>
property Name: string read FName write FName;
/// <summary>
/// other legal information of the seller (BT-33) Seller only
/// </summary>
property Description: string read FDescription write FDescription;
/// <summary>
/// Name of the contact at the party
/// </summary>
property ContactName: string read FContactName write FContactName;
/// <summary>
/// City, not including postcode (separate property)
/// </summary>
property City: string read FCity write FCity;
/// <summary>
/// Party postcode, represented in the respective country format
/// </summary>
property Postcode: string read FPostcode write FPostcode;
/// <summary>
/// Party country
/// </summary>
property Country: TZUGFeRDCountryCodes read FCountry write FCountry;
/// <summary>
/// Street name and number
/// </summary>
property Street: string read FStreet write FStreet;
/// <summary>
/// Global identifier
/// </summary>
property GlobalID: TZUGFeRDGlobalID read FGlobalID write FGlobalID;
/// <summary>
/// Address line 3
/// It's an additional line to give more details to the address.
/// This field is purely optional.
/// e.g. used for BT-162, BT-164, BT-165
/// </summary>
property AddressLine3: string read FAddressLine3 write FAddressLine3;
/// <summary>
/// Country subdivision (e.g. Niedersachsen, Bayern)
/// This field is purely optional.
/// e.g. used for BT-39, BT-54, BT-68, BT-79
/// </summary>
property CountrySubdivisionName: string read FCountrySubdivisionName write FCountrySubdivisionName;
/// <summary>
/// Legal organization
/// </summary>
property SpecifiedLegalOrganization: TZUGFeRDLegalOrganization read FSpecifiedLegalOrganization write FSpecifiedLegalOrganization;
end;
implementation
constructor TZUGFeRDParty.Create;
begin
FID := TZUGFeRDGlobalID.Create;
FGlobalID := TZUGFeRDGlobalID.Create;
FSpecifiedLegalOrganization := nil;//TZUGFeRDLegalOrganization.Create;
end;
destructor TZUGFeRDParty.Destroy;
begin
if Assigned(FID) then begin FID.Free; FID := nil; end;
if Assigned(FGlobalID) then begin FGlobalID.Free; FGlobalID := nil; end;
if Assigned(FSpecifiedLegalOrganization) then begin FSpecifiedLegalOrganization.Free; FSpecifiedLegalOrganization := nil; end;
inherited;
end;
end.