@@ -75,6 +75,20 @@ TZUGFeRDInvoiceDescriptor20Writer = class(TZUGFeRDInvoiceDescriptorWriter)
75
75
procedure _writeElementWithAttribute (_writer: TZUGFeRDProfileAwareXmlTextWriter; tagName, attributeName,attributeValue, nodeValue: String);
76
76
function _translateInvoiceType (type_ : TZUGFeRDInvoiceType) : String;
77
77
function _encodeInvoiceType (type_ : TZUGFeRDInvoiceType) : Integer;
78
+ private const
79
+ ALL_PROFILES = [TZUGFeRDProfile.Minimum,
80
+ TZUGFeRDProfile.BasicWL,
81
+ TZUGFeRDProfile.Basic,
82
+ TZUGFeRDProfile.Comfort,
83
+ TZUGFeRDProfile.Extended,
84
+ TZUGFeRDProfile.XRechnung1,
85
+ TZUGFeRDProfile.XRechnung,
86
+ TZUGFeRDProfile.EReporting];
87
+ PROFILE_COMFORT_EXTENDED_XRECHNUNG =
88
+ [TZUGFeRDProfile.Comfort,
89
+ TZUGFeRDProfile.Extended,
90
+ TZUGFeRDProfile.XRechnung1,
91
+ TZUGFeRDProfile.XRechnung];
78
92
public
79
93
function Validate (_descriptor: TZUGFeRDInvoiceDescriptor; _throwExceptions: Boolean = True): Boolean; override;
80
94
// / <summary>
@@ -469,6 +483,11 @@ procedure TZUGFeRDInvoiceDescriptor20Writer.Save(
469
483
_writeOptionalParty(Writer, ' ram:SellerTradeParty' , Descriptor.Seller, Descriptor.SellerContact, Descriptor.SellerTaxRegistration);
470
484
_writeOptionalParty(Writer, ' ram:BuyerTradeParty' , Descriptor.Buyer, Descriptor.BuyerContact, Descriptor.BuyerTaxRegistration);
471
485
486
+ // #region SellerTaxRepresentativeTradeParty
487
+ // BT-63: the tax registration of the SellerTaxRepresentativeTradeParty
488
+ _writeOptionalParty(Writer, ' ram:SellerTaxRepresentativeTradeParty' , Descriptor.SellerTaxRepresentative, Nil , Descriptor.SellerTaxRepresentativeTaxRegistration);
489
+ // #endregion
490
+
472
491
// #region SellerOrderReferencedDocument (BT-14: Comfort, Extended)
473
492
if (Descriptor.SellerOrderReferencedDocument <> nil ) then
474
493
if (Descriptor.SellerOrderReferencedDocument.ID <> ' ' ) then
@@ -1058,7 +1077,9 @@ procedure TZUGFeRDInvoiceDescriptor20Writer._writeNotes(
1058
1077
1059
1078
procedure TZUGFeRDInvoiceDescriptor20Writer._writeOptionalParty (
1060
1079
_writer: TZUGFeRDProfileAwareXmlTextWriter;
1061
- PartyTag : String; Party : TZUGFeRDParty; Contact : TZUGFeRDContact = nil ;
1080
+ PartyTag : String;
1081
+ Party : TZUGFeRDParty;
1082
+ Contact : TZUGFeRDContact = nil ;
1062
1083
TaxRegistrations : TObjectList<TZUGFeRDTaxRegistration> = nil );
1063
1084
begin
1064
1085
if Party = nil then
@@ -1091,7 +1112,7 @@ procedure TZUGFeRDInvoiceDescriptor20Writer._writeOptionalParty(
1091
1112
end ;
1092
1113
1093
1114
_Writer.WriteOptionalElementString(' ram:Name' , Party.Name );
1094
- _Writer.WriteOptionalElementString(' ram:Description' , Party.Description, [TZUGFeRDProfile.Comfort,TZUGFeRDProfile.Extended,TZUGFeRDProfile.XRechnung1, TZUGFeRDProfile.XRechnung] );
1115
+ _Writer.WriteOptionalElementString(' ram:Description' , Party.Description, PROFILE_COMFORT_EXTENDED_XRECHNUNG );
1095
1116
_writeOptionalContact(_writer, ' ram:DefinedTradeContact' , Contact);
1096
1117
_writer.WriteStartElement(' ram:PostalTradeAddress' );
1097
1118
_writer.WriteOptionalElementString(' ram:PostcodeCode' , Party.Postcode);
0 commit comments