public RetailSalesReceipt( InvoiceHeader header, LocalInvoiceParty issuer, ISequentialEnumerableStartingWithOne <NonNegativeRevenue> revenueItems, INonEmptyEnumerable <NonNegativePayment> payments) : base(header, issuer, revenueItems, payments) { }
public SimplifiedInvoice( InvoiceHeader header, LocalInvoiceParty issuer, ISequentialEnumerableStartingWithOne <NonNegativeRevenue> revenueItems, INonEmptyEnumerable <NonNegativePayment> payments) : base(header, issuer, revenueItems, payments) { if (header.CurrencyCode.IsNull() || header.CurrencyCode.Value == "EUR") { Check.Condition(revenueItems.Sum(i => i.Value.NetValue.Value + i.Value.VatValue.Value) <= 100, "Simplified Invoice can only be below 100 EUR."); } }
public SalesInvoice( InvoiceHeader header, LocalInvoiceParty issuer, ISequentialEnumerableStartingWithOne <NonNegativeRevenue> revenueItems, InvoiceParty counterpart, INonEmptyEnumerable <NonNegativePayment> payments) : base(header, issuer, revenueItems, payments, counterpart) { if (counterpart == null) { throw new ArgumentNullException(nameof(counterpart)); } }
public Invoice( InvoiceHeader header, LocalInvoiceParty issuer, ISequentialEnumerableStartingWithOne <Revenue> revenueItems, INonEmptyEnumerable <Payment> payments, InvoiceParty counterpart = null, long?correlatedInvoice = null) { Header = header ?? throw new ArgumentNullException(nameof(header)); Issuer = issuer ?? throw new ArgumentNullException(nameof(issuer)); RevenueItems = revenueItems ?? throw new ArgumentNullException(nameof(revenueItems)); Payments = payments ?? throw new ArgumentNullException(nameof(payments)); Counterpart = counterpart; CorrelatedInvoice = correlatedInvoice; if (!RevenueItems.Any()) { throw new ArgumentException($"Minimal count of {nameof(revenueItems)} is 1."); } }