Skip to content

Separated writing of specifiedTradeAllowance and specifiedTradeCharge changes the order of SpecifiedTradeAllowanceCharge #829

@PeterSawatzki-MGGM

Description

@PeterSawatzki-MGGM

In InvoiceDescriptor23CIIWriter.cs separated writing of specifiedTradeAllowance and specifiedTradeCharge changes the order of the resulting SpecifiedTradeAllowanceCharge in XML. While this is perfectly valid, it makes comparing with read/written documents difficult, for example comparing/testing "01.01_comprehensive_test_uncefact.xml" is difficult.

this is the code in InvoiceDescriptor23CIIWriter.cs:

                #region SpecifiedTradeAllowanceCharge (Basic, Comfort, Extended, XRechnung)
                //Abschläge auf Ebene der Rechnungsposition (Basic, Comfort, Extended, XRechnung)
                if (descriptor.Profile.In(Profile.Basic, Profile.Comfort, Profile.Extended, Profile.XRechnung1, Profile.XRechnung))
                {
                    foreach (TradeAllowance specifiedTradeAllowance in tradeLineItem.GetSpecifiedTradeAllowances()) // BG-28
                    {
                        _WriteItemLevelSpecifiedTradeAllowanceCharge(_Writer, specifiedTradeAllowance);
                    }

                    foreach (TradeCharge specifiedTradeCharge in tradeLineItem.GetSpecifiedTradeCharges()) // BG-28
                    {
                        _WriteItemLevelSpecifiedTradeAllowanceCharge(_Writer, specifiedTradeCharge);
                    }
                }
                #endregion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions