Skip to content

Commit

Permalink
Merge pull request #393 from Syntaxrabbit/master
Browse files Browse the repository at this point in the history
Satisfy validators for XRechnung and XRechnung1 with charges or allowances
  • Loading branch information
stephanstapel authored Oct 9, 2024
2 parents 5f49780 + 30b4b9e commit cae2ffe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ZUGFeRD/InvoiceDescriptor23CIIWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ public override void Save(InvoiceDescriptor descriptor, Stream stream, ZUGFeRDFo
}
#endregion

#region SpecifiedTradeAllowanceCharge (Basic, Comfort, Extended)
//Abschläge auf Ebene der Rechnungsposition (Basic, Comfort, Extended)
if (new Profile[] { Profile.Basic, Profile.Comfort, Profile.Extended, Profile.XRechnung }.Contains(descriptor.Profile))
#region SpecifiedTradeAllowanceCharge (Basic, Comfort, Extended, XRechnung)
//Abschläge auf Ebene der Rechnungsposition (Basic, Comfort, Extended, XRechnung)
if (new Profile[] { Profile.Basic, Profile.Comfort, Profile.Extended, Profile.XRechnung1, Profile.XRechnung }.Contains(descriptor.Profile))
{
if (tradeLineItem.GetSpecifiedTradeAllowanceCharges().Count > 0)
{
Writer.WriteStartElement("ram:SpecifiedTradeAllowanceCharge", Profile.Basic | Profile.Comfort | Profile.Extended | Profile.XRechnung);
Writer.WriteStartElement("ram:SpecifiedTradeAllowanceCharge", Profile.Basic | Profile.Comfort | Profile.Extended | Profile.XRechnung1 | Profile.XRechnung);

foreach (TradeAllowanceCharge specifiedTradeAllowanceCharge in tradeLineItem.GetSpecifiedTradeAllowanceCharges()) // BT-147
{
Expand Down

0 comments on commit cae2ffe

Please sign in to comment.