private CreditCardExpenseEntry GetEntry(int installment, CreditCardInvoice invoice) { return(new CreditCardExpenseEntry ( $"{ReferenceName} {Date:F} {installment}/{Installments}", Date, GetDateReference(installment), Amount / Installments, Account, Buyer, invoice )); }
public CreditCardInvoice GetInvoice(DateTime referenceDate) { var invoice = _invoices.FirstOrDefault(i => i.Reference == CreditCardInvoice.GetReferenceFromDate(referenceDate)); if (invoice != null) { return(invoice); } invoice = new CreditCardInvoice(this, referenceDate); _invoices.Add(invoice); return(invoice); }
public CreditCardExpenseEntry ( string description, DateTime date, DateTime applicationDate, double amount, Account account, Buyer buyer, CreditCardInvoice creditCardInvoice ) : base(description, date, applicationDate, null, EEntryType.Debit, amount, account, buyer) { CreditCardInvoiceId = creditCardInvoice.Id; CreditCardInvoice = creditCardInvoice; }
public CreditCardInvoiceDetail ( CreditCardInvoice invoice, CreditCardExpenseEntry entry ) : this() { ReferenceName = entry.Description; Amount = Math.Abs(entry.Value); InvoiceId = invoice.Id; Invoice = invoice; EntryId = entry.Id; Entry = entry; }