Skip to content

Commit f50c34b

Browse files
sync ZUGFeRDInvoiceDecriptor23CIIWriter with C# library, add intf.ZUGFeRDIncludedReferencedProduct
1 parent c7e517a commit f50c34b

7 files changed

+376
-290
lines changed

intf.ZUGFeRDAdditionalReferencedDocument.pas

+14
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ TZUGFeRDAdditionalReferencedDocument = class(TZUGFeRDBaseReferencedDocument)
3737
private
3838
FReferenceTypeCode: TZUGFeRDReferenceTypeCodes;
3939
FName: string;
40+
FLineID: string;
41+
FURIID: string;
4042
FAttachmentBinaryObject: TMemoryStream;
4143
FFilename: string;
4244
FTypeCode: TZUGFeRDAdditionalReferencedDocumentTypeCode;
@@ -45,6 +47,18 @@ TZUGFeRDAdditionalReferencedDocument = class(TZUGFeRDBaseReferencedDocument)
4547
constructor Create(CreateAttachmentBinaryObject : Boolean);
4648
destructor Destroy; override;
4749
public
50+
/// <summary>
51+
/// External document location
52+
/// BT-124, BT-X-28
53+
/// </summary>
54+
property URIID: string read FURIID write FURIID;
55+
56+
/// <summary>
57+
/// Referenced position
58+
/// BT-X-29
59+
/// </summary>
60+
property LineID: string read FLineID write FLineID;
61+
4862
/// <summary>
4963
/// Reference documents are strongly typed, specify ReferenceTypeCode to allow easy processing by invoicee
5064
/// </summary>

intf.ZUGFeRDAssociatedDocument.pas

+14
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ TZUGFeRDAssociatedDocument = class
3232
FLineID: string;
3333
FLineStatusCode: string;
3434
FLineStatusReasonCode: string;
35+
FParentLineID: string;
3536
public
3637
constructor Create(lineID: string);
3738
destructor Destroy; override;
@@ -46,6 +47,19 @@ TZUGFeRDAssociatedDocument = class
4647
/// </summary>
4748
property LineID: string read FLineID write FLineID;
4849

50+
/// <summary>
51+
/// Refers to the superior line in a hierarchical structure.
52+
/// This property is used to map a hierarchy tree of invoice items, allowing child items to reference their parent line.
53+
/// BT-X-304
54+
///
55+
/// Example usage:
56+
/// <code>
57+
/// var tradeLineItem:= TZUGFeRDTradeLineItem.Create;
58+
/// tradeLineItem.SetParentLineId('1');
59+
/// </code>
60+
/// </summary>
61+
property ParentLineID: string read FParentLineID write FParentLineID;
62+
4963
//Typ der Rechnungsposition (Code)
5064
//qdt:LineStatusCodeType
5165
//Zeigt an, ob die Rechnungsposition Preise beinhaltet, die bei der
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{* Licensed to the Apache Software Foundation (ASF) under one
2+
* or more contributor license agreements. See the NOTICE file
3+
* distributed with this work for additional information
4+
* regarding copyright ownership. The ASF licenses this file
5+
* to you under the Apache License, Version 2.0 (the
6+
* "License"); you may not use this file except in compliance
7+
* with the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
* KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations
16+
* under the License.}
17+
18+
unit intf.ZUGFeRDIncludedReferencedProduct;
19+
20+
interface
21+
22+
uses
23+
System.Generics.Collections,
24+
intf.ZUGFeRDHelper,
25+
intf.ZUGFeRDQuantityCodes;
26+
27+
type
28+
/// <summary>
29+
/// An included Item referenced from this trade product.
30+
/// </summary>
31+
TZUGFeRDIncludedReferencedProduct = class
32+
private
33+
FName: string;
34+
FUnitQuantity: ZUGFeRDNullable<Double>;
35+
FUnitCode: TZUGFeRDQuantityCodes;
36+
public
37+
/// <summary>
38+
/// Name of Included Item
39+
///
40+
/// BT-X-18
41+
/// </summary>
42+
property Name: string read FName write FName;
43+
44+
/// <summary>
45+
/// Included quantity
46+
///
47+
/// BT-X-20
48+
/// </summary>
49+
property UnitQuantity: ZUGFeRDNullable<Double> read FUnitQuantity write FUnitQuantity;
50+
51+
/// <summary>
52+
/// Item Base Quantity Unit Code
53+
///
54+
/// BT-X-20-1
55+
/// </summary>
56+
property UnitCode: TZUGFeRDQuantityCodes read FUnitCode write FUnitCode;
57+
58+
end;
59+
60+
implementation
61+
62+
end.

intf.ZUGFeRDInvoiceDescriptor.pas

+8
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ TZUGFeRDInvoiceDescriptor = class
9797
FSellerElectronicAddress: TZUGFeRDElectronicAddress;
9898
FInvoicee: TZUGFeRDParty;
9999
FShipTo: TZUGFeRDParty;
100+
FUltimateShipTo: TZUGFeRDParty;
100101
FPayee: TZUGFeRDParty;
101102
FShipFrom: TZUGFeRDParty;
102103
FNotes: TObjectList<TZUGFeRDNote>;
@@ -259,6 +260,11 @@ TZUGFeRDInvoiceDescriptor = class
259260
/// </summary>
260261
property ShipTo: TZUGFeRDParty read FShipTo write FShipTo;
261262

263+
/// <summary>
264+
/// This party is optional and only relevant for Extended profile
265+
/// </summary>
266+
property UltimateShipTo: TZUGFeRDParty read FUltimateShipTo write FUltimateShipTo;
267+
262268
/// <summary>
263269
/// This party is optional and only relevant for Extended profile
264270
/// </summary>
@@ -867,6 +873,7 @@ constructor TZUGFeRDInvoiceDescriptor.Create;
867873
FInvoicee := nil;//TZUGFeRDParty.Create;
868874
FInvoicer := nil;//TZUGFeRDParty.Create;
869875
FShipTo := nil;//TZUGFeRDParty.Create;
876+
FUltimateShipTo := nil;//TZUGFeRDParty.Create;
870877
FPayee := nil;//TZUGFeRDParty.Create;
871878
FShipFrom := nil;//TZUGFeRDParty.Create;
872879
FNotes := TObjectList<TZUGFeRDNote>.Create;
@@ -903,6 +910,7 @@ destructor TZUGFeRDInvoiceDescriptor.Destroy;
903910
if Assigned(FInvoicee ) then begin FInvoicee.Free; FInvoicee := nil; end;
904911
if Assigned(FInvoicer ) then begin FInvoicer.Free; FInvoicer := nil; end;
905912
if Assigned(FShipTo ) then begin FShipTo.Free; FShipTo := nil; end;
913+
if Assigned(FUltimateShipTo ) then begin FUltimateShipTo.Free; FUltimateShipTo := nil; end;
906914
if Assigned(FPayee ) then begin FPayee.Free; FPayee := nil; end;
907915
if Assigned(FShipFrom ) then begin FShipFrom.Free; FShipFrom := nil; end;
908916
if Assigned(FNotes ) then begin FNotes.Free; FNotes := nil; end;

0 commit comments

Comments
 (0)