Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasisAmount and Reason valid for *Specified*TradeAllowanceCharge (not… #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions intf.ZUGFeRDInvoiceDescriptor23CIIWriter.pas
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ procedure TZUGFeRDInvoiceDescriptor23CIIWriter.Save(
//#region BasisAmount
if (specifiedTradeAllowanceCharge.BasisAmount <> 0.0) then
begin
Writer.WriteStartElement('ram:BasisAmount', [TZUGFeRDProfile.Extended]); // not in XRechnung, according to CII-SR-123
// according to CII-SR-123 not in XRechnung for *Applied*TradeAllowanceCharge but valid for *Specified*TradeAllowanceCharge!
Writer.WriteStartElement('ram:BasisAmount', [TZUGFeRDProfile.Basic,TZUGFeRDProfile.Comfort, TZUGFeRDProfile.Extended, TZUGFeRDProfile.XRechnung]);
Writer.WriteValue(_formatDecimal(specifiedTradeAllowanceCharge.BasisAmount, 2));
Writer.WriteEndElement();
end;
Expand All @@ -565,10 +566,8 @@ procedure TZUGFeRDInvoiceDescriptor23CIIWriter.Save(
specifiedTradeAllowanceCharge.ReasonCodeAllowance));
end;

//c# means not in XRechnung according to CII-SR-128
// Reason is not rejected from the validator, so it is included here for XRechnung
//TODO Theoretisch auch Basic, Comfort
Writer.WriteOptionalElementString('ram:Reason', specifiedTradeAllowanceCharge.Reason, [TZUGFeRDProfile.Extended, TZUGFeRDProfile.XRechnung]);
// according to CII-SR-123 not in XRechnung for *Applied*TradeAllowanceCharge but valid for *Specified*TradeAllowanceCharge!
Writer.WriteOptionalElementString('ram:Reason', specifiedTradeAllowanceCharge.Reason, [TZUGFeRDProfile.Basic, TZUGFeRDProfile.Comfort, TZUGFeRDProfile.Extended, TZUGFeRDProfile.XRechnung]);

Writer.WriteEndElement(); // !ram:SpecifiedTradeAllowanceCharge
end;
Expand Down