/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 31, Configuration.FieldSeparator), Id, ProviderInvoiceNumber?.ToDelimitedString(), PayerInvoiceNumber?.ToDelimitedString(), ContractAgreementNumber?.ToDelimitedString(), InvoiceControl?.ToDelimitedString(), InvoiceReason?.ToDelimitedString(), InvoiceType?.ToDelimitedString(), InvoiceDateTime.HasValue ? InvoiceDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, InvoiceAmount?.ToDelimitedString(), PaymentTerms, ProviderOrganization?.ToDelimitedString(), PayerOrganization?.ToDelimitedString(), Attention?.ToDelimitedString(), LastInvoiceIndicator, InvoiceBookingPeriod.HasValue ? InvoiceBookingPeriod.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, Origin, InvoiceFixedAmount?.ToDelimitedString(), SpecialCosts?.ToDelimitedString(), AmountForDoctorsTreatment?.ToDelimitedString(), ResponsiblePhysician?.ToDelimitedString(), CostCenter?.ToDelimitedString(), InvoicePrepaidAmount?.ToDelimitedString(), TotalInvoiceAmountWithoutPrepaidAmount?.ToDelimitedString(), TotalAmountOfVat?.ToDelimitedString(), VatRatesApplied != null ? string.Join(Configuration.FieldRepeatSeparator, VatRatesApplied.Select(x => x.ToString(Consts.NumericFormat, culture))) : null, BenefitGroup?.ToDelimitedString(), ProviderTaxId, PayerTaxId, ProviderTaxStatus?.ToDelimitedString(), PayerTaxStatus?.ToDelimitedString(), SalesTaxId ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }