Пример #1
0
        public Invoice(string note, Client client, List <InvoiceItem> items, List <InvoicePayment> payments,
                       DateTime?invoiceDate, DateTime?dueDate, InvoiceType invoiceType, InvoiceStatus status) : base()
        {
            Note        = note;
            Client      = client;
            Items       = items;
            Payments    = payments;
            InvoiceDate = invoiceDate;
            DueDate     = dueDate;
            InvoiceType = invoiceType;
            Status      = status;

            if (InvoiceDate == null || InvoiceDate?.Year == 1)
            {
                InvoiceDate = DateTime.Now;
            }
        }
Пример #2
0
 public Invoice(int id, DateTime creation, string note, Client client, List <InvoiceItem> items, List <InvoicePayment> payments,
                DateTime?invoiceDate, DateTime?dueDate, InvoiceType invoiceType, InvoiceStatus status)
     : this(note, client, items, payments, invoiceDate, dueDate, invoiceType, status)
 {
     Id           = id;
     CreationDate = creation;
 }