Skip to content

Commit 7803c66

Browse files
committed
Item Attributes (BT-160 und BT-161)
1 parent a788e59 commit 7803c66

10 files changed

+265
-8
lines changed

Delphi6/Samples/XRechnungUnit1.dfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
object Form1: TForm1
2-
Left = 195
3-
Top = 176
2+
Left = 18
3+
Top = 153
44
Width = 1630
55
Height = 748
66
Caption = 'XRechnung for Delphi v3.0.x'

Delphi6/Samples/XRechnungUnit2TestCases.pas

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
Copyright (C) 2024 Landrix Software GmbH & Co. KG
33
Sven Harazim, [email protected]
4-
Version 3.0.1
4+
Version 3.0.2
55
66
License
77
This file is not official part of the package XRechnung-for-Delphi.
@@ -484,6 +484,17 @@ class procedure TInvoiceTestCases.Gesamtbeispiel(inv: TInvoice;
484484
BaseQuantity := 0; //Preiseinheit 0 = wird nicht ausgegeben, entspricht default = 1
485485
BaseQuantityUnitCode := iuc_None; //Preiseinheit Mengeneinheit
486486
LineAmount := 100;
487+
488+
with ItemAttributes.AddItemAttribute do
489+
begin
490+
Name := 'Key1';
491+
Value := 'xyz';
492+
end;
493+
with ItemAttributes.AddItemAttribute do
494+
begin
495+
Name := 'Key2';
496+
Value := '123';
497+
end;
487498
end;
488499
with inv.InvoiceLines.AddInvoiceLine do
489500
begin

Delphi6/intfInvoice.pas

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,25 @@ TInvoiceAllowanceCharges = class(TObjectList)
391391

392392
TInvoiceLines = class;
393393

394+
TInvoiceLineItemAttribute = class(TObject)
395+
public
396+
Name : String; //BT-160
397+
Value : String; //BT-161
398+
end;
399+
400+
TInvoiceLineItemAttributes = class(TObjectList)
401+
protected
402+
function GetItem(Index: Integer): TInvoiceLineItemAttribute;
403+
procedure SetItem(Index: Integer; AItem: TInvoiceLineItemAttribute);
404+
public
405+
function Extract(Item: TObject): TInvoiceLineItemAttribute;
406+
function First: TInvoiceLineItemAttribute;
407+
function Last: TInvoiceLineItemAttribute;
408+
property Items[Index: Integer]: TInvoiceLineItemAttribute read GetItem write SetItem; default;
409+
public
410+
function AddItemAttribute : TInvoiceLineItemAttribute;
411+
end;
412+
394413
TInvoiceLine = class(TObject)
395414
public
396415
ID : String; //Positionsnummer
@@ -411,6 +430,7 @@ TInvoiceLine = class(TObject)
411430
LineAmount : Currency;
412431
AllowanceCharges : TInvoiceAllowanceCharges;
413432
SubInvoiceLines : TInvoiceLines;
433+
ItemAttributes : TInvoiceLineItemAttributes;
414434
public
415435
constructor Create;
416436
destructor Destroy; override;
@@ -598,6 +618,7 @@ TInvoice = class(TObject)
598618
AllowanceTotalAmount : Currency;
599619
ChargeTotalAmount : Currency;
600620
PrepaidAmount : Currency;
621+
PayableRoundingAmount : Currency; //BT-114
601622
PayableAmount : Currency;
602623
public
603624
constructor Create;
@@ -647,6 +668,15 @@ procedure TInvoice.Clear;
647668
Notes.Clear;
648669
TaxAmountSubtotals.Clear;
649670
PaymentTermsType := iptt_None;
671+
672+
LineAmount := 0;
673+
TaxExclusiveAmount := 0;
674+
TaxInclusiveAmount := 0;
675+
AllowanceTotalAmount := 0;
676+
ChargeTotalAmount := 0;
677+
PrepaidAmount := 0;
678+
PayableRoundingAmount := 0;
679+
PayableAmount := 0;
650680
end;
651681

652682
{ TInvoiceLines }
@@ -781,12 +811,14 @@ constructor TInvoiceLine.Create;
781811
begin
782812
AllowanceCharges := TInvoiceAllowanceCharges.Create;
783813
SubInvoiceLines := TInvoiceLines.Create;
814+
ItemAttributes := TInvoiceLineItemAttributes.Create;
784815
end;
785816

786817
destructor TInvoiceLine.Destroy;
787818
begin
788819
if Assigned(AllowanceCharges) then begin AllowanceCharges.Free; AllowanceCharges := nil; end;
789820
if Assigned(SubInvoiceLines) then begin SubInvoiceLines.Free; SubInvoiceLines := nil; end;
821+
if Assigned(ItemAttributes) then begin ItemAttributes.Free; ItemAttributes := nil; end;
790822
inherited;
791823
end;
792824

@@ -1136,5 +1168,28 @@ destructor TInvoiceDeliveryInformation.Destroy;
11361168
inherited;
11371169
end;
11381170

1171+
{ TInvoiceLineItemAttributes }
1172+
1173+
function TInvoiceLineItemAttributes.AddItemAttribute: TInvoiceLineItemAttribute;
1174+
begin
1175+
Result := TInvoiceLineItemAttribute.Create;
1176+
Add(Result);
1177+
end;
1178+
1179+
function TInvoiceLineItemAttributes.Extract(Item: TObject): TInvoiceLineItemAttribute;
1180+
begin Result := TInvoiceLineItemAttribute(inherited Extract(Item)); end;
1181+
1182+
function TInvoiceLineItemAttributes.First: TInvoiceLineItemAttribute;
1183+
begin if Count = 0 then Result := nil else Result := TInvoiceLineItemAttribute(inherited First); end;
1184+
1185+
function TInvoiceLineItemAttributes.GetItem(Index: Integer): TInvoiceLineItemAttribute;
1186+
begin Result := TInvoiceLineItemAttribute(inherited Items[Index]); end;
1187+
1188+
function TInvoiceLineItemAttributes.Last: TInvoiceLineItemAttribute;
1189+
begin if Count = 0 then Result := nil else Result := TInvoiceLineItemAttribute(inherited Last); end;
1190+
1191+
procedure TInvoiceLineItemAttributes.SetItem(Index: Integer; AItem: TInvoiceLineItemAttribute);
1192+
begin inherited Items[Index] := AItem; end;
1193+
11391194
end.
11401195

Delphi6/intfXRechnung_2_3.pas

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class function TXRechnungInvoiceAdapter230.LoadDocumentUBL(_Invoice: TInvoice;
107107
_Invoiceline.GlobalID_EAN_GTIN := node2.text;
108108
_Invoiceline.TaxCategory := TXRechnungHelper.InvoiceDutyTaxFeeCategoryCodeFromStr(TXRechnungXMLHelper.SelectNodeText(node,'.//cac:ClassifiedTaxCategory/cbc:ID'));
109109
_Invoiceline.TaxPercent := TXRechnungHelper.PercentageFromStr(TXRechnungXMLHelper.SelectNodeText(node,'.//cac:ClassifiedTaxCategory/cbc:Percent'));
110+
if TXRechnungXMLHelper.SelectNodes(node,'.//cac:AdditionalItemProperty',nodes) then
111+
for i := 0 to nodes.length-1 do
112+
with _Invoiceline.ItemAttributes.AddItemAttribute do
113+
begin
114+
Name := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//cbc:Name');
115+
Value := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//cbc:Value');
116+
end;
110117
//VAT := TXRechnungXMLHelper.SelectNodeText(node,'.//cac:TaxScheme/cbc:ID');
111118
end;
112119
_Invoiceline.NetPriceAmount := TXRechnungHelper.UnitPriceAmountFromStr(TXRechnungXMLHelper.SelectNodeText(_Node,'.//cac:Price/cbc:PriceAmount'));
@@ -327,6 +334,7 @@ class function TXRechnungInvoiceAdapter230.LoadDocumentUBL(_Invoice: TInvoice;
327334
_Invoice.AllowanceTotalAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount'));
328335
_Invoice.ChargeTotalAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:ChargeTotalAmount'));
329336
_Invoice.PrepaidAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PrepaidAmount'));
337+
_Invoice.PayableRoundingAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PayableRoundingAmount'));
330338
_Invoice.PayableAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PayableAmount'));
331339

332340
if TXRechnungXMLHelper.SelectNodes(xml,'.//cac:InvoiceLine',nodes) then
@@ -371,6 +379,13 @@ class function TXRechnungInvoiceAdapter230.LoadDocumentUNCEFACT(_Invoice: TInvoi
371379
_Invoiceline.SellersItemIdentification := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:SellerAssignedID');
372380
_Invoiceline.Name := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:Name');
373381
_Invoiceline.Description := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:Description');
382+
if TXRechnungXMLHelper.SelectNodes(node2,'.//ram:ApplicableProductCharacteristic',nodes) then
383+
for i := 0 to nodes.length-1 do
384+
with _Invoiceline.ItemAttributes.AddItemAttribute do
385+
begin
386+
Name := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//ram:Description');
387+
Value := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//ram:Value');
388+
end;
374389
end;
375390
if TXRechnungXMLHelper.SelectNode(_Node,'.//ram:SpecifiedLineTradeAgreement',node2) then
376391
begin
@@ -791,6 +806,7 @@ class function TXRechnungInvoiceAdapter230.LoadDocumentUNCEFACT(_Invoice: TInvoi
791806
_Invoice.TaxCurrencyCode := TXRechnungXMLHelper.SelectAttributeText(node,'currencyID');
792807
_Invoice.TaxAmountTotal := TXRechnungHelper.AmountFromStr(node.text);
793808
end;
809+
_Invoice.PayableRoundingAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:RoundingAmount'));
794810
_Invoice.TaxInclusiveAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:GrandTotalAmount'));
795811
_Invoice.PrepaidAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:TotalPrepaidAmount'));
796812
_Invoice.PayableAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:DuePayableAmount'));
@@ -896,6 +912,12 @@ class procedure TXRechnungInvoiceAdapter230.SaveDocumentUBL(_Invoice: TInvoice;
896912
AddChild('cbc:Percent').Text := TXRechnungHelper.PercentageToStr(_Invoiceline.TaxPercent);
897913
AddChild('cac:TaxScheme').AddChild('cbc:ID').Text := 'VAT';
898914
end;
915+
for i := 0 to _Invoiceline.ItemAttributes.Count-1 do
916+
with AddChild('cac:AdditionalItemProperty') do
917+
begin
918+
AddChild('cbc:Name').Text := _Invoiceline.ItemAttributes[i].Name;
919+
AddChild('cbc:Value').Text := _Invoiceline.ItemAttributes[i].Value;
920+
end;
899921
end;
900922
with _Node.AddChild('cac:Price') do
901923
begin
@@ -1335,7 +1357,12 @@ class procedure TXRechnungInvoiceAdapter230.SaveDocumentUBL(_Invoice: TInvoice;
13351357
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
13361358
Text := TXRechnungHelper.AmountToStr(_Invoice.PrepaidAmount);
13371359
end;
1338-
// <cbc:PayableRoundingAmount currencyID="EUR">0</cbc:PayableRoundingAmount>
1360+
if _Invoice.PayableRoundingAmount <> 0.0 then
1361+
with AddChild('cbc:PayableRoundingAmount') do
1362+
begin
1363+
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
1364+
Text := TXRechnungHelper.AmountToStr(_Invoice.PayableRoundingAmount);
1365+
end;
13391366
with AddChild('cbc:PayableAmount') do
13401367
begin
13411368
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
@@ -1378,6 +1405,14 @@ class procedure TXRechnungInvoiceAdapter230.SaveDocumentUNCEFACT(
13781405
AddChild('ram:Name').Text := _Invoiceline.Name;
13791406
if not (_Invoiceline.Description = '') then
13801407
AddChild('ram:Description').Text := _Invoiceline.Description;
1408+
for i := 0 to _Invoiceline.ItemAttributes.Count-1 do
1409+
with AddChild('ram:ApplicableProductCharacteristic') do
1410+
begin
1411+
if _Invoiceline.ItemAttributes[i].Name <> '' then
1412+
AddChild('ram:Description').Text := _Invoiceline.ItemAttributes[i].Name;
1413+
if _Invoiceline.ItemAttributes[i].Value <> '' then
1414+
AddChild('ram:Value').Text := _Invoiceline.ItemAttributes[i].Value;
1415+
end;
13811416
end;
13821417
with _Node.AddChild('ram:SpecifiedLineTradeAgreement') do
13831418
begin
@@ -1804,7 +1839,8 @@ class procedure TXRechnungInvoiceAdapter230.SaveDocumentUNCEFACT(
18041839
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
18051840
Text := TXRechnungHelper.AmountToStr(_Invoice.TaxAmountTotal);
18061841
end;
1807-
// <ram:RoundingAmount>0</ram:RoundingAmount>
1842+
if _Invoice.PayableRoundingAmount <> 0.0 then
1843+
AddChild('ram:RoundingAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PayableRoundingAmount);
18081844
AddChild('ram:GrandTotalAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.TaxInclusiveAmount);
18091845
AddChild('ram:TotalPrepaidAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PrepaidAmount);
18101846
AddChild('ram:DuePayableAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PayableAmount);

Delphi6/intfXRechnung_3_0.pas

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class function TXRechnungInvoiceAdapter301.LoadDocumentUBL(_Invoice: TInvoice;
107107
_Invoiceline.GlobalID_EAN_GTIN := node2.text;
108108
_Invoiceline.TaxCategory := TXRechnungHelper.InvoiceDutyTaxFeeCategoryCodeFromStr(TXRechnungXMLHelper.SelectNodeText(node,'.//cac:ClassifiedTaxCategory/cbc:ID'));
109109
_Invoiceline.TaxPercent := TXRechnungHelper.PercentageFromStr(TXRechnungXMLHelper.SelectNodeText(node,'.//cac:ClassifiedTaxCategory/cbc:Percent'));
110+
if TXRechnungXMLHelper.SelectNodes(node,'.//cac:AdditionalItemProperty',nodes) then
111+
for i := 0 to nodes.length-1 do
112+
with _Invoiceline.ItemAttributes.AddItemAttribute do
113+
begin
114+
Name := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//cbc:Name');
115+
Value := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//cbc:Value');
116+
end;
110117
//VAT := TXRechnungXMLHelper.SelectNodeText(node,'.//cac:TaxScheme/cbc:ID');
111118
end;
112119
_Invoiceline.NetPriceAmount := TXRechnungHelper.UnitPriceAmountFromStr(TXRechnungXMLHelper.SelectNodeText(_Node,'.//cac:Price/cbc:PriceAmount'));
@@ -327,6 +334,7 @@ class function TXRechnungInvoiceAdapter301.LoadDocumentUBL(_Invoice: TInvoice;
327334
_Invoice.AllowanceTotalAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount'));
328335
_Invoice.ChargeTotalAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:ChargeTotalAmount'));
329336
_Invoice.PrepaidAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PrepaidAmount'));
337+
_Invoice.PayableRoundingAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PayableRoundingAmount'));
330338
_Invoice.PayableAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(xml,'//cac:LegalMonetaryTotal/cbc:PayableAmount'));
331339

332340
if TXRechnungXMLHelper.SelectNodes(xml,'.//cac:InvoiceLine',nodes) then
@@ -371,6 +379,13 @@ class function TXRechnungInvoiceAdapter301.LoadDocumentUNCEFACT(_Invoice: TInvoi
371379
_Invoiceline.SellersItemIdentification := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:SellerAssignedID');
372380
_Invoiceline.Name := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:Name');
373381
_Invoiceline.Description := TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:Description');
382+
if TXRechnungXMLHelper.SelectNodes(node2,'.//ram:ApplicableProductCharacteristic',nodes) then
383+
for i := 0 to nodes.length-1 do
384+
with _Invoiceline.ItemAttributes.AddItemAttribute do
385+
begin
386+
Name := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//ram:Description');
387+
Value := TXRechnungXMLHelper.SelectNodeText(nodes[i],'.//ram:Value');
388+
end;
374389
end;
375390
if TXRechnungXMLHelper.SelectNode(_Node,'.//ram:SpecifiedLineTradeAgreement',node2) then
376391
begin
@@ -791,6 +806,7 @@ class function TXRechnungInvoiceAdapter301.LoadDocumentUNCEFACT(_Invoice: TInvoi
791806
_Invoice.TaxCurrencyCode := TXRechnungXMLHelper.SelectAttributeText(node,'currencyID');
792807
_Invoice.TaxAmountTotal := TXRechnungHelper.AmountFromStr(node.text);
793808
end;
809+
_Invoice.PayableRoundingAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:RoundingAmount'));
794810
_Invoice.TaxInclusiveAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:GrandTotalAmount'));
795811
_Invoice.PrepaidAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:TotalPrepaidAmount'));
796812
_Invoice.PayableAmount := TXRechnungHelper.AmountFromStr(TXRechnungXMLHelper.SelectNodeText(node2,'.//ram:DuePayableAmount'));
@@ -896,6 +912,12 @@ class procedure TXRechnungInvoiceAdapter301.SaveDocumentUBL(_Invoice: TInvoice;
896912
AddChild('cbc:Percent').Text := TXRechnungHelper.PercentageToStr(_Invoiceline.TaxPercent);
897913
AddChild('cac:TaxScheme').AddChild('cbc:ID').Text := 'VAT';
898914
end;
915+
for i := 0 to _Invoiceline.ItemAttributes.Count-1 do
916+
with AddChild('cac:AdditionalItemProperty') do
917+
begin
918+
AddChild('cbc:Name').Text := _Invoiceline.ItemAttributes[i].Name;
919+
AddChild('cbc:Value').Text := _Invoiceline.ItemAttributes[i].Value;
920+
end;
899921
end;
900922
with _Node.AddChild('cac:Price') do
901923
begin
@@ -1336,7 +1358,12 @@ class procedure TXRechnungInvoiceAdapter301.SaveDocumentUBL(_Invoice: TInvoice;
13361358
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
13371359
Text := TXRechnungHelper.AmountToStr(_Invoice.PrepaidAmount);
13381360
end;
1339-
// <cbc:PayableRoundingAmount currencyID="EUR">0</cbc:PayableRoundingAmount>
1361+
if _Invoice.PayableRoundingAmount <> 0.0 then
1362+
with AddChild('cbc:PayableRoundingAmount') do
1363+
begin
1364+
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
1365+
Text := TXRechnungHelper.AmountToStr(_Invoice.PayableRoundingAmount);
1366+
end;
13401367
with AddChild('cbc:PayableAmount') do
13411368
begin
13421369
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
@@ -1379,6 +1406,14 @@ class procedure TXRechnungInvoiceAdapter301.SaveDocumentUNCEFACT(
13791406
AddChild('ram:Name').Text := _Invoiceline.Name;
13801407
if not (_Invoiceline.Description = '') then
13811408
AddChild('ram:Description').Text := _Invoiceline.Description;
1409+
for i := 0 to _Invoiceline.ItemAttributes.Count-1 do
1410+
with AddChild('ram:ApplicableProductCharacteristic') do
1411+
begin
1412+
if _Invoiceline.ItemAttributes[i].Name <> '' then
1413+
AddChild('ram:Description').Text := _Invoiceline.ItemAttributes[i].Name;
1414+
if _Invoiceline.ItemAttributes[i].Value <> '' then
1415+
AddChild('ram:Value').Text := _Invoiceline.ItemAttributes[i].Value;
1416+
end;
13821417
end;
13831418
with _Node.AddChild('ram:SpecifiedLineTradeAgreement') do
13841419
begin
@@ -1810,7 +1845,8 @@ class procedure TXRechnungInvoiceAdapter301.SaveDocumentUNCEFACT(
18101845
Attributes['currencyID'] := _Invoice.TaxCurrencyCode;
18111846
Text := TXRechnungHelper.AmountToStr(_Invoice.TaxAmountTotal);
18121847
end;
1813-
// <ram:RoundingAmount>0</ram:RoundingAmount>
1848+
if _Invoice.PayableRoundingAmount <> 0.0 then
1849+
AddChild('ram:RoundingAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PayableRoundingAmount);
18141850
AddChild('ram:GrandTotalAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.TaxInclusiveAmount);
18151851
AddChild('ram:TotalPrepaidAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PrepaidAmount);
18161852
AddChild('ram:DuePayableAmount').Text := TXRechnungHelper.AmountToStr(_Invoice.PayableAmount);

Samples/XRechnungUnit2TestCases.pas

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,17 @@ class procedure TInvoiceTestCases.Gesamtbeispiel(inv: TInvoice;
485485
BaseQuantity := 0; //Preiseinheit 0 = wird nicht ausgegeben, entspricht default = 1
486486
BaseQuantityUnitCode := TInvoiceUnitCode.iuc_None; //Preiseinheit Mengeneinheit
487487
LineAmount := 100;
488+
489+
with ItemAttributes.AddItemAttribute do
490+
begin
491+
Name := 'Key1';
492+
Value := 'xyz';
493+
end;
494+
with ItemAttributes.AddItemAttribute do
495+
begin
496+
Name := 'Key2';
497+
Value := '123';
498+
end;
488499
end;
489500
with inv.InvoiceLines.AddInvoiceLine do
490501
begin

0 commit comments

Comments
 (0)